blob: b24c829c8a1cc1457299a913b4a91bd359e32851 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002# From configure.in Revision: 63545 .
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
706OTHER_LIBTOOL_OPT
707LIBTOOL_CRUFT
708SO
709LDSHARED
710BLDSHARED
711CCSHARED
712LINKFORSHARED
713CFLAGSFORSHARED
714SHLIBS
715USE_SIGNAL_MODULE
716SIGNAL_OBJS
717USE_THREAD_MODULE
718LDLAST
719THREADOBJ
720DLINCLDIR
721DYNLOADFILE
722MACHDEP_OBJS
723TRUE
724LIBOBJS
725HAVE_GETHOSTBYNAME_R_6_ARG
726HAVE_GETHOSTBYNAME_R_5_ARG
727HAVE_GETHOSTBYNAME_R_3_ARG
728HAVE_GETHOSTBYNAME_R
729HAVE_GETHOSTBYNAME
730LIBM
731LIBC
732UNICODE_OBJS
733THREADHEADERS
734SRCDIRS
735LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000736ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000737 ac_precious_vars='build_alias
738host_alias
739target_alias
740CC
741CFLAGS
742LDFLAGS
743LIBS
744CPPFLAGS
745CPP'
746
Guido van Rossum627b2d71993-12-24 10:39:16 +0000747
Guido van Rossum7f43da71994-08-01 12:15:30 +0000748# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000749ac_init_help=
750ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# The variables have the same names as the options, with
752# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000754exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756no_recursion=
757prefix=NONE
758program_prefix=NONE
759program_suffix=NONE
760program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000761silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765x_includes=NONE
766x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000767
768# Installation directory options.
769# These are left unexpanded so users can "make install exec_prefix=/foo"
770# and all the variables that are supposed to be based on exec_prefix
771# by default will actually change.
772# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000773# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000774bindir='${exec_prefix}/bin'
775sbindir='${exec_prefix}/sbin'
776libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777datarootdir='${prefix}/share'
778datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779sysconfdir='${prefix}/etc'
780sharedstatedir='${prefix}/com'
781localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782includedir='${prefix}/include'
783oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000784docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
785infodir='${datarootdir}/info'
786htmldir='${docdir}'
787dvidir='${docdir}'
788pdfdir='${docdir}'
789psdir='${docdir}'
790libdir='${exec_prefix}/lib'
791localedir='${datarootdir}/locale'
792mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000795ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000797do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798 # If the previous option needs an argument, assign it.
799 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 ac_prev=
802 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 case $ac_option in
806 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
807 *) ac_optarg=yes ;;
808 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810 # Accept the important Cygnus configure options, so we can diagnose typos.
811
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812 case $ac_dashdash$ac_option in
813 --)
814 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816 -bindir | --bindir | --bindi | --bind | --bin | --bi)
817 ac_prev=bindir ;;
818 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000819 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820
821 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826 -cache-file | --cache-file | --cache-fil | --cache-fi \
827 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
828 ac_prev=cache_file ;;
829 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
830 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 cache_file=$ac_optarg ;;
832
833 --config-cache | -C)
834 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
842 | --dataroo | --dataro | --datar)
843 ac_prev=datarootdir ;;
844 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
845 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
846 datarootdir=$ac_optarg ;;
847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000851 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
853 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000854 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
855 eval enable_$ac_feature=no ;;
856
857 -docdir | --docdir | --docdi | --doc | --do)
858 ac_prev=docdir ;;
859 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
860 docdir=$ac_optarg ;;
861
862 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
863 ac_prev=dvidir ;;
864 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
865 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
867 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
872 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
874 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
877 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
878 | --exec | --exe | --ex)
879 ac_prev=exec_prefix ;;
880 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
881 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
882 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
885 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 # Obsolete; use --with-gas.
887 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 -help | --help | --hel | --he | -h)
890 ac_init_help=long ;;
891 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
892 ac_init_help=recursive ;;
893 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
894 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
902 ac_prev=htmldir ;;
903 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
904 | --ht=*)
905 htmldir=$ac_optarg ;;
906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -includedir | --includedir | --includedi | --included | --include \
908 | --includ | --inclu | --incl | --inc)
909 ac_prev=includedir ;;
910 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
911 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
914 -infodir | --infodir | --infodi | --infod | --info | --inf)
915 ac_prev=infodir ;;
916 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -libdir | --libdir | --libdi | --libd)
920 ac_prev=libdir ;;
921 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
925 | --libexe | --libex | --libe)
926 ac_prev=libexecdir ;;
927 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
928 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Martin v. Löwiseba40652007-08-30 20:10:57 +0000931 -localedir | --localedir | --localedi | --localed | --locale)
932 ac_prev=localedir ;;
933 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
934 localedir=$ac_optarg ;;
935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 ac_prev=localstatedir ;;
939 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
943 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
944 ac_prev=mandir ;;
945 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Obsolete; use --without-fp.
950 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 no_create=yes ;;
955
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
957 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
958 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
961 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
962 | --oldin | --oldi | --old | --ol | --o)
963 ac_prev=oldincludedir ;;
964 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
965 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
966 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
970 ac_prev=prefix ;;
971 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -program-prefix | --program-prefix | --program-prefi | --program-pref \
975 | --program-pre | --program-pr | --program-p)
976 ac_prev=program_prefix ;;
977 -program-prefix=* | --program-prefix=* | --program-prefi=* \
978 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -program-suffix | --program-suffix | --program-suffi | --program-suff \
982 | --program-suf | --program-su | --program-s)
983 ac_prev=program_suffix ;;
984 -program-suffix=* | --program-suffix=* | --program-suffi=* \
985 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -program-transform-name | --program-transform-name \
989 | --program-transform-nam | --program-transform-na \
990 | --program-transform-n | --program-transform- \
991 | --program-transform | --program-transfor \
992 | --program-transfo | --program-transf \
993 | --program-trans | --program-tran \
994 | --progr-tra | --program-tr | --program-t)
995 ac_prev=program_transform_name ;;
996 -program-transform-name=* | --program-transform-name=* \
997 | --program-transform-nam=* | --program-transform-na=* \
998 | --program-transform-n=* | --program-transform-=* \
999 | --program-transform=* | --program-transfor=* \
1000 | --program-transfo=* | --program-transf=* \
1001 | --program-trans=* | --program-tran=* \
1002 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwiseba40652007-08-30 20:10:57 +00001005 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1006 ac_prev=pdfdir ;;
1007 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1008 pdfdir=$ac_optarg ;;
1009
1010 -psdir | --psdir | --psdi | --psd | --ps)
1011 ac_prev=psdir ;;
1012 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1013 psdir=$ac_optarg ;;
1014
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1016 | -silent | --silent | --silen | --sile | --sil)
1017 silent=yes ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1020 ac_prev=sbindir ;;
1021 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1022 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1026 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1027 | --sharedst | --shareds | --shared | --share | --shar \
1028 | --sha | --sh)
1029 ac_prev=sharedstatedir ;;
1030 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1031 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1032 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1033 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 -site | --site | --sit)
1037 ac_prev=site ;;
1038 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1042 ac_prev=srcdir ;;
1043 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1047 | --syscon | --sysco | --sysc | --sys | --sy)
1048 ac_prev=sysconfdir ;;
1049 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1050 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
1058 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1059 verbose=yes ;;
1060
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 -version | --version | --versio | --versi | --vers | -V)
1062 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001067 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 { echo "$as_me: error: invalid package name: $ac_package" >&2
1069 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001070 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1071 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001076 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { echo "$as_me: error: invalid package name: $ac_package" >&2
1078 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1080 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 --x)
1083 # Obsolete; use --with-x.
1084 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1087 | --x-incl | --x-inc | --x-in | --x-i)
1088 ac_prev=x_includes ;;
1089 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1090 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1094 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1095 ac_prev=x_libraries ;;
1096 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1097 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -*) { echo "$as_me: error: unrecognized option: $ac_option
1101Try \`$0 --help' for more information." >&2
1102 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 *=*)
1106 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1107 # Reject names that are not valid shell variable names.
1108 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1109 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1110 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001111 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 export $ac_envvar ;;
1113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 # FIXME: should be removed in autoconf 3.0.
1116 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1117 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1118 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1119 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 ;;
1121
1122 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123done
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1127 { echo "$as_me: error: missing argument to $ac_option" >&2
1128 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129fi
1130
Martin v. Löwiseba40652007-08-30 20:10:57 +00001131# Be sure to have absolute directory names.
1132for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1133 datadir sysconfdir sharedstatedir localstatedir includedir \
1134 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1135 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 [\\/$]* | ?:[\\/]* ) continue;;
1140 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1143 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001144done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001145
Martin v. Löwis11437992002-04-12 09:54:03 +00001146# There might be people who depend on the old broken behavior: `$host'
1147# used to hold the argument of --host etc.
1148# FIXME: To remove some day.
1149build=$build_alias
1150host=$host_alias
1151target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153# FIXME: To remove some day.
1154if test "x$host_alias" != x; then
1155 if test "x$build_alias" = x; then
1156 cross_compiling=maybe
1157 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1158 If a cross compiler is detected then cross compile mode will be used." >&2
1159 elif test "x$build_alias" != "x$host_alias"; then
1160 cross_compiling=yes
1161 fi
1162fi
1163
1164ac_tool_prefix=
1165test -n "$host_alias" && ac_tool_prefix=$host_alias-
1166
1167test "$silent" = yes && exec 6>/dev/null
1168
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
Martin v. Löwiseba40652007-08-30 20:10:57 +00001170ac_pwd=`pwd` && test -n "$ac_pwd" &&
1171ac_ls_di=`ls -di .` &&
1172ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1173 { echo "$as_me: error: Working directory cannot be determined" >&2
1174 { (exit 1); exit 1; }; }
1175test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1176 { echo "$as_me: error: pwd does not report name of working directory" >&2
1177 { (exit 1); exit 1; }; }
1178
1179
Guido van Rossum627b2d71993-12-24 10:39:16 +00001180# Find the source files, if location was not specified.
1181if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001183 # Try the directory containing this script, then the parent directory.
1184 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001185$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001186 X"$0" : 'X\(//\)[^/]' \| \
1187 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001189echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1191 s//\1/
1192 q
1193 }
1194 /^X\(\/\/\)[^/].*/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\).*/{
1203 s//\1/
1204 q
1205 }
1206 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001208 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209 srcdir=..
1210 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211else
1212 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001214if test ! -r "$srcdir/$ac_unique_file"; then
1215 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1216 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1220ac_abs_confdir=`(
1221 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001222 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223 pwd)`
1224# When building in place, set srcdir=.
1225if test "$ac_abs_confdir" = "$ac_pwd"; then
1226 srcdir=.
1227fi
1228# Remove unnecessary trailing slashes from srcdir.
1229# Double slashes in file names in object file debugging info
1230# mess up M-x gdb in Emacs.
1231case $srcdir in
1232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1233esac
1234for ac_var in $ac_precious_vars; do
1235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1236 eval ac_env_${ac_var}_value=\$${ac_var}
1237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1239done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241#
1242# Report the --help message.
1243#
1244if test "$ac_init_help" = "long"; then
1245 # Omit some internal or obsolete options to make the list less imposing.
1246 # This message is too long to be a string in the A/UX 3.1 sh.
1247 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001248\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001249
1250Usage: $0 [OPTION]... [VAR=VALUE]...
1251
1252To assign environment variables (e.g., CC, CFLAGS...), specify them as
1253VAR=VALUE. See below for descriptions of some of the useful variables.
1254
1255Defaults for the options are specified in brackets.
1256
1257Configuration:
1258 -h, --help display this help and exit
1259 --help=short display options specific to this package
1260 --help=recursive display the short help of all the included packages
1261 -V, --version display version information and exit
1262 -q, --quiet, --silent do not print \`checking...' messages
1263 --cache-file=FILE cache test results in FILE [disabled]
1264 -C, --config-cache alias for \`--cache-file=config.cache'
1265 -n, --no-create do not create output files
1266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1267
Martin v. Löwis11437992002-04-12 09:54:03 +00001268Installation directories:
1269 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001270 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
1274By default, \`make install' will install all the files in
1275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1277for instance \`--prefix=\$HOME'.
1278
1279For better control, use the options below.
1280
1281Fine tuning of the installation directories:
1282 --bindir=DIR user executables [EPREFIX/bin]
1283 --sbindir=DIR system admin executables [EPREFIX/sbin]
1284 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1288 --libdir=DIR object code libraries [EPREFIX/lib]
1289 --includedir=DIR C header files [PREFIX/include]
1290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1293 --infodir=DIR info documentation [DATAROOTDIR/info]
1294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1295 --mandir=DIR man documentation [DATAROOTDIR/man]
1296 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1297 --htmldir=DIR html documentation [DOCDIR]
1298 --dvidir=DIR dvi documentation [DOCDIR]
1299 --pdfdir=DIR pdf documentation [DOCDIR]
1300 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001301_ACEOF
1302
1303 cat <<\_ACEOF
1304_ACEOF
1305fi
1306
1307if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001308 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001309 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 cat <<\_ACEOF
1312
1313Optional Features:
1314 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1315 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001316 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001317 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318 --enable-framework[=INSTALLDIR]
1319 Build (MacOSX|Darwin) framework
1320 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001321 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
1325 --enable-unicode[=ucs[24]]
1326 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001331 --with-framework-name=FRAMEWORK
1332 specify an alternate name of the framework built
1333 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001335 --with-cxx-main=<compiler>
1336 compile main() and link python executable with C++
1337 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-suffix=.exe set executable suffix
1339 --with-pydebug build with Py_DEBUG defined
1340 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001341 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-signal-module disable/enable signal module
1343 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1344 --with(out)-threads[=DIRECTORY]
1345 disable/enable thread support
1346 --with(out)-thread[=DIRECTORY]
1347 deprecated; use --with(out)-threads
1348 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001350 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with(out)-pymalloc disable/enable specialized mallocs
1352 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with-fpectl enable SIGFPE catching
1354 --with-libm=STRING math library
1355 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001356
1357Some influential environment variables:
1358 CC C compiler command
1359 CFLAGS C compiler flags
1360 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1361 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001362 LIBS libraries to pass to the linker, e.g. -l<library>
1363 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1364 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001365 CPP C preprocessor
1366
1367Use these variables to override the choices made by `configure' or to help
1368it to find libraries and programs with nonstandard names/locations.
1369
Martin v. Löwis1d459062005-03-14 21:23:33 +00001370Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001371_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001372ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001373fi
1374
1375if test "$ac_init_help" = "recursive"; then
1376 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001378 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 ac_builddir=.
1380
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381case "$ac_dir" in
1382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 # A ".." for each directory in $ac_dir_suffix.
1386 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1387 case $ac_top_builddir_sub in
1388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1390 esac ;;
1391esac
1392ac_abs_top_builddir=$ac_pwd
1393ac_abs_builddir=$ac_pwd$ac_dir_suffix
1394# for backward compatibility:
1395ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$ac_top_builddir_sub
1401 ac_abs_top_srcdir=$ac_pwd ;;
1402 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 ac_top_srcdir=$srcdir
1405 ac_abs_top_srcdir=$srcdir ;;
1406 *) # Relative name.
1407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1408 ac_top_srcdir=$ac_top_build_prefix$srcdir
1409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001410esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001412
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 cd "$ac_dir" || { ac_status=$?; continue; }
1414 # Check for guested configure.
1415 if test -f "$ac_srcdir/configure.gnu"; then
1416 echo &&
1417 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1418 elif test -f "$ac_srcdir/configure"; then
1419 echo &&
1420 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 else
1422 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423 fi || ac_status=$?
1424 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 done
1426fi
1427
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001429if $ac_init_version; then
1430 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001431python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
Martin v. Löwiseba40652007-08-30 20:10:57 +00001434Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14352002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001436This configure script is free software; the Free Software Foundation
1437gives unlimited permission to copy, distribute and modify it.
1438_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001442This file contains any messages produced by compilers while
1443running configure, to aid debugging if configure makes a mistake.
1444
Neal Norwitz9be57322006-08-18 05:39:20 +00001445It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448 $ $0 $@
1449
1450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001452{
1453cat <<_ASUNAME
1454## --------- ##
1455## Platform. ##
1456## --------- ##
1457
1458hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1459uname -m = `(uname -m) 2>/dev/null || echo unknown`
1460uname -r = `(uname -r) 2>/dev/null || echo unknown`
1461uname -s = `(uname -s) 2>/dev/null || echo unknown`
1462uname -v = `(uname -v) 2>/dev/null || echo unknown`
1463
1464/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1465/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1466
1467/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1468/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1469/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001471/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1472/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1473/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1474
1475_ASUNAME
1476
1477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1478for as_dir in $PATH
1479do
1480 IFS=$as_save_IFS
1481 test -z "$as_dir" && as_dir=.
1482 echo "PATH: $as_dir"
1483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486} >&5
1487
1488cat >&5 <<_ACEOF
1489
1490
1491## ----------- ##
1492## Core tests. ##
1493## ----------- ##
1494
1495_ACEOF
1496
1497
1498# Keep a trace of the command line.
1499# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001500# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001502# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001503ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001504ac_configure_args0=
1505ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001506ac_must_keep_next=false
1507for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001508do
Skip Montanaro6dead952003-09-25 14:50:04 +00001509 for ac_arg
1510 do
1511 case $ac_arg in
1512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514 | -silent | --silent | --silen | --sile | --sil)
1515 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001517 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1518 esac
1519 case $ac_pass in
1520 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1521 2)
1522 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1523 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001525 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001526 case $ac_arg in
1527 *=* | --config-cache | -C | -disable-* | --disable-* \
1528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1530 | -with-* | --with-* | -without-* | --without-* | --x)
1531 case "$ac_configure_args0 " in
1532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1533 esac
1534 ;;
1535 -* ) ac_must_keep_next=true ;;
1536 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001539 ;;
1540 esac
1541 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001542done
Skip Montanaro6dead952003-09-25 14:50:04 +00001543$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1544$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 +00001545
1546# When interrupted or exit'd, cleanup temporary files, and complete
1547# config.log. We remove comments because anyway the quotes in there
1548# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549# WARNING: Use '\'' to represent an apostrophe within the trap.
1550# 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 +00001551trap 'exit_status=$?
1552 # Save into config.log some information that might help in debugging.
1553 {
1554 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001555
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 cat <<\_ASBOX
1557## ---------------- ##
1558## Cache variables. ##
1559## ---------------- ##
1560_ASBOX
1561 echo
1562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563(
1564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1565 eval ac_val=\$$ac_var
1566 case $ac_val in #(
1567 *${as_nl}*)
1568 case $ac_var in #(
1569 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1570echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1571 esac
1572 case $ac_var in #(
1573 _ | IFS | as_nl) ;; #(
1574 *) $as_unset $ac_var ;;
1575 esac ;;
1576 esac
1577 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1580 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 "s/'\''/'\''\\\\'\'''\''/g;
1583 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1584 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001585 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001587 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 esac |
1589 sort
1590)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001592
1593 cat <<\_ASBOX
1594## ----------------- ##
1595## Output variables. ##
1596## ----------------- ##
1597_ASBOX
1598 echo
1599 for ac_var in $ac_subst_vars
1600 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 eval ac_val=\$$ac_var
1602 case $ac_val in
1603 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1604 esac
1605 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001606 done | sort
1607 echo
1608
1609 if test -n "$ac_subst_files"; then
1610 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001611## ------------------- ##
1612## File substitutions. ##
1613## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001614_ASBOX
1615 echo
1616 for ac_var in $ac_subst_files
1617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 eval ac_val=\$$ac_var
1619 case $ac_val in
1620 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1621 esac
1622 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001623 done | sort
1624 echo
1625 fi
1626
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 if test -s confdefs.h; then
1628 cat <<\_ASBOX
1629## ----------- ##
1630## confdefs.h. ##
1631## ----------- ##
1632_ASBOX
1633 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 echo
1636 fi
1637 test "$ac_signal" != 0 &&
1638 echo "$as_me: caught signal $ac_signal"
1639 echo "$as_me: exit $exit_status"
1640 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 rm -f core *.core core.conftest.* &&
1642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001645for ac_signal in 1 2 13 15; do
1646 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1647done
1648ac_signal=0
1649
1650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
1653# Predefined preprocessor variables.
1654
1655cat >>confdefs.h <<_ACEOF
1656#define PACKAGE_NAME "$PACKAGE_NAME"
1657_ACEOF
1658
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_VERSION "$PACKAGE_VERSION"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_STRING "$PACKAGE_STRING"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1677_ACEOF
1678
1679
1680# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001682if test -n "$CONFIG_SITE"; then
1683 set x "$CONFIG_SITE"
1684elif test "x$prefix" != xNONE; then
1685 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1686else
1687 set x "$ac_default_prefix/share/config.site" \
1688 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001690shift
1691for ac_site_file
1692do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001694 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1695echo "$as_me: loading site script $ac_site_file" >&6;}
1696 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 . "$ac_site_file"
1698 fi
1699done
1700
1701if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 # Some versions of bash will fail to source /dev/null (special
1703 # files actually), so we avoid doing that.
1704 if test -f "$cache_file"; then
1705 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1706echo "$as_me: loading cache $cache_file" >&6;}
1707 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 esac
1711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712else
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1714echo "$as_me: creating cache $cache_file" >&6;}
1715 >$cache_file
1716fi
1717
1718# Check that the precious variables saved in the cache have kept the same
1719# value.
1720ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1723 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 case $ac_old_set,$ac_new_set in
1727 set,)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,set)
1732 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1733echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1734 ac_cache_corrupted=: ;;
1735 ,);;
1736 *)
1737 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001741echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001742 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001743echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001744 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 fi;;
1746 esac
1747 # Pass precious variables to config.status.
1748 if test "$ac_new_set" = set; then
1749 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001750 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 *) ac_arg=$ac_var=$ac_new_val ;;
1752 esac
1753 case " $ac_configure_args " in
1754 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1755 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1756 esac
1757 fi
1758done
1759if $ac_cache_corrupted; then
1760 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1761echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1762 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1763echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1764 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765fi
1766
Martin v. Löwiseba40652007-08-30 20:10:57 +00001767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
Guido van Rossum7f43da71994-08-01 12:15:30 +00001791ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797
Michael W. Hudson54241132001-12-07 15:38:26 +00001798
Martin v. Löwiseba40652007-08-30 20:10:57 +00001799ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001800
1801
Martin v. Löwis11437992002-04-12 09:54:03 +00001802
1803
1804
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001805
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001806
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001807# We don't use PACKAGE_ variables, and they cause conflicts
1808# with other autoconf-based packages that include Python.h
1809grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1810rm confdefs.h
1811mv confdefs.h.new confdefs.h
1812
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001813
Neal Norwitz9be57322006-08-18 05:39:20 +00001814VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001815
Martin v. Löwis1142de32002-03-29 16:28:31 +00001816
1817SOVERSION=1.0
1818
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001819# The later defininition of _XOPEN_SOURCE disables certain features
1820# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1821
1822cat >>confdefs.h <<\_ACEOF
1823#define _GNU_SOURCE 1
1824_ACEOF
1825
1826
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001827# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1828# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1829# them.
1830
1831cat >>confdefs.h <<\_ACEOF
1832#define _NETBSD_SOURCE 1
1833_ACEOF
1834
1835
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001836# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1837# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1838# them.
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define __BSD_VISIBLE 1
1842_ACEOF
1843
1844
Martin v. Löwisd6320502004-08-12 13:45:08 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _BSD_TYPES 1
1850_ACEOF
1851
1852
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001853define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001854
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001855# Arguments passed to configure.
1856
1857CONFIG_ARGS="$ac_configure_args"
1858
Martin v. Löwiseba40652007-08-30 20:10:57 +00001859# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001860if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001861 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001862 case $enableval in
1863 yes)
1864 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1865 ;;
1866 esac
1867 case $enableval in
1868 no)
1869 UNIVERSALSDK=
1870 enable_universalsdk=
1871 ;;
1872 *)
1873 UNIVERSALSDK=$enableval
1874 ;;
1875 esac
1876
1877else
1878
1879 UNIVERSALSDK=
1880 enable_universalsdk=
1881
Martin v. Löwiseba40652007-08-30 20:10:57 +00001882fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001883
1884
Martin v. Löwiseba40652007-08-30 20:10:57 +00001885
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001886
1887# Check whether --with-framework-name was given.
1888if test "${with_framework_name+set}" = set; then
1889 withval=$with_framework_name;
1890 PYTHONFRAMEWORK=${withval}
1891 PYTHONFRAMEWORKDIR=${withval}.framework
1892 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1893
1894else
1895
1896 PYTHONFRAMEWORK=Python
1897 PYTHONFRAMEWORKDIR=Python.framework
1898 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1899
1900fi
1901
Martin v. Löwiseba40652007-08-30 20:10:57 +00001902# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001903if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001904 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001905 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001907 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001908 esac
1909 case $enableval in
1910 no)
1911 PYTHONFRAMEWORK=
1912 PYTHONFRAMEWORKDIR=no-framework
1913 PYTHONFRAMEWORKPREFIX=
1914 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001915 FRAMEWORKINSTALLFIRST=
1916 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001917 FRAMEWORKALTINSTALLFIRST=
1918 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001919 if test "x${prefix}" = "xNONE"; then
1920 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1921 else
1922 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1923 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001924 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001925 ;;
1926 *)
1927 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001928 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001929 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1930 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001931 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1932 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001933 if test "x${prefix}" = "xNONE" ; then
1934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1935 else
1936 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1937 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001938 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001939
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001940 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001941 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001942 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001943
Martin v. Löwiseba40652007-08-30 20:10:57 +00001944 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001945
Martin v. Löwiseba40652007-08-30 20:10:57 +00001946 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001947
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001948 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1949
1950 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1951
Jack Jansene578a632001-08-15 01:27:14 +00001952 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001953
Guido van Rossum563e7081996-09-10 18:20:48 +00001954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955
Jack Jansene578a632001-08-15 01:27:14 +00001956 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001957 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001958 PYTHONFRAMEWORKPREFIX=
1959 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001960 FRAMEWORKINSTALLFIRST=
1961 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001962 FRAMEWORKALTINSTALLFIRST=
1963 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001964 if test "x${prefix}" = "xNONE" ; then
1965 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1966 else
1967 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1968 fi
Jack Jansene578a632001-08-15 01:27:14 +00001969 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001970
Martin v. Löwiseba40652007-08-30 20:10:57 +00001971fi
1972
Michael W. Hudson54241132001-12-07 15:38:26 +00001973
1974
1975
1976
Jack Jansene578a632001-08-15 01:27:14 +00001977
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001978
1979
Ronald Oussoren5b787322006-06-06 19:50:24 +00001980
1981
1982
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001983
Jack Jansene578a632001-08-15 01:27:14 +00001984##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001985## AC_HELP_STRING(--with-dyld,
1986## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001987##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001988# Set name for machine-dependent library files
1989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1991echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001992if test -z "$MACHDEP"
1993then
Guido van Rossum563e7081996-09-10 18:20:48 +00001994 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001995 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1996 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001997 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001998 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001999 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002000 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002001 ac_md_system=`echo $ac_sys_system |
2002 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2003 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002004 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002005 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002006
Guido van Rossum07397971997-04-29 21:49:50 +00002007 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002008 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002009 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002010 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002011 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002012 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002013 esac
2014fi
Guido van Rossum91922671997-10-09 20:24:13 +00002015
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002016# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2017# disable features if it is defined, without any means to access these
2018# features as extensions. For these systems, we skip the definition of
2019# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2020# some feature, make sure there is no alternative way to access this
2021# feature. Also, when using wildcards, make sure you have verified the
2022# need for not defining _XOPEN_SOURCE on all systems matching the
2023# wildcard, and that the wildcard does not include future systems
2024# (which may remove their limitations).
2025case $ac_sys_system/$ac_sys_release in
2026 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2027 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002028 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002029 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002030 define_xopen_source=no
2031 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2032 # also defined. This can be overridden by defining _BSD_SOURCE
2033 # As this has a different meaning on Linux, only define it on OpenBSD
2034
2035cat >>confdefs.h <<\_ACEOF
2036#define _BSD_SOURCE 1
2037_ACEOF
2038
2039 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002040 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2041 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2042 # Marc Recht
2043 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2044 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002045 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2046 # of union __?sigval. Reported by Stuart Bishop.
2047 SunOS/5.6)
2048 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002049 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2050 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002051 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002052 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002053 define_xopen_source=no;;
2054 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002055 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002056 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002057 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002058 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2059 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2060 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2061 # This should hopefully be fixed in FreeBSD 4.9
2062 FreeBSD/4.8* | Darwin/6* )
2063 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002064 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2065 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2066 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002067 AIX/4)
2068 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002069 AIX/5)
2070 if test `uname -r` -eq 1; then
2071 define_xopen_source=no
2072 fi
2073 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002074 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2075 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002076 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002077 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002078 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002079 define_xopen_source=no
2080 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002081 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2082 # defining NI_NUMERICHOST.
2083 QNX/6.3.2)
2084 define_xopen_source=no
2085 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002086
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002087esac
2088
2089if test $define_xopen_source = yes
2090then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002091 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2092 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002093 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2094 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002095 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002096 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002097
2098cat >>confdefs.h <<\_ACEOF
2099#define _XOPEN_SOURCE 500
2100_ACEOF
2101
2102 ;;
2103 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002104
2105cat >>confdefs.h <<\_ACEOF
2106#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002107_ACEOF
2108
Skip Montanarof0d5f792004-08-15 14:08:23 +00002109 ;;
2110 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002111
2112 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2113 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2114 # several APIs are not declared. Since this is also needed in some
2115 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002116 # except for Solaris 10, where it must not be defined,
2117 # as it implies XPG4.2
2118 case $ac_sys_system/$ac_sys_release in
2119 SunOS/5.10)
2120 ;;
2121 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002122
2123cat >>confdefs.h <<\_ACEOF
2124#define _XOPEN_SOURCE_EXTENDED 1
2125_ACEOF
2126
Martin v. Löwis7dece662005-11-26 11:38:24 +00002127 ;;
2128 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002129
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002130
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002131cat >>confdefs.h <<\_ACEOF
2132#define _POSIX_C_SOURCE 200112L
2133_ACEOF
2134
2135
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002136fi
2137
Guido van Rossum91922671997-10-09 20:24:13 +00002138#
2139# SGI compilers allow the specification of the both the ABI and the
2140# ISA on the command line. Depending on the values of these switches,
2141# different and often incompatable code will be generated.
2142#
2143# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2144# thus supply support for various ABI/ISA combinations. The MACHDEP
2145# variable is also adjusted.
2146#
2147
2148if test ! -z "$SGI_ABI"
2149then
2150 CC="cc $SGI_ABI"
2151 LDFLAGS="$SGI_ABI $LDFLAGS"
2152 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002154{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2155echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002156
Jack Jansen83f898c2002-12-30 22:23:40 +00002157# And add extra plat-mac for darwin
2158
Jack Jansen7b59b422003-03-17 15:44:10 +00002159
Martin v. Löwiseba40652007-08-30 20:10:57 +00002160{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2161echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002162if test -z "$EXTRAPLATDIR"
2163then
2164 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002165 darwin)
2166 EXTRAPLATDIR="\$(PLATMACDIRS)"
2167 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2168 ;;
2169 *)
2170 EXTRAPLATDIR=""
2171 EXTRAMACHDEPPATH=""
2172 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002173 esac
2174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002175{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2176echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002177
Jack Jansen6b08a402004-06-03 12:41:45 +00002178# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2179# it may influence the way we can build extensions, so distutils
2180# needs to check it
2181
Ronald Oussoren988117f2006-04-29 11:31:35 +00002182
Jack Jansen6b08a402004-06-03 12:41:45 +00002183CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002184EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002185
Mark Dickinson65134662008-04-25 16:11:04 +00002186{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2187echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2188ac_sys_machine=`uname -m`
2189{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2190echo "${ECHO_T}$ac_sys_machine" >&6; }
2191
Mark Dickinson8f66a4a2008-05-23 04:22:50 +00002192# temporary check to find out which exact processor
2193# is in the Debian/alpha buildbot.
2194case $ac_sys_system in
2195 Linux*)
2196 case $ac_sys_machine in alpha*)
2197 cat /proc/cpuinfo
2198 ;;
2199 esac
2200 ;;
2201esac
2202
Guido van Rossum627b2d71993-12-24 10:39:16 +00002203# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002204
2205# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2206# for debug/optimization stuff. BASECFLAGS is for flags that are required
2207# just to get things to compile and link. Users are free to override OPT
2208# when running configure or make. The build should not break if they do.
2209# BASECFLAGS should generally not be messed with, however.
2210
2211# XXX shouldn't some/most/all of this code be merged with the stuff later
2212# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002213{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2214echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002215
Martin v. Löwiseba40652007-08-30 20:10:57 +00002216# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002217if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002218 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002219 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002220 no) CC=cc
2221 without_gcc=yes;;
2222 yes) CC=gcc
2223 without_gcc=no;;
2224 *) CC=$withval
2225 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002226 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002227else
Martin v. Löwis11437992002-04-12 09:54:03 +00002228
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002229 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002230 AIX*) CC=cc_r
2231 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002232 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002233 case $BE_HOST_CPU in
2234 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002235 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002236 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002237 BASECFLAGS="$BASECFLAGS -export pragma"
2238 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002239 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002240 ;;
2241 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002242 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002243 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002244 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002245 ;;
2246 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002247 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2248echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2249 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002250 ;;
2251 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002252 AR="\$(srcdir)/Modules/ar_beos"
2253 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002254 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002255 Monterey*)
2256 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002257 without_gcc=;;
2258 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002259 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002260fi
2261
2262{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2263echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002264
Guido van Rossum8b131c51995-03-09 14:10:13 +00002265# If the user switches compilers, we can't believe the cache
2266if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2267then
Martin v. Löwis11437992002-04-12 09:54:03 +00002268 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2269(it is also a good idea to do 'make clean' before compiling)" >&5
2270echo "$as_me: error: cached CC is different -- throw away $cache_file
2271(it is also a good idea to do 'make clean' before compiling)" >&2;}
2272 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002273fi
2274
Martin v. Löwis11437992002-04-12 09:54:03 +00002275ac_ext=c
2276ac_cpp='$CPP $CPPFLAGS'
2277ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2278ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2279ac_compiler_gnu=$ac_cv_c_compiler_gnu
2280if test -n "$ac_tool_prefix"; then
2281 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2282set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002283{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2284echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002285if test "${ac_cv_prog_CC+set}" = set; then
2286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002287else
2288 if test -n "$CC"; then
2289 ac_cv_prog_CC="$CC" # Let the user override the test.
2290else
Martin v. Löwis11437992002-04-12 09:54:03 +00002291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2292for as_dir in $PATH
2293do
2294 IFS=$as_save_IFS
2295 test -z "$as_dir" && as_dir=.
2296 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002297 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 +00002298 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2299 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2300 break 2
2301 fi
2302done
2303done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002304IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002305
Jack Jansendd19cf82001-12-06 22:36:17 +00002306fi
2307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002308CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002309if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002310 { echo "$as_me:$LINENO: result: $CC" >&5
2311echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002312else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002313 { echo "$as_me:$LINENO: result: no" >&5
2314echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002315fi
2316
Martin v. Löwiseba40652007-08-30 20:10:57 +00002317
Martin v. Löwis11437992002-04-12 09:54:03 +00002318fi
2319if test -z "$ac_cv_prog_CC"; then
2320 ac_ct_CC=$CC
2321 # Extract the first word of "gcc", so it can be a program name with args.
2322set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002325if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2326 echo $ECHO_N "(cached) $ECHO_C" >&6
2327else
2328 if test -n "$ac_ct_CC"; then
2329 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2330else
2331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2332for as_dir in $PATH
2333do
2334 IFS=$as_save_IFS
2335 test -z "$as_dir" && as_dir=.
2336 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002337 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 +00002338 ac_cv_prog_ac_ct_CC="gcc"
2339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2340 break 2
2341 fi
2342done
2343done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002344IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346fi
2347fi
2348ac_ct_CC=$ac_cv_prog_ac_ct_CC
2349if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002350 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2351echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002352else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002353 { echo "$as_me:$LINENO: result: no" >&5
2354echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355fi
2356
Martin v. Löwiseba40652007-08-30 20:10:57 +00002357 if test "x$ac_ct_CC" = x; then
2358 CC=""
2359 else
2360 case $cross_compiling:$ac_tool_warned in
2361yes:)
2362{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2363whose name does not start with the host triplet. If you think this
2364configuration is useful to you, please write to autoconf@gnu.org." >&5
2365echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2366whose name does not start with the host triplet. If you think this
2367configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2368ac_tool_warned=yes ;;
2369esac
2370 CC=$ac_ct_CC
2371 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372else
2373 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002374fi
2375
Jack Jansendd19cf82001-12-06 22:36:17 +00002376if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377 if test -n "$ac_tool_prefix"; then
2378 # 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 +00002379set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382if test "${ac_cv_prog_CC+set}" = set; then
2383 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002384else
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
Martin v. Löwis11437992002-04-12 09:54:03 +00002388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
2393 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 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 +00002395 ac_cv_prog_CC="${ac_tool_prefix}cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403fi
2404fi
2405CC=$ac_cv_prog_CC
2406if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407 { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002409else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002410 { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412fi
2413
Martin v. Löwiseba40652007-08-30 20:10:57 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002416fi
2417if test -z "$CC"; then
2418 # Extract the first word of "cc", so it can be a program name with args.
2419set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_CC+set}" = set; then
2423 echo $ECHO_N "(cached) $ECHO_C" >&6
2424else
2425 if test -n "$CC"; then
2426 ac_cv_prog_CC="$CC" # Let the user override the test.
2427else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002428 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435 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 +00002436 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2437 ac_prog_rejected=yes
2438 continue
2439 fi
2440 ac_cv_prog_CC="cc"
2441 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2442 break 2
2443 fi
2444done
2445done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002446IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002447
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002448if test $ac_prog_rejected = yes; then
2449 # We found a bogon in the path, so make sure we never use it.
2450 set dummy $ac_cv_prog_CC
2451 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453 # We chose a different compiler from the bogus one.
2454 # However, it has the same basename, so the bogon will be chosen
2455 # first if we set CC to just the basename; use the full file name.
2456 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458 fi
2459fi
2460fi
2461fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002462CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: $CC" >&5
2465echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002466else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467 { echo "$as_me:$LINENO: result: no" >&5
2468echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469fi
2470
Martin v. Löwiseba40652007-08-30 20:10:57 +00002471
Martin v. Löwis11437992002-04-12 09:54:03 +00002472fi
2473if test -z "$CC"; then
2474 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002475 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 do
2477 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2478set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002479{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2480echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002481if test "${ac_cv_prog_CC+set}" = set; then
2482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002483else
2484 if test -n "$CC"; then
2485 ac_cv_prog_CC="$CC" # Let the user override the test.
2486else
Martin v. Löwis11437992002-04-12 09:54:03 +00002487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
2492 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 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 +00002494 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2495 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2496 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002498done
2499done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502fi
2503fi
2504CC=$ac_cv_prog_CC
2505if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506 { echo "$as_me:$LINENO: result: $CC" >&5
2507echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002508else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509 { echo "$as_me:$LINENO: result: no" >&5
2510echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002511fi
2512
Martin v. Löwiseba40652007-08-30 20:10:57 +00002513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 test -n "$CC" && break
2515 done
2516fi
2517if test -z "$CC"; then
2518 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002520do
2521 # Extract the first word of "$ac_prog", so it can be a program name with args.
2522set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2524echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002525if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2526 echo $ECHO_N "(cached) $ECHO_C" >&6
2527else
2528 if test -n "$ac_ct_CC"; then
2529 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2530else
2531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2532for as_dir in $PATH
2533do
2534 IFS=$as_save_IFS
2535 test -z "$as_dir" && as_dir=.
2536 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 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 +00002538 ac_cv_prog_ac_ct_CC="$ac_prog"
2539 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2540 break 2
2541 fi
2542done
2543done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546fi
2547fi
2548ac_ct_CC=$ac_cv_prog_ac_ct_CC
2549if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2551echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002552else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553 { echo "$as_me:$LINENO: result: no" >&5
2554echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002555fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002556
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 test -n "$ac_ct_CC" && break
2559done
Michael W. Hudson54241132001-12-07 15:38:26 +00002560
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 if test "x$ac_ct_CC" = x; then
2562 CC=""
2563 else
2564 case $cross_compiling:$ac_tool_warned in
2565yes:)
2566{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2567whose name does not start with the host triplet. If you think this
2568configuration is useful to you, please write to autoconf@gnu.org." >&5
2569echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2570whose name does not start with the host triplet. If you think this
2571configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2572ac_tool_warned=yes ;;
2573esac
2574 CC=$ac_ct_CC
2575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002576fi
2577
2578fi
2579
2580
Skip Montanaro6dead952003-09-25 14:50:04 +00002581test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2582See \`config.log' for more details." >&5
2583echo "$as_me: error: no acceptable C compiler found in \$PATH
2584See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 { (exit 1); exit 1; }; }
2586
2587# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002589ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590{ (ac_try="$ac_compiler --version >&5"
2591case "(($ac_try" in
2592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593 *) ac_try_echo=$ac_try;;
2594esac
2595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2596 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 ac_status=$?
2598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2599 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600{ (ac_try="$ac_compiler -v >&5"
2601case "(($ac_try" in
2602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2603 *) ac_try_echo=$ac_try;;
2604esac
2605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2606 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 ac_status=$?
2608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610{ (ac_try="$ac_compiler -V >&5"
2611case "(($ac_try" in
2612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613 *) ac_try_echo=$ac_try;;
2614esac
2615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2616 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 ac_status=$?
2618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2619 (exit $ac_status); }
2620
2621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002622/* confdefs.h. */
2623_ACEOF
2624cat confdefs.h >>conftest.$ac_ext
2625cat >>conftest.$ac_ext <<_ACEOF
2626/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628int
2629main ()
2630{
2631
2632 ;
2633 return 0;
2634}
2635_ACEOF
2636ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002637ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002638# Try to create an executable without -o first, disregard a.out.
2639# It will help us diagnose broken compilers, and finding out an intuition
2640# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2642echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002643ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644#
2645# List of possible output files, starting from the most likely.
2646# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2647# only as a last resort. b.out is created by i960 compilers.
2648ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2649#
2650# The IRIX 6 linker writes into existing files which may not be
2651# executable, retaining their permissions. Remove them first so a
2652# subsequent execution test works.
2653ac_rmfiles=
2654for ac_file in $ac_files
2655do
2656 case $ac_file in
2657 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2658 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2659 esac
2660done
2661rm -f $ac_rmfiles
2662
2663if { (ac_try="$ac_link_default"
2664case "(($ac_try" in
2665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2666 *) ac_try_echo=$ac_try;;
2667esac
2668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2669 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002673 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2674# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2675# in a Makefile. We should not override ac_cv_exeext if it was cached,
2676# so that the user can short-circuit this test for compilers unknown to
2677# Autoconf.
2678for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002679do
2680 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002683 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002684 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002685 # We found the default executable, but exeext='' is most
2686 # certainly right.
2687 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002688 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2690 then :; else
2691 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2692 fi
2693 # We set ac_cv_exeext here because the later test for it is not
2694 # safe: cross compilers may not add the suffix if given an `-o'
2695 # argument, so we may need to know it at that point already.
2696 # Even if this section looks crufty: it has the advantage of
2697 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002698 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002699 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002700 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 esac
2702done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703test "$ac_cv_exeext" = no && ac_cv_exeext=
2704
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002705else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002706 ac_file=''
2707fi
2708
2709{ echo "$as_me:$LINENO: result: $ac_file" >&5
2710echo "${ECHO_T}$ac_file" >&6; }
2711if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002713sed 's/^/| /' conftest.$ac_ext >&5
2714
2715{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2716See \`config.log' for more details." >&5
2717echo "$as_me: error: C compiler cannot create executables
2718See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002720fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002723
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002725# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002726{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2727echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002728# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2729# If not cross compiling, check that we can run a simple program.
2730if test "$cross_compiling" != yes; then
2731 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002732 { (case "(($ac_try" in
2733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2734 *) ac_try_echo=$ac_try;;
2735esac
2736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2737 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 ac_status=$?
2739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2740 (exit $ac_status); }; }; then
2741 cross_compiling=no
2742 else
2743 if test "$cross_compiling" = maybe; then
2744 cross_compiling=yes
2745 else
2746 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002747If you meant to cross compile, use \`--host'.
2748See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002749echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002750If you meant to cross compile, use \`--host'.
2751See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 { (exit 1); exit 1; }; }
2753 fi
2754 fi
2755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756{ echo "$as_me:$LINENO: result: yes" >&5
2757echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
Skip Montanaro6dead952003-09-25 14:50:04 +00002759rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002760ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002762# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2764echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2765{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2766echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002767
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2769echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2770if { (ac_try="$ac_link"
2771case "(($ac_try" in
2772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773 *) ac_try_echo=$ac_try;;
2774esac
2775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2776 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 ac_status=$?
2778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2779 (exit $ac_status); }; then
2780 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2781# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2782# work properly (i.e., refer to `conftest.exe'), while it won't with
2783# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002784for ac_file in conftest.exe conftest conftest.*; do
2785 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002789 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 * ) break;;
2791 esac
2792done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793else
Skip Montanaro6dead952003-09-25 14:50:04 +00002794 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2795See \`config.log' for more details." >&5
2796echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002799fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002800
Martin v. Löwis11437992002-04-12 09:54:03 +00002801rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2803echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002804
2805rm -f conftest.$ac_ext
2806EXEEXT=$ac_cv_exeext
2807ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002808{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2809echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002810if test "${ac_cv_objext+set}" = set; then
2811 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002812else
Martin v. Löwis11437992002-04-12 09:54:03 +00002813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002814/* confdefs.h. */
2815_ACEOF
2816cat confdefs.h >>conftest.$ac_ext
2817cat >>conftest.$ac_ext <<_ACEOF
2818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002819
Martin v. Löwis11437992002-04-12 09:54:03 +00002820int
2821main ()
2822{
2823
2824 ;
2825 return 0;
2826}
2827_ACEOF
2828rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002829if { (ac_try="$ac_compile"
2830case "(($ac_try" in
2831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2832 *) ac_try_echo=$ac_try;;
2833esac
2834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2835 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002839 for ac_file in conftest.o conftest.obj conftest.*; do
2840 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002842 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2844 break;;
2845 esac
2846done
2847else
2848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002849sed 's/^/| /' conftest.$ac_ext >&5
2850
2851{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2852See \`config.log' for more details." >&5
2853echo "$as_me: error: cannot compute suffix of object files: cannot compile
2854See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002855 { (exit 1); exit 1; }; }
2856fi
2857
2858rm -f conftest.$ac_cv_objext conftest.$ac_ext
2859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002860{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2861echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862OBJEXT=$ac_cv_objext
2863ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2865echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866if test "${ac_cv_c_compiler_gnu+set}" = set; then
2867 echo $ECHO_N "(cached) $ECHO_C" >&6
2868else
2869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002870/* confdefs.h. */
2871_ACEOF
2872cat confdefs.h >>conftest.$ac_ext
2873cat >>conftest.$ac_ext <<_ACEOF
2874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002875
Martin v. Löwis11437992002-04-12 09:54:03 +00002876int
2877main ()
2878{
2879#ifndef __GNUC__
2880 choke me
2881#endif
2882
2883 ;
2884 return 0;
2885}
2886_ACEOF
2887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002888if { (ac_try="$ac_compile"
2889case "(($ac_try" in
2890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2891 *) ac_try_echo=$ac_try;;
2892esac
2893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002896 grep -v '^ *+' conftest.er1 >conftest.err
2897 rm -f conftest.er1
2898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002900 (exit $ac_status); } && {
2901 test -z "$ac_c_werror_flag" ||
2902 test ! -s conftest.err
2903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 ac_compiler_gnu=yes
2905else
2906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002907sed 's/^/| /' conftest.$ac_ext >&5
2908
Martin v. Löwiseba40652007-08-30 20:10:57 +00002909 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002911
2912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002913ac_cv_c_compiler_gnu=$ac_compiler_gnu
2914
2915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002916{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2917echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918GCC=`test $ac_compiler_gnu = yes && echo yes`
2919ac_test_CFLAGS=${CFLAGS+set}
2920ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002921{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2922echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002923if test "${ac_cv_prog_cc_g+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2925else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002926 ac_save_c_werror_flag=$ac_c_werror_flag
2927 ac_c_werror_flag=yes
2928 ac_cv_prog_cc_g=no
2929 CFLAGS="-g"
2930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002931/* confdefs.h. */
2932_ACEOF
2933cat confdefs.h >>conftest.$ac_ext
2934cat >>conftest.$ac_ext <<_ACEOF
2935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937int
2938main ()
2939{
2940
2941 ;
2942 return 0;
2943}
2944_ACEOF
2945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002946if { (ac_try="$ac_compile"
2947case "(($ac_try" in
2948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2949 *) ac_try_echo=$ac_try;;
2950esac
2951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002954 grep -v '^ *+' conftest.er1 >conftest.err
2955 rm -f conftest.er1
2956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (exit $ac_status); } && {
2959 test -z "$ac_c_werror_flag" ||
2960 test ! -s conftest.err
2961 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002962 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002963else
Martin v. Löwis11437992002-04-12 09:54:03 +00002964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 CFLAGS=""
2968 cat >conftest.$ac_ext <<_ACEOF
2969/* confdefs.h. */
2970_ACEOF
2971cat confdefs.h >>conftest.$ac_ext
2972cat >>conftest.$ac_ext <<_ACEOF
2973/* end confdefs.h. */
2974
2975int
2976main ()
2977{
2978
2979 ;
2980 return 0;
2981}
2982_ACEOF
2983rm -f conftest.$ac_objext
2984if { (ac_try="$ac_compile"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
2989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2990 (eval "$ac_compile") 2>conftest.er1
2991 ac_status=$?
2992 grep -v '^ *+' conftest.er1 >conftest.err
2993 rm -f conftest.er1
2994 cat conftest.err >&5
2995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2996 (exit $ac_status); } && {
2997 test -z "$ac_c_werror_flag" ||
2998 test ! -s conftest.err
2999 } && test -s conftest.$ac_objext; then
3000 :
3001else
3002 echo "$as_me: failed program was:" >&5
3003sed 's/^/| /' conftest.$ac_ext >&5
3004
3005 ac_c_werror_flag=$ac_save_c_werror_flag
3006 CFLAGS="-g"
3007 cat >conftest.$ac_ext <<_ACEOF
3008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
3013
3014int
3015main ()
3016{
3017
3018 ;
3019 return 0;
3020}
3021_ACEOF
3022rm -f conftest.$ac_objext
3023if { (ac_try="$ac_compile"
3024case "(($ac_try" in
3025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026 *) ac_try_echo=$ac_try;;
3027esac
3028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3029 (eval "$ac_compile") 2>conftest.er1
3030 ac_status=$?
3031 grep -v '^ *+' conftest.er1 >conftest.err
3032 rm -f conftest.er1
3033 cat conftest.err >&5
3034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035 (exit $ac_status); } && {
3036 test -z "$ac_c_werror_flag" ||
3037 test ! -s conftest.err
3038 } && test -s conftest.$ac_objext; then
3039 ac_cv_prog_cc_g=yes
3040else
3041 echo "$as_me: failed program was:" >&5
3042sed 's/^/| /' conftest.$ac_ext >&5
3043
3044
Guido van Rossum627b2d71993-12-24 10:39:16 +00003045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003046
3047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003049
3050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3051fi
3052
3053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3054 ac_c_werror_flag=$ac_save_c_werror_flag
3055fi
3056{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3057echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003058if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003059 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003060elif test $ac_cv_prog_cc_g = yes; then
3061 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062 CFLAGS="-g -O2"
3063 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003064 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065 fi
3066else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003067 if test "$GCC" = yes; then
3068 CFLAGS="-O2"
3069 else
3070 CFLAGS=
3071 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3074echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3075if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003076 echo $ECHO_N "(cached) $ECHO_C" >&6
3077else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003078 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003079ac_save_CC=$CC
3080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003081/* confdefs.h. */
3082_ACEOF
3083cat confdefs.h >>conftest.$ac_ext
3084cat >>conftest.$ac_ext <<_ACEOF
3085/* end confdefs.h. */
3086#include <stdarg.h>
3087#include <stdio.h>
3088#include <sys/types.h>
3089#include <sys/stat.h>
3090/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3091struct buf { int x; };
3092FILE * (*rcsopen) (struct buf *, struct stat *, int);
3093static char *e (p, i)
3094 char **p;
3095 int i;
3096{
3097 return p[i];
3098}
3099static char *f (char * (*g) (char **, int), char **p, ...)
3100{
3101 char *s;
3102 va_list v;
3103 va_start (v,p);
3104 s = g (p, va_arg (v,int));
3105 va_end (v);
3106 return s;
3107}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003108
3109/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3110 function prototypes and stuff, but not '\xHH' hex character constants.
3111 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003112 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003113 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3114 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003115 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003116int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3119 inside strings and character constants. */
3120#define FOO(x) 'x'
3121int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3122
Skip Montanaro6dead952003-09-25 14:50:04 +00003123int test (int i, double x);
3124struct s1 {int (*f) (int a);};
3125struct s2 {int (*f) (double a);};
3126int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3127int argc;
3128char **argv;
3129int
3130main ()
3131{
3132return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3133 ;
3134 return 0;
3135}
3136_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3138 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003139do
3140 CC="$ac_save_CC $ac_arg"
3141 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142if { (ac_try="$ac_compile"
3143case "(($ac_try" in
3144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3145 *) ac_try_echo=$ac_try;;
3146esac
3147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3148 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003150 grep -v '^ *+' conftest.er1 >conftest.err
3151 rm -f conftest.er1
3152 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003154 (exit $ac_status); } && {
3155 test -z "$ac_c_werror_flag" ||
3156 test ! -s conftest.err
3157 } && test -s conftest.$ac_objext; then
3158 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003159else
3160 echo "$as_me: failed program was:" >&5
3161sed 's/^/| /' conftest.$ac_ext >&5
3162
Martin v. Löwiseba40652007-08-30 20:10:57 +00003163
Skip Montanaro6dead952003-09-25 14:50:04 +00003164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003165
3166rm -f core conftest.err conftest.$ac_objext
3167 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003168done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003170CC=$ac_save_CC
3171
3172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173# AC_CACHE_VAL
3174case "x$ac_cv_prog_cc_c89" in
3175 x)
3176 { echo "$as_me:$LINENO: result: none needed" >&5
3177echo "${ECHO_T}none needed" >&6; } ;;
3178 xno)
3179 { echo "$as_me:$LINENO: result: unsupported" >&5
3180echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182 CC="$CC $ac_cv_prog_cc_c89"
3183 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3184echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003185esac
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003193
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003194
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003195
3196
Martin v. Löwiseba40652007-08-30 20:10:57 +00003197{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3198echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003199
Martin v. Löwiseba40652007-08-30 20:10:57 +00003200# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003201if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003203
3204 case $withval in
3205 no) with_cxx_main=no
3206 MAINCC='$(CC)';;
3207 yes) with_cxx_main=yes
3208 MAINCC='$(CXX)';;
3209 *) with_cxx_main=yes
3210 MAINCC=$withval
3211 if test -z "$CXX"
3212 then
3213 CXX=$withval
3214 fi;;
3215 esac
3216else
3217
3218 with_cxx_main=no
3219 MAINCC='$(CC)'
3220
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221fi
3222
3223{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3224echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225
3226preset_cxx="$CXX"
3227if test -z "$CXX"
3228then
3229 case "$CC" in
3230 gcc) # Extract the first word of "g++", so it can be a program name with args.
3231set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003234if test "${ac_cv_path_CXX+set}" = set; then
3235 echo $ECHO_N "(cached) $ECHO_C" >&6
3236else
3237 case $CXX in
3238 [\\/]* | ?:[\\/]*)
3239 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3240 ;;
3241 *)
3242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243for as_dir in notfound
3244do
3245 IFS=$as_save_IFS
3246 test -z "$as_dir" && as_dir=.
3247 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003248 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 +00003249 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3251 break 2
3252 fi
3253done
3254done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003255IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003256
3257 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3258 ;;
3259esac
3260fi
3261CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003262if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003263 { echo "$as_me:$LINENO: result: $CXX" >&5
3264echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003265else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266 { echo "$as_me:$LINENO: result: no" >&5
3267echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003269
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003270 ;;
3271 cc) # Extract the first word of "c++", so it can be a program name with args.
3272set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003275if test "${ac_cv_path_CXX+set}" = set; then
3276 echo $ECHO_N "(cached) $ECHO_C" >&6
3277else
3278 case $CXX in
3279 [\\/]* | ?:[\\/]*)
3280 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3281 ;;
3282 *)
3283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in notfound
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
3288 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003289 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 +00003290 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3292 break 2
3293 fi
3294done
3295done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297
3298 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3299 ;;
3300esac
3301fi
3302CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003303if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304 { echo "$as_me:$LINENO: result: $CXX" >&5
3305echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003306else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003307 { echo "$as_me:$LINENO: result: no" >&5
3308echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003310
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311 ;;
3312 esac
3313 if test "$CXX" = "notfound"
3314 then
3315 CXX=""
3316 fi
3317fi
3318if test -z "$CXX"
3319then
3320 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3321do
3322 # Extract the first word of "$ac_prog", so it can be a program name with args.
3323set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003326if test "${ac_cv_prog_CXX+set}" = set; then
3327 echo $ECHO_N "(cached) $ECHO_C" >&6
3328else
3329 if test -n "$CXX"; then
3330 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3331else
3332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
3337 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003338 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 +00003339 ac_cv_prog_CXX="$ac_prog"
3340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3341 break 2
3342 fi
3343done
3344done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003346
3347fi
3348fi
3349CXX=$ac_cv_prog_CXX
3350if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003351 { echo "$as_me:$LINENO: result: $CXX" >&5
3352echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003353else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003354 { echo "$as_me:$LINENO: result: no" >&5
3355echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003356fi
3357
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003359 test -n "$CXX" && break
3360done
3361test -n "$CXX" || CXX="notfound"
3362
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test "$preset_cxx" != "$CXX"
3369then
3370 { echo "$as_me:$LINENO: WARNING:
3371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&5
3375echo "$as_me: WARNING:
3376
3377 By default, distutils will build C++ extension modules with \"$CXX\".
3378 If this is not intended, then set CXX on the configure command line.
3379 " >&2;}
3380fi
3381
3382
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003384
3385ac_ext=c
3386ac_cpp='$CPP $CPPFLAGS'
3387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3391echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003392# On Suns, sometimes $CPP names a directory.
3393if test -n "$CPP" && test -d "$CPP"; then
3394 CPP=
3395fi
3396if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test "${ac_cv_prog_CPP+set}" = set; then
3398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399else
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 # Double quotes because CPP needs to be expanded
3401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3402 do
3403 ac_preproc_ok=false
3404for ac_c_preproc_warn_flag in '' yes
3405do
3406 # Use a header file that comes with gcc, so configuring glibc
3407 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003408 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3409 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003410 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 # not just through cpp. "Syntax error" is here to catch this case.
3412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003413/* confdefs.h. */
3414_ACEOF
3415cat confdefs.h >>conftest.$ac_ext
3416cat >>conftest.$ac_ext <<_ACEOF
3417/* end confdefs.h. */
3418#ifdef __STDC__
3419# include <limits.h>
3420#else
3421# include <assert.h>
3422#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003423 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003424_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425if { (ac_try="$ac_cpp conftest.$ac_ext"
3426case "(($ac_try" in
3427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3428 *) ac_try_echo=$ac_try;;
3429esac
3430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3431 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003433 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 rm -f conftest.er1
3435 cat conftest.err >&5
3436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003437 (exit $ac_status); } >/dev/null && {
3438 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3439 test ! -s conftest.err
3440 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003441 :
3442else
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003444sed 's/^/| /' conftest.$ac_ext >&5
3445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # Broken: fails on valid input.
3447continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003451
Martin v. Löwiseba40652007-08-30 20:10:57 +00003452 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # can be detected and how.
3454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003455/* confdefs.h. */
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003460#include <ac_nonexistent.h>
3461_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003462if { (ac_try="$ac_cpp conftest.$ac_ext"
3463case "(($ac_try" in
3464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3465 *) ac_try_echo=$ac_try;;
3466esac
3467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3468 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003470 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 rm -f conftest.er1
3472 cat conftest.err >&5
3473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003474 (exit $ac_status); } >/dev/null && {
3475 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3476 test ! -s conftest.err
3477 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 # Broken: success on invalid input.
3479continue
3480else
3481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003482sed 's/^/| /' conftest.$ac_ext >&5
3483
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 # Passes both tests.
3485ac_preproc_ok=:
3486break
3487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489rm -f conftest.err conftest.$ac_ext
3490
3491done
3492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3493rm -f conftest.err conftest.$ac_ext
3494if $ac_preproc_ok; then
3495 break
3496fi
3497
3498 done
3499 ac_cv_prog_CPP=$CPP
3500
3501fi
3502 CPP=$ac_cv_prog_CPP
3503else
3504 ac_cv_prog_CPP=$CPP
3505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003506{ echo "$as_me:$LINENO: result: $CPP" >&5
3507echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003508ac_preproc_ok=false
3509for ac_c_preproc_warn_flag in '' yes
3510do
3511 # Use a header file that comes with gcc, so configuring glibc
3512 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003513 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3514 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003515 # On the NeXT, cc -E runs the code through the compiler's parser,
3516 # not just through cpp. "Syntax error" is here to catch this case.
3517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003518/* confdefs.h. */
3519_ACEOF
3520cat confdefs.h >>conftest.$ac_ext
3521cat >>conftest.$ac_ext <<_ACEOF
3522/* end confdefs.h. */
3523#ifdef __STDC__
3524# include <limits.h>
3525#else
3526# include <assert.h>
3527#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003528 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003529_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003530if { (ac_try="$ac_cpp conftest.$ac_ext"
3531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
3535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3536 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003538 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 rm -f conftest.er1
3540 cat conftest.err >&5
3541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003542 (exit $ac_status); } >/dev/null && {
3543 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3544 test ! -s conftest.err
3545 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 :
3547else
3548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003549sed 's/^/| /' conftest.$ac_ext >&5
3550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # Broken: fails on valid input.
3552continue
3553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555rm -f conftest.err conftest.$ac_ext
3556
Martin v. Löwiseba40652007-08-30 20:10:57 +00003557 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 # can be detected and how.
3559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003560/* confdefs.h. */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003565#include <ac_nonexistent.h>
3566_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003567if { (ac_try="$ac_cpp conftest.$ac_ext"
3568case "(($ac_try" in
3569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3570 *) ac_try_echo=$ac_try;;
3571esac
3572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003575 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 rm -f conftest.er1
3577 cat conftest.err >&5
3578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003579 (exit $ac_status); } >/dev/null && {
3580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3581 test ! -s conftest.err
3582 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: success on invalid input.
3584continue
3585else
3586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 # Passes both tests.
3590ac_preproc_ok=:
3591break
3592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594rm -f conftest.err conftest.$ac_ext
3595
3596done
3597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3598rm -f conftest.err conftest.$ac_ext
3599if $ac_preproc_ok; then
3600 :
3601else
Skip Montanaro6dead952003-09-25 14:50:04 +00003602 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3603See \`config.log' for more details." >&5
3604echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3605See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 { (exit 1); exit 1; }; }
3607fi
3608
3609ac_ext=c
3610ac_cpp='$CPP $CPPFLAGS'
3611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3613ac_compiler_gnu=$ac_cv_c_compiler_gnu
3614
3615
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3617echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3618if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003619 echo $ECHO_N "(cached) $ECHO_C" >&6
3620else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621 # Extract the first word of "grep ggrep" to use in msg output
3622if test -z "$GREP"; then
3623set dummy grep ggrep; ac_prog_name=$2
3624if test "${ac_cv_path_GREP+set}" = set; then
3625 echo $ECHO_N "(cached) $ECHO_C" >&6
3626else
3627 ac_path_GREP_found=false
3628# Loop through the user's path and test for each of PROGNAME-LIST
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
3634 for ac_prog in grep ggrep; do
3635 for ac_exec_ext in '' $ac_executable_extensions; do
3636 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3637 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3638 # Check for GNU ac_path_GREP and select it if it is found.
3639 # Check for GNU $ac_path_GREP
3640case `"$ac_path_GREP" --version 2>&1` in
3641*GNU*)
3642 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3643*)
3644 ac_count=0
3645 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3646 while :
3647 do
3648 cat "conftest.in" "conftest.in" >"conftest.tmp"
3649 mv "conftest.tmp" "conftest.in"
3650 cp "conftest.in" "conftest.nl"
3651 echo 'GREP' >> "conftest.nl"
3652 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3653 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3654 ac_count=`expr $ac_count + 1`
3655 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3656 # Best one so far, save it but keep looking for a better one
3657 ac_cv_path_GREP="$ac_path_GREP"
3658 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003659 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003660 # 10*(2^10) chars as input seems more than enough
3661 test $ac_count -gt 10 && break
3662 done
3663 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3664esac
3665
3666
3667 $ac_path_GREP_found && break 3
3668 done
3669done
3670
3671done
3672IFS=$as_save_IFS
3673
3674
Skip Montanaro6dead952003-09-25 14:50:04 +00003675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676
3677GREP="$ac_cv_path_GREP"
3678if test -z "$GREP"; then
3679 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3680echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3681 { (exit 1); exit 1; }; }
3682fi
3683
3684else
3685 ac_cv_path_GREP=$GREP
3686fi
3687
3688
3689fi
3690{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3691echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3692 GREP="$ac_cv_path_GREP"
3693
3694
3695{ echo "$as_me:$LINENO: checking for egrep" >&5
3696echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3697if test "${ac_cv_path_EGREP+set}" = set; then
3698 echo $ECHO_N "(cached) $ECHO_C" >&6
3699else
3700 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3701 then ac_cv_path_EGREP="$GREP -E"
3702 else
3703 # Extract the first word of "egrep" to use in msg output
3704if test -z "$EGREP"; then
3705set dummy egrep; ac_prog_name=$2
3706if test "${ac_cv_path_EGREP+set}" = set; then
3707 echo $ECHO_N "(cached) $ECHO_C" >&6
3708else
3709 ac_path_EGREP_found=false
3710# Loop through the user's path and test for each of PROGNAME-LIST
3711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
3716 for ac_prog in egrep; do
3717 for ac_exec_ext in '' $ac_executable_extensions; do
3718 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3719 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3720 # Check for GNU ac_path_EGREP and select it if it is found.
3721 # Check for GNU $ac_path_EGREP
3722case `"$ac_path_EGREP" --version 2>&1` in
3723*GNU*)
3724 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3725*)
3726 ac_count=0
3727 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3728 while :
3729 do
3730 cat "conftest.in" "conftest.in" >"conftest.tmp"
3731 mv "conftest.tmp" "conftest.in"
3732 cp "conftest.in" "conftest.nl"
3733 echo 'EGREP' >> "conftest.nl"
3734 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3735 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3736 ac_count=`expr $ac_count + 1`
3737 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3738 # Best one so far, save it but keep looking for a better one
3739 ac_cv_path_EGREP="$ac_path_EGREP"
3740 ac_path_EGREP_max=$ac_count
3741 fi
3742 # 10*(2^10) chars as input seems more than enough
3743 test $ac_count -gt 10 && break
3744 done
3745 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3746esac
3747
3748
3749 $ac_path_EGREP_found && break 3
3750 done
3751done
3752
3753done
3754IFS=$as_save_IFS
3755
3756
3757fi
3758
3759EGREP="$ac_cv_path_EGREP"
3760if test -z "$EGREP"; then
3761 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3762echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3763 { (exit 1); exit 1; }; }
3764fi
3765
3766else
3767 ac_cv_path_EGREP=$EGREP
3768fi
3769
3770
3771 fi
3772fi
3773{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3774echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3775 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003776
3777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779{ echo "$as_me:$LINENO: checking for AIX" >&5
3780echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003782/* confdefs.h. */
3783_ACEOF
3784cat confdefs.h >>conftest.$ac_ext
3785cat >>conftest.$ac_ext <<_ACEOF
3786/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003787#ifdef _AIX
3788 yes
3789#endif
3790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003793 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 { echo "$as_me:$LINENO: result: yes" >&5
3795echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003797#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003798_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003799
3800else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003801 { echo "$as_me:$LINENO: result: no" >&5
3802echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003803fi
3804rm -f conftest*
3805
Michael W. Hudson54241132001-12-07 15:38:26 +00003806
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003807
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003808# Check for unsupported systems
3809case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003810atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003811 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3812 echo See README for details.
3813 exit 1;;
3814esac
3815
Michael W. Hudson54241132001-12-07 15:38:26 +00003816
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3818echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003819
Martin v. Löwiseba40652007-08-30 20:10:57 +00003820# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003821if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003822 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003823 case $withval in
3824 no) EXEEXT=;;
3825 yes) EXEEXT=.exe;;
3826 *) EXEEXT=$withval;;
3827 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003828fi
3829
3830{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3831echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003832
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003833# Test whether we're running on a non-case-sensitive system, in which
3834# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003835
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3837echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003838if test ! -d CaseSensitiveTestDir; then
3839mkdir CaseSensitiveTestDir
3840fi
3841
3842if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003843then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003844 { echo "$as_me:$LINENO: result: yes" >&5
3845echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003846 BUILDEXEEXT=.exe
3847else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848 { echo "$as_me:$LINENO: result: no" >&5
3849echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003850 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003851fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003852rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003853
Guido van Rossumdd997f71998-10-07 19:58:26 +00003854case $MACHDEP in
3855bsdos*)
3856 case $CC in
3857 gcc) CC="$CC -D_HAVE_BSDI";;
3858 esac;;
3859esac
3860
Guido van Rossum24b1e751997-08-21 02:29:16 +00003861case $ac_sys_system in
3862hp*|HP*)
3863 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003864 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003865 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003866Monterey*)
3867 case $CC in
3868 cc) CC="$CC -Wl,-Bexport";;
3869 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003870SunOS*)
3871 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
3873cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003874#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003875_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003876
3877 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003878esac
3879
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
3881
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3883echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003884if test -z "$LIBRARY"
3885then
3886 LIBRARY='libpython$(VERSION).a'
3887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3889echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003890
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003891# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003892# name of the library into which to insert object files). BLDLIBRARY is also
3893# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3894# is blank as the main program is not linked directly against LDLIBRARY.
3895# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3896# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3897# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3898# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003899#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003900# RUNSHARED is used to run shared python without installed libraries
3901#
3902# INSTSONAME is the name of the shared library that will be use to install
3903# on the system - some systems like version suffix, others don't
3904
3905
Michael W. Hudson54241132001-12-07 15:38:26 +00003906
3907
3908
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003909
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003910LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003911BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003912INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003913DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003914LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003916
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003917# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003918# If CXX is set, and if it is needed to link a main function that was
3919# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3920# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003921# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003922# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003923
Martin v. Löwiseba40652007-08-30 20:10:57 +00003924{ echo "$as_me:$LINENO: checking LINKCC" >&5
3925echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003926if test -z "$LINKCC"
3927then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003928 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003929 case $ac_sys_system in
3930 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003931 exp_extra="\"\""
3932 if test $ac_sys_release -ge 5 -o \
3933 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3934 exp_extra="."
3935 fi
3936 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003937 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003938 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003939 QNX*)
3940 # qcc must be used because the other compilers do not
3941 # support -N.
3942 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003943 esac
3944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3946echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003947
Martin v. Löwiseba40652007-08-30 20:10:57 +00003948{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3949echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3950# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003951if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003952 enableval=$enable_shared;
3953fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003954
Martin v. Löwis1142de32002-03-29 16:28:31 +00003955
3956if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003957then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003958 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003959 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003960 enable_shared="yes";;
3961 *)
3962 enable_shared="no";;
3963 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3966echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003967
Martin v. Löwiseba40652007-08-30 20:10:57 +00003968{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3969echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3970# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003971if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003973 CC="$CC -pg"
3974 if test "$cross_compiling" = yes; then
3975 ac_enable_profiling="no"
3976else
3977 cat >conftest.$ac_ext <<_ACEOF
3978/* confdefs.h. */
3979_ACEOF
3980cat confdefs.h >>conftest.$ac_ext
3981cat >>conftest.$ac_ext <<_ACEOF
3982/* end confdefs.h. */
3983int main() { return 0; }
3984_ACEOF
3985rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003986if { (ac_try="$ac_link"
3987case "(($ac_try" in
3988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989 *) ac_try_echo=$ac_try;;
3990esac
3991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3992 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003993 ac_status=$?
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996 { (case "(($ac_try" in
3997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3998 *) ac_try_echo=$ac_try;;
3999esac
4000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4001 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004002 ac_status=$?
4003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004 (exit $ac_status); }; }; then
4005 ac_enable_profiling="yes"
4006else
4007 echo "$as_me: program exited with status $ac_status" >&5
4008echo "$as_me: failed program was:" >&5
4009sed 's/^/| /' conftest.$ac_ext >&5
4010
4011( exit $ac_status )
4012ac_enable_profiling="no"
4013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004014rm -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 +00004015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004016
4017
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004018 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004019fi
4020
4021{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4022echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004023
4024case "$ac_enable_profiling" in
4025 "yes")
4026 BASECFLAGS="-pg $BASECFLAGS"
4027 LDFLAGS="-pg $LDFLAGS"
4028 ;;
4029esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030
Martin v. Löwiseba40652007-08-30 20:10:57 +00004031{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4032echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004033
Guido van Rossumb8552162001-09-05 14:58:11 +00004034# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4035# library that we build, but we do not want to link against it (we
4036# will find it with a -framework option). For this reason there is an
4037# extra variable BLDLIBRARY against which Python and the extension
4038# modules are linked, BLDLIBRARY. This is normally the same as
4039# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004040if test "$enable_framework"
4041then
4042 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004043 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004044 BLDLIBRARY=''
4045else
4046 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004047fi
Jack Jansene578a632001-08-15 01:27:14 +00004048
Martin v. Löwis1142de32002-03-29 16:28:31 +00004049# Other platforms follow
4050if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004051
4052cat >>confdefs.h <<\_ACEOF
4053#define Py_ENABLE_SHARED 1
4054_ACEOF
4055
Martin v. Löwis1142de32002-03-29 16:28:31 +00004056 case $ac_sys_system in
4057 BeOS*)
4058 LDLIBRARY='libpython$(VERSION).so'
4059 ;;
4060 CYGWIN*)
4061 LDLIBRARY='libpython$(VERSION).dll.a'
4062 DLLLIBRARY='libpython$(VERSION).dll'
4063 ;;
4064 SunOS*)
4065 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004066 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004067 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004068 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004069 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004070 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004071 LDLIBRARY='libpython$(VERSION).so'
4072 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004073 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004074 case $ac_sys_system in
4075 FreeBSD*)
4076 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4077 ;;
4078 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004079 INSTSONAME="$LDLIBRARY".$SOVERSION
4080 ;;
4081 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004082 case `uname -m` in
4083 ia64)
4084 LDLIBRARY='libpython$(VERSION).so'
4085 ;;
4086 *)
4087 LDLIBRARY='libpython$(VERSION).sl'
4088 ;;
4089 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004090 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004091 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004092 ;;
4093 OSF*)
4094 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004095 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004096 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004097 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004098 atheos*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 BLDLIBRARY='-L. -lpython$(VERSION)'
4101 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4102 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004103 esac
Jason Tishler30765592003-09-04 11:04:06 +00004104else # shared is disabled
4105 case $ac_sys_system in
4106 CYGWIN*)
4107 BLDLIBRARY='$(LIBRARY)'
4108 LDLIBRARY='libpython$(VERSION).dll.a'
4109 ;;
4110 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004111fi
4112
Martin v. Löwiseba40652007-08-30 20:10:57 +00004113{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4114echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004115
Martin v. Löwis11437992002-04-12 09:54:03 +00004116if test -n "$ac_tool_prefix"; then
4117 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4118set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004119{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4120echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004121if test "${ac_cv_prog_RANLIB+set}" = set; then
4122 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004123else
4124 if test -n "$RANLIB"; then
4125 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4126else
Martin v. Löwis11437992002-04-12 09:54:03 +00004127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130 IFS=$as_save_IFS
4131 test -z "$as_dir" && as_dir=.
4132 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133 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 +00004134 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4135 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4136 break 2
4137 fi
4138done
4139done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004141
Guido van Rossum627b2d71993-12-24 10:39:16 +00004142fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004144RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004146 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4147echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004149 { echo "$as_me:$LINENO: result: no" >&5
4150echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
4152
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
4155if test -z "$ac_cv_prog_RANLIB"; then
4156 ac_ct_RANLIB=$RANLIB
4157 # Extract the first word of "ranlib", so it can be a program name with args.
4158set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004159{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4160echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4162 echo $ECHO_N "(cached) $ECHO_C" >&6
4163else
4164 if test -n "$ac_ct_RANLIB"; then
4165 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4166else
4167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168for as_dir in $PATH
4169do
4170 IFS=$as_save_IFS
4171 test -z "$as_dir" && as_dir=.
4172 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 ac_cv_prog_ac_ct_RANLIB="ranlib"
4175 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4176 break 2
4177 fi
4178done
4179done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004180IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004181
Martin v. Löwis11437992002-04-12 09:54:03 +00004182fi
4183fi
4184ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4185if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004186 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4187echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189 { echo "$as_me:$LINENO: result: no" >&5
4190echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004191fi
4192
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193 if test "x$ac_ct_RANLIB" = x; then
4194 RANLIB=":"
4195 else
4196 case $cross_compiling:$ac_tool_warned in
4197yes:)
4198{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4199whose name does not start with the host triplet. If you think this
4200configuration is useful to you, please write to autoconf@gnu.org." >&5
4201echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4202whose name does not start with the host triplet. If you think this
4203configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4204ac_tool_warned=yes ;;
4205esac
4206 RANLIB=$ac_ct_RANLIB
4207 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208else
4209 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004211
4212
Guido van Rossum7f43da71994-08-01 12:15:30 +00004213for ac_prog in ar aal
4214do
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004217{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4218echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004219if test "${ac_cv_prog_AR+set}" = set; then
4220 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221else
4222 if test -n "$AR"; then
4223 ac_cv_prog_AR="$AR" # Let the user override the test.
4224else
Martin v. Löwis11437992002-04-12 09:54:03 +00004225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228 IFS=$as_save_IFS
4229 test -z "$as_dir" && as_dir=.
4230 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004231 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 +00004232 ac_cv_prog_AR="$ac_prog"
4233 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 break 2
4235 fi
4236done
4237done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004239
Guido van Rossum7f43da71994-08-01 12:15:30 +00004240fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004242AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004244 { echo "$as_me:$LINENO: result: $AR" >&5
4245echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247 { echo "$as_me:$LINENO: result: no" >&5
4248echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004250
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004253done
4254test -n "$AR" || AR="ar"
4255
Michael W. Hudson54241132001-12-07 15:38:26 +00004256
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004257
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004258# Extract the first word of "svnversion", so it can be a program name with args.
4259set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004260{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004262if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4263 echo $ECHO_N "(cached) $ECHO_C" >&6
4264else
4265 if test -n "$SVNVERSION"; then
4266 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4267else
4268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4269for as_dir in $PATH
4270do
4271 IFS=$as_save_IFS
4272 test -z "$as_dir" && as_dir=.
4273 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004274 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 +00004275 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004276 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4277 break 2
4278 fi
4279done
4280done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004281IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004282
Martin v. Löwisff600232006-04-03 19:12:32 +00004283 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004284fi
4285fi
4286SVNVERSION=$ac_cv_prog_SVNVERSION
4287if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004288 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4289echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004290else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 { echo "$as_me:$LINENO: result: no" >&5
4292echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004293fi
4294
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004296if test $SVNVERSION = found
4297then
4298 SVNVERSION="svnversion \$(srcdir)"
4299else
4300 SVNVERSION="echo exported"
4301fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004302
Neil Schemenauera42c8272001-03-31 00:01:55 +00004303case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004304bsdos*|hp*|HP*)
4305 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004306 if test -z "$INSTALL"
4307 then
4308 INSTALL="${srcdir}/install-sh -c"
4309 fi
4310esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004312for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4313 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004314 ac_aux_dir=$ac_dir
4315 ac_install_sh="$ac_aux_dir/install-sh -c"
4316 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004317 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004318 ac_aux_dir=$ac_dir
4319 ac_install_sh="$ac_aux_dir/install.sh -c"
4320 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 ac_aux_dir=$ac_dir
4323 ac_install_sh="$ac_aux_dir/shtool install -c"
4324 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004325 fi
4326done
4327if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4329echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004330 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332
4333# These three variables are undocumented and unsupported,
4334# and are intended to be withdrawn in a future Autoconf release.
4335# They can cause serious problems if a builder's source tree is in a directory
4336# whose full name contains unusual characters.
4337ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4338ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4339ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4340
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004341
4342# Find a good install program. We prefer a C program (faster),
4343# so one script is as good as another. But avoid the broken or
4344# incompatible versions:
4345# SysV /etc/install, /usr/sbin/install
4346# SunOS /usr/etc/install
4347# IRIX /sbin/install
4348# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004349# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4351# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4352# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004353# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4356echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004358if test "${ac_cv_path_install+set}" = set; then
4359 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360else
Martin v. Löwis11437992002-04-12 09:54:03 +00004361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362for as_dir in $PATH
4363do
4364 IFS=$as_save_IFS
4365 test -z "$as_dir" && as_dir=.
4366 # Account for people who put trailing slashes in PATH elements.
4367case $as_dir/ in
4368 ./ | .// | /cC/* | \
4369 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004370 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 /usr/ucb/* ) ;;
4372 *)
4373 # OSF1 and SCO ODT 3.0 have their own names for install.
4374 # Don't use installbsd from OSF since it installs stuff as root
4375 # by default.
4376 for ac_prog in ginstall scoinst install; do
4377 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004378 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 +00004379 if test $ac_prog = install &&
4380 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4381 # AIX install. It has an incompatible calling convention.
4382 :
4383 elif test $ac_prog = install &&
4384 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4385 # program-specific install script used by HP pwplus--don't use.
4386 :
4387 else
4388 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4389 break 3
4390 fi
4391 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004392 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004393 done
4394 ;;
4395esac
4396done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004398
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004399
4400fi
4401 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004402 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004403 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004404 # As a last resort, use the slow shell script. Don't cache a
4405 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004406 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004407 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004408 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004409 fi
4410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004411{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4412echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004413
4414# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4415# It thinks the first close brace ends the variable substitution.
4416test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4417
Martin v. Löwis11437992002-04-12 09:54:03 +00004418test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004419
4420test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4421
Michael W. Hudson54241132001-12-07 15:38:26 +00004422
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004423# Not every filesystem supports hard links
4424
4425if test -z "$LN" ; then
4426 case $ac_sys_system in
4427 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004428 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004429 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004430 *) LN=ln;;
4431 esac
4432fi
4433
Fred Drake109d9862001-07-11 06:27:56 +00004434# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4436echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004437
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004439if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004440 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004441if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004442then
4443
4444cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004445#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004446_ACEOF
4447
Martin v. Löwiseba40652007-08-30 20:10:57 +00004448 { echo "$as_me:$LINENO: result: yes" >&5
4449echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004450 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451else { echo "$as_me:$LINENO: result: no" >&5
4452echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004453fi
4454else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004455 { echo "$as_me:$LINENO: result: no" >&5
4456echo "${ECHO_T}no" >&6; }
4457fi
4458
Fred Drake109d9862001-07-11 06:27:56 +00004459
Skip Montanarodecc6a42003-01-01 20:07:49 +00004460# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4461# merged with this chunk of code?
4462
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004463# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004464# ------------------------
4465# (The following bit of code is complicated enough - please keep things
4466# indented properly. Just pretend you're editing Python code. ;-)
4467
4468# There are two parallel sets of case statements below, one that checks to
4469# see if OPT was set and one that does BASECFLAGS setting based upon
4470# compiler and platform. BASECFLAGS tweaks need to be made even if the
4471# user set OPT.
4472
4473# tweak OPT based on compiler and platform, only if the user didn't set
4474# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004475
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004476if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004477then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004478 case $GCC in
4479 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004480 if test "$CC" != 'g++' ; then
4481 STRICT_PROTO="-Wstrict-prototypes"
4482 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004483 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4484 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4485 WRAP="-fwrapv"
4486 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004487 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004488 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004489 if test "$Py_DEBUG" = 'true' ; then
4490 # Optimization messes up debuggers, so turn it off for
4491 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004492 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004493 else
Thomas Hellere5529592007-12-13 21:20:29 +00004494 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004495 fi
4496 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004497 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004498 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004500 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004501 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004502 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4503 ;;
4504 esac
Fred Drake109d9862001-07-11 06:27:56 +00004505 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004506
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004507 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004508 OPT="-O"
4509 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004510 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004511
4512 # The current (beta) Monterey compiler dies with optimizations
4513 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004514 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004515 Monterey*)
4516 OPT=""
4517 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004518 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004519
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004520fi
4521
Skip Montanarodecc6a42003-01-01 20:07:49 +00004522
4523# tweak BASECFLAGS based on compiler and platform
4524case $GCC in
4525yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004526 # Python violates C99 rules, by casting between incompatible
4527 # pointer types. GCC may generate bad code as a result of that,
4528 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4530echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 ac_save_cc="$CC"
4532 CC="$CC -fno-strict-aliasing"
4533 if test "$cross_compiling" = yes; then
4534 ac_cv_no_strict_aliasing_ok=no
4535else
4536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004537/* confdefs.h. */
4538_ACEOF
4539cat confdefs.h >>conftest.$ac_ext
4540cat >>conftest.$ac_ext <<_ACEOF
4541/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004542int main() { return 0; }
4543_ACEOF
4544rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004545if { (ac_try="$ac_link"
4546case "(($ac_try" in
4547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4548 *) ac_try_echo=$ac_try;;
4549esac
4550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4551 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004552 ac_status=$?
4553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004555 { (case "(($ac_try" in
4556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4557 *) ac_try_echo=$ac_try;;
4558esac
4559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4560 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004561 ac_status=$?
4562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4563 (exit $ac_status); }; }; then
4564 ac_cv_no_strict_aliasing_ok=yes
4565else
4566 echo "$as_me: program exited with status $ac_status" >&5
4567echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004568sed 's/^/| /' conftest.$ac_ext >&5
4569
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004570( exit $ac_status )
4571ac_cv_no_strict_aliasing_ok=no
4572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004573rm -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 +00004574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004575
4576
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004577 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004578 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4579echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004580 if test $ac_cv_no_strict_aliasing_ok = yes
4581 then
4582 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4583 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004584
4585 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4586 # support. Without this, treatment of subnormals doesn't follow
4587 # the standard.
4588 case $ac_sys_machine in
4589 alpha*)
4590 BASECFLAGS="$BASECFLAGS -mieee"
4591 ;;
4592 esac
4593
Skip Montanarodecc6a42003-01-01 20:07:49 +00004594 case $ac_sys_system in
4595 SCO_SV*)
4596 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4597 ;;
4598 # is there any other compiler on Darwin besides gcc?
4599 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004600 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4601 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004602 if test "${enable_universalsdk}"; then
4603 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4604 fi
4605
Skip Montanarodecc6a42003-01-01 20:07:49 +00004606 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004607 OSF*)
4608 BASECFLAGS="$BASECFLAGS -mieee"
4609 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004610 esac
4611 ;;
4612
4613*)
4614 case $ac_sys_system in
4615 OpenUNIX*|UnixWare*)
4616 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4617 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004618 OSF*)
4619 BASECFLAGS="$BASECFLAGS -ieee -std"
4620 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004621 SCO_SV*)
4622 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4623 ;;
4624 esac
4625 ;;
4626esac
4627
Fred Drakee1ceaa02001-12-04 20:55:47 +00004628if test "$Py_DEBUG" = 'true'; then
4629 :
4630else
4631 OPT="-DNDEBUG $OPT"
4632fi
4633
Guido van Rossum563e7081996-09-10 18:20:48 +00004634if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004635then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004636 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004637fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004638
Neal Norwitz020c46a2006-01-07 21:39:28 +00004639# disable check for icc since it seems to pass, but generates a warning
4640if test "$CC" = icc
4641then
4642 ac_cv_opt_olimit_ok=no
4643fi
4644
Martin v. Löwiseba40652007-08-30 20:10:57 +00004645{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4646echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004647if test "${ac_cv_opt_olimit_ok+set}" = set; then
4648 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004649else
4650 ac_save_cc="$CC"
4651CC="$CC -OPT:Olimit=0"
4652if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004653 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004654else
Martin v. Löwis11437992002-04-12 09:54:03 +00004655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004656/* confdefs.h. */
4657_ACEOF
4658cat confdefs.h >>conftest.$ac_ext
4659cat >>conftest.$ac_ext <<_ACEOF
4660/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004661int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004662_ACEOF
4663rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004664if { (ac_try="$ac_link"
4665case "(($ac_try" in
4666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4667 *) ac_try_echo=$ac_try;;
4668esac
4669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4670 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004671 ac_status=$?
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004674 { (case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
4678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4679 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004683 ac_cv_opt_olimit_ok=yes
4684else
Martin v. Löwis11437992002-04-12 09:54:03 +00004685 echo "$as_me: program exited with status $ac_status" >&5
4686echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004687sed 's/^/| /' conftest.$ac_ext >&5
4688
Martin v. Löwis11437992002-04-12 09:54:03 +00004689( exit $ac_status )
4690ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004692rm -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 +00004693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004694
4695
Guido van Rossum91922671997-10-09 20:24:13 +00004696CC="$ac_save_cc"
4697fi
4698
Martin v. Löwiseba40652007-08-30 20:10:57 +00004699{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4700echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004701if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004702 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004703 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4704 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4705 # environment?
4706 Darwin*)
4707 ;;
4708 *)
4709 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4710 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004711 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004712else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004713 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4714echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004715 if test "${ac_cv_olimit_ok+set}" = set; then
4716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004717else
4718 ac_save_cc="$CC"
4719 CC="$CC -Olimit 1500"
4720 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004721 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004722else
Martin v. Löwis11437992002-04-12 09:54:03 +00004723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004724/* confdefs.h. */
4725_ACEOF
4726cat confdefs.h >>conftest.$ac_ext
4727cat >>conftest.$ac_ext <<_ACEOF
4728/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004729int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004730_ACEOF
4731rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004732if { (ac_try="$ac_link"
4733case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004742 { (case "(($ac_try" in
4743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4744 *) ac_try_echo=$ac_try;;
4745esac
4746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4747 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 ac_status=$?
4749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4750 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004751 ac_cv_olimit_ok=yes
4752else
Martin v. Löwis11437992002-04-12 09:54:03 +00004753 echo "$as_me: program exited with status $ac_status" >&5
4754echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004755sed 's/^/| /' conftest.$ac_ext >&5
4756
Martin v. Löwis11437992002-04-12 09:54:03 +00004757( exit $ac_status )
4758ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004760rm -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 +00004761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004762
4763
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004764 CC="$ac_save_cc"
4765fi
4766
Martin v. Löwiseba40652007-08-30 20:10:57 +00004767 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4768echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004769 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004770 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004771 fi
4772fi
4773
Martin v. Löwisaac13162006-10-19 10:58:46 +00004774# Check whether GCC supports PyArg_ParseTuple format
4775if test "$GCC" = "yes"
4776then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004777 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4778echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004779 save_CFLAGS=$CFLAGS
4780 CFLAGS="$CFLAGS -Werror"
4781 cat >conftest.$ac_ext <<_ACEOF
4782/* confdefs.h. */
4783_ACEOF
4784cat confdefs.h >>conftest.$ac_ext
4785cat >>conftest.$ac_ext <<_ACEOF
4786/* end confdefs.h. */
4787
4788 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4789
4790int
4791main ()
4792{
4793
4794 ;
4795 return 0;
4796}
4797_ACEOF
4798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799if { (ac_try="$ac_compile"
4800case "(($ac_try" in
4801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4802 *) ac_try_echo=$ac_try;;
4803esac
4804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004806 ac_status=$?
4807 grep -v '^ *+' conftest.er1 >conftest.err
4808 rm -f conftest.er1
4809 cat conftest.err >&5
4810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004811 (exit $ac_status); } && {
4812 test -z "$ac_c_werror_flag" ||
4813 test ! -s conftest.err
4814 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004815
4816cat >>confdefs.h <<\_ACEOF
4817#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4818_ACEOF
4819
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 { echo "$as_me:$LINENO: result: yes" >&5
4821echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004822else
4823 echo "$as_me: failed program was:" >&5
4824sed 's/^/| /' conftest.$ac_ext >&5
4825
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826 { echo "$as_me:$LINENO: result: no" >&5
4827echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004828
4829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004830
4831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004832 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004833fi
4834
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004835# On some compilers, pthreads are available without further options
4836# (e.g. MacOS X). On some of these systems, the compiler will not
4837# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4838# So we have to see first whether pthreads are available without
4839# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004840{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4841echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004842if test "${ac_cv_pthread_is_default+set}" = set; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004844else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004845 if test "$cross_compiling" = yes; then
4846 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004847else
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004849/* confdefs.h. */
4850_ACEOF
4851cat confdefs.h >>conftest.$ac_ext
4852cat >>conftest.$ac_ext <<_ACEOF
4853/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004854
Martin v. Löwis130fb172001-07-19 11:00:41 +00004855#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004856
4857void* routine(void* p){return NULL;}
4858
4859int main(){
4860 pthread_t p;
4861 if(pthread_create(&p,NULL,routine,NULL)!=0)
4862 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004863 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004864 return 0;
4865}
4866
Martin v. Löwis11437992002-04-12 09:54:03 +00004867_ACEOF
4868rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869if { (ac_try="$ac_link"
4870case "(($ac_try" in
4871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872 *) ac_try_echo=$ac_try;;
4873esac
4874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4875 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004876 ac_status=$?
4877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4878 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 { (case "(($ac_try" in
4880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4881 *) ac_try_echo=$ac_try;;
4882esac
4883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4884 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 ac_status=$?
4886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4887 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004888
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004889 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004890 ac_cv_kthread=no
4891 ac_cv_pthread=no
4892
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 echo "$as_me: program exited with status $ac_status" >&5
4895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004896sed 's/^/| /' conftest.$ac_ext >&5
4897
Martin v. Löwis11437992002-04-12 09:54:03 +00004898( exit $ac_status )
4899ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901rm -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 +00004902fi
4903
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904
4905
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004906fi
4907
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4909echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004910
Michael W. Hudson54241132001-12-07 15:38:26 +00004911
Martin v. Löwis11437992002-04-12 09:54:03 +00004912if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004913then
4914 ac_cv_kpthread=no
4915else
4916# -Kpthread, if available, provides the right #defines
4917# and linker options to make pthread_create available
4918# Some compilers won't report that they do not support -Kpthread,
4919# so we need to run a program to see whether it really made the
4920# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4922echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004923if test "${ac_cv_kpthread+set}" = set; then
4924 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004925else
4926 ac_save_cc="$CC"
4927CC="$CC -Kpthread"
4928if test "$cross_compiling" = yes; then
4929 ac_cv_kpthread=no
4930else
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004932/* confdefs.h. */
4933_ACEOF
4934cat confdefs.h >>conftest.$ac_ext
4935cat >>conftest.$ac_ext <<_ACEOF
4936/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004937
4938#include <pthread.h>
4939
4940void* routine(void* p){return NULL;}
4941
4942int main(){
4943 pthread_t p;
4944 if(pthread_create(&p,NULL,routine,NULL)!=0)
4945 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004946 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004947 return 0;
4948}
4949
Martin v. Löwis11437992002-04-12 09:54:03 +00004950_ACEOF
4951rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004952if { (ac_try="$ac_link"
4953case "(($ac_try" in
4954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4955 *) ac_try_echo=$ac_try;;
4956esac
4957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4958 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004959 ac_status=$?
4960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4961 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962 { (case "(($ac_try" in
4963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4964 *) ac_try_echo=$ac_try;;
4965esac
4966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4967 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004968 ac_status=$?
4969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004971 ac_cv_kpthread=yes
4972else
Martin v. Löwis11437992002-04-12 09:54:03 +00004973 echo "$as_me: program exited with status $ac_status" >&5
4974echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004975sed 's/^/| /' conftest.$ac_ext >&5
4976
Martin v. Löwis11437992002-04-12 09:54:03 +00004977( exit $ac_status )
4978ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980rm -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 +00004981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004982
4983
Martin v. Löwis130fb172001-07-19 11:00:41 +00004984CC="$ac_save_cc"
4985fi
4986
Martin v. Löwiseba40652007-08-30 20:10:57 +00004987{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4988echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004989fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004990
Skip Montanarod8d39a02003-07-10 20:44:10 +00004991if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004992then
4993# -Kthread, if available, provides the right #defines
4994# and linker options to make pthread_create available
4995# Some compilers won't report that they do not support -Kthread,
4996# so we need to run a program to see whether it really made the
4997# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4999echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005000if test "${ac_cv_kthread+set}" = set; then
5001 echo $ECHO_N "(cached) $ECHO_C" >&6
5002else
5003 ac_save_cc="$CC"
5004CC="$CC -Kthread"
5005if test "$cross_compiling" = yes; then
5006 ac_cv_kthread=no
5007else
5008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005009/* confdefs.h. */
5010_ACEOF
5011cat confdefs.h >>conftest.$ac_ext
5012cat >>conftest.$ac_ext <<_ACEOF
5013/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005014
5015#include <pthread.h>
5016
5017void* routine(void* p){return NULL;}
5018
5019int main(){
5020 pthread_t p;
5021 if(pthread_create(&p,NULL,routine,NULL)!=0)
5022 return 1;
5023 (void)pthread_detach(p);
5024 return 0;
5025}
5026
5027_ACEOF
5028rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005029if { (ac_try="$ac_link"
5030case "(($ac_try" in
5031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032 *) ac_try_echo=$ac_try;;
5033esac
5034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5035 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005036 ac_status=$?
5037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005039 { (case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
5043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5044 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005045 ac_status=$?
5046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047 (exit $ac_status); }; }; then
5048 ac_cv_kthread=yes
5049else
5050 echo "$as_me: program exited with status $ac_status" >&5
5051echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005052sed 's/^/| /' conftest.$ac_ext >&5
5053
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005054( exit $ac_status )
5055ac_cv_kthread=no
5056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005057rm -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 +00005058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005059
5060
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005061CC="$ac_save_cc"
5062fi
5063
Martin v. Löwiseba40652007-08-30 20:10:57 +00005064{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5065echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005066fi
5067
Skip Montanarod8d39a02003-07-10 20:44:10 +00005068if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005069then
5070# -pthread, if available, provides the right #defines
5071# and linker options to make pthread_create available
5072# Some compilers won't report that they do not support -pthread,
5073# so we need to run a program to see whether it really made the
5074# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005075{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5076echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005077if test "${ac_cv_thread+set}" = set; then
5078 echo $ECHO_N "(cached) $ECHO_C" >&6
5079else
5080 ac_save_cc="$CC"
5081CC="$CC -pthread"
5082if test "$cross_compiling" = yes; then
5083 ac_cv_pthread=no
5084else
5085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005086/* confdefs.h. */
5087_ACEOF
5088cat confdefs.h >>conftest.$ac_ext
5089cat >>conftest.$ac_ext <<_ACEOF
5090/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005091
5092#include <pthread.h>
5093
5094void* routine(void* p){return NULL;}
5095
5096int main(){
5097 pthread_t p;
5098 if(pthread_create(&p,NULL,routine,NULL)!=0)
5099 return 1;
5100 (void)pthread_detach(p);
5101 return 0;
5102}
5103
5104_ACEOF
5105rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005106if { (ac_try="$ac_link"
5107case "(($ac_try" in
5108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5109 *) ac_try_echo=$ac_try;;
5110esac
5111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5112 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005113 ac_status=$?
5114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005116 { (case "(($ac_try" in
5117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5118 *) ac_try_echo=$ac_try;;
5119esac
5120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5121 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); }; }; then
5125 ac_cv_pthread=yes
5126else
5127 echo "$as_me: program exited with status $ac_status" >&5
5128echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005129sed 's/^/| /' conftest.$ac_ext >&5
5130
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005131( exit $ac_status )
5132ac_cv_pthread=no
5133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005134rm -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 +00005135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005136
5137
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005138CC="$ac_save_cc"
5139fi
5140
Martin v. Löwiseba40652007-08-30 20:10:57 +00005141{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5142echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005143fi
5144
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005145# If we have set a CC compiler flag for thread support then
5146# check if it works for CXX, too.
5147ac_cv_cxx_thread=no
5148if test ! -z "$CXX"
5149then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005150{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5151echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005152ac_save_cxx="$CXX"
5153
5154if test "$ac_cv_kpthread" = "yes"
5155then
5156 CXX="$CXX -Kpthread"
5157 ac_cv_cxx_thread=yes
5158elif test "$ac_cv_kthread" = "yes"
5159then
5160 CXX="$CXX -Kthread"
5161 ac_cv_cxx_thread=yes
5162elif test "$ac_cv_pthread" = "yes"
5163then
5164 CXX="$CXX -pthread"
5165 ac_cv_cxx_thread=yes
5166fi
5167
5168if test $ac_cv_cxx_thread = yes
5169then
5170 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5171 $CXX -c conftest.$ac_ext 2>&5
5172 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5173 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5174 then
5175 ac_cv_cxx_thread=yes
5176 else
5177 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005178 fi
5179 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005181{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5182echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005183fi
5184CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005185
Michael W. Hudson54241132001-12-07 15:38:26 +00005186
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005187# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005188{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5189echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005190if test "${ac_cv_header_stdc+set}" = set; then
5191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192else
Martin v. Löwis11437992002-04-12 09:54:03 +00005193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005194/* confdefs.h. */
5195_ACEOF
5196cat confdefs.h >>conftest.$ac_ext
5197cat >>conftest.$ac_ext <<_ACEOF
5198/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005199#include <stdlib.h>
5200#include <stdarg.h>
5201#include <string.h>
5202#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005203
Skip Montanaro6dead952003-09-25 14:50:04 +00005204int
5205main ()
5206{
5207
5208 ;
5209 return 0;
5210}
Martin v. Löwis11437992002-04-12 09:54:03 +00005211_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005212rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005213if { (ac_try="$ac_compile"
5214case "(($ac_try" in
5215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5216 *) ac_try_echo=$ac_try;;
5217esac
5218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005221 grep -v '^ *+' conftest.er1 >conftest.err
5222 rm -f conftest.er1
5223 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005225 (exit $ac_status); } && {
5226 test -z "$ac_c_werror_flag" ||
5227 test ! -s conftest.err
5228 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005229 ac_cv_header_stdc=yes
5230else
Martin v. Löwis11437992002-04-12 09:54:03 +00005231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005232sed 's/^/| /' conftest.$ac_ext >&5
5233
Martin v. Löwiseba40652007-08-30 20:10:57 +00005234 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005236
5237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238
5239if test $ac_cv_header_stdc = yes; then
5240 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005242/* confdefs.h. */
5243_ACEOF
5244cat confdefs.h >>conftest.$ac_ext
5245cat >>conftest.$ac_ext <<_ACEOF
5246/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005247#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005248
5249_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005251 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252 :
5253else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005254 ac_cv_header_stdc=no
5255fi
5256rm -f conftest*
5257
5258fi
5259
5260if test $ac_cv_header_stdc = yes; then
5261 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005263/* confdefs.h. */
5264_ACEOF
5265cat confdefs.h >>conftest.$ac_ext
5266cat >>conftest.$ac_ext <<_ACEOF
5267/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005268#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005269
5270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005272 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005273 :
5274else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275 ac_cv_header_stdc=no
5276fi
5277rm -f conftest*
5278
5279fi
5280
5281if test $ac_cv_header_stdc = yes; then
5282 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005283 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005284 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005285else
Martin v. Löwis11437992002-04-12 09:54:03 +00005286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005287/* confdefs.h. */
5288_ACEOF
5289cat confdefs.h >>conftest.$ac_ext
5290cat >>conftest.$ac_ext <<_ACEOF
5291/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005292#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005294#if ((' ' & 0x0FF) == 0x020)
5295# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5296# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5297#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005298# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005299 (('a' <= (c) && (c) <= 'i') \
5300 || ('j' <= (c) && (c) <= 'r') \
5301 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005302# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5303#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005304
Martin v. Löwis11437992002-04-12 09:54:03 +00005305#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5306int
5307main ()
5308{
5309 int i;
5310 for (i = 0; i < 256; i++)
5311 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005312 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005313 return 2;
5314 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005315}
5316_ACEOF
5317rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005318if { (ac_try="$ac_link"
5319case "(($ac_try" in
5320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5321 *) ac_try_echo=$ac_try;;
5322esac
5323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5324 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005325 ac_status=$?
5326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005328 { (case "(($ac_try" in
5329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5330 *) ac_try_echo=$ac_try;;
5331esac
5332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5333 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005334 ac_status=$?
5335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337 :
5338else
Martin v. Löwis11437992002-04-12 09:54:03 +00005339 echo "$as_me: program exited with status $ac_status" >&5
5340echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005341sed 's/^/| /' conftest.$ac_ext >&5
5342
Martin v. Löwis11437992002-04-12 09:54:03 +00005343( exit $ac_status )
5344ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5347fi
5348
5349
Michael W. Hudson54241132001-12-07 15:38:26 +00005350fi
5351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005352{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5353echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005354if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005355
5356cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005357#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005358_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005359
5360fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005361
Skip Montanarob9820a32004-01-17 00:16:12 +00005362# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005373 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005374do
5375as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005376{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5377echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5378if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005379 echo $ECHO_N "(cached) $ECHO_C" >&6
5380else
5381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005382/* confdefs.h. */
5383_ACEOF
5384cat confdefs.h >>conftest.$ac_ext
5385cat >>conftest.$ac_ext <<_ACEOF
5386/* end confdefs.h. */
5387$ac_includes_default
5388
5389#include <$ac_header>
5390_ACEOF
5391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005392if { (ac_try="$ac_compile"
5393case "(($ac_try" in
5394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5395 *) ac_try_echo=$ac_try;;
5396esac
5397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5398 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005400 grep -v '^ *+' conftest.er1 >conftest.err
5401 rm -f conftest.er1
5402 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005404 (exit $ac_status); } && {
5405 test -z "$ac_c_werror_flag" ||
5406 test ! -s conftest.err
5407 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005408 eval "$as_ac_Header=yes"
5409else
5410 echo "$as_me: failed program was:" >&5
5411sed 's/^/| /' conftest.$ac_ext >&5
5412
Martin v. Löwiseba40652007-08-30 20:10:57 +00005413 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005415
5416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005418ac_res=`eval echo '${'$as_ac_Header'}'`
5419 { echo "$as_me:$LINENO: result: $ac_res" >&5
5420echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005421if test `eval echo '${'$as_ac_Header'}'` = yes; then
5422 cat >>confdefs.h <<_ACEOF
5423#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5424_ACEOF
5425
5426fi
5427
5428done
5429
5430
Martin v. Löwis11437992002-04-12 09:54:03 +00005431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
Anthony Baxter8a560de2004-10-13 15:30:56 +00005467
Martin v. Löwisc3001752005-01-23 09:27:24 +00005468
Martin v. Löwis11017b12006-01-14 18:12:57 +00005469
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005470
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005471
5472
5473
5474
5475
5476
5477
5478
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005479
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005480
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005481
5482
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005483
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005484
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005485for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5486fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005487ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005488shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005489unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005490sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5491sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005492sys/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 +00005493sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005494sys/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 +00005495sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005496bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005497do
Martin v. Löwis11437992002-04-12 09:54:03 +00005498as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005499if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5500 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5501echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5502if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005503 echo $ECHO_N "(cached) $ECHO_C" >&6
5504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005505ac_res=`eval echo '${'$as_ac_Header'}'`
5506 { echo "$as_me:$LINENO: result: $ac_res" >&5
5507echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005508else
Martin v. Löwis11437992002-04-12 09:54:03 +00005509 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005510{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5511echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005512cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005513/* confdefs.h. */
5514_ACEOF
5515cat confdefs.h >>conftest.$ac_ext
5516cat >>conftest.$ac_ext <<_ACEOF
5517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005518$ac_includes_default
5519#include <$ac_header>
5520_ACEOF
5521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005522if { (ac_try="$ac_compile"
5523case "(($ac_try" in
5524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5525 *) ac_try_echo=$ac_try;;
5526esac
5527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005530 grep -v '^ *+' conftest.er1 >conftest.err
5531 rm -f conftest.er1
5532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005534 (exit $ac_status); } && {
5535 test -z "$ac_c_werror_flag" ||
5536 test ! -s conftest.err
5537 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005538 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005539else
Martin v. Löwis11437992002-04-12 09:54:03 +00005540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005541sed 's/^/| /' conftest.$ac_ext >&5
5542
Martin v. Löwiseba40652007-08-30 20:10:57 +00005543 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005545
5546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5547{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5548echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005549
5550# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005551{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5552echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005554/* confdefs.h. */
5555_ACEOF
5556cat confdefs.h >>conftest.$ac_ext
5557cat >>conftest.$ac_ext <<_ACEOF
5558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005559#include <$ac_header>
5560_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005561if { (ac_try="$ac_cpp conftest.$ac_ext"
5562case "(($ac_try" in
5563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5564 *) ac_try_echo=$ac_try;;
5565esac
5566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5567 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005568 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005569 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005570 rm -f conftest.er1
5571 cat conftest.err >&5
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005573 (exit $ac_status); } >/dev/null && {
5574 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5575 test ! -s conftest.err
5576 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005577 ac_header_preproc=yes
5578else
5579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005580sed 's/^/| /' conftest.$ac_ext >&5
5581
Martin v. Löwis11437992002-04-12 09:54:03 +00005582 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005584
Martin v. Löwis11437992002-04-12 09:54:03 +00005585rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005586{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5587echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005588
5589# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005590case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5591 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005592 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5593echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005594 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5595echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5596 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005597 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005598 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005599 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5600echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005601 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5602echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5603 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5604echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5605 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5606echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005607 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5608echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005609 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5610echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005611 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005612## ------------------------------------------------ ##
5613## Report this to http://www.python.org/python-bugs ##
5614## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005615_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005616 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005617 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005618esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005619{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5620echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5621if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005623else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005624 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005626ac_res=`eval echo '${'$as_ac_Header'}'`
5627 { echo "$as_me:$LINENO: result: $ac_res" >&5
5628echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005629
5630fi
5631if test `eval echo '${'$as_ac_Header'}'` = yes; then
5632 cat >>confdefs.h <<_ACEOF
5633#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5634_ACEOF
5635
5636fi
5637
Guido van Rossum627b2d71993-12-24 10:39:16 +00005638done
5639
Martin v. Löwis11437992002-04-12 09:54:03 +00005640
5641
5642
5643
5644
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005645ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005646for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5647 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005648{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5649echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5650if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652else
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005654/* confdefs.h. */
5655_ACEOF
5656cat confdefs.h >>conftest.$ac_ext
5657cat >>conftest.$ac_ext <<_ACEOF
5658/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005659#include <sys/types.h>
5660#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005661
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
5665if ((DIR *) 0)
5666return 0;
5667 ;
5668 return 0;
5669}
5670_ACEOF
5671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672if { (ac_try="$ac_compile"
5673case "(($ac_try" in
5674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5675 *) ac_try_echo=$ac_try;;
5676esac
5677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005680 grep -v '^ *+' conftest.er1 >conftest.err
5681 rm -f conftest.er1
5682 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684 (exit $ac_status); } && {
5685 test -z "$ac_c_werror_flag" ||
5686 test ! -s conftest.err
5687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005689else
Martin v. Löwis11437992002-04-12 09:54:03 +00005690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005691sed 's/^/| /' conftest.$ac_ext >&5
5692
Martin v. Löwiseba40652007-08-30 20:10:57 +00005693 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005695
5696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005698ac_res=`eval echo '${'$as_ac_Header'}'`
5699 { echo "$as_me:$LINENO: result: $ac_res" >&5
5700echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005701if test `eval echo '${'$as_ac_Header'}'` = yes; then
5702 cat >>confdefs.h <<_ACEOF
5703#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5704_ACEOF
5705
5706ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005709done
5710# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5711if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005712 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5713echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005714if test "${ac_cv_search_opendir+set}" = set; then
5715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005716else
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005719/* confdefs.h. */
5720_ACEOF
5721cat confdefs.h >>conftest.$ac_ext
5722cat >>conftest.$ac_ext <<_ACEOF
5723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005724
Martin v. Löwiseba40652007-08-30 20:10:57 +00005725/* Override any GCC internal prototype to avoid an error.
5726 Use char because int might match the return type of a GCC
5727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005728#ifdef __cplusplus
5729extern "C"
5730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005731char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005732int
5733main ()
5734{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005735return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005736 ;
5737 return 0;
5738}
5739_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005740for ac_lib in '' dir; do
5741 if test -z "$ac_lib"; then
5742 ac_res="none required"
5743 else
5744 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005745 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005746 fi
5747 rm -f conftest.$ac_objext conftest$ac_exeext
5748if { (ac_try="$ac_link"
5749case "(($ac_try" in
5750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5751 *) ac_try_echo=$ac_try;;
5752esac
5753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5754 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005755 ac_status=$?
5756 grep -v '^ *+' conftest.er1 >conftest.err
5757 rm -f conftest.er1
5758 cat conftest.err >&5
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760 (exit $ac_status); } && {
5761 test -z "$ac_c_werror_flag" ||
5762 test ! -s conftest.err
5763 } && test -s conftest$ac_exeext &&
5764 $as_test_x conftest$ac_exeext; then
5765 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005766else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005767 echo "$as_me: failed program was:" >&5
5768sed 's/^/| /' conftest.$ac_ext >&5
5769
Martin v. Löwiseba40652007-08-30 20:10:57 +00005770
Brett Cannon19fab762007-06-02 03:02:29 +00005771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005772
5773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5774 conftest$ac_exeext
5775 if test "${ac_cv_search_opendir+set}" = set; then
5776 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005778done
5779if test "${ac_cv_search_opendir+set}" = set; then
5780 :
5781else
5782 ac_cv_search_opendir=no
5783fi
5784rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005785LIBS=$ac_func_search_save_LIBS
5786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005787{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5788echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5789ac_res=$ac_cv_search_opendir
5790if test "$ac_res" != no; then
5791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005794
Michael W. Hudson54241132001-12-07 15:38:26 +00005795else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005796 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5797echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005798if test "${ac_cv_search_opendir+set}" = set; then
5799 echo $ECHO_N "(cached) $ECHO_C" >&6
5800else
5801 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005803/* confdefs.h. */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809/* Override any GCC internal prototype to avoid an error.
5810 Use char because int might match the return type of a GCC
5811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005812#ifdef __cplusplus
5813extern "C"
5814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005815char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005816int
5817main ()
5818{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 ;
5821 return 0;
5822}
5823_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005824for ac_lib in '' x; do
5825 if test -z "$ac_lib"; then
5826 ac_res="none required"
5827 else
5828 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005830 fi
5831 rm -f conftest.$ac_objext conftest$ac_exeext
5832if { (ac_try="$ac_link"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
5837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5838 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005839 ac_status=$?
5840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
5843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
5847 } && test -s conftest$ac_exeext &&
5848 $as_test_x conftest$ac_exeext; then
5849 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005850else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005851 echo "$as_me: failed program was:" >&5
5852sed 's/^/| /' conftest.$ac_ext >&5
5853
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854
Brett Cannon19fab762007-06-02 03:02:29 +00005855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005856
5857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5858 conftest$ac_exeext
5859 if test "${ac_cv_search_opendir+set}" = set; then
5860 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862done
5863if test "${ac_cv_search_opendir+set}" = set; then
5864 :
5865else
5866 ac_cv_search_opendir=no
5867fi
5868rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005869LIBS=$ac_func_search_save_LIBS
5870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5872echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5873ac_res=$ac_cv_search_opendir
5874if test "$ac_res" != no; then
5875 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005876
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877fi
5878
5879fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005880
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5882echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005883if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5884 echo $ECHO_N "(cached) $ECHO_C" >&6
5885else
5886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005892#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005893int
5894main ()
5895{
5896return makedev(0, 0);
5897 ;
5898 return 0;
5899}
5900_ACEOF
5901rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005902if { (ac_try="$ac_link"
5903case "(($ac_try" in
5904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5905 *) ac_try_echo=$ac_try;;
5906esac
5907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5908 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005910 grep -v '^ *+' conftest.er1 >conftest.err
5911 rm -f conftest.er1
5912 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 (exit $ac_status); } && {
5915 test -z "$ac_c_werror_flag" ||
5916 test ! -s conftest.err
5917 } && test -s conftest$ac_exeext &&
5918 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005919 ac_cv_header_sys_types_h_makedev=yes
5920else
5921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005922sed 's/^/| /' conftest.$ac_ext >&5
5923
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926
5927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005929
5930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005931{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5932echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005933
5934if test $ac_cv_header_sys_types_h_makedev = no; then
5935if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5937echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005938if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5939 echo $ECHO_N "(cached) $ECHO_C" >&6
5940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005941{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5942echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005943else
5944 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005945{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5946echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005948/* confdefs.h. */
5949_ACEOF
5950cat confdefs.h >>conftest.$ac_ext
5951cat >>conftest.$ac_ext <<_ACEOF
5952/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005953$ac_includes_default
5954#include <sys/mkdev.h>
5955_ACEOF
5956rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957if { (ac_try="$ac_compile"
5958case "(($ac_try" in
5959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5960 *) ac_try_echo=$ac_try;;
5961esac
5962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005965 grep -v '^ *+' conftest.er1 >conftest.err
5966 rm -f conftest.er1
5967 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969 (exit $ac_status); } && {
5970 test -z "$ac_c_werror_flag" ||
5971 test ! -s conftest.err
5972 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005973 ac_header_compiler=yes
5974else
5975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005976sed 's/^/| /' conftest.$ac_ext >&5
5977
Martin v. Löwiseba40652007-08-30 20:10:57 +00005978 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005980
5981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5982{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5983echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984
5985# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005986{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5987echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005989/* confdefs.h. */
5990_ACEOF
5991cat confdefs.h >>conftest.$ac_ext
5992cat >>conftest.$ac_ext <<_ACEOF
5993/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994#include <sys/mkdev.h>
5995_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005996if { (ac_try="$ac_cpp conftest.$ac_ext"
5997case "(($ac_try" in
5998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5999 *) ac_try_echo=$ac_try;;
6000esac
6001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6002 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006004 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005 rm -f conftest.er1
6006 cat conftest.err >&5
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008 (exit $ac_status); } >/dev/null && {
6009 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6010 test ! -s conftest.err
6011 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012 ac_header_preproc=yes
6013else
6014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006015sed 's/^/| /' conftest.$ac_ext >&5
6016
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017 ac_header_preproc=no
6018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6022echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023
6024# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006025case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6026 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6028echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006029 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6030echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6031 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006032 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006033 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006034 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6035echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006036 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6037echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6038 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6039echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6040 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6041echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006042 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6043echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006044 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6045echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006046 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006047## ------------------------------------------------ ##
6048## Report this to http://www.python.org/python-bugs ##
6049## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006050_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006051 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006052 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6055echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6057 echo $ECHO_N "(cached) $ECHO_C" >&6
6058else
6059 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6062echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063
6064fi
6065if test $ac_cv_header_sys_mkdev_h = yes; then
6066
6067cat >>confdefs.h <<\_ACEOF
6068#define MAJOR_IN_MKDEV 1
6069_ACEOF
6070
6071fi
6072
6073
6074
6075 if test $ac_cv_header_sys_mkdev_h = no; then
6076 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6078echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6080 echo $ECHO_N "(cached) $ECHO_C" >&6
6081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006082{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6083echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084else
6085 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6087echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094$ac_includes_default
6095#include <sys/sysmacros.h>
6096_ACEOF
6097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098if { (ac_try="$ac_compile"
6099case "(($ac_try" in
6100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6101 *) ac_try_echo=$ac_try;;
6102esac
6103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106 grep -v '^ *+' conftest.er1 >conftest.err
6107 rm -f conftest.er1
6108 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110 (exit $ac_status); } && {
6111 test -z "$ac_c_werror_flag" ||
6112 test ! -s conftest.err
6113 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_compiler=yes
6115else
6116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006117sed 's/^/| /' conftest.$ac_ext >&5
6118
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121
6122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6123{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6124echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125
6126# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6128echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006130/* confdefs.h. */
6131_ACEOF
6132cat confdefs.h >>conftest.$ac_ext
6133cat >>conftest.$ac_ext <<_ACEOF
6134/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135#include <sys/sysmacros.h>
6136_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137if { (ac_try="$ac_cpp conftest.$ac_ext"
6138case "(($ac_try" in
6139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6140 *) ac_try_echo=$ac_try;;
6141esac
6142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6143 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006145 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146 rm -f conftest.er1
6147 cat conftest.err >&5
6148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149 (exit $ac_status); } >/dev/null && {
6150 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6151 test ! -s conftest.err
6152 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153 ac_header_preproc=yes
6154else
6155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006156sed 's/^/| /' conftest.$ac_ext >&5
6157
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_header_preproc=no
6159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006160
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6163echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164
6165# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006166case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6167 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6169echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006170 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6171echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6172 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006173 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006174 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006175 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6176echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006177 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6178echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6179 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6180echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6181 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6182echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006183 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6184echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6186echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006187 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006188## ------------------------------------------------ ##
6189## Report this to http://www.python.org/python-bugs ##
6190## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006191_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006193 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6196echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6198 echo $ECHO_N "(cached) $ECHO_C" >&6
6199else
6200 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6203echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205fi
6206if test $ac_cv_header_sys_sysmacros_h = yes; then
6207
6208cat >>confdefs.h <<\_ACEOF
6209#define MAJOR_IN_SYSMACROS 1
6210_ACEOF
6211
6212fi
6213
6214
6215 fi
6216fi
6217
Michael W. Hudson54241132001-12-07 15:38:26 +00006218
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006219# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006220
6221for ac_header in term.h
6222do
6223as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6225echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6226if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006227 echo $ECHO_N "(cached) $ECHO_C" >&6
6228else
6229 cat >conftest.$ac_ext <<_ACEOF
6230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006235
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006236#ifdef HAVE_CURSES_H
6237#include <curses.h>
6238#endif
6239
6240
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006241#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006242_ACEOF
6243rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244if { (ac_try="$ac_compile"
6245case "(($ac_try" in
6246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6247 *) ac_try_echo=$ac_try;;
6248esac
6249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006251 ac_status=$?
6252 grep -v '^ *+' conftest.er1 >conftest.err
6253 rm -f conftest.er1
6254 cat conftest.err >&5
6255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256 (exit $ac_status); } && {
6257 test -z "$ac_c_werror_flag" ||
6258 test ! -s conftest.err
6259 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006260 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006261else
6262 echo "$as_me: failed program was:" >&5
6263sed 's/^/| /' conftest.$ac_ext >&5
6264
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267
6268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270ac_res=`eval echo '${'$as_ac_Header'}'`
6271 { echo "$as_me:$LINENO: result: $ac_res" >&5
6272echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006273if test `eval echo '${'$as_ac_Header'}'` = yes; then
6274 cat >>confdefs.h <<_ACEOF
6275#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6276_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006277
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006278fi
6279
6280done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006281
6282
Martin v. Löwis11017b12006-01-14 18:12:57 +00006283# On Linux, netlink.h requires asm/types.h
6284
6285for ac_header in linux/netlink.h
6286do
6287as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6289echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6290if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006291 echo $ECHO_N "(cached) $ECHO_C" >&6
6292else
6293 cat >conftest.$ac_ext <<_ACEOF
6294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
6299
6300#ifdef HAVE_ASM_TYPES_H
6301#include <asm/types.h>
6302#endif
6303#ifdef HAVE_SYS_SOCKET_H
6304#include <sys/socket.h>
6305#endif
6306
6307
6308#include <$ac_header>
6309_ACEOF
6310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006311if { (ac_try="$ac_compile"
6312case "(($ac_try" in
6313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6314 *) ac_try_echo=$ac_try;;
6315esac
6316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006318 ac_status=$?
6319 grep -v '^ *+' conftest.er1 >conftest.err
6320 rm -f conftest.er1
6321 cat conftest.err >&5
6322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006323 (exit $ac_status); } && {
6324 test -z "$ac_c_werror_flag" ||
6325 test ! -s conftest.err
6326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006327 eval "$as_ac_Header=yes"
6328else
6329 echo "$as_me: failed program was:" >&5
6330sed 's/^/| /' conftest.$ac_ext >&5
6331
Martin v. Löwiseba40652007-08-30 20:10:57 +00006332 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006334
6335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006337ac_res=`eval echo '${'$as_ac_Header'}'`
6338 { echo "$as_me:$LINENO: result: $ac_res" >&5
6339echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006340if test `eval echo '${'$as_ac_Header'}'` = yes; then
6341 cat >>confdefs.h <<_ACEOF
6342#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6343_ACEOF
6344
6345fi
6346
6347done
6348
6349
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006351was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006352{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6353echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006355/* confdefs.h. */
6356_ACEOF
6357cat confdefs.h >>conftest.$ac_ext
6358cat >>conftest.$ac_ext <<_ACEOF
6359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006360#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006361
6362_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006364 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006365 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006366else
Martin v. Löwis11437992002-04-12 09:54:03 +00006367
6368
6369cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006370#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006371_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006372
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006373
Guido van Rossum627b2d71993-12-24 10:39:16 +00006374fi
6375rm -f conftest*
6376
Martin v. Löwiseba40652007-08-30 20:10:57 +00006377{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6378echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006379
Neal Norwitz11690112002-07-30 01:08:28 +00006380# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006381{ echo "$as_me:$LINENO: checking for makedev" >&5
6382echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006384/* confdefs.h. */
6385_ACEOF
6386cat confdefs.h >>conftest.$ac_ext
6387cat >>conftest.$ac_ext <<_ACEOF
6388/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006389#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006390int
6391main ()
6392{
6393 makedev(0, 0)
6394 ;
6395 return 0;
6396}
6397_ACEOF
6398rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399if { (ac_try="$ac_link"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
6404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6405 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 (exit $ac_status); } && {
6412 test -z "$ac_c_werror_flag" ||
6413 test ! -s conftest.err
6414 } && test -s conftest$ac_exeext &&
6415 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006416 ac_cv_has_makedev=yes
6417else
6418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006419sed 's/^/| /' conftest.$ac_ext >&5
6420
Martin v. Löwiseba40652007-08-30 20:10:57 +00006421 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006423
6424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006425 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006426if test "$ac_cv_has_makedev" = "no"; then
6427 # we didn't link, try if _OSF_SOURCE will allow us to link
6428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006429/* confdefs.h. */
6430_ACEOF
6431cat confdefs.h >>conftest.$ac_ext
6432cat >>conftest.$ac_ext <<_ACEOF
6433/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006434
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006435#define _OSF_SOURCE 1
6436#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006437
Neal Norwitz11690112002-07-30 01:08:28 +00006438int
6439main ()
6440{
6441 makedev(0, 0)
6442 ;
6443 return 0;
6444}
6445_ACEOF
6446rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006447if { (ac_try="$ac_link"
6448case "(($ac_try" in
6449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6450 *) ac_try_echo=$ac_try;;
6451esac
6452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6453 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006455 grep -v '^ *+' conftest.er1 >conftest.err
6456 rm -f conftest.er1
6457 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459 (exit $ac_status); } && {
6460 test -z "$ac_c_werror_flag" ||
6461 test ! -s conftest.err
6462 } && test -s conftest$ac_exeext &&
6463 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006464 ac_cv_has_makedev=yes
6465else
6466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006467sed 's/^/| /' conftest.$ac_ext >&5
6468
Martin v. Löwiseba40652007-08-30 20:10:57 +00006469 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471
6472rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006473 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006474 if test "$ac_cv_has_makedev" = "yes"; then
6475
6476cat >>confdefs.h <<\_ACEOF
6477#define _OSF_SOURCE 1
6478_ACEOF
6479
6480 fi
6481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6483echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006484if test "$ac_cv_has_makedev" = "yes"; then
6485
6486cat >>confdefs.h <<\_ACEOF
6487#define HAVE_MAKEDEV 1
6488_ACEOF
6489
6490fi
6491
Martin v. Löwis399a6892002-10-04 10:22:02 +00006492# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6493# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6494# defined, but the compiler does not support pragma redefine_extname,
6495# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6496# structures (such as rlimit64) without declaring them. As a
6497# work-around, disable LFS on such configurations
6498
6499use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006500{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6501echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006503/* confdefs.h. */
6504_ACEOF
6505cat confdefs.h >>conftest.$ac_ext
6506cat >>conftest.$ac_ext <<_ACEOF
6507/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006508
6509#define _LARGEFILE_SOURCE 1
6510#define _FILE_OFFSET_BITS 64
6511#include <sys/resource.h>
6512
Martin v. Löwis399a6892002-10-04 10:22:02 +00006513int
6514main ()
6515{
6516struct rlimit foo;
6517 ;
6518 return 0;
6519}
6520_ACEOF
6521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006522if { (ac_try="$ac_compile"
6523case "(($ac_try" in
6524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6525 *) ac_try_echo=$ac_try;;
6526esac
6527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006530 grep -v '^ *+' conftest.er1 >conftest.err
6531 rm -f conftest.er1
6532 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006534 (exit $ac_status); } && {
6535 test -z "$ac_c_werror_flag" ||
6536 test ! -s conftest.err
6537 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006538 sol_lfs_bug=no
6539else
6540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006541sed 's/^/| /' conftest.$ac_ext >&5
6542
Martin v. Löwiseba40652007-08-30 20:10:57 +00006543 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006545
6546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6547{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6548echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006549if test "$sol_lfs_bug" = "yes"; then
6550 use_lfs=no
6551fi
6552
6553if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006554# Two defines needed to enable largefile support on various platforms
6555# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006556
Martin v. Löwis11437992002-04-12 09:54:03 +00006557cat >>confdefs.h <<\_ACEOF
6558#define _LARGEFILE_SOURCE 1
6559_ACEOF
6560
6561
6562cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006563#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006564_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006565
Martin v. Löwis399a6892002-10-04 10:22:02 +00006566fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006567
Guido van Rossum84e7b241996-08-19 21:59:00 +00006568# Add some code to confdefs.h so that the test for off_t works on SCO
6569cat >> confdefs.h <<\EOF
6570#if defined(SCO_DS)
6571#undef _OFF_T
6572#endif
6573EOF
6574
Guido van Rossumef2255b2000-03-10 22:30:29 +00006575# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576{ echo "$as_me:$LINENO: checking for mode_t" >&5
6577echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006578if test "${ac_cv_type_mode_t+set}" = set; then
6579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580else
Martin v. Löwis11437992002-04-12 09:54:03 +00006581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* confdefs.h. */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006587$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006588typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006589int
6590main ()
6591{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006593 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006595 return 0;
6596 ;
6597 return 0;
6598}
6599_ACEOF
6600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006601if { (ac_try="$ac_compile"
6602case "(($ac_try" in
6603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6604 *) ac_try_echo=$ac_try;;
6605esac
6606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006609 grep -v '^ *+' conftest.er1 >conftest.err
6610 rm -f conftest.er1
6611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613 (exit $ac_status); } && {
6614 test -z "$ac_c_werror_flag" ||
6615 test ! -s conftest.err
6616 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006617 ac_cv_type_mode_t=yes
6618else
Martin v. Löwis11437992002-04-12 09:54:03 +00006619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006620sed 's/^/| /' conftest.$ac_ext >&5
6621
Martin v. Löwiseba40652007-08-30 20:10:57 +00006622 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624
6625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006627{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6628echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006629if test $ac_cv_type_mode_t = yes; then
6630 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006631else
Martin v. Löwis11437992002-04-12 09:54:03 +00006632
6633cat >>confdefs.h <<_ACEOF
6634#define mode_t int
6635_ACEOF
6636
6637fi
6638
Martin v. Löwiseba40652007-08-30 20:10:57 +00006639{ echo "$as_me:$LINENO: checking for off_t" >&5
6640echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006641if test "${ac_cv_type_off_t+set}" = set; then
6642 echo $ECHO_N "(cached) $ECHO_C" >&6
6643else
6644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006645/* confdefs.h. */
6646_ACEOF
6647cat confdefs.h >>conftest.$ac_ext
6648cat >>conftest.$ac_ext <<_ACEOF
6649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006651typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006652int
6653main ()
6654{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006655if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006656 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006657if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006658 return 0;
6659 ;
6660 return 0;
6661}
6662_ACEOF
6663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006664if { (ac_try="$ac_compile"
6665case "(($ac_try" in
6666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6667 *) ac_try_echo=$ac_try;;
6668esac
6669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006672 grep -v '^ *+' conftest.er1 >conftest.err
6673 rm -f conftest.er1
6674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676 (exit $ac_status); } && {
6677 test -z "$ac_c_werror_flag" ||
6678 test ! -s conftest.err
6679 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006680 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006681else
Martin v. Löwis11437992002-04-12 09:54:03 +00006682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006683sed 's/^/| /' conftest.$ac_ext >&5
6684
Martin v. Löwiseba40652007-08-30 20:10:57 +00006685 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687
6688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6691echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006692if test $ac_cv_type_off_t = yes; then
6693 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006694else
Martin v. Löwis11437992002-04-12 09:54:03 +00006695
6696cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006697#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006698_ACEOF
6699
6700fi
6701
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702{ echo "$as_me:$LINENO: checking for pid_t" >&5
6703echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006704if test "${ac_cv_type_pid_t+set}" = set; then
6705 echo $ECHO_N "(cached) $ECHO_C" >&6
6706else
6707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006708/* confdefs.h. */
6709_ACEOF
6710cat confdefs.h >>conftest.$ac_ext
6711cat >>conftest.$ac_ext <<_ACEOF
6712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006713$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006714typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006715int
6716main ()
6717{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006721 return 0;
6722 ;
6723 return 0;
6724}
6725_ACEOF
6726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727if { (ac_try="$ac_compile"
6728case "(($ac_try" in
6729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6730 *) ac_try_echo=$ac_try;;
6731esac
6732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006735 grep -v '^ *+' conftest.er1 >conftest.err
6736 rm -f conftest.er1
6737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739 (exit $ac_status); } && {
6740 test -z "$ac_c_werror_flag" ||
6741 test ! -s conftest.err
6742 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006743 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006744else
Martin v. Löwis11437992002-04-12 09:54:03 +00006745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006746sed 's/^/| /' conftest.$ac_ext >&5
6747
Martin v. Löwiseba40652007-08-30 20:10:57 +00006748 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750
6751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6754echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006755if test $ac_cv_type_pid_t = yes; then
6756 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757else
Martin v. Löwis11437992002-04-12 09:54:03 +00006758
6759cat >>confdefs.h <<_ACEOF
6760#define pid_t int
6761_ACEOF
6762
6763fi
6764
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6766echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006767if test "${ac_cv_type_signal+set}" = set; then
6768 echo $ECHO_N "(cached) $ECHO_C" >&6
6769else
6770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006771/* confdefs.h. */
6772_ACEOF
6773cat confdefs.h >>conftest.$ac_ext
6774cat >>conftest.$ac_ext <<_ACEOF
6775/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006776#include <sys/types.h>
6777#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779int
6780main ()
6781{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 ;
6784 return 0;
6785}
6786_ACEOF
6787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006788if { (ac_try="$ac_compile"
6789case "(($ac_try" in
6790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6791 *) ac_try_echo=$ac_try;;
6792esac
6793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006796 grep -v '^ *+' conftest.er1 >conftest.err
6797 rm -f conftest.er1
6798 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800 (exit $ac_status); } && {
6801 test -z "$ac_c_werror_flag" ||
6802 test ! -s conftest.err
6803 } && test -s conftest.$ac_objext; then
6804 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006805else
Martin v. Löwis11437992002-04-12 09:54:03 +00006806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006807sed 's/^/| /' conftest.$ac_ext >&5
6808
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811
6812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6815echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006816
Martin v. Löwis11437992002-04-12 09:54:03 +00006817cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006818#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006819_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006820
Michael W. Hudson54241132001-12-07 15:38:26 +00006821
Martin v. Löwiseba40652007-08-30 20:10:57 +00006822{ echo "$as_me:$LINENO: checking for size_t" >&5
6823echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006824if test "${ac_cv_type_size_t+set}" = set; then
6825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006826else
Martin v. Löwis11437992002-04-12 09:54:03 +00006827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006828/* confdefs.h. */
6829_ACEOF
6830cat confdefs.h >>conftest.$ac_ext
6831cat >>conftest.$ac_ext <<_ACEOF
6832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006833$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006835int
6836main ()
6837{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006838if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 return 0;
6842 ;
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
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006863 ac_cv_type_size_t=yes
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_size_t=no
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
Michael W. Hudson54241132001-12-07 15:38:26 +00006872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006873{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6874echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006875if test $ac_cv_type_size_t = yes; then
6876 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006877else
Martin v. Löwis11437992002-04-12 09:54:03 +00006878
6879cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006881_ACEOF
6882
6883fi
6884
Martin v. Löwiseba40652007-08-30 20:10:57 +00006885{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6886echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006887if test "${ac_cv_type_uid_t+set}" = set; then
6888 echo $ECHO_N "(cached) $ECHO_C" >&6
6889else
6890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006891/* confdefs.h. */
6892_ACEOF
6893cat confdefs.h >>conftest.$ac_ext
6894cat >>conftest.$ac_ext <<_ACEOF
6895/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006896#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006897
6898_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006900 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006901 ac_cv_type_uid_t=yes
6902else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903 ac_cv_type_uid_t=no
6904fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905rm -f conftest*
6906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6909echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006910if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912cat >>confdefs.h <<\_ACEOF
6913#define uid_t int
6914_ACEOF
6915
6916
6917cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006919_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920
6921fi
6922
Martin v. Löwiseba40652007-08-30 20:10:57 +00006923{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6924echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006925if test "${ac_cv_type_ssize_t+set}" = set; then
6926 echo $ECHO_N "(cached) $ECHO_C" >&6
6927else
6928 cat >conftest.$ac_ext <<_ACEOF
6929/* confdefs.h. */
6930_ACEOF
6931cat confdefs.h >>conftest.$ac_ext
6932cat >>conftest.$ac_ext <<_ACEOF
6933/* end confdefs.h. */
6934$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006936int
6937main ()
6938{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006940 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006942 return 0;
6943 ;
6944 return 0;
6945}
6946_ACEOF
6947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948if { (ac_try="$ac_compile"
6949case "(($ac_try" in
6950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6951 *) ac_try_echo=$ac_try;;
6952esac
6953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006955 ac_status=$?
6956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
6959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006964 ac_cv_type_ssize_t=yes
6965else
6966 echo "$as_me: failed program was:" >&5
6967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006971
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006974{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6975echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006976if test $ac_cv_type_ssize_t = yes; then
6977
6978cat >>confdefs.h <<\_ACEOF
6979#define HAVE_SSIZE_T 1
6980_ACEOF
6981
6982fi
6983
Jack Jansendd19cf82001-12-06 22:36:17 +00006984
Michael W. Hudson54241132001-12-07 15:38:26 +00006985# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006986# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987{ echo "$as_me:$LINENO: checking for int" >&5
6988echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006989if test "${ac_cv_type_int+set}" = set; then
6990 echo $ECHO_N "(cached) $ECHO_C" >&6
6991else
6992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006993/* confdefs.h. */
6994_ACEOF
6995cat confdefs.h >>conftest.$ac_ext
6996cat >>conftest.$ac_ext <<_ACEOF
6997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006998$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007000int
7001main ()
7002{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007003if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007004 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007005if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 return 0;
7007 ;
7008 return 0;
7009}
7010_ACEOF
7011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007012if { (ac_try="$ac_compile"
7013case "(($ac_try" in
7014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7015 *) ac_try_echo=$ac_try;;
7016esac
7017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007020 grep -v '^ *+' conftest.er1 >conftest.err
7021 rm -f conftest.er1
7022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007024 (exit $ac_status); } && {
7025 test -z "$ac_c_werror_flag" ||
7026 test ! -s conftest.err
7027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007028 ac_cv_type_int=yes
7029else
7030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007031sed 's/^/| /' conftest.$ac_ext >&5
7032
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007034fi
Brett Cannon19fab762007-06-02 03:02:29 +00007035
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7037fi
7038{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7039echo "${ECHO_T}$ac_cv_type_int" >&6; }
7040
7041# The cast to long int works around a bug in the HP C Compiler
7042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7044# This bug is HP SR number 8606223364.
7045{ echo "$as_me:$LINENO: checking size of int" >&5
7046echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007047if test "${ac_cv_sizeof_int+set}" = set; then
7048 echo $ECHO_N "(cached) $ECHO_C" >&6
7049else
Martin v. Löwis11437992002-04-12 09:54:03 +00007050 if test "$cross_compiling" = yes; then
7051 # Depending upon the size, compute the lo and hi bounds.
7052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007053/* confdefs.h. */
7054_ACEOF
7055cat confdefs.h >>conftest.$ac_ext
7056cat >>conftest.$ac_ext <<_ACEOF
7057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007058$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007060int
7061main ()
7062{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007064test_array [0] = 0
7065
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_lo=0 ac_mid=0
7088 while :; do
7089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007090/* confdefs.h. */
7091_ACEOF
7092cat confdefs.h >>conftest.$ac_ext
7093cat >>conftest.$ac_ext <<_ACEOF
7094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007095$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007096 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007097int
7098main ()
7099{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007100static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007101test_array [0] = 0
7102
7103 ;
7104 return 0;
7105}
7106_ACEOF
7107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007108if { (ac_try="$ac_compile"
7109case "(($ac_try" in
7110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7111 *) ac_try_echo=$ac_try;;
7112esac
7113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007116 grep -v '^ *+' conftest.er1 >conftest.err
7117 rm -f conftest.er1
7118 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007120 (exit $ac_status); } && {
7121 test -z "$ac_c_werror_flag" ||
7122 test ! -s conftest.err
7123 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007124 ac_hi=$ac_mid; break
7125else
7126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007127sed 's/^/| /' conftest.$ac_ext >&5
7128
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129 ac_lo=`expr $ac_mid + 1`
7130 if test $ac_lo -le $ac_mid; then
7131 ac_lo= ac_hi=
7132 break
7133 fi
7134 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007138 done
7139else
7140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007141sed 's/^/| /' conftest.$ac_ext >&5
7142
Martin v. Löwiseba40652007-08-30 20:10:57 +00007143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007144/* confdefs.h. */
7145_ACEOF
7146cat confdefs.h >>conftest.$ac_ext
7147cat >>conftest.$ac_ext <<_ACEOF
7148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007149$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007150 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007151int
7152main ()
7153{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007155test_array [0] = 0
7156
7157 ;
7158 return 0;
7159}
7160_ACEOF
7161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007162if { (ac_try="$ac_compile"
7163case "(($ac_try" in
7164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7165 *) ac_try_echo=$ac_try;;
7166esac
7167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007170 grep -v '^ *+' conftest.er1 >conftest.err
7171 rm -f conftest.er1
7172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007174 (exit $ac_status); } && {
7175 test -z "$ac_c_werror_flag" ||
7176 test ! -s conftest.err
7177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007178 ac_hi=-1 ac_mid=-1
7179 while :; do
7180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007186$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007188int
7189main ()
7190{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
7204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ac_lo=$ac_mid; break
7216else
7217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
Martin v. Löwiseba40652007-08-30 20:10:57 +00007220 ac_hi=`expr '(' $ac_mid ')' - 1`
7221 if test $ac_mid -le $ac_hi; then
7222 ac_lo= ac_hi=
7223 break
7224 fi
7225 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227
7228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007229 done
7230else
7231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007232sed 's/^/| /' conftest.$ac_ext >&5
7233
Martin v. Löwiseba40652007-08-30 20:10:57 +00007234 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007236
7237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007239
7240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007241# Binary search between lo and hi bounds.
7242while test "x$ac_lo" != "x$ac_hi"; do
7243 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007245/* confdefs.h. */
7246_ACEOF
7247cat confdefs.h >>conftest.$ac_ext
7248cat >>conftest.$ac_ext <<_ACEOF
7249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007250$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007251 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007252int
7253main ()
7254{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007256test_array [0] = 0
7257
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007263if { (ac_try="$ac_compile"
7264case "(($ac_try" in
7265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7266 *) ac_try_echo=$ac_try;;
7267esac
7268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007271 grep -v '^ *+' conftest.er1 >conftest.err
7272 rm -f conftest.er1
7273 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007275 (exit $ac_status); } && {
7276 test -z "$ac_c_werror_flag" ||
7277 test ! -s conftest.err
7278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007279 ac_hi=$ac_mid
7280else
7281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007282sed 's/^/| /' conftest.$ac_ext >&5
7283
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00007288done
7289case $ac_lo in
7290?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291'') if test "$ac_cv_type_int" = yes; then
7292 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007293See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007294echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007295See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007296 { (exit 77); exit 77; }; }
7297 else
7298 ac_cv_sizeof_int=0
7299 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007300esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007301else
Martin v. Löwis11437992002-04-12 09:54:03 +00007302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007303/* confdefs.h. */
7304_ACEOF
7305cat confdefs.h >>conftest.$ac_ext
7306cat >>conftest.$ac_ext <<_ACEOF
7307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007308$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 typedef int ac__type_sizeof_;
7310static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7311static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007312#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007313#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007314int
7315main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007316{
Martin v. Löwis11437992002-04-12 09:54:03 +00007317
7318 FILE *f = fopen ("conftest.val", "w");
7319 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007320 return 1;
7321 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007322 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007323 long int i = longval ();
7324 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7325 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007326 fprintf (f, "%ld\n", i);
7327 }
7328 else
7329 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007330 unsigned long int i = ulongval ();
7331 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7332 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 fprintf (f, "%lu\n", i);
7334 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007335 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007336
7337 ;
7338 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007339}
Martin v. Löwis11437992002-04-12 09:54:03 +00007340_ACEOF
7341rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342if { (ac_try="$ac_link"
7343case "(($ac_try" in
7344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7345 *) ac_try_echo=$ac_try;;
7346esac
7347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7348 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007352 { (case "(($ac_try" in
7353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7354 *) ac_try_echo=$ac_try;;
7355esac
7356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7357 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); }; }; then
7361 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007362else
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 echo "$as_me: program exited with status $ac_status" >&5
7364echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007365sed 's/^/| /' conftest.$ac_ext >&5
7366
Martin v. Löwis11437992002-04-12 09:54:03 +00007367( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368if test "$ac_cv_type_int" = yes; then
7369 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007370See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007372See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007373 { (exit 77); exit 77; }; }
7374 else
7375 ac_cv_sizeof_int=0
7376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378rm -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 +00007379fi
7380rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7383echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7384
7385
7386
Martin v. Löwis11437992002-04-12 09:54:03 +00007387cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007388#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007389_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007390
7391
Martin v. Löwiseba40652007-08-30 20:10:57 +00007392{ echo "$as_me:$LINENO: checking for long" >&5
7393echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007394if test "${ac_cv_type_long+set}" = set; then
7395 echo $ECHO_N "(cached) $ECHO_C" >&6
7396else
7397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007398/* confdefs.h. */
7399_ACEOF
7400cat confdefs.h >>conftest.$ac_ext
7401cat >>conftest.$ac_ext <<_ACEOF
7402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007403$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007405int
7406main ()
7407{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007408if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007409 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007410if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007411 return 0;
7412 ;
7413 return 0;
7414}
7415_ACEOF
7416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007417if { (ac_try="$ac_compile"
7418case "(($ac_try" in
7419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7420 *) ac_try_echo=$ac_try;;
7421esac
7422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007425 grep -v '^ *+' conftest.er1 >conftest.err
7426 rm -f conftest.er1
7427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007429 (exit $ac_status); } && {
7430 test -z "$ac_c_werror_flag" ||
7431 test ! -s conftest.err
7432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007433 ac_cv_type_long=yes
7434else
7435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007436sed 's/^/| /' conftest.$ac_ext >&5
7437
Martin v. Löwiseba40652007-08-30 20:10:57 +00007438 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007439fi
Brett Cannon19fab762007-06-02 03:02:29 +00007440
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7442fi
7443{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7444echo "${ECHO_T}$ac_cv_type_long" >&6; }
7445
7446# The cast to long int works around a bug in the HP C Compiler
7447# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7448# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7449# This bug is HP SR number 8606223364.
7450{ echo "$as_me:$LINENO: checking size of long" >&5
7451echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007452if test "${ac_cv_sizeof_long+set}" = set; then
7453 echo $ECHO_N "(cached) $ECHO_C" >&6
7454else
Martin v. Löwis11437992002-04-12 09:54:03 +00007455 if test "$cross_compiling" = yes; then
7456 # Depending upon the size, compute the lo and hi bounds.
7457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007458/* confdefs.h. */
7459_ACEOF
7460cat confdefs.h >>conftest.$ac_ext
7461cat >>conftest.$ac_ext <<_ACEOF
7462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007463$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007465int
7466main ()
7467{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007468static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007469test_array [0] = 0
7470
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_lo=0 ac_mid=0
7493 while :; do
7494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007495/* confdefs.h. */
7496_ACEOF
7497cat confdefs.h >>conftest.$ac_ext
7498cat >>conftest.$ac_ext <<_ACEOF
7499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007500$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007501 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007502int
7503main ()
7504{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007506test_array [0] = 0
7507
7508 ;
7509 return 0;
7510}
7511_ACEOF
7512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007513if { (ac_try="$ac_compile"
7514case "(($ac_try" in
7515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7516 *) ac_try_echo=$ac_try;;
7517esac
7518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007521 grep -v '^ *+' conftest.er1 >conftest.err
7522 rm -f conftest.er1
7523 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007525 (exit $ac_status); } && {
7526 test -z "$ac_c_werror_flag" ||
7527 test ! -s conftest.err
7528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007529 ac_hi=$ac_mid; break
7530else
7531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007532sed 's/^/| /' conftest.$ac_ext >&5
7533
Martin v. Löwiseba40652007-08-30 20:10:57 +00007534 ac_lo=`expr $ac_mid + 1`
7535 if test $ac_lo -le $ac_mid; then
7536 ac_lo= ac_hi=
7537 break
7538 fi
7539 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007541
7542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007543 done
7544else
7545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007546sed 's/^/| /' conftest.$ac_ext >&5
7547
Martin v. Löwiseba40652007-08-30 20:10:57 +00007548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007549/* confdefs.h. */
7550_ACEOF
7551cat confdefs.h >>conftest.$ac_ext
7552cat >>conftest.$ac_ext <<_ACEOF
7553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007554$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007555 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007556int
7557main ()
7558{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007559static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007560test_array [0] = 0
7561
7562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007567if { (ac_try="$ac_compile"
7568case "(($ac_try" in
7569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7570 *) ac_try_echo=$ac_try;;
7571esac
7572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007575 grep -v '^ *+' conftest.er1 >conftest.err
7576 rm -f conftest.er1
7577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579 (exit $ac_status); } && {
7580 test -z "$ac_c_werror_flag" ||
7581 test ! -s conftest.err
7582 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 ac_hi=-1 ac_mid=-1
7584 while :; do
7585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007586/* confdefs.h. */
7587_ACEOF
7588cat confdefs.h >>conftest.$ac_ext
7589cat >>conftest.$ac_ext <<_ACEOF
7590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007591$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007593int
7594main ()
7595{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007597test_array [0] = 0
7598
7599 ;
7600 return 0;
7601}
7602_ACEOF
7603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007604if { (ac_try="$ac_compile"
7605case "(($ac_try" in
7606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7607 *) ac_try_echo=$ac_try;;
7608esac
7609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007612 grep -v '^ *+' conftest.er1 >conftest.err
7613 rm -f conftest.er1
7614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 (exit $ac_status); } && {
7617 test -z "$ac_c_werror_flag" ||
7618 test ! -s conftest.err
7619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 ac_lo=$ac_mid; break
7621else
7622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007623sed 's/^/| /' conftest.$ac_ext >&5
7624
Martin v. Löwiseba40652007-08-30 20:10:57 +00007625 ac_hi=`expr '(' $ac_mid ')' - 1`
7626 if test $ac_mid -le $ac_hi; then
7627 ac_lo= ac_hi=
7628 break
7629 fi
7630 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632
7633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 done
7635else
7636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007637sed 's/^/| /' conftest.$ac_ext >&5
7638
Martin v. Löwiseba40652007-08-30 20:10:57 +00007639 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641
7642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644
7645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007646# Binary search between lo and hi bounds.
7647while test "x$ac_lo" != "x$ac_hi"; do
7648 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007650/* confdefs.h. */
7651_ACEOF
7652cat confdefs.h >>conftest.$ac_ext
7653cat >>conftest.$ac_ext <<_ACEOF
7654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007655$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007656 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007657int
7658main ()
7659{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007661test_array [0] = 0
7662
7663 ;
7664 return 0;
7665}
7666_ACEOF
7667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668if { (ac_try="$ac_compile"
7669case "(($ac_try" in
7670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7671 *) ac_try_echo=$ac_try;;
7672esac
7673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007676 grep -v '^ *+' conftest.er1 >conftest.err
7677 rm -f conftest.er1
7678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680 (exit $ac_status); } && {
7681 test -z "$ac_c_werror_flag" ||
7682 test ! -s conftest.err
7683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 ac_hi=$ac_mid
7685else
7686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007687sed 's/^/| /' conftest.$ac_ext >&5
7688
Martin v. Löwiseba40652007-08-30 20:10:57 +00007689 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00007693done
7694case $ac_lo in
7695?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696'') if test "$ac_cv_type_long" = yes; then
7697 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007698See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007699echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007700See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007701 { (exit 77); exit 77; }; }
7702 else
7703 ac_cv_sizeof_long=0
7704 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007705esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007706else
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007708/* confdefs.h. */
7709_ACEOF
7710cat confdefs.h >>conftest.$ac_ext
7711cat >>conftest.$ac_ext <<_ACEOF
7712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007713$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 typedef long ac__type_sizeof_;
7715static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7716static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007717#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007718#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007719int
7720main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007721{
Martin v. Löwis11437992002-04-12 09:54:03 +00007722
7723 FILE *f = fopen ("conftest.val", "w");
7724 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725 return 1;
7726 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728 long int i = longval ();
7729 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7730 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 fprintf (f, "%ld\n", i);
7732 }
7733 else
7734 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735 unsigned long int i = ulongval ();
7736 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7737 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 fprintf (f, "%lu\n", i);
7739 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007741
7742 ;
7743 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007744}
Martin v. Löwis11437992002-04-12 09:54:03 +00007745_ACEOF
7746rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747if { (ac_try="$ac_link"
7748case "(($ac_try" in
7749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7750 *) ac_try_echo=$ac_try;;
7751esac
7752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7753 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_status=$?
7755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 { (case "(($ac_try" in
7758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7759 *) ac_try_echo=$ac_try;;
7760esac
7761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7762 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007767else
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 echo "$as_me: program exited with status $ac_status" >&5
7769echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007770sed 's/^/| /' conftest.$ac_ext >&5
7771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773if test "$ac_cv_type_long" = yes; then
7774 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007775See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007777See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778 { (exit 77); exit 77; }; }
7779 else
7780 ac_cv_sizeof_long=0
7781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783rm -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 +00007784fi
7785rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7788echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7789
7790
7791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007793#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007794_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007795
7796
Martin v. Löwiseba40652007-08-30 20:10:57 +00007797{ echo "$as_me:$LINENO: checking for void *" >&5
7798echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007799if test "${ac_cv_type_void_p+set}" = set; then
7800 echo $ECHO_N "(cached) $ECHO_C" >&6
7801else
7802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007803/* confdefs.h. */
7804_ACEOF
7805cat confdefs.h >>conftest.$ac_ext
7806cat >>conftest.$ac_ext <<_ACEOF
7807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007808$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007810int
7811main ()
7812{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007813if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 return 0;
7817 ;
7818 return 0;
7819}
7820_ACEOF
7821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822if { (ac_try="$ac_compile"
7823case "(($ac_try" in
7824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7825 *) ac_try_echo=$ac_try;;
7826esac
7827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007830 grep -v '^ *+' conftest.er1 >conftest.err
7831 rm -f conftest.er1
7832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 (exit $ac_status); } && {
7835 test -z "$ac_c_werror_flag" ||
7836 test ! -s conftest.err
7837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 ac_cv_type_void_p=yes
7839else
7840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007841sed 's/^/| /' conftest.$ac_ext >&5
7842
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
Brett Cannon19fab762007-06-02 03:02:29 +00007845
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7847fi
7848{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7849echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7850
7851# The cast to long int works around a bug in the HP C Compiler
7852# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7853# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7854# This bug is HP SR number 8606223364.
7855{ echo "$as_me:$LINENO: checking size of void *" >&5
7856echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007857if test "${ac_cv_sizeof_void_p+set}" = set; then
7858 echo $ECHO_N "(cached) $ECHO_C" >&6
7859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 if test "$cross_compiling" = yes; then
7861 # Depending upon the size, compute the lo and hi bounds.
7862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007863/* confdefs.h. */
7864_ACEOF
7865cat confdefs.h >>conftest.$ac_ext
7866cat >>conftest.$ac_ext <<_ACEOF
7867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007868$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007870int
7871main ()
7872{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007874test_array [0] = 0
7875
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_lo=0 ac_mid=0
7898 while :; do
7899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007900/* confdefs.h. */
7901_ACEOF
7902cat confdefs.h >>conftest.$ac_ext
7903cat >>conftest.$ac_ext <<_ACEOF
7904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007905$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007906 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007907int
7908main ()
7909{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007911test_array [0] = 0
7912
7913 ;
7914 return 0;
7915}
7916_ACEOF
7917rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918if { (ac_try="$ac_compile"
7919case "(($ac_try" in
7920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7921 *) ac_try_echo=$ac_try;;
7922esac
7923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007926 grep -v '^ *+' conftest.er1 >conftest.err
7927 rm -f conftest.er1
7928 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007930 (exit $ac_status); } && {
7931 test -z "$ac_c_werror_flag" ||
7932 test ! -s conftest.err
7933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 ac_hi=$ac_mid; break
7935else
7936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007937sed 's/^/| /' conftest.$ac_ext >&5
7938
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939 ac_lo=`expr $ac_mid + 1`
7940 if test $ac_lo -le $ac_mid; then
7941 ac_lo= ac_hi=
7942 break
7943 fi
7944 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946
7947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 done
7949else
7950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007951sed 's/^/| /' conftest.$ac_ext >&5
7952
Martin v. Löwiseba40652007-08-30 20:10:57 +00007953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* confdefs.h. */
7955_ACEOF
7956cat confdefs.h >>conftest.$ac_ext
7957cat >>conftest.$ac_ext <<_ACEOF
7958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007961int
7962main ()
7963{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007965test_array [0] = 0
7966
7967 ;
7968 return 0;
7969}
7970_ACEOF
7971rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972if { (ac_try="$ac_compile"
7973case "(($ac_try" in
7974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7975 *) ac_try_echo=$ac_try;;
7976esac
7977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007980 grep -v '^ *+' conftest.er1 >conftest.err
7981 rm -f conftest.er1
7982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984 (exit $ac_status); } && {
7985 test -z "$ac_c_werror_flag" ||
7986 test ! -s conftest.err
7987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ac_hi=-1 ac_mid=-1
7989 while :; do
7990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007997 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008002test_array [0] = 0
8003
8004 ;
8005 return 0;
8006}
8007_ACEOF
8008rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009if { (ac_try="$ac_compile"
8010case "(($ac_try" in
8011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8012 *) ac_try_echo=$ac_try;;
8013esac
8014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 (exit $ac_status); } && {
8022 test -z "$ac_c_werror_flag" ||
8023 test ! -s conftest.err
8024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_lo=$ac_mid; break
8026else
8027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008028sed 's/^/| /' conftest.$ac_ext >&5
8029
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030 ac_hi=`expr '(' $ac_mid ')' - 1`
8031 if test $ac_mid -le $ac_hi; then
8032 ac_lo= ac_hi=
8033 break
8034 fi
8035 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037
8038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 done
8040else
8041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008042sed 's/^/| /' conftest.$ac_ext >&5
8043
Martin v. Löwiseba40652007-08-30 20:10:57 +00008044 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046
8047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008049
8050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008051# Binary search between lo and hi bounds.
8052while test "x$ac_lo" != "x$ac_hi"; do
8053 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008055/* confdefs.h. */
8056_ACEOF
8057cat confdefs.h >>conftest.$ac_ext
8058cat >>conftest.$ac_ext <<_ACEOF
8059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008060$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008061 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008062int
8063main ()
8064{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008066test_array [0] = 0
8067
8068 ;
8069 return 0;
8070}
8071_ACEOF
8072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073if { (ac_try="$ac_compile"
8074case "(($ac_try" in
8075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8076 *) ac_try_echo=$ac_try;;
8077esac
8078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008081 grep -v '^ *+' conftest.er1 >conftest.err
8082 rm -f conftest.er1
8083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008085 (exit $ac_status); } && {
8086 test -z "$ac_c_werror_flag" ||
8087 test ! -s conftest.err
8088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ac_hi=$ac_mid
8090else
8091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008092sed 's/^/| /' conftest.$ac_ext >&5
8093
Martin v. Löwiseba40652007-08-30 20:10:57 +00008094 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008098done
8099case $ac_lo in
8100?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101'') if test "$ac_cv_type_void_p" = yes; then
8102 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008103See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008104echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008105See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008106 { (exit 77); exit 77; }; }
8107 else
8108 ac_cv_sizeof_void_p=0
8109 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008110esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008111else
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008113/* confdefs.h. */
8114_ACEOF
8115cat confdefs.h >>conftest.$ac_ext
8116cat >>conftest.$ac_ext <<_ACEOF
8117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008118$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 typedef void * ac__type_sizeof_;
8120static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8121static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008122#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008123#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008124int
8125main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008126{
Martin v. Löwis11437992002-04-12 09:54:03 +00008127
8128 FILE *f = fopen ("conftest.val", "w");
8129 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130 return 1;
8131 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133 long int i = longval ();
8134 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8135 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008136 fprintf (f, "%ld\n", i);
8137 }
8138 else
8139 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140 unsigned long int i = ulongval ();
8141 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8142 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 fprintf (f, "%lu\n", i);
8144 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
8147 ;
8148 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008149}
Martin v. Löwis11437992002-04-12 09:54:03 +00008150_ACEOF
8151rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008152if { (ac_try="$ac_link"
8153case "(($ac_try" in
8154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8155 *) ac_try_echo=$ac_try;;
8156esac
8157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8158 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ac_status=$?
8160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8161 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162 { (case "(($ac_try" in
8163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8164 *) ac_try_echo=$ac_try;;
8165esac
8166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8167 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 ac_status=$?
8169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8170 (exit $ac_status); }; }; then
8171 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008172else
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 echo "$as_me: program exited with status $ac_status" >&5
8174echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008175sed 's/^/| /' conftest.$ac_ext >&5
8176
Martin v. Löwis11437992002-04-12 09:54:03 +00008177( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178if test "$ac_cv_type_void_p" = yes; then
8179 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008180See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008182See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183 { (exit 77); exit 77; }; }
8184 else
8185 ac_cv_sizeof_void_p=0
8186 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188rm -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 +00008189fi
8190rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8193echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8194
8195
8196
Martin v. Löwis11437992002-04-12 09:54:03 +00008197cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008198#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008200
8201
Martin v. Löwiseba40652007-08-30 20:10:57 +00008202{ echo "$as_me:$LINENO: checking for short" >&5
8203echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008204if test "${ac_cv_type_short+set}" = set; then
8205 echo $ECHO_N "(cached) $ECHO_C" >&6
8206else
8207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* confdefs.h. */
8209_ACEOF
8210cat confdefs.h >>conftest.$ac_ext
8211cat >>conftest.$ac_ext <<_ACEOF
8212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008215int
8216main ()
8217{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008218if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 return 0;
8222 ;
8223 return 0;
8224}
8225_ACEOF
8226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227if { (ac_try="$ac_compile"
8228case "(($ac_try" in
8229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8230 *) ac_try_echo=$ac_try;;
8231esac
8232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008235 grep -v '^ *+' conftest.er1 >conftest.err
8236 rm -f conftest.er1
8237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 (exit $ac_status); } && {
8240 test -z "$ac_c_werror_flag" ||
8241 test ! -s conftest.err
8242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008243 ac_cv_type_short=yes
8244else
8245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008246sed 's/^/| /' conftest.$ac_ext >&5
8247
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
Brett Cannon19fab762007-06-02 03:02:29 +00008250
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8252fi
8253{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8254echo "${ECHO_T}$ac_cv_type_short" >&6; }
8255
8256# The cast to long int works around a bug in the HP C Compiler
8257# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8258# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8259# This bug is HP SR number 8606223364.
8260{ echo "$as_me:$LINENO: checking size of short" >&5
8261echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008262if test "${ac_cv_sizeof_short+set}" = set; then
8263 echo $ECHO_N "(cached) $ECHO_C" >&6
8264else
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 if test "$cross_compiling" = yes; then
8266 # Depending upon the size, compute the lo and hi bounds.
8267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008268/* confdefs.h. */
8269_ACEOF
8270cat confdefs.h >>conftest.$ac_ext
8271cat >>conftest.$ac_ext <<_ACEOF
8272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008273$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008275int
8276main ()
8277{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008279test_array [0] = 0
8280
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_lo=0 ac_mid=0
8303 while :; do
8304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008305/* confdefs.h. */
8306_ACEOF
8307cat confdefs.h >>conftest.$ac_ext
8308cat >>conftest.$ac_ext <<_ACEOF
8309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008310$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008311 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008312int
8313main ()
8314{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008316test_array [0] = 0
8317
8318 ;
8319 return 0;
8320}
8321_ACEOF
8322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323if { (ac_try="$ac_compile"
8324case "(($ac_try" in
8325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8326 *) ac_try_echo=$ac_try;;
8327esac
8328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008331 grep -v '^ *+' conftest.er1 >conftest.err
8332 rm -f conftest.er1
8333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008335 (exit $ac_status); } && {
8336 test -z "$ac_c_werror_flag" ||
8337 test ! -s conftest.err
8338 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 ac_hi=$ac_mid; break
8340else
8341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008342sed 's/^/| /' conftest.$ac_ext >&5
8343
Martin v. Löwiseba40652007-08-30 20:10:57 +00008344 ac_lo=`expr $ac_mid + 1`
8345 if test $ac_lo -le $ac_mid; then
8346 ac_lo= ac_hi=
8347 break
8348 fi
8349 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008351
8352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 done
8354else
8355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008356sed 's/^/| /' conftest.$ac_ext >&5
8357
Martin v. Löwiseba40652007-08-30 20:10:57 +00008358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008364$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008365 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008366int
8367main ()
8368{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008369static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008370test_array [0] = 0
8371
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008377if { (ac_try="$ac_compile"
8378case "(($ac_try" in
8379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8380 *) ac_try_echo=$ac_try;;
8381esac
8382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008385 grep -v '^ *+' conftest.er1 >conftest.err
8386 rm -f conftest.er1
8387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389 (exit $ac_status); } && {
8390 test -z "$ac_c_werror_flag" ||
8391 test ! -s conftest.err
8392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 ac_hi=-1 ac_mid=-1
8394 while :; do
8395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008396/* confdefs.h. */
8397_ACEOF
8398cat confdefs.h >>conftest.$ac_ext
8399cat >>conftest.$ac_ext <<_ACEOF
8400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008401$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008402 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008403int
8404main ()
8405{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008407test_array [0] = 0
8408
8409 ;
8410 return 0;
8411}
8412_ACEOF
8413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008414if { (ac_try="$ac_compile"
8415case "(($ac_try" in
8416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8417 *) ac_try_echo=$ac_try;;
8418esac
8419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008422 grep -v '^ *+' conftest.er1 >conftest.err
8423 rm -f conftest.er1
8424 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 (exit $ac_status); } && {
8427 test -z "$ac_c_werror_flag" ||
8428 test ! -s conftest.err
8429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_lo=$ac_mid; break
8431else
8432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008433sed 's/^/| /' conftest.$ac_ext >&5
8434
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435 ac_hi=`expr '(' $ac_mid ')' - 1`
8436 if test $ac_mid -le $ac_hi; then
8437 ac_lo= ac_hi=
8438 break
8439 fi
8440 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442
8443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 done
8445else
8446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008447sed 's/^/| /' conftest.$ac_ext >&5
8448
Martin v. Löwiseba40652007-08-30 20:10:57 +00008449 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451
8452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454
8455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008456# Binary search between lo and hi bounds.
8457while test "x$ac_lo" != "x$ac_hi"; do
8458 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008460/* confdefs.h. */
8461_ACEOF
8462cat confdefs.h >>conftest.$ac_ext
8463cat >>conftest.$ac_ext <<_ACEOF
8464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008465$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008466 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008467int
8468main ()
8469{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008470static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008471test_array [0] = 0
8472
8473 ;
8474 return 0;
8475}
8476_ACEOF
8477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478if { (ac_try="$ac_compile"
8479case "(($ac_try" in
8480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8481 *) ac_try_echo=$ac_try;;
8482esac
8483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008486 grep -v '^ *+' conftest.er1 >conftest.err
8487 rm -f conftest.er1
8488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490 (exit $ac_status); } && {
8491 test -z "$ac_c_werror_flag" ||
8492 test ! -s conftest.err
8493 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_hi=$ac_mid
8495else
8496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008497sed 's/^/| /' conftest.$ac_ext >&5
8498
Martin v. Löwiseba40652007-08-30 20:10:57 +00008499 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008503done
8504case $ac_lo in
8505?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506'') if test "$ac_cv_type_short" = yes; then
8507 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008508See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008510See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008511 { (exit 77); exit 77; }; }
8512 else
8513 ac_cv_sizeof_short=0
8514 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008515esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008516else
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* confdefs.h. */
8519_ACEOF
8520cat confdefs.h >>conftest.$ac_ext
8521cat >>conftest.$ac_ext <<_ACEOF
8522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 typedef short ac__type_sizeof_;
8525static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8526static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008527#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008528#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008529int
8530main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008531{
Martin v. Löwis11437992002-04-12 09:54:03 +00008532
8533 FILE *f = fopen ("conftest.val", "w");
8534 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535 return 1;
8536 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008538 long int i = longval ();
8539 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8540 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 fprintf (f, "%ld\n", i);
8542 }
8543 else
8544 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545 unsigned long int i = ulongval ();
8546 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8547 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 fprintf (f, "%lu\n", i);
8549 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008550 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
8552 ;
8553 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554}
Martin v. Löwis11437992002-04-12 09:54:03 +00008555_ACEOF
8556rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008557if { (ac_try="$ac_link"
8558case "(($ac_try" in
8559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8560 *) ac_try_echo=$ac_try;;
8561esac
8562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8563 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 ac_status=$?
8565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8566 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 { (case "(($ac_try" in
8568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8569 *) ac_try_echo=$ac_try;;
8570esac
8571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8572 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
8576 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 echo "$as_me: program exited with status $ac_status" >&5
8579echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008580sed 's/^/| /' conftest.$ac_ext >&5
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583if test "$ac_cv_type_short" = yes; then
8584 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008585See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008587See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588 { (exit 77); exit 77; }; }
8589 else
8590 ac_cv_sizeof_short=0
8591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593rm -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 +00008594fi
8595rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8598echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8599
8600
8601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008603#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008604_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008605
8606
Martin v. Löwiseba40652007-08-30 20:10:57 +00008607{ echo "$as_me:$LINENO: checking for float" >&5
8608echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008609if test "${ac_cv_type_float+set}" = set; then
8610 echo $ECHO_N "(cached) $ECHO_C" >&6
8611else
8612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* confdefs.h. */
8614_ACEOF
8615cat confdefs.h >>conftest.$ac_ext
8616cat >>conftest.$ac_ext <<_ACEOF
8617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008620int
8621main ()
8622{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008623if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 return 0;
8627 ;
8628 return 0;
8629}
8630_ACEOF
8631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632if { (ac_try="$ac_compile"
8633case "(($ac_try" in
8634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8635 *) ac_try_echo=$ac_try;;
8636esac
8637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008640 grep -v '^ *+' conftest.er1 >conftest.err
8641 rm -f conftest.er1
8642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 (exit $ac_status); } && {
8645 test -z "$ac_c_werror_flag" ||
8646 test ! -s conftest.err
8647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ac_cv_type_float=yes
8649else
8650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008651sed 's/^/| /' conftest.$ac_ext >&5
8652
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008654fi
Brett Cannon19fab762007-06-02 03:02:29 +00008655
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8657fi
8658{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8659echo "${ECHO_T}$ac_cv_type_float" >&6; }
8660
8661# The cast to long int works around a bug in the HP C Compiler
8662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8664# This bug is HP SR number 8606223364.
8665{ echo "$as_me:$LINENO: checking size of float" >&5
8666echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008667if test "${ac_cv_sizeof_float+set}" = set; then
8668 echo $ECHO_N "(cached) $ECHO_C" >&6
8669else
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 if test "$cross_compiling" = yes; then
8671 # Depending upon the size, compute the lo and hi bounds.
8672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008673/* confdefs.h. */
8674_ACEOF
8675cat confdefs.h >>conftest.$ac_ext
8676cat >>conftest.$ac_ext <<_ACEOF
8677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008678$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008680int
8681main ()
8682{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008684test_array [0] = 0
8685
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_lo=0 ac_mid=0
8708 while :; do
8709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008710/* confdefs.h. */
8711_ACEOF
8712cat confdefs.h >>conftest.$ac_ext
8713cat >>conftest.$ac_ext <<_ACEOF
8714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008716 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008721test_array [0] = 0
8722
8723 ;
8724 return 0;
8725}
8726_ACEOF
8727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728if { (ac_try="$ac_compile"
8729case "(($ac_try" in
8730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8731 *) ac_try_echo=$ac_try;;
8732esac
8733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008736 grep -v '^ *+' conftest.er1 >conftest.err
8737 rm -f conftest.er1
8738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008740 (exit $ac_status); } && {
8741 test -z "$ac_c_werror_flag" ||
8742 test ! -s conftest.err
8743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 ac_hi=$ac_mid; break
8745else
8746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008747sed 's/^/| /' conftest.$ac_ext >&5
8748
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749 ac_lo=`expr $ac_mid + 1`
8750 if test $ac_lo -le $ac_mid; then
8751 ac_lo= ac_hi=
8752 break
8753 fi
8754 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008756
8757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 done
8759else
8760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008761sed 's/^/| /' conftest.$ac_ext >&5
8762
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* confdefs.h. */
8765_ACEOF
8766cat confdefs.h >>conftest.$ac_ext
8767cat >>conftest.$ac_ext <<_ACEOF
8768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008771int
8772main ()
8773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008775test_array [0] = 0
8776
8777 ;
8778 return 0;
8779}
8780_ACEOF
8781rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782if { (ac_try="$ac_compile"
8783case "(($ac_try" in
8784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8785 *) ac_try_echo=$ac_try;;
8786esac
8787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008790 grep -v '^ *+' conftest.er1 >conftest.err
8791 rm -f conftest.er1
8792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794 (exit $ac_status); } && {
8795 test -z "$ac_c_werror_flag" ||
8796 test ! -s conftest.err
8797 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ac_hi=-1 ac_mid=-1
8799 while :; do
8800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008801/* confdefs.h. */
8802_ACEOF
8803cat confdefs.h >>conftest.$ac_ext
8804cat >>conftest.$ac_ext <<_ACEOF
8805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008812test_array [0] = 0
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008819if { (ac_try="$ac_compile"
8820case "(($ac_try" in
8821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8822 *) ac_try_echo=$ac_try;;
8823esac
8824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008827 grep -v '^ *+' conftest.er1 >conftest.err
8828 rm -f conftest.er1
8829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 (exit $ac_status); } && {
8832 test -z "$ac_c_werror_flag" ||
8833 test ! -s conftest.err
8834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_lo=$ac_mid; break
8836else
8837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008838sed 's/^/| /' conftest.$ac_ext >&5
8839
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840 ac_hi=`expr '(' $ac_mid ')' - 1`
8841 if test $ac_mid -le $ac_hi; then
8842 ac_lo= ac_hi=
8843 break
8844 fi
8845 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847
8848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 done
8850else
8851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008852sed 's/^/| /' conftest.$ac_ext >&5
8853
Martin v. Löwiseba40652007-08-30 20:10:57 +00008854 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856
8857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008859
8860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008861# Binary search between lo and hi bounds.
8862while test "x$ac_lo" != "x$ac_hi"; do
8863 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* confdefs.h. */
8866_ACEOF
8867cat confdefs.h >>conftest.$ac_ext
8868cat >>conftest.$ac_ext <<_ACEOF
8869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008870$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008871 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008872int
8873main ()
8874{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008876test_array [0] = 0
8877
8878 ;
8879 return 0;
8880}
8881_ACEOF
8882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883if { (ac_try="$ac_compile"
8884case "(($ac_try" in
8885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8886 *) ac_try_echo=$ac_try;;
8887esac
8888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008891 grep -v '^ *+' conftest.er1 >conftest.err
8892 rm -f conftest.er1
8893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895 (exit $ac_status); } && {
8896 test -z "$ac_c_werror_flag" ||
8897 test ! -s conftest.err
8898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ac_hi=$ac_mid
8900else
8901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008902sed 's/^/| /' conftest.$ac_ext >&5
8903
Martin v. Löwiseba40652007-08-30 20:10:57 +00008904 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00008908done
8909case $ac_lo in
8910?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911'') if test "$ac_cv_type_float" = yes; then
8912 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008913See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008914echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008915See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008916 { (exit 77); exit 77; }; }
8917 else
8918 ac_cv_sizeof_float=0
8919 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008920esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 typedef float ac__type_sizeof_;
8930static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8931static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008932#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008933#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008936{
Martin v. Löwis11437992002-04-12 09:54:03 +00008937
8938 FILE *f = fopen ("conftest.val", "w");
8939 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940 return 1;
8941 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008943 long int i = longval ();
8944 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8945 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 fprintf (f, "%ld\n", i);
8947 }
8948 else
8949 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950 unsigned long int i = ulongval ();
8951 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8952 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 fprintf (f, "%lu\n", i);
8954 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008955 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
8957 ;
8958 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008959}
Martin v. Löwis11437992002-04-12 09:54:03 +00008960_ACEOF
8961rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962if { (ac_try="$ac_link"
8963case "(($ac_try" in
8964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8965 *) ac_try_echo=$ac_try;;
8966esac
8967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8968 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_status=$?
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972 { (case "(($ac_try" in
8973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8974 *) ac_try_echo=$ac_try;;
8975esac
8976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8977 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 ac_status=$?
8979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8980 (exit $ac_status); }; }; then
8981 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008982else
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 echo "$as_me: program exited with status $ac_status" >&5
8984echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008985sed 's/^/| /' conftest.$ac_ext >&5
8986
Martin v. Löwis11437992002-04-12 09:54:03 +00008987( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988if test "$ac_cv_type_float" = yes; then
8989 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008990See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008992See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993 { (exit 77); exit 77; }; }
8994 else
8995 ac_cv_sizeof_float=0
8996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998rm -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 +00008999fi
9000rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9003echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9004
9005
9006
Martin v. Löwis11437992002-04-12 09:54:03 +00009007cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009008#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009009_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009010
9011
Martin v. Löwiseba40652007-08-30 20:10:57 +00009012{ echo "$as_me:$LINENO: checking for double" >&5
9013echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009014if test "${ac_cv_type_double+set}" = set; then
9015 echo $ECHO_N "(cached) $ECHO_C" >&6
9016else
9017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009018/* confdefs.h. */
9019_ACEOF
9020cat confdefs.h >>conftest.$ac_ext
9021cat >>conftest.$ac_ext <<_ACEOF
9022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009025int
9026main ()
9027{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 return 0;
9032 ;
9033 return 0;
9034}
9035_ACEOF
9036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037if { (ac_try="$ac_compile"
9038case "(($ac_try" in
9039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9040 *) ac_try_echo=$ac_try;;
9041esac
9042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009045 grep -v '^ *+' conftest.er1 >conftest.err
9046 rm -f conftest.er1
9047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 (exit $ac_status); } && {
9050 test -z "$ac_c_werror_flag" ||
9051 test ! -s conftest.err
9052 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 ac_cv_type_double=yes
9054else
9055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009056sed 's/^/| /' conftest.$ac_ext >&5
9057
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009059fi
Brett Cannon19fab762007-06-02 03:02:29 +00009060
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9062fi
9063{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9064echo "${ECHO_T}$ac_cv_type_double" >&6; }
9065
9066# The cast to long int works around a bug in the HP C Compiler
9067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9069# This bug is HP SR number 8606223364.
9070{ echo "$as_me:$LINENO: checking size of double" >&5
9071echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009072if test "${ac_cv_sizeof_double+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
9074else
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 if test "$cross_compiling" = yes; then
9076 # Depending upon the size, compute the lo and hi bounds.
9077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009078/* confdefs.h. */
9079_ACEOF
9080cat confdefs.h >>conftest.$ac_ext
9081cat >>conftest.$ac_ext <<_ACEOF
9082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009083$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009085int
9086main ()
9087{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009089test_array [0] = 0
9090
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_lo=0 ac_mid=0
9113 while :; do
9114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009115/* confdefs.h. */
9116_ACEOF
9117cat confdefs.h >>conftest.$ac_ext
9118cat >>conftest.$ac_ext <<_ACEOF
9119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009120$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009122int
9123main ()
9124{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009126test_array [0] = 0
9127
9128 ;
9129 return 0;
9130}
9131_ACEOF
9132rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133if { (ac_try="$ac_compile"
9134case "(($ac_try" in
9135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9136 *) ac_try_echo=$ac_try;;
9137esac
9138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009141 grep -v '^ *+' conftest.er1 >conftest.err
9142 rm -f conftest.er1
9143 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009145 (exit $ac_status); } && {
9146 test -z "$ac_c_werror_flag" ||
9147 test ! -s conftest.err
9148 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 ac_hi=$ac_mid; break
9150else
9151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009152sed 's/^/| /' conftest.$ac_ext >&5
9153
Martin v. Löwiseba40652007-08-30 20:10:57 +00009154 ac_lo=`expr $ac_mid + 1`
9155 if test $ac_lo -le $ac_mid; then
9156 ac_lo= ac_hi=
9157 break
9158 fi
9159 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161
9162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 done
9164else
9165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009166sed 's/^/| /' conftest.$ac_ext >&5
9167
Martin v. Löwiseba40652007-08-30 20:10:57 +00009168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009169/* confdefs.h. */
9170_ACEOF
9171cat confdefs.h >>conftest.$ac_ext
9172cat >>conftest.$ac_ext <<_ACEOF
9173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009174$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009175 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009176int
9177main ()
9178{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009180test_array [0] = 0
9181
9182 ;
9183 return 0;
9184}
9185_ACEOF
9186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009187if { (ac_try="$ac_compile"
9188case "(($ac_try" in
9189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9190 *) ac_try_echo=$ac_try;;
9191esac
9192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009195 grep -v '^ *+' conftest.er1 >conftest.err
9196 rm -f conftest.er1
9197 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199 (exit $ac_status); } && {
9200 test -z "$ac_c_werror_flag" ||
9201 test ! -s conftest.err
9202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_hi=-1 ac_mid=-1
9204 while :; do
9205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009206/* confdefs.h. */
9207_ACEOF
9208cat confdefs.h >>conftest.$ac_ext
9209cat >>conftest.$ac_ext <<_ACEOF
9210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009211$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009212 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009217test_array [0] = 0
9218
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224if { (ac_try="$ac_compile"
9225case "(($ac_try" in
9226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9227 *) ac_try_echo=$ac_try;;
9228esac
9229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009232 grep -v '^ *+' conftest.er1 >conftest.err
9233 rm -f conftest.er1
9234 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 (exit $ac_status); } && {
9237 test -z "$ac_c_werror_flag" ||
9238 test ! -s conftest.err
9239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ac_lo=$ac_mid; break
9241else
9242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009243sed 's/^/| /' conftest.$ac_ext >&5
9244
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245 ac_hi=`expr '(' $ac_mid ')' - 1`
9246 if test $ac_mid -le $ac_hi; then
9247 ac_lo= ac_hi=
9248 break
9249 fi
9250 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252
9253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 done
9255else
9256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009257sed 's/^/| /' conftest.$ac_ext >&5
9258
Martin v. Löwiseba40652007-08-30 20:10:57 +00009259 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261
9262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009264
9265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009266# Binary search between lo and hi bounds.
9267while test "x$ac_lo" != "x$ac_hi"; do
9268 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009270/* confdefs.h. */
9271_ACEOF
9272cat confdefs.h >>conftest.$ac_ext
9273cat >>conftest.$ac_ext <<_ACEOF
9274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009275$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009276 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009277int
9278main ()
9279{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009281test_array [0] = 0
9282
9283 ;
9284 return 0;
9285}
9286_ACEOF
9287rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288if { (ac_try="$ac_compile"
9289case "(($ac_try" in
9290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9291 *) ac_try_echo=$ac_try;;
9292esac
9293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009296 grep -v '^ *+' conftest.er1 >conftest.err
9297 rm -f conftest.er1
9298 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009300 (exit $ac_status); } && {
9301 test -z "$ac_c_werror_flag" ||
9302 test ! -s conftest.err
9303 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ac_hi=$ac_mid
9305else
9306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009307sed 's/^/| /' conftest.$ac_ext >&5
9308
Martin v. Löwiseba40652007-08-30 20:10:57 +00009309 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009313done
9314case $ac_lo in
9315?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316'') if test "$ac_cv_type_double" = yes; then
9317 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009318See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009319echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009320See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009321 { (exit 77); exit 77; }; }
9322 else
9323 ac_cv_sizeof_double=0
9324 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009325esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009326else
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009328/* confdefs.h. */
9329_ACEOF
9330cat confdefs.h >>conftest.$ac_ext
9331cat >>conftest.$ac_ext <<_ACEOF
9332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009333$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 typedef double ac__type_sizeof_;
9335static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9336static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009337#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009338#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009339int
9340main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009341{
Martin v. Löwis11437992002-04-12 09:54:03 +00009342
9343 FILE *f = fopen ("conftest.val", "w");
9344 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345 return 1;
9346 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009348 long int i = longval ();
9349 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9350 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 fprintf (f, "%ld\n", i);
9352 }
9353 else
9354 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355 unsigned long int i = ulongval ();
9356 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9357 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 fprintf (f, "%lu\n", i);
9359 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009361
9362 ;
9363 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009364}
Martin v. Löwis11437992002-04-12 09:54:03 +00009365_ACEOF
9366rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367if { (ac_try="$ac_link"
9368case "(($ac_try" in
9369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9370 *) ac_try_echo=$ac_try;;
9371esac
9372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9373 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 ac_status=$?
9375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 { (case "(($ac_try" in
9378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9379 *) ac_try_echo=$ac_try;;
9380esac
9381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9382 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 ac_status=$?
9384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9385 (exit $ac_status); }; }; then
9386 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009387else
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 echo "$as_me: program exited with status $ac_status" >&5
9389echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009390sed 's/^/| /' conftest.$ac_ext >&5
9391
Martin v. Löwis11437992002-04-12 09:54:03 +00009392( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393if test "$ac_cv_type_double" = yes; then
9394 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009395See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009397See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398 { (exit 77); exit 77; }; }
9399 else
9400 ac_cv_sizeof_double=0
9401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403rm -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 +00009404fi
9405rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9408echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9409
9410
9411
Martin v. Löwis11437992002-04-12 09:54:03 +00009412cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009413#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009414_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009415
9416
Martin v. Löwiseba40652007-08-30 20:10:57 +00009417{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9418echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009419if test "${ac_cv_type_fpos_t+set}" = set; then
9420 echo $ECHO_N "(cached) $ECHO_C" >&6
9421else
9422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* confdefs.h. */
9424_ACEOF
9425cat confdefs.h >>conftest.$ac_ext
9426cat >>conftest.$ac_ext <<_ACEOF
9427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009428$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009430int
9431main ()
9432{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009433if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 return 0;
9437 ;
9438 return 0;
9439}
9440_ACEOF
9441rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442if { (ac_try="$ac_compile"
9443case "(($ac_try" in
9444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9445 *) ac_try_echo=$ac_try;;
9446esac
9447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009450 grep -v '^ *+' conftest.er1 >conftest.err
9451 rm -f conftest.er1
9452 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 (exit $ac_status); } && {
9455 test -z "$ac_c_werror_flag" ||
9456 test ! -s conftest.err
9457 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ac_cv_type_fpos_t=yes
9459else
9460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009461sed 's/^/| /' conftest.$ac_ext >&5
9462
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009464fi
Brett Cannon19fab762007-06-02 03:02:29 +00009465
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9467fi
9468{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9469echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9470
9471# The cast to long int works around a bug in the HP C Compiler
9472# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9473# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9474# This bug is HP SR number 8606223364.
9475{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9476echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009477if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9478 echo $ECHO_N "(cached) $ECHO_C" >&6
9479else
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 if test "$cross_compiling" = yes; then
9481 # Depending upon the size, compute the lo and hi bounds.
9482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009483/* confdefs.h. */
9484_ACEOF
9485cat confdefs.h >>conftest.$ac_ext
9486cat >>conftest.$ac_ext <<_ACEOF
9487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009488$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009490int
9491main ()
9492{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009494test_array [0] = 0
9495
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_lo=0 ac_mid=0
9518 while :; do
9519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009520/* confdefs.h. */
9521_ACEOF
9522cat confdefs.h >>conftest.$ac_ext
9523cat >>conftest.$ac_ext <<_ACEOF
9524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009526 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009527int
9528main ()
9529{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009531test_array [0] = 0
9532
9533 ;
9534 return 0;
9535}
9536_ACEOF
9537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538if { (ac_try="$ac_compile"
9539case "(($ac_try" in
9540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9541 *) ac_try_echo=$ac_try;;
9542esac
9543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009546 grep -v '^ *+' conftest.er1 >conftest.err
9547 rm -f conftest.er1
9548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009550 (exit $ac_status); } && {
9551 test -z "$ac_c_werror_flag" ||
9552 test ! -s conftest.err
9553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ac_hi=$ac_mid; break
9555else
9556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009557sed 's/^/| /' conftest.$ac_ext >&5
9558
Martin v. Löwiseba40652007-08-30 20:10:57 +00009559 ac_lo=`expr $ac_mid + 1`
9560 if test $ac_lo -le $ac_mid; then
9561 ac_lo= ac_hi=
9562 break
9563 fi
9564 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566
9567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 done
9569else
9570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009571sed 's/^/| /' conftest.$ac_ext >&5
9572
Martin v. Löwiseba40652007-08-30 20:10:57 +00009573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009574/* confdefs.h. */
9575_ACEOF
9576cat confdefs.h >>conftest.$ac_ext
9577cat >>conftest.$ac_ext <<_ACEOF
9578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009579$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009580 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009581int
9582main ()
9583{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009584static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009585test_array [0] = 0
9586
9587 ;
9588 return 0;
9589}
9590_ACEOF
9591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009592if { (ac_try="$ac_compile"
9593case "(($ac_try" in
9594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9595 *) ac_try_echo=$ac_try;;
9596esac
9597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009600 grep -v '^ *+' conftest.er1 >conftest.err
9601 rm -f conftest.er1
9602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604 (exit $ac_status); } && {
9605 test -z "$ac_c_werror_flag" ||
9606 test ! -s conftest.err
9607 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ac_hi=-1 ac_mid=-1
9609 while :; do
9610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009617 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009622test_array [0] = 0
9623
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009629if { (ac_try="$ac_compile"
9630case "(($ac_try" in
9631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632 *) ac_try_echo=$ac_try;;
9633esac
9634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_lo=$ac_mid; break
9646else
9647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009648sed 's/^/| /' conftest.$ac_ext >&5
9649
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650 ac_hi=`expr '(' $ac_mid ')' - 1`
9651 if test $ac_mid -le $ac_hi; then
9652 ac_lo= ac_hi=
9653 break
9654 fi
9655 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657
9658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 done
9660else
9661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009662sed 's/^/| /' conftest.$ac_ext >&5
9663
Martin v. Löwiseba40652007-08-30 20:10:57 +00009664 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666
9667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009669
9670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009671# Binary search between lo and hi bounds.
9672while test "x$ac_lo" != "x$ac_hi"; do
9673 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009675/* confdefs.h. */
9676_ACEOF
9677cat confdefs.h >>conftest.$ac_ext
9678cat >>conftest.$ac_ext <<_ACEOF
9679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009680$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009681 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009682int
9683main ()
9684{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009685static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009686test_array [0] = 0
9687
9688 ;
9689 return 0;
9690}
9691_ACEOF
9692rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693if { (ac_try="$ac_compile"
9694case "(($ac_try" in
9695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9696 *) ac_try_echo=$ac_try;;
9697esac
9698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009701 grep -v '^ *+' conftest.er1 >conftest.err
9702 rm -f conftest.er1
9703 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705 (exit $ac_status); } && {
9706 test -z "$ac_c_werror_flag" ||
9707 test ! -s conftest.err
9708 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_hi=$ac_mid
9710else
9711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009712sed 's/^/| /' conftest.$ac_ext >&5
9713
Martin v. Löwiseba40652007-08-30 20:10:57 +00009714 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +00009718done
9719case $ac_lo in
9720?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721'') if test "$ac_cv_type_fpos_t" = yes; then
9722 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009723See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009724echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009725See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009726 { (exit 77); exit 77; }; }
9727 else
9728 ac_cv_sizeof_fpos_t=0
9729 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009730esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009733/* confdefs.h. */
9734_ACEOF
9735cat confdefs.h >>conftest.$ac_ext
9736cat >>conftest.$ac_ext <<_ACEOF
9737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009738$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 typedef fpos_t ac__type_sizeof_;
9740static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9741static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009742#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009743#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009746{
Martin v. Löwis11437992002-04-12 09:54:03 +00009747
9748 FILE *f = fopen ("conftest.val", "w");
9749 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750 return 1;
9751 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009753 long int i = longval ();
9754 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9755 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 fprintf (f, "%ld\n", i);
9757 }
9758 else
9759 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760 unsigned long int i = ulongval ();
9761 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9762 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 fprintf (f, "%lu\n", i);
9764 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009765 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009766
9767 ;
9768 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009769}
Martin v. Löwis11437992002-04-12 09:54:03 +00009770_ACEOF
9771rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772if { (ac_try="$ac_link"
9773case "(($ac_try" in
9774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9775 *) ac_try_echo=$ac_try;;
9776esac
9777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9778 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_status=$?
9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782 { (case "(($ac_try" in
9783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9784 *) ac_try_echo=$ac_try;;
9785esac
9786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9787 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ac_status=$?
9789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9790 (exit $ac_status); }; }; then
9791 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 echo "$as_me: program exited with status $ac_status" >&5
9794echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009795sed 's/^/| /' conftest.$ac_ext >&5
9796
Martin v. Löwis11437992002-04-12 09:54:03 +00009797( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798if test "$ac_cv_type_fpos_t" = yes; then
9799 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009800See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009802See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803 { (exit 77); exit 77; }; }
9804 else
9805 ac_cv_sizeof_fpos_t=0
9806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808rm -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 +00009809fi
9810rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9813echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9814
9815
9816
Martin v. Löwis11437992002-04-12 09:54:03 +00009817cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009818#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009819_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009820
Michael W. Hudson54241132001-12-07 15:38:26 +00009821
Martin v. Löwiseba40652007-08-30 20:10:57 +00009822{ echo "$as_me:$LINENO: checking for size_t" >&5
9823echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009824if test "${ac_cv_type_size_t+set}" = set; then
9825 echo $ECHO_N "(cached) $ECHO_C" >&6
9826else
9827 cat >conftest.$ac_ext <<_ACEOF
9828/* confdefs.h. */
9829_ACEOF
9830cat confdefs.h >>conftest.$ac_ext
9831cat >>conftest.$ac_ext <<_ACEOF
9832/* end confdefs.h. */
9833$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009835int
9836main ()
9837{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009839 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009841 return 0;
9842 ;
9843 return 0;
9844}
9845_ACEOF
9846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847if { (ac_try="$ac_compile"
9848case "(($ac_try" in
9849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9850 *) ac_try_echo=$ac_try;;
9851esac
9852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009854 ac_status=$?
9855 grep -v '^ *+' conftest.er1 >conftest.err
9856 rm -f conftest.er1
9857 cat conftest.err >&5
9858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 (exit $ac_status); } && {
9860 test -z "$ac_c_werror_flag" ||
9861 test ! -s conftest.err
9862 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009863 ac_cv_type_size_t=yes
9864else
9865 echo "$as_me: failed program was:" >&5
9866sed 's/^/| /' conftest.$ac_ext >&5
9867
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009869fi
Brett Cannon19fab762007-06-02 03:02:29 +00009870
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9872fi
9873{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9874echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9875
9876# The cast to long int works around a bug in the HP C Compiler
9877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9879# This bug is HP SR number 8606223364.
9880{ echo "$as_me:$LINENO: checking size of size_t" >&5
9881echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009882if test "${ac_cv_sizeof_size_t+set}" = set; then
9883 echo $ECHO_N "(cached) $ECHO_C" >&6
9884else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009885 if test "$cross_compiling" = yes; then
9886 # Depending upon the size, compute the lo and hi bounds.
9887cat >conftest.$ac_ext <<_ACEOF
9888/* confdefs.h. */
9889_ACEOF
9890cat confdefs.h >>conftest.$ac_ext
9891cat >>conftest.$ac_ext <<_ACEOF
9892/* end confdefs.h. */
9893$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009895int
9896main ()
9897{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009899test_array [0] = 0
9900
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_lo=0 ac_mid=0
9923 while :; do
9924 cat >conftest.$ac_ext <<_ACEOF
9925/* confdefs.h. */
9926_ACEOF
9927cat confdefs.h >>conftest.$ac_ext
9928cat >>conftest.$ac_ext <<_ACEOF
9929/* end confdefs.h. */
9930$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009931 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009932int
9933main ()
9934{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009935static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009936test_array [0] = 0
9937
9938 ;
9939 return 0;
9940}
9941_ACEOF
9942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943if { (ac_try="$ac_compile"
9944case "(($ac_try" in
9945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9946 *) ac_try_echo=$ac_try;;
9947esac
9948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009950 ac_status=$?
9951 grep -v '^ *+' conftest.er1 >conftest.err
9952 rm -f conftest.er1
9953 cat conftest.err >&5
9954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955 (exit $ac_status); } && {
9956 test -z "$ac_c_werror_flag" ||
9957 test ! -s conftest.err
9958 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009959 ac_hi=$ac_mid; break
9960else
9961 echo "$as_me: failed program was:" >&5
9962sed 's/^/| /' conftest.$ac_ext >&5
9963
Martin v. Löwiseba40652007-08-30 20:10:57 +00009964 ac_lo=`expr $ac_mid + 1`
9965 if test $ac_lo -le $ac_mid; then
9966 ac_lo= ac_hi=
9967 break
9968 fi
9969 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009971
9972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009973 done
9974else
9975 echo "$as_me: failed program was:" >&5
9976sed 's/^/| /' conftest.$ac_ext >&5
9977
Martin v. Löwiseba40652007-08-30 20:10:57 +00009978 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009979/* confdefs.h. */
9980_ACEOF
9981cat confdefs.h >>conftest.$ac_ext
9982cat >>conftest.$ac_ext <<_ACEOF
9983/* end confdefs.h. */
9984$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009986int
9987main ()
9988{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009990test_array [0] = 0
9991
9992 ;
9993 return 0;
9994}
9995_ACEOF
9996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009997if { (ac_try="$ac_compile"
9998case "(($ac_try" in
9999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10000 *) ac_try_echo=$ac_try;;
10001esac
10002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010004 ac_status=$?
10005 grep -v '^ *+' conftest.er1 >conftest.err
10006 rm -f conftest.er1
10007 cat conftest.err >&5
10008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009 (exit $ac_status); } && {
10010 test -z "$ac_c_werror_flag" ||
10011 test ! -s conftest.err
10012 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013 ac_hi=-1 ac_mid=-1
10014 while :; do
10015 cat >conftest.$ac_ext <<_ACEOF
10016/* confdefs.h. */
10017_ACEOF
10018cat confdefs.h >>conftest.$ac_ext
10019cat >>conftest.$ac_ext <<_ACEOF
10020/* end confdefs.h. */
10021$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010022 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010023int
10024main ()
10025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010027test_array [0] = 0
10028
10029 ;
10030 return 0;
10031}
10032_ACEOF
10033rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010034if { (ac_try="$ac_compile"
10035case "(($ac_try" in
10036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10037 *) ac_try_echo=$ac_try;;
10038esac
10039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010041 ac_status=$?
10042 grep -v '^ *+' conftest.er1 >conftest.err
10043 rm -f conftest.er1
10044 cat conftest.err >&5
10045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 (exit $ac_status); } && {
10047 test -z "$ac_c_werror_flag" ||
10048 test ! -s conftest.err
10049 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050 ac_lo=$ac_mid; break
10051else
10052 echo "$as_me: failed program was:" >&5
10053sed 's/^/| /' conftest.$ac_ext >&5
10054
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055 ac_hi=`expr '(' $ac_mid ')' - 1`
10056 if test $ac_mid -le $ac_hi; then
10057 ac_lo= ac_hi=
10058 break
10059 fi
10060 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062
10063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010064 done
10065else
10066 echo "$as_me: failed program was:" >&5
10067sed 's/^/| /' conftest.$ac_ext >&5
10068
Martin v. Löwiseba40652007-08-30 20:10:57 +000010069 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071
10072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010074
10075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010076# Binary search between lo and hi bounds.
10077while test "x$ac_lo" != "x$ac_hi"; do
10078 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10079 cat >conftest.$ac_ext <<_ACEOF
10080/* confdefs.h. */
10081_ACEOF
10082cat confdefs.h >>conftest.$ac_ext
10083cat >>conftest.$ac_ext <<_ACEOF
10084/* end confdefs.h. */
10085$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010086 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010087int
10088main ()
10089{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010091test_array [0] = 0
10092
10093 ;
10094 return 0;
10095}
10096_ACEOF
10097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098if { (ac_try="$ac_compile"
10099case "(($ac_try" in
10100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10101 *) ac_try_echo=$ac_try;;
10102esac
10103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010105 ac_status=$?
10106 grep -v '^ *+' conftest.er1 >conftest.err
10107 rm -f conftest.er1
10108 cat conftest.err >&5
10109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110 (exit $ac_status); } && {
10111 test -z "$ac_c_werror_flag" ||
10112 test ! -s conftest.err
10113 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010114 ac_hi=$ac_mid
10115else
10116 echo "$as_me: failed program was:" >&5
10117sed 's/^/| /' conftest.$ac_ext >&5
10118
Martin v. Löwiseba40652007-08-30 20:10:57 +000010119 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000010123done
10124case $ac_lo in
10125?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126'') if test "$ac_cv_type_size_t" = yes; then
10127 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010128See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010129echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010130See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010131 { (exit 77); exit 77; }; }
10132 else
10133 ac_cv_sizeof_size_t=0
10134 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010135esac
10136else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010137 cat >conftest.$ac_ext <<_ACEOF
10138/* confdefs.h. */
10139_ACEOF
10140cat confdefs.h >>conftest.$ac_ext
10141cat >>conftest.$ac_ext <<_ACEOF
10142/* end confdefs.h. */
10143$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 typedef size_t ac__type_sizeof_;
10145static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10146static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010147#include <stdio.h>
10148#include <stdlib.h>
10149int
10150main ()
10151{
10152
10153 FILE *f = fopen ("conftest.val", "w");
10154 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155 return 1;
10156 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010157 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010158 long int i = longval ();
10159 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10160 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010161 fprintf (f, "%ld\n", i);
10162 }
10163 else
10164 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165 unsigned long int i = ulongval ();
10166 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10167 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010168 fprintf (f, "%lu\n", i);
10169 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010170 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010171
10172 ;
10173 return 0;
10174}
10175_ACEOF
10176rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177if { (ac_try="$ac_link"
10178case "(($ac_try" in
10179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10180 *) ac_try_echo=$ac_try;;
10181esac
10182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10183 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010184 ac_status=$?
10185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10186 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187 { (case "(($ac_try" in
10188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10189 *) ac_try_echo=$ac_try;;
10190esac
10191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10192 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010193 ac_status=$?
10194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10195 (exit $ac_status); }; }; then
10196 ac_cv_sizeof_size_t=`cat conftest.val`
10197else
10198 echo "$as_me: program exited with status $ac_status" >&5
10199echo "$as_me: failed program was:" >&5
10200sed 's/^/| /' conftest.$ac_ext >&5
10201
10202( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203if test "$ac_cv_type_size_t" = yes; then
10204 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010205See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010207See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010208 { (exit 77); exit 77; }; }
10209 else
10210 ac_cv_sizeof_size_t=0
10211 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213rm -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 +000010214fi
10215rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10218echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10219
10220
10221
Martin v. Löwis18e16552006-02-15 17:27:45 +000010222cat >>confdefs.h <<_ACEOF
10223#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10224_ACEOF
10225
10226
Christian Heimes951cc0f2008-01-31 23:08:23 +000010227{ echo "$as_me:$LINENO: checking for pid_t" >&5
10228echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10229if test "${ac_cv_type_pid_t+set}" = set; then
10230 echo $ECHO_N "(cached) $ECHO_C" >&6
10231else
10232 cat >conftest.$ac_ext <<_ACEOF
10233/* confdefs.h. */
10234_ACEOF
10235cat confdefs.h >>conftest.$ac_ext
10236cat >>conftest.$ac_ext <<_ACEOF
10237/* end confdefs.h. */
10238$ac_includes_default
10239typedef pid_t ac__type_new_;
10240int
10241main ()
10242{
10243if ((ac__type_new_ *) 0)
10244 return 0;
10245if (sizeof (ac__type_new_))
10246 return 0;
10247 ;
10248 return 0;
10249}
10250_ACEOF
10251rm -f conftest.$ac_objext
10252if { (ac_try="$ac_compile"
10253case "(($ac_try" in
10254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10255 *) ac_try_echo=$ac_try;;
10256esac
10257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10258 (eval "$ac_compile") 2>conftest.er1
10259 ac_status=$?
10260 grep -v '^ *+' conftest.er1 >conftest.err
10261 rm -f conftest.er1
10262 cat conftest.err >&5
10263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10264 (exit $ac_status); } && {
10265 test -z "$ac_c_werror_flag" ||
10266 test ! -s conftest.err
10267 } && test -s conftest.$ac_objext; then
10268 ac_cv_type_pid_t=yes
10269else
10270 echo "$as_me: failed program was:" >&5
10271sed 's/^/| /' conftest.$ac_ext >&5
10272
10273 ac_cv_type_pid_t=no
10274fi
10275
10276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10277fi
10278{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10279echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10280
10281# The cast to long int works around a bug in the HP C Compiler
10282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10284# This bug is HP SR number 8606223364.
10285{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10286echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10287if test "${ac_cv_sizeof_pid_t+set}" = set; then
10288 echo $ECHO_N "(cached) $ECHO_C" >&6
10289else
10290 if test "$cross_compiling" = yes; then
10291 # Depending upon the size, compute the lo and hi bounds.
10292cat >conftest.$ac_ext <<_ACEOF
10293/* confdefs.h. */
10294_ACEOF
10295cat confdefs.h >>conftest.$ac_ext
10296cat >>conftest.$ac_ext <<_ACEOF
10297/* end confdefs.h. */
10298$ac_includes_default
10299 typedef pid_t ac__type_sizeof_;
10300int
10301main ()
10302{
10303static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10304test_array [0] = 0
10305
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_lo=0 ac_mid=0
10328 while :; do
10329 cat >conftest.$ac_ext <<_ACEOF
10330/* confdefs.h. */
10331_ACEOF
10332cat confdefs.h >>conftest.$ac_ext
10333cat >>conftest.$ac_ext <<_ACEOF
10334/* end confdefs.h. */
10335$ac_includes_default
10336 typedef pid_t ac__type_sizeof_;
10337int
10338main ()
10339{
10340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10341test_array [0] = 0
10342
10343 ;
10344 return 0;
10345}
10346_ACEOF
10347rm -f conftest.$ac_objext
10348if { (ac_try="$ac_compile"
10349case "(($ac_try" in
10350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10351 *) ac_try_echo=$ac_try;;
10352esac
10353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10354 (eval "$ac_compile") 2>conftest.er1
10355 ac_status=$?
10356 grep -v '^ *+' conftest.er1 >conftest.err
10357 rm -f conftest.er1
10358 cat conftest.err >&5
10359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10360 (exit $ac_status); } && {
10361 test -z "$ac_c_werror_flag" ||
10362 test ! -s conftest.err
10363 } && test -s conftest.$ac_objext; then
10364 ac_hi=$ac_mid; break
10365else
10366 echo "$as_me: failed program was:" >&5
10367sed 's/^/| /' conftest.$ac_ext >&5
10368
10369 ac_lo=`expr $ac_mid + 1`
10370 if test $ac_lo -le $ac_mid; then
10371 ac_lo= ac_hi=
10372 break
10373 fi
10374 ac_mid=`expr 2 '*' $ac_mid + 1`
10375fi
10376
10377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10378 done
10379else
10380 echo "$as_me: failed program was:" >&5
10381sed 's/^/| /' conftest.$ac_ext >&5
10382
10383 cat >conftest.$ac_ext <<_ACEOF
10384/* confdefs.h. */
10385_ACEOF
10386cat confdefs.h >>conftest.$ac_ext
10387cat >>conftest.$ac_ext <<_ACEOF
10388/* end confdefs.h. */
10389$ac_includes_default
10390 typedef pid_t ac__type_sizeof_;
10391int
10392main ()
10393{
10394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10395test_array [0] = 0
10396
10397 ;
10398 return 0;
10399}
10400_ACEOF
10401rm -f conftest.$ac_objext
10402if { (ac_try="$ac_compile"
10403case "(($ac_try" in
10404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10405 *) ac_try_echo=$ac_try;;
10406esac
10407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10408 (eval "$ac_compile") 2>conftest.er1
10409 ac_status=$?
10410 grep -v '^ *+' conftest.er1 >conftest.err
10411 rm -f conftest.er1
10412 cat conftest.err >&5
10413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10414 (exit $ac_status); } && {
10415 test -z "$ac_c_werror_flag" ||
10416 test ! -s conftest.err
10417 } && test -s conftest.$ac_objext; then
10418 ac_hi=-1 ac_mid=-1
10419 while :; do
10420 cat >conftest.$ac_ext <<_ACEOF
10421/* confdefs.h. */
10422_ACEOF
10423cat confdefs.h >>conftest.$ac_ext
10424cat >>conftest.$ac_ext <<_ACEOF
10425/* end confdefs.h. */
10426$ac_includes_default
10427 typedef pid_t ac__type_sizeof_;
10428int
10429main ()
10430{
10431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10432test_array [0] = 0
10433
10434 ;
10435 return 0;
10436}
10437_ACEOF
10438rm -f conftest.$ac_objext
10439if { (ac_try="$ac_compile"
10440case "(($ac_try" in
10441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442 *) ac_try_echo=$ac_try;;
10443esac
10444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10445 (eval "$ac_compile") 2>conftest.er1
10446 ac_status=$?
10447 grep -v '^ *+' conftest.er1 >conftest.err
10448 rm -f conftest.er1
10449 cat conftest.err >&5
10450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451 (exit $ac_status); } && {
10452 test -z "$ac_c_werror_flag" ||
10453 test ! -s conftest.err
10454 } && test -s conftest.$ac_objext; then
10455 ac_lo=$ac_mid; break
10456else
10457 echo "$as_me: failed program was:" >&5
10458sed 's/^/| /' conftest.$ac_ext >&5
10459
10460 ac_hi=`expr '(' $ac_mid ')' - 1`
10461 if test $ac_mid -le $ac_hi; then
10462 ac_lo= ac_hi=
10463 break
10464 fi
10465 ac_mid=`expr 2 '*' $ac_mid`
10466fi
10467
10468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10469 done
10470else
10471 echo "$as_me: failed program was:" >&5
10472sed 's/^/| /' conftest.$ac_ext >&5
10473
10474 ac_lo= ac_hi=
10475fi
10476
10477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10478fi
10479
10480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10481# Binary search between lo and hi bounds.
10482while test "x$ac_lo" != "x$ac_hi"; do
10483 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10484 cat >conftest.$ac_ext <<_ACEOF
10485/* confdefs.h. */
10486_ACEOF
10487cat confdefs.h >>conftest.$ac_ext
10488cat >>conftest.$ac_ext <<_ACEOF
10489/* end confdefs.h. */
10490$ac_includes_default
10491 typedef pid_t ac__type_sizeof_;
10492int
10493main ()
10494{
10495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10496test_array [0] = 0
10497
10498 ;
10499 return 0;
10500}
10501_ACEOF
10502rm -f conftest.$ac_objext
10503if { (ac_try="$ac_compile"
10504case "(($ac_try" in
10505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10506 *) ac_try_echo=$ac_try;;
10507esac
10508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10509 (eval "$ac_compile") 2>conftest.er1
10510 ac_status=$?
10511 grep -v '^ *+' conftest.er1 >conftest.err
10512 rm -f conftest.er1
10513 cat conftest.err >&5
10514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10515 (exit $ac_status); } && {
10516 test -z "$ac_c_werror_flag" ||
10517 test ! -s conftest.err
10518 } && test -s conftest.$ac_objext; then
10519 ac_hi=$ac_mid
10520else
10521 echo "$as_me: failed program was:" >&5
10522sed 's/^/| /' conftest.$ac_ext >&5
10523
10524 ac_lo=`expr '(' $ac_mid ')' + 1`
10525fi
10526
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10528done
10529case $ac_lo in
10530?*) ac_cv_sizeof_pid_t=$ac_lo;;
10531'') if test "$ac_cv_type_pid_t" = yes; then
10532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10533See \`config.log' for more details." >&5
10534echo "$as_me: error: cannot compute sizeof (pid_t)
10535See \`config.log' for more details." >&2;}
10536 { (exit 77); exit 77; }; }
10537 else
10538 ac_cv_sizeof_pid_t=0
10539 fi ;;
10540esac
10541else
10542 cat >conftest.$ac_ext <<_ACEOF
10543/* confdefs.h. */
10544_ACEOF
10545cat confdefs.h >>conftest.$ac_ext
10546cat >>conftest.$ac_ext <<_ACEOF
10547/* end confdefs.h. */
10548$ac_includes_default
10549 typedef pid_t ac__type_sizeof_;
10550static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10551static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10552#include <stdio.h>
10553#include <stdlib.h>
10554int
10555main ()
10556{
10557
10558 FILE *f = fopen ("conftest.val", "w");
10559 if (! f)
10560 return 1;
10561 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10562 {
10563 long int i = longval ();
10564 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10565 return 1;
10566 fprintf (f, "%ld\n", i);
10567 }
10568 else
10569 {
10570 unsigned long int i = ulongval ();
10571 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10572 return 1;
10573 fprintf (f, "%lu\n", i);
10574 }
10575 return ferror (f) || fclose (f) != 0;
10576
10577 ;
10578 return 0;
10579}
10580_ACEOF
10581rm -f conftest$ac_exeext
10582if { (ac_try="$ac_link"
10583case "(($ac_try" in
10584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10585 *) ac_try_echo=$ac_try;;
10586esac
10587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10588 (eval "$ac_link") 2>&5
10589 ac_status=$?
10590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10592 { (case "(($ac_try" in
10593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10594 *) ac_try_echo=$ac_try;;
10595esac
10596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10597 (eval "$ac_try") 2>&5
10598 ac_status=$?
10599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10600 (exit $ac_status); }; }; then
10601 ac_cv_sizeof_pid_t=`cat conftest.val`
10602else
10603 echo "$as_me: program exited with status $ac_status" >&5
10604echo "$as_me: failed program was:" >&5
10605sed 's/^/| /' conftest.$ac_ext >&5
10606
10607( exit $ac_status )
10608if test "$ac_cv_type_pid_t" = yes; then
10609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10610See \`config.log' for more details." >&5
10611echo "$as_me: error: cannot compute sizeof (pid_t)
10612See \`config.log' for more details." >&2;}
10613 { (exit 77); exit 77; }; }
10614 else
10615 ac_cv_sizeof_pid_t=0
10616 fi
10617fi
10618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10619fi
10620rm -f conftest.val
10621fi
10622{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10623echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10624
10625
10626
10627cat >>confdefs.h <<_ACEOF
10628#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10629_ACEOF
10630
10631
Michael W. Hudson54241132001-12-07 15:38:26 +000010632
Martin v. Löwiseba40652007-08-30 20:10:57 +000010633{ echo "$as_me:$LINENO: checking for long long support" >&5
10634echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010635have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* confdefs.h. */
10638_ACEOF
10639cat confdefs.h >>conftest.$ac_ext
10640cat >>conftest.$ac_ext <<_ACEOF
10641/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010642
Martin v. Löwis11437992002-04-12 09:54:03 +000010643int
10644main ()
10645{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010646long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010652if { (ac_try="$ac_compile"
10653case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
10657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010660 grep -v '^ *+' conftest.er1 >conftest.err
10661 rm -f conftest.er1
10662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664 (exit $ac_status); } && {
10665 test -z "$ac_c_werror_flag" ||
10666 test ! -s conftest.err
10667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010668
10669
10670cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010671#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010672_ACEOF
10673
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010674 have_long_long=yes
10675
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010676else
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010678sed 's/^/| /' conftest.$ac_ext >&5
10679
Martin v. Löwiseba40652007-08-30 20:10:57 +000010680
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010682
10683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10684{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10685echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010686if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010687{ echo "$as_me:$LINENO: checking for long long" >&5
10688echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010689if test "${ac_cv_type_long_long+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
10691else
10692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* confdefs.h. */
10694_ACEOF
10695cat confdefs.h >>conftest.$ac_ext
10696cat >>conftest.$ac_ext <<_ACEOF
10697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010698$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 return 0;
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712if { (ac_try="$ac_compile"
10713case "(($ac_try" in
10714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10715 *) ac_try_echo=$ac_try;;
10716esac
10717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010720 grep -v '^ *+' conftest.er1 >conftest.err
10721 rm -f conftest.er1
10722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010724 (exit $ac_status); } && {
10725 test -z "$ac_c_werror_flag" ||
10726 test ! -s conftest.err
10727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 ac_cv_type_long_long=yes
10729else
10730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010731sed 's/^/| /' conftest.$ac_ext >&5
10732
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010734fi
Brett Cannon19fab762007-06-02 03:02:29 +000010735
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10737fi
10738{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10739echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10740
10741# The cast to long int works around a bug in the HP C Compiler
10742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10744# This bug is HP SR number 8606223364.
10745{ echo "$as_me:$LINENO: checking size of long long" >&5
10746echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010747if test "${ac_cv_sizeof_long_long+set}" = set; then
10748 echo $ECHO_N "(cached) $ECHO_C" >&6
10749else
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 if test "$cross_compiling" = yes; then
10751 # Depending upon the size, compute the lo and hi bounds.
10752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010753/* confdefs.h. */
10754_ACEOF
10755cat confdefs.h >>conftest.$ac_ext
10756cat >>conftest.$ac_ext <<_ACEOF
10757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010758$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010760int
10761main ()
10762{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010764test_array [0] = 0
10765
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_lo=0 ac_mid=0
10788 while :; do
10789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010790/* confdefs.h. */
10791_ACEOF
10792cat confdefs.h >>conftest.$ac_ext
10793cat >>conftest.$ac_ext <<_ACEOF
10794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010795$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010796 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010797int
10798main ()
10799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010801test_array [0] = 0
10802
10803 ;
10804 return 0;
10805}
10806_ACEOF
10807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010808if { (ac_try="$ac_compile"
10809case "(($ac_try" in
10810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10811 *) ac_try_echo=$ac_try;;
10812esac
10813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010816 grep -v '^ *+' conftest.er1 >conftest.err
10817 rm -f conftest.er1
10818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010820 (exit $ac_status); } && {
10821 test -z "$ac_c_werror_flag" ||
10822 test ! -s conftest.err
10823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ac_hi=$ac_mid; break
10825else
10826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010827sed 's/^/| /' conftest.$ac_ext >&5
10828
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829 ac_lo=`expr $ac_mid + 1`
10830 if test $ac_lo -le $ac_mid; then
10831 ac_lo= ac_hi=
10832 break
10833 fi
10834 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836
10837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010838 done
10839else
10840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010841sed 's/^/| /' conftest.$ac_ext >&5
10842
Martin v. Löwiseba40652007-08-30 20:10:57 +000010843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010844/* confdefs.h. */
10845_ACEOF
10846cat confdefs.h >>conftest.$ac_ext
10847cat >>conftest.$ac_ext <<_ACEOF
10848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010849$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010851int
10852main ()
10853{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010855test_array [0] = 0
10856
10857 ;
10858 return 0;
10859}
10860_ACEOF
10861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010862if { (ac_try="$ac_compile"
10863case "(($ac_try" in
10864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10865 *) ac_try_echo=$ac_try;;
10866esac
10867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010870 grep -v '^ *+' conftest.er1 >conftest.err
10871 rm -f conftest.er1
10872 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010874 (exit $ac_status); } && {
10875 test -z "$ac_c_werror_flag" ||
10876 test ! -s conftest.err
10877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ac_hi=-1 ac_mid=-1
10879 while :; do
10880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* confdefs.h. */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010886$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010887 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010888int
10889main ()
10890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010892test_array [0] = 0
10893
10894 ;
10895 return 0;
10896}
10897_ACEOF
10898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010899if { (ac_try="$ac_compile"
10900case "(($ac_try" in
10901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10902 *) ac_try_echo=$ac_try;;
10903esac
10904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010907 grep -v '^ *+' conftest.er1 >conftest.err
10908 rm -f conftest.er1
10909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010911 (exit $ac_status); } && {
10912 test -z "$ac_c_werror_flag" ||
10913 test ! -s conftest.err
10914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ac_lo=$ac_mid; break
10916else
10917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010918sed 's/^/| /' conftest.$ac_ext >&5
10919
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920 ac_hi=`expr '(' $ac_mid ')' - 1`
10921 if test $ac_mid -le $ac_hi; then
10922 ac_lo= ac_hi=
10923 break
10924 fi
10925 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927
10928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 done
10930else
10931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010932sed 's/^/| /' conftest.$ac_ext >&5
10933
Martin v. Löwiseba40652007-08-30 20:10:57 +000010934 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936
10937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010939
10940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010941# Binary search between lo and hi bounds.
10942while test "x$ac_lo" != "x$ac_hi"; do
10943 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010945/* confdefs.h. */
10946_ACEOF
10947cat confdefs.h >>conftest.$ac_ext
10948cat >>conftest.$ac_ext <<_ACEOF
10949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010950$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010951 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
10953main ()
10954{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010956test_array [0] = 0
10957
10958 ;
10959 return 0;
10960}
10961_ACEOF
10962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010963if { (ac_try="$ac_compile"
10964case "(($ac_try" in
10965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10966 *) ac_try_echo=$ac_try;;
10967esac
10968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010971 grep -v '^ *+' conftest.er1 >conftest.err
10972 rm -f conftest.er1
10973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010975 (exit $ac_status); } && {
10976 test -z "$ac_c_werror_flag" ||
10977 test ! -s conftest.err
10978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 ac_hi=$ac_mid
10980else
10981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010982sed 's/^/| /' conftest.$ac_ext >&5
10983
Martin v. Löwiseba40652007-08-30 20:10:57 +000010984 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000010988done
10989case $ac_lo in
10990?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991'') if test "$ac_cv_type_long_long" = yes; then
10992 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010993See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010994echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010995See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010996 { (exit 77); exit 77; }; }
10997 else
10998 ac_cv_sizeof_long_long=0
10999 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011000esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* confdefs.h. */
11004_ACEOF
11005cat confdefs.h >>conftest.$ac_ext
11006cat >>conftest.$ac_ext <<_ACEOF
11007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011008$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009 typedef long long ac__type_sizeof_;
11010static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11011static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011012#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011013#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011014int
11015main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011016{
Martin v. Löwis11437992002-04-12 09:54:03 +000011017
11018 FILE *f = fopen ("conftest.val", "w");
11019 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011020 return 1;
11021 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011023 long int i = longval ();
11024 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11025 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 fprintf (f, "%ld\n", i);
11027 }
11028 else
11029 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011030 unsigned long int i = ulongval ();
11031 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11032 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 fprintf (f, "%lu\n", i);
11034 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011035 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
11037 ;
11038 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011039}
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
11041rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011042if { (ac_try="$ac_link"
11043case "(($ac_try" in
11044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11045 *) ac_try_echo=$ac_try;;
11046esac
11047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 ac_status=$?
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052 { (case "(($ac_try" in
11053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11054 *) ac_try_echo=$ac_try;;
11055esac
11056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11057 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 ac_status=$?
11059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060 (exit $ac_status); }; }; then
11061 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011062else
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 echo "$as_me: program exited with status $ac_status" >&5
11064echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011065sed 's/^/| /' conftest.$ac_ext >&5
11066
Martin v. Löwis11437992002-04-12 09:54:03 +000011067( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068if test "$ac_cv_type_long_long" = yes; then
11069 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011070See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011071echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011072See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011073 { (exit 77); exit 77; }; }
11074 else
11075 ac_cv_sizeof_long_long=0
11076 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078rm -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 +000011079fi
11080rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11083echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11084
11085
11086
Martin v. Löwis11437992002-04-12 09:54:03 +000011087cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011088#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011090
Michael W. Hudson54241132001-12-07 15:38:26 +000011091
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011092fi
11093
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11095echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011096have_c99_bool=no
11097cat >conftest.$ac_ext <<_ACEOF
11098/* confdefs.h. */
11099_ACEOF
11100cat confdefs.h >>conftest.$ac_ext
11101cat >>conftest.$ac_ext <<_ACEOF
11102/* end confdefs.h. */
11103
11104int
11105main ()
11106{
11107_Bool x; x = (_Bool)0;
11108 ;
11109 return 0;
11110}
11111_ACEOF
11112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011113if { (ac_try="$ac_compile"
11114case "(($ac_try" in
11115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11116 *) ac_try_echo=$ac_try;;
11117esac
11118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011120 ac_status=$?
11121 grep -v '^ *+' conftest.er1 >conftest.err
11122 rm -f conftest.er1
11123 cat conftest.err >&5
11124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011125 (exit $ac_status); } && {
11126 test -z "$ac_c_werror_flag" ||
11127 test ! -s conftest.err
11128 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011129
11130
11131cat >>confdefs.h <<\_ACEOF
11132#define HAVE_C99_BOOL 1
11133_ACEOF
11134
11135 have_c99_bool=yes
11136
11137else
11138 echo "$as_me: failed program was:" >&5
11139sed 's/^/| /' conftest.$ac_ext >&5
11140
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011143
11144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11145{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11146echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011147if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011148{ echo "$as_me:$LINENO: checking for _Bool" >&5
11149echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011150if test "${ac_cv_type__Bool+set}" = set; then
11151 echo $ECHO_N "(cached) $ECHO_C" >&6
11152else
11153 cat >conftest.$ac_ext <<_ACEOF
11154/* confdefs.h. */
11155_ACEOF
11156cat confdefs.h >>conftest.$ac_ext
11157cat >>conftest.$ac_ext <<_ACEOF
11158/* end confdefs.h. */
11159$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011161int
11162main ()
11163{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011165 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011167 return 0;
11168 ;
11169 return 0;
11170}
11171_ACEOF
11172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173if { (ac_try="$ac_compile"
11174case "(($ac_try" in
11175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11176 *) ac_try_echo=$ac_try;;
11177esac
11178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011180 ac_status=$?
11181 grep -v '^ *+' conftest.er1 >conftest.err
11182 rm -f conftest.er1
11183 cat conftest.err >&5
11184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011185 (exit $ac_status); } && {
11186 test -z "$ac_c_werror_flag" ||
11187 test ! -s conftest.err
11188 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011189 ac_cv_type__Bool=yes
11190else
11191 echo "$as_me: failed program was:" >&5
11192sed 's/^/| /' conftest.$ac_ext >&5
11193
Martin v. Löwiseba40652007-08-30 20:10:57 +000011194 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011195fi
Brett Cannon19fab762007-06-02 03:02:29 +000011196
Martin v. Löwiseba40652007-08-30 20:10:57 +000011197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11198fi
11199{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11200echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11201
11202# The cast to long int works around a bug in the HP C Compiler
11203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11205# This bug is HP SR number 8606223364.
11206{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11207echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011208if test "${ac_cv_sizeof__Bool+set}" = set; then
11209 echo $ECHO_N "(cached) $ECHO_C" >&6
11210else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011211 if test "$cross_compiling" = yes; then
11212 # Depending upon the size, compute the lo and hi bounds.
11213cat >conftest.$ac_ext <<_ACEOF
11214/* confdefs.h. */
11215_ACEOF
11216cat confdefs.h >>conftest.$ac_ext
11217cat >>conftest.$ac_ext <<_ACEOF
11218/* end confdefs.h. */
11219$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011221int
11222main ()
11223{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011225test_array [0] = 0
11226
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_lo=0 ac_mid=0
11249 while :; do
11250 cat >conftest.$ac_ext <<_ACEOF
11251/* confdefs.h. */
11252_ACEOF
11253cat confdefs.h >>conftest.$ac_ext
11254cat >>conftest.$ac_ext <<_ACEOF
11255/* end confdefs.h. */
11256$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011258int
11259main ()
11260{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011262test_array [0] = 0
11263
11264 ;
11265 return 0;
11266}
11267_ACEOF
11268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011269if { (ac_try="$ac_compile"
11270case "(($ac_try" in
11271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11272 *) ac_try_echo=$ac_try;;
11273esac
11274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011276 ac_status=$?
11277 grep -v '^ *+' conftest.er1 >conftest.err
11278 rm -f conftest.er1
11279 cat conftest.err >&5
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281 (exit $ac_status); } && {
11282 test -z "$ac_c_werror_flag" ||
11283 test ! -s conftest.err
11284 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011285 ac_hi=$ac_mid; break
11286else
11287 echo "$as_me: failed program was:" >&5
11288sed 's/^/| /' conftest.$ac_ext >&5
11289
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290 ac_lo=`expr $ac_mid + 1`
11291 if test $ac_lo -le $ac_mid; then
11292 ac_lo= ac_hi=
11293 break
11294 fi
11295 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297
11298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011299 done
11300else
11301 echo "$as_me: failed program was:" >&5
11302sed 's/^/| /' conftest.$ac_ext >&5
11303
Martin v. Löwiseba40652007-08-30 20:10:57 +000011304 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011305/* confdefs.h. */
11306_ACEOF
11307cat confdefs.h >>conftest.$ac_ext
11308cat >>conftest.$ac_ext <<_ACEOF
11309/* end confdefs.h. */
11310$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011312int
11313main ()
11314{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011316test_array [0] = 0
11317
11318 ;
11319 return 0;
11320}
11321_ACEOF
11322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323if { (ac_try="$ac_compile"
11324case "(($ac_try" in
11325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11326 *) ac_try_echo=$ac_try;;
11327esac
11328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011330 ac_status=$?
11331 grep -v '^ *+' conftest.er1 >conftest.err
11332 rm -f conftest.er1
11333 cat conftest.err >&5
11334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335 (exit $ac_status); } && {
11336 test -z "$ac_c_werror_flag" ||
11337 test ! -s conftest.err
11338 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011339 ac_hi=-1 ac_mid=-1
11340 while :; do
11341 cat >conftest.$ac_ext <<_ACEOF
11342/* confdefs.h. */
11343_ACEOF
11344cat confdefs.h >>conftest.$ac_ext
11345cat >>conftest.$ac_ext <<_ACEOF
11346/* end confdefs.h. */
11347$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011349int
11350main ()
11351{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011353test_array [0] = 0
11354
11355 ;
11356 return 0;
11357}
11358_ACEOF
11359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360if { (ac_try="$ac_compile"
11361case "(($ac_try" in
11362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11363 *) ac_try_echo=$ac_try;;
11364esac
11365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011367 ac_status=$?
11368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
11371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011372 (exit $ac_status); } && {
11373 test -z "$ac_c_werror_flag" ||
11374 test ! -s conftest.err
11375 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011376 ac_lo=$ac_mid; break
11377else
11378 echo "$as_me: failed program was:" >&5
11379sed 's/^/| /' conftest.$ac_ext >&5
11380
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381 ac_hi=`expr '(' $ac_mid ')' - 1`
11382 if test $ac_mid -le $ac_hi; then
11383 ac_lo= ac_hi=
11384 break
11385 fi
11386 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011388
11389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011390 done
11391else
11392 echo "$as_me: failed program was:" >&5
11393sed 's/^/| /' conftest.$ac_ext >&5
11394
Martin v. Löwiseba40652007-08-30 20:10:57 +000011395 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011397
11398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400
11401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011402# Binary search between lo and hi bounds.
11403while test "x$ac_lo" != "x$ac_hi"; do
11404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11405 cat >conftest.$ac_ext <<_ACEOF
11406/* confdefs.h. */
11407_ACEOF
11408cat confdefs.h >>conftest.$ac_ext
11409cat >>conftest.$ac_ext <<_ACEOF
11410/* end confdefs.h. */
11411$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011412 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011413int
11414main ()
11415{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011417test_array [0] = 0
11418
11419 ;
11420 return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011424if { (ac_try="$ac_compile"
11425case "(($ac_try" in
11426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11427 *) ac_try_echo=$ac_try;;
11428esac
11429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011431 ac_status=$?
11432 grep -v '^ *+' conftest.er1 >conftest.err
11433 rm -f conftest.er1
11434 cat conftest.err >&5
11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436 (exit $ac_status); } && {
11437 test -z "$ac_c_werror_flag" ||
11438 test ! -s conftest.err
11439 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011440 ac_hi=$ac_mid
11441else
11442 echo "$as_me: failed program was:" >&5
11443sed 's/^/| /' conftest.$ac_ext >&5
11444
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000011449done
11450case $ac_lo in
11451?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452'') if test "$ac_cv_type__Bool" = yes; then
11453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011454See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011456See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011457 { (exit 77); exit 77; }; }
11458 else
11459 ac_cv_sizeof__Bool=0
11460 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011461esac
11462else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011463 cat >conftest.$ac_ext <<_ACEOF
11464/* confdefs.h. */
11465_ACEOF
11466cat confdefs.h >>conftest.$ac_ext
11467cat >>conftest.$ac_ext <<_ACEOF
11468/* end confdefs.h. */
11469$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 typedef _Bool ac__type_sizeof_;
11471static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11472static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011473#include <stdio.h>
11474#include <stdlib.h>
11475int
11476main ()
11477{
11478
11479 FILE *f = fopen ("conftest.val", "w");
11480 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481 return 1;
11482 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011484 long int i = longval ();
11485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11486 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011487 fprintf (f, "%ld\n", i);
11488 }
11489 else
11490 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011491 unsigned long int i = ulongval ();
11492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11493 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011494 fprintf (f, "%lu\n", i);
11495 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011496 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011497
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503if { (ac_try="$ac_link"
11504case "(($ac_try" in
11505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11506 *) ac_try_echo=$ac_try;;
11507esac
11508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11509 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011510 ac_status=$?
11511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513 { (case "(($ac_try" in
11514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11515 *) ac_try_echo=$ac_try;;
11516esac
11517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11518 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011519 ac_status=$?
11520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11521 (exit $ac_status); }; }; then
11522 ac_cv_sizeof__Bool=`cat conftest.val`
11523else
11524 echo "$as_me: program exited with status $ac_status" >&5
11525echo "$as_me: failed program was:" >&5
11526sed 's/^/| /' conftest.$ac_ext >&5
11527
11528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529if test "$ac_cv_type__Bool" = yes; then
11530 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011531See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011533See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 { (exit 77); exit 77; }; }
11535 else
11536 ac_cv_sizeof__Bool=0
11537 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539rm -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 +000011540fi
11541rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11544echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11545
11546
11547
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011548cat >>confdefs.h <<_ACEOF
11549#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11550_ACEOF
11551
11552
11553fi
11554
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11556echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011557if test "${ac_cv_type_uintptr_t+set}" = set; then
11558 echo $ECHO_N "(cached) $ECHO_C" >&6
11559else
11560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011561/* confdefs.h. */
11562_ACEOF
11563cat confdefs.h >>conftest.$ac_ext
11564cat >>conftest.$ac_ext <<_ACEOF
11565/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011566#ifdef HAVE_STDINT_H
11567 #include <stdint.h>
11568 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011569
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011571int
11572main ()
11573{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011575 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011576if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011577 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ;
11579 return 0;
11580}
11581_ACEOF
11582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583if { (ac_try="$ac_compile"
11584case "(($ac_try" in
11585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11586 *) ac_try_echo=$ac_try;;
11587esac
11588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011591 grep -v '^ *+' conftest.er1 >conftest.err
11592 rm -f conftest.er1
11593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011595 (exit $ac_status); } && {
11596 test -z "$ac_c_werror_flag" ||
11597 test ! -s conftest.err
11598 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011599 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011600else
Martin v. Löwis11437992002-04-12 09:54:03 +000011601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011602sed 's/^/| /' conftest.$ac_ext >&5
11603
Martin v. Löwiseba40652007-08-30 20:10:57 +000011604 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011606
11607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11610echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011611if test $ac_cv_type_uintptr_t = yes; then
11612
11613cat >>confdefs.h <<_ACEOF
11614#define HAVE_UINTPTR_T 1
11615_ACEOF
11616
Martin v. Löwiseba40652007-08-30 20:10:57 +000011617{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11618echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011619if test "${ac_cv_type_uintptr_t+set}" = set; then
11620 echo $ECHO_N "(cached) $ECHO_C" >&6
11621else
11622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011623/* confdefs.h. */
11624_ACEOF
11625cat confdefs.h >>conftest.$ac_ext
11626cat >>conftest.$ac_ext <<_ACEOF
11627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011628$ac_includes_default
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öwis11437992002-04-12 09:54:03 +000011634 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011635if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011636 return 0;
11637 ;
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öwis11437992002-04-12 09:54:03 +000011658 ac_cv_type_uintptr_t=yes
11659else
11660 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
Martin v. Löwis11437992002-04-12 09:54:03 +000011664fi
Brett Cannon19fab762007-06-02 03:02:29 +000011665
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11667fi
11668{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11669echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11670
11671# The cast to long int works around a bug in the HP C Compiler
11672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11674# This bug is HP SR number 8606223364.
11675{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11676echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011677if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11678 echo $ECHO_N "(cached) $ECHO_C" >&6
11679else
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 if test "$cross_compiling" = yes; then
11681 # Depending upon the size, compute the lo and hi bounds.
11682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* confdefs.h. */
11684_ACEOF
11685cat confdefs.h >>conftest.$ac_ext
11686cat >>conftest.$ac_ext <<_ACEOF
11687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011688$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011689 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011690int
11691main ()
11692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011694test_array [0] = 0
11695
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_lo=0 ac_mid=0
11718 while :; do
11719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011720/* confdefs.h. */
11721_ACEOF
11722cat confdefs.h >>conftest.$ac_ext
11723cat >>conftest.$ac_ext <<_ACEOF
11724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011725$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011726 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011727int
11728main ()
11729{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011731test_array [0] = 0
11732
11733 ;
11734 return 0;
11735}
11736_ACEOF
11737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738if { (ac_try="$ac_compile"
11739case "(($ac_try" in
11740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11741 *) ac_try_echo=$ac_try;;
11742esac
11743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011746 grep -v '^ *+' conftest.er1 >conftest.err
11747 rm -f conftest.er1
11748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011750 (exit $ac_status); } && {
11751 test -z "$ac_c_werror_flag" ||
11752 test ! -s conftest.err
11753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 ac_hi=$ac_mid; break
11755else
11756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011757sed 's/^/| /' conftest.$ac_ext >&5
11758
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759 ac_lo=`expr $ac_mid + 1`
11760 if test $ac_lo -le $ac_mid; then
11761 ac_lo= ac_hi=
11762 break
11763 fi
11764 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011766
11767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 done
11769else
11770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011771sed 's/^/| /' conftest.$ac_ext >&5
11772
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011774/* confdefs.h. */
11775_ACEOF
11776cat confdefs.h >>conftest.$ac_ext
11777cat >>conftest.$ac_ext <<_ACEOF
11778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011779$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011780 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011781int
11782main ()
11783{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011784static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011785test_array [0] = 0
11786
11787 ;
11788 return 0;
11789}
11790_ACEOF
11791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011792if { (ac_try="$ac_compile"
11793case "(($ac_try" in
11794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11795 *) ac_try_echo=$ac_try;;
11796esac
11797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011800 grep -v '^ *+' conftest.er1 >conftest.err
11801 rm -f conftest.er1
11802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011804 (exit $ac_status); } && {
11805 test -z "$ac_c_werror_flag" ||
11806 test ! -s conftest.err
11807 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 ac_hi=-1 ac_mid=-1
11809 while :; do
11810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011811/* confdefs.h. */
11812_ACEOF
11813cat confdefs.h >>conftest.$ac_ext
11814cat >>conftest.$ac_ext <<_ACEOF
11815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011816$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011817 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011818int
11819main ()
11820{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011822test_array [0] = 0
11823
11824 ;
11825 return 0;
11826}
11827_ACEOF
11828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011829if { (ac_try="$ac_compile"
11830case "(($ac_try" in
11831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11832 *) ac_try_echo=$ac_try;;
11833esac
11834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011837 grep -v '^ *+' conftest.er1 >conftest.err
11838 rm -f conftest.er1
11839 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841 (exit $ac_status); } && {
11842 test -z "$ac_c_werror_flag" ||
11843 test ! -s conftest.err
11844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ac_lo=$ac_mid; break
11846else
11847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011848sed 's/^/| /' conftest.$ac_ext >&5
11849
Martin v. Löwiseba40652007-08-30 20:10:57 +000011850 ac_hi=`expr '(' $ac_mid ')' - 1`
11851 if test $ac_mid -le $ac_hi; then
11852 ac_lo= ac_hi=
11853 break
11854 fi
11855 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011857
11858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 done
11860else
11861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011862sed 's/^/| /' conftest.$ac_ext >&5
11863
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866
11867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011869
11870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011871# Binary search between lo and hi bounds.
11872while test "x$ac_lo" != "x$ac_hi"; do
11873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011875/* confdefs.h. */
11876_ACEOF
11877cat confdefs.h >>conftest.$ac_ext
11878cat >>conftest.$ac_ext <<_ACEOF
11879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011880$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011881 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011882int
11883main ()
11884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011886test_array [0] = 0
11887
11888 ;
11889 return 0;
11890}
11891_ACEOF
11892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011893if { (ac_try="$ac_compile"
11894case "(($ac_try" in
11895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11896 *) ac_try_echo=$ac_try;;
11897esac
11898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011901 grep -v '^ *+' conftest.er1 >conftest.err
11902 rm -f conftest.er1
11903 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011905 (exit $ac_status); } && {
11906 test -z "$ac_c_werror_flag" ||
11907 test ! -s conftest.err
11908 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 ac_hi=$ac_mid
11910else
11911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011912sed 's/^/| /' conftest.$ac_ext >&5
11913
Martin v. Löwiseba40652007-08-30 20:10:57 +000011914 ac_lo=`expr '(' $ac_mid ')' + 1`
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 +000011918done
11919case $ac_lo in
11920?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921'') if test "$ac_cv_type_uintptr_t" = yes; then
11922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011923See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011924echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011925See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011926 { (exit 77); exit 77; }; }
11927 else
11928 ac_cv_sizeof_uintptr_t=0
11929 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011930esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011931else
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011933/* confdefs.h. */
11934_ACEOF
11935cat confdefs.h >>conftest.$ac_ext
11936cat >>conftest.$ac_ext <<_ACEOF
11937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011938$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011939 typedef uintptr_t ac__type_sizeof_;
11940static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11941static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011942#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011943#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011944int
11945main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011946{
Martin v. Löwis11437992002-04-12 09:54:03 +000011947
11948 FILE *f = fopen ("conftest.val", "w");
11949 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011950 return 1;
11951 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011953 long int i = longval ();
11954 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11955 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 fprintf (f, "%ld\n", i);
11957 }
11958 else
11959 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011960 unsigned long int i = ulongval ();
11961 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11962 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 fprintf (f, "%lu\n", i);
11964 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011965 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011966
11967 ;
11968 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011969}
Martin v. Löwis11437992002-04-12 09:54:03 +000011970_ACEOF
11971rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011972if { (ac_try="$ac_link"
11973case "(($ac_try" in
11974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11975 *) ac_try_echo=$ac_try;;
11976esac
11977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11978 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 ac_status=$?
11980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011982 { (case "(($ac_try" in
11983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11984 *) ac_try_echo=$ac_try;;
11985esac
11986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11987 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 ac_status=$?
11989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11990 (exit $ac_status); }; }; then
11991 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011992else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 echo "$as_me: program exited with status $ac_status" >&5
11994echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011995sed 's/^/| /' conftest.$ac_ext >&5
11996
Martin v. Löwis11437992002-04-12 09:54:03 +000011997( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011998if test "$ac_cv_type_uintptr_t" = yes; then
11999 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012000See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012001echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012002See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012003 { (exit 77); exit 77; }; }
12004 else
12005 ac_cv_sizeof_uintptr_t=0
12006 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008rm -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 +000012009fi
12010rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012012{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12013echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12014
12015
12016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012018#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012019_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012020
Michael W. Hudson54241132001-12-07 15:38:26 +000012021
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012022fi
12023
Martin v. Löwisebe26702006-10-02 14:55:51 +000012024
12025
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012026# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012027{ echo "$as_me:$LINENO: checking size of off_t" >&5
12028echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012029if test "${ac_cv_sizeof_off_t+set}" = set; then
12030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012031else
12032 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012033 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012034else
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* confdefs.h. */
12037_ACEOF
12038cat confdefs.h >>conftest.$ac_ext
12039cat >>conftest.$ac_ext <<_ACEOF
12040/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012041#include <stdio.h>
12042#include <sys/types.h>
12043main()
12044{
12045 FILE *f=fopen("conftestval", "w");
12046 if (!f) exit(1);
12047 fprintf(f, "%d\n", sizeof(off_t));
12048 exit(0);
12049}
Martin v. Löwis11437992002-04-12 09:54:03 +000012050_ACEOF
12051rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052if { (ac_try="$ac_link"
12053case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
12057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12058 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 ac_status=$?
12060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012062 { (case "(($ac_try" in
12063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12064 *) ac_try_echo=$ac_try;;
12065esac
12066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12067 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 ac_status=$?
12069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12070 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012071 ac_cv_sizeof_off_t=`cat conftestval`
12072else
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 echo "$as_me: program exited with status $ac_status" >&5
12074echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012075sed 's/^/| /' conftest.$ac_ext >&5
12076
Martin v. Löwis11437992002-04-12 09:54:03 +000012077( exit $ac_status )
12078ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012080rm -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 +000012081fi
12082
Martin v. Löwiseba40652007-08-30 20:10:57 +000012083
12084
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012085fi
12086
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12088echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
12090cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012091#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012092_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012093
Michael W. Hudson54241132001-12-07 15:38:26 +000012094
Martin v. Löwiseba40652007-08-30 20:10:57 +000012095{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12096echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012097if test "$have_long_long" = yes -a \
12098 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12099 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101cat >>confdefs.h <<\_ACEOF
12102#define HAVE_LARGEFILE_SUPPORT 1
12103_ACEOF
12104
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105 { echo "$as_me:$LINENO: result: yes" >&5
12106echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012107else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108 { echo "$as_me:$LINENO: result: no" >&5
12109echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012110fi
12111
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012112# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012113{ echo "$as_me:$LINENO: checking size of time_t" >&5
12114echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012115if test "${ac_cv_sizeof_time_t+set}" = set; then
12116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012117else
12118 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012119 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012120else
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* confdefs.h. */
12123_ACEOF
12124cat confdefs.h >>conftest.$ac_ext
12125cat >>conftest.$ac_ext <<_ACEOF
12126/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012127#include <stdio.h>
12128#include <time.h>
12129main()
12130{
12131 FILE *f=fopen("conftestval", "w");
12132 if (!f) exit(1);
12133 fprintf(f, "%d\n", sizeof(time_t));
12134 exit(0);
12135}
Martin v. Löwis11437992002-04-12 09:54:03 +000012136_ACEOF
12137rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012138if { (ac_try="$ac_link"
12139case "(($ac_try" in
12140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12141 *) ac_try_echo=$ac_try;;
12142esac
12143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12144 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 ac_status=$?
12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012148 { (case "(($ac_try" in
12149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12150 *) ac_try_echo=$ac_try;;
12151esac
12152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12153 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ac_status=$?
12155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12156 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012157 ac_cv_sizeof_time_t=`cat conftestval`
12158else
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 echo "$as_me: program exited with status $ac_status" >&5
12160echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012161sed 's/^/| /' conftest.$ac_ext >&5
12162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163( exit $ac_status )
12164ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012166rm -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 +000012167fi
12168
Martin v. Löwiseba40652007-08-30 20:10:57 +000012169
12170
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012171fi
12172
Martin v. Löwiseba40652007-08-30 20:10:57 +000012173{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12174echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
12176cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012177#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012178_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012179
Michael W. Hudson54241132001-12-07 15:38:26 +000012180
12181
Trent Mick635f6fb2000-08-23 21:33:05 +000012182# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012183ac_save_cc="$CC"
12184if test "$ac_cv_kpthread" = "yes"
12185then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012186elif test "$ac_cv_kthread" = "yes"
12187then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012188elif test "$ac_cv_pthread" = "yes"
12189then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012191{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12192echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012193have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* confdefs.h. */
12196_ACEOF
12197cat confdefs.h >>conftest.$ac_ext
12198cat >>conftest.$ac_ext <<_ACEOF
12199/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012200#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012201int
12202main ()
12203{
Guido van Rossum12580492000-09-24 16:47:19 +000012204pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 ;
12206 return 0;
12207}
12208_ACEOF
12209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012210if { (ac_try="$ac_compile"
12211case "(($ac_try" in
12212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12213 *) ac_try_echo=$ac_try;;
12214esac
12215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012218 grep -v '^ *+' conftest.er1 >conftest.err
12219 rm -f conftest.er1
12220 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012222 (exit $ac_status); } && {
12223 test -z "$ac_c_werror_flag" ||
12224 test ! -s conftest.err
12225 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012226 have_pthread_t=yes
12227else
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012229sed 's/^/| /' conftest.$ac_ext >&5
12230
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231
Trent Mick635f6fb2000-08-23 21:33:05 +000012232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233
12234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12235{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12236echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012237if test "$have_pthread_t" = yes ; then
12238 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12240echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12242 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012243else
12244 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012245 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012246else
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* confdefs.h. */
12249_ACEOF
12250cat confdefs.h >>conftest.$ac_ext
12251cat >>conftest.$ac_ext <<_ACEOF
12252/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012253#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012254#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012255 main()
12256 {
12257 FILE *f=fopen("conftestval", "w");
12258 if (!f) exit(1);
12259 fprintf(f, "%d\n", sizeof(pthread_t));
12260 exit(0);
12261 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012262_ACEOF
12263rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264if { (ac_try="$ac_link"
12265case "(($ac_try" in
12266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12267 *) ac_try_echo=$ac_try;;
12268esac
12269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12270 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ac_status=$?
12272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012274 { (case "(($ac_try" in
12275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12276 *) ac_try_echo=$ac_try;;
12277esac
12278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12279 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 ac_status=$?
12281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12282 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012283 ac_cv_sizeof_pthread_t=`cat conftestval`
12284else
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 echo "$as_me: program exited with status $ac_status" >&5
12286echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012287sed 's/^/| /' conftest.$ac_ext >&5
12288
Martin v. Löwis11437992002-04-12 09:54:03 +000012289( exit $ac_status )
12290ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292rm -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 +000012293fi
12294
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295
12296
Trent Mick635f6fb2000-08-23 21:33:05 +000012297fi
12298
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12300echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
12302cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012303#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012304_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012305
12306fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012307CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012308
Martin v. Löwiseba40652007-08-30 20:10:57 +000012309{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12310echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12311# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012312if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012313 enableval=$enable_toolbox_glue;
12314fi
Jack Jansene578a632001-08-15 01:27:14 +000012315
12316
12317if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012318then
Jack Jansene578a632001-08-15 01:27:14 +000012319 case $ac_sys_system/$ac_sys_release in
12320 Darwin/*)
12321 enable_toolbox_glue="yes";;
12322 *)
12323 enable_toolbox_glue="no";;
12324 esac
12325fi
12326case "$enable_toolbox_glue" in
12327yes)
Jack Jansene578a632001-08-15 01:27:14 +000012328 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012329 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012332#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012333_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012334
12335 ;;
12336*)
Jack Jansene578a632001-08-15 01:27:14 +000012337 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012338 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012339 ;;
12340esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12342echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012343
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012344
12345case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012346 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012347 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12348 ;;
12349 Darwin/*)
12350 OTHER_LIBTOOL_OPT=""
12351 ;;
12352esac
12353
12354
12355case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012356 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012357 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12358 if test "${enable_universalsdk}"; then
12359 :
12360 else
12361 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12362 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012364 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012365 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012366 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12367 if test ${gcc_version} '<' 4.0
12368 then
12369 LIBTOOL_CRUFT="-lcc_dynamic"
12370 else
12371 LIBTOOL_CRUFT=""
12372 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012375 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012376esac
12377
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12379echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012380if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012381then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012382 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012384 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386cat >>confdefs.h <<\_ACEOF
12387#define WITH_NEXT_FRAMEWORK 1
12388_ACEOF
12389
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390 { echo "$as_me:$LINENO: result: yes" >&5
12391echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012392else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393 { echo "$as_me:$LINENO: result: no" >&5
12394echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012395fi
12396
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397{ echo "$as_me:$LINENO: checking for dyld" >&5
12398echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012399case $ac_sys_system/$ac_sys_release in
12400 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012401
Martin v. Löwis11437992002-04-12 09:54:03 +000012402cat >>confdefs.h <<\_ACEOF
12403#define WITH_DYLD 1
12404_ACEOF
12405
Martin v. Löwiseba40652007-08-30 20:10:57 +000012406 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12407echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012408 ;;
12409 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012410 { echo "$as_me:$LINENO: result: no" >&5
12411echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012412 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012413esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012414
Guido van Rossum0a516c91994-09-12 10:58:40 +000012415# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012416
Michael W. Hudson54241132001-12-07 15:38:26 +000012417
12418
12419
12420
Guido van Rossum0a516c91994-09-12 10:58:40 +000012421# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012422# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423{ echo "$as_me:$LINENO: checking SO" >&5
12424echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012425if test -z "$SO"
12426then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012428 hp*|HP*)
12429 case `uname -m` in
12430 ia64) SO=.so;;
12431 *) SO=.sl;;
12432 esac
12433 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012434 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012435 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012436 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012437else
12438 # this might also be a termcap variable, see #610332
12439 echo
12440 echo '====================================================================='
12441 echo '+ +'
12442 echo '+ WARNING: You have set SO in your environment. +'
12443 echo '+ Do you really mean to change the extension for shared libraries? +'
12444 echo '+ Continuing in 10 seconds to let you to ponder. +'
12445 echo '+ +'
12446 echo '====================================================================='
12447 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449{ echo "$as_me:$LINENO: result: $SO" >&5
12450echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012451
12452cat >>confdefs.h <<_ACEOF
12453#define SHLIB_EXT "$SO"
12454_ACEOF
12455
Guido van Rossum0a516c91994-09-12 10:58:40 +000012456# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012457# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012458# (Shared libraries in this instance are shared modules to be loaded into
12459# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12461echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012462if test -z "$LDSHARED"
12463then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012465 AIX*)
12466 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012467 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012468 ;;
12469 BeOS*)
12470 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012471 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012472 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012473 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012474 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012476 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012477 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012478 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012479 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012480 hp*|HP*)
12481 if test "$GCC" = "yes"
12482 then LDSHARED='$(CC) -shared'
12483 else LDSHARED='ld -b';
12484 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012485 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012486 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012487 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12488 if test "$enable_framework" ; then
12489 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012490 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12491 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012492 else
12493 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012494 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012495 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012496 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012497 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12498 if test "$enable_framework" ; then
12499 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012500 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12501 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012502 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012503 # No framework, use the Python app as bundle-loader
12504 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012505 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012506 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012507 Darwin/*)
12508 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12509 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012510 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012511 if test ${cur_target} '>' 10.2; then
12512 cur_target=10.3
12513 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012514 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012515
12516 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12517 # environment with a value that is the same as what we'll use
12518 # in the Makefile to ensure that we'll get the same compiler
12519 # environment during configure and build time.
12520 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12521 export MACOSX_DEPLOYMENT_TARGET
12522
Ronald Oussoren988117f2006-04-29 11:31:35 +000012523 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012524 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012525 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012526 if test "${enable_universalsdk}"; then
12527 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12528 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012529 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12530 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012531 else
12532 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12533 if test "$enable_framework" ; then
12534 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012535 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12536 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012537 else
12538 # No framework, use the Python app as bundle-loader
12539 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12540 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12541 fi
12542 fi
12543 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012544 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012545 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012546 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012547 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012548 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012549 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012550 else
12551 LDSHARED="ld -Bshareable ${LDFLAGS}"
12552 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012553 OpenBSD*)
12554 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12555 then
12556 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12557 else
12558 case `uname -r` in
12559 [01].* | 2.[0-7] | 2.[0-7].*)
12560 LDSHARED="ld -Bshareable ${LDFLAGS}"
12561 ;;
12562 *)
12563 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12564 ;;
12565 esac
12566 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012567 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012568 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012569 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012570 then LDSHARED='$(CC) -shared'
12571 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012572 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012573 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012574 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012575 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012576 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012577 *) LDSHARED="ld";;
12578 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012580{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12581echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012582BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012583# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012584# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12586echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012587if test -z "$CCSHARED"
12588then
Guido van Rossum07397971997-04-29 21:49:50 +000012589 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012590 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012591 then CCSHARED="-fPIC";
12592 elif test `uname -p` = sparc;
12593 then CCSHARED="-xcode=pic32";
12594 else CCSHARED="-Kpic";
12595 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012596 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012597 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012598 else CCSHARED="+z";
12599 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012600 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012601 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012602 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012603 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012604 if test "$GCC" = "yes"
12605 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012606 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012607 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012608 SCO_SV*)
12609 if test "$GCC" = "yes"
12610 then CCSHARED="-fPIC"
12611 else CCSHARED="-Kpic -belf"
12612 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012613 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012614 IRIX*/6*) case $CC in
12615 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012616 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012617 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012618 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012619 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12622echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012623# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012624# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012625{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12626echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012627if test -z "$LINKFORSHARED"
12628then
Guido van Rossum07397971997-04-29 21:49:50 +000012629 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012630 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012631 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012632 LINKFORSHARED="-Wl,-E -Wl,+s";;
12633# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012634 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012635 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012636 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012638 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12639 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012640 # not used by the core itself but which needs to be in the core so
12641 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012642 # -prebind is no longer used, because it actually seems to give a
12643 # slowdown in stead of a speedup, maybe due to the large number of
12644 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012645
12646 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012647 if test "$enable_framework"
12648 then
Jack Jansenda49e192005-01-07 13:08:22 +000012649 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012650 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012651 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012652 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012653 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012654 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012655 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012656 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12657 then
12658 LINKFORSHARED="-Wl,--export-dynamic"
12659 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012660 SunOS/5*) case $CC in
12661 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012662 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012663 then
12664 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012665 fi;;
12666 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012667 CYGWIN*)
12668 if test $enable_shared = "no"
12669 then
12670 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12671 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012672 QNX*)
12673 # -Wl,-E causes the symbols to be added to the dynamic
12674 # symbol table so that they can be found when a module
12675 # is loaded. -N 2048K causes the stack size to be set
12676 # to 2048 kilobytes so that the stack doesn't overflow
12677 # when running test_compile.py.
12678 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12682echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012683
Michael W. Hudson54241132001-12-07 15:38:26 +000012684
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12686echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012687if test ! "$LIBRARY" = "$LDLIBRARY"
12688then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012689 case $ac_sys_system in
12690 CYGWIN*)
12691 # Cygwin needs CCSHARED when building extension DLLs
12692 # but not when building the interpreter DLL.
12693 CFLAGSFORSHARED='';;
12694 *)
12695 CFLAGSFORSHARED='$(CCSHARED)'
12696 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012698{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12699echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012700
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012701# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12702# library (with --enable-shared).
12703# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012704# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12705# if it is not required, since it creates a dependency of the shared library
12706# to LIBS. This, in turn, means that applications linking the shared libpython
12707# don't need to link LIBS explicitly. The default should be only changed
12708# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012709
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12711echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012712case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012713 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012714 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012715esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012716{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12717echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012718
12719
Guido van Rossum627b2d71993-12-24 10:39:16 +000012720# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Martin v. Löwiseba40652007-08-30 20:10:57 +000012722{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12723echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012724if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726else
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012728LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012729cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* confdefs.h. */
12731_ACEOF
12732cat confdefs.h >>conftest.$ac_ext
12733cat >>conftest.$ac_ext <<_ACEOF
12734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736/* Override any GCC internal prototype to avoid an error.
12737 Use char because int might match the return type of a GCC
12738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012739#ifdef __cplusplus
12740extern "C"
12741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012742char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012743int
12744main ()
12745{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ;
12748 return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752if { (ac_try="$ac_link"
12753case "(($ac_try" in
12754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12755 *) ac_try_echo=$ac_try;;
12756esac
12757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12758 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012760 grep -v '^ *+' conftest.er1 >conftest.err
12761 rm -f conftest.er1
12762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764 (exit $ac_status); } && {
12765 test -z "$ac_c_werror_flag" ||
12766 test ! -s conftest.err
12767 } && test -s conftest$ac_exeext &&
12768 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012772sed 's/^/| /' conftest.$ac_ext >&5
12773
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776
12777rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012778 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012779LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012781{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12782echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012783if test $ac_cv_lib_dl_dlopen = yes; then
12784 cat >>confdefs.h <<_ACEOF
12785#define HAVE_LIBDL 1
12786_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012788 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790fi
12791 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12794echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012795if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797else
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012799LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* confdefs.h. */
12802_ACEOF
12803cat confdefs.h >>conftest.$ac_ext
12804cat >>conftest.$ac_ext <<_ACEOF
12805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807/* Override any GCC internal prototype to avoid an error.
12808 Use char because int might match the return type of a GCC
12809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012810#ifdef __cplusplus
12811extern "C"
12812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012813char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
12822rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012823if { (ac_try="$ac_link"
12824case "(($ac_try" in
12825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12826 *) ac_try_echo=$ac_try;;
12827esac
12828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12829 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012831 grep -v '^ *+' conftest.er1 >conftest.err
12832 rm -f conftest.er1
12833 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835 (exit $ac_status); } && {
12836 test -z "$ac_c_werror_flag" ||
12837 test ! -s conftest.err
12838 } && test -s conftest$ac_exeext &&
12839 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841else
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012843sed 's/^/| /' conftest.$ac_ext >&5
12844
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847
12848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012850LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12853echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012854if test $ac_cv_lib_dld_shl_load = yes; then
12855 cat >>confdefs.h <<_ACEOF
12856#define HAVE_LIBDLD 1
12857_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012859 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861fi
12862 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012863
12864# only check for sem_ini if thread support is requested
12865if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12867echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012868if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012870else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012871 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012873/* confdefs.h. */
12874_ACEOF
12875cat confdefs.h >>conftest.$ac_ext
12876cat >>conftest.$ac_ext <<_ACEOF
12877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012878
Martin v. Löwiseba40652007-08-30 20:10:57 +000012879/* Override any GCC internal prototype to avoid an error.
12880 Use char because int might match the return type of a GCC
12881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012882#ifdef __cplusplus
12883extern "C"
12884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012885char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012886int
12887main ()
12888{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012889return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 ;
12891 return 0;
12892}
12893_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894for ac_lib in '' pthread rt posix4; do
12895 if test -z "$ac_lib"; then
12896 ac_res="none required"
12897 else
12898 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012899 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900 fi
12901 rm -f conftest.$ac_objext conftest$ac_exeext
12902if { (ac_try="$ac_link"
12903case "(($ac_try" in
12904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12905 *) ac_try_echo=$ac_try;;
12906esac
12907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12908 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012909 ac_status=$?
12910 grep -v '^ *+' conftest.er1 >conftest.err
12911 rm -f conftest.er1
12912 cat conftest.err >&5
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914 (exit $ac_status); } && {
12915 test -z "$ac_c_werror_flag" ||
12916 test ! -s conftest.err
12917 } && test -s conftest$ac_exeext &&
12918 $as_test_x conftest$ac_exeext; then
12919 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012920else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012921 echo "$as_me: failed program was:" >&5
12922sed 's/^/| /' conftest.$ac_ext >&5
12923
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924
Brett Cannon19fab762007-06-02 03:02:29 +000012925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012926
12927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12928 conftest$ac_exeext
12929 if test "${ac_cv_search_sem_init+set}" = set; then
12930 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012932done
12933if test "${ac_cv_search_sem_init+set}" = set; then
12934 :
12935else
12936 ac_cv_search_sem_init=no
12937fi
12938rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012939LIBS=$ac_func_search_save_LIBS
12940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12942echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12943ac_res=$ac_cv_search_sem_init
12944if test "$ac_res" != no; then
12945 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012946
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012947fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012948 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012949 # posix4 on Solaris 2.6
12950 # pthread (first!) on Linux
12951fi
12952
Martin v. Löwis19d17342003-06-14 21:03:05 +000012953# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12955echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012956if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12957 echo $ECHO_N "(cached) $ECHO_C" >&6
12958else
12959 ac_check_lib_save_LIBS=$LIBS
12960LIBS="-lintl $LIBS"
12961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* confdefs.h. */
12963_ACEOF
12964cat confdefs.h >>conftest.$ac_ext
12965cat >>conftest.$ac_ext <<_ACEOF
12966/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012967
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968/* Override any GCC internal prototype to avoid an error.
12969 Use char because int might match the return type of a GCC
12970 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012971#ifdef __cplusplus
12972extern "C"
12973#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012974char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012975int
12976main ()
12977{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012979 ;
12980 return 0;
12981}
12982_ACEOF
12983rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984if { (ac_try="$ac_link"
12985case "(($ac_try" in
12986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12987 *) ac_try_echo=$ac_try;;
12988esac
12989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12990 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012992 grep -v '^ *+' conftest.er1 >conftest.err
12993 rm -f conftest.er1
12994 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012996 (exit $ac_status); } && {
12997 test -z "$ac_c_werror_flag" ||
12998 test ! -s conftest.err
12999 } && test -s conftest$ac_exeext &&
13000 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013001 ac_cv_lib_intl_textdomain=yes
13002else
13003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013004sed 's/^/| /' conftest.$ac_ext >&5
13005
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008
13009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013011LIBS=$ac_check_lib_save_LIBS
13012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013013{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13014echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013015if test $ac_cv_lib_intl_textdomain = yes; then
13016
13017cat >>confdefs.h <<\_ACEOF
13018#define WITH_LIBINTL 1
13019_ACEOF
13020
13021fi
13022
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013023
13024# checks for system dependent C++ extensions support
13025case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13027echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 cat >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. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013034#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013035int
13036main ()
13037{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013038loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 ;
13040 return 0;
13041}
13042_ACEOF
13043rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013044if { (ac_try="$ac_link"
13045case "(($ac_try" in
13046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13047 *) ac_try_echo=$ac_try;;
13048esac
13049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13050 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013052 grep -v '^ *+' conftest.er1 >conftest.err
13053 rm -f conftest.er1
13054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056 (exit $ac_status); } && {
13057 test -z "$ac_c_werror_flag" ||
13058 test ! -s conftest.err
13059 } && test -s conftest$ac_exeext &&
13060 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013061
Martin v. Löwis11437992002-04-12 09:54:03 +000013062cat >>confdefs.h <<\_ACEOF
13063#define AIX_GENUINE_CPLUSPLUS 1
13064_ACEOF
13065
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066 { echo "$as_me:$LINENO: result: yes" >&5
13067echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013070sed 's/^/| /' conftest.$ac_ext >&5
13071
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072 { echo "$as_me:$LINENO: result: no" >&5
13073echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +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;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013078 *) ;;
13079esac
13080
Guido van Rossum70c7f481998-03-26 18:44:10 +000013081# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013082# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013083{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13084echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013085if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13086 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013087else
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013089LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* confdefs.h. */
13092_ACEOF
13093cat confdefs.h >>conftest.$ac_ext
13094cat >>conftest.$ac_ext <<_ACEOF
13095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013096
Martin v. Löwiseba40652007-08-30 20:10:57 +000013097/* Override any GCC internal prototype to avoid an error.
13098 Use char because int might match the return type of a GCC
13099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013100#ifdef __cplusplus
13101extern "C"
13102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013103char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013104int
13105main ()
13106{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ;
13109 return 0;
13110}
13111_ACEOF
13112rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113if { (ac_try="$ac_link"
13114case "(($ac_try" in
13115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13116 *) ac_try_echo=$ac_try;;
13117esac
13118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13119 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013121 grep -v '^ *+' conftest.er1 >conftest.err
13122 rm -f conftest.er1
13123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013125 (exit $ac_status); } && {
13126 test -z "$ac_c_werror_flag" ||
13127 test ! -s conftest.err
13128 } && test -s conftest$ac_exeext &&
13129 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013131else
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013133sed 's/^/| /' conftest.$ac_ext >&5
13134
Martin v. Löwiseba40652007-08-30 20:10:57 +000013135 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013137
13138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013140LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013142{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13143echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013144if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013145 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013146fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013147 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013148{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13149echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013150if test "${ac_cv_lib_socket_socket+set}" = set; then
13151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013152else
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013154LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013156/* confdefs.h. */
13157_ACEOF
13158cat confdefs.h >>conftest.$ac_ext
13159cat >>conftest.$ac_ext <<_ACEOF
13160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013161
Martin v. Löwiseba40652007-08-30 20:10:57 +000013162/* Override any GCC internal prototype to avoid an error.
13163 Use char because int might match the return type of a GCC
13164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013165#ifdef __cplusplus
13166extern "C"
13167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013168char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013169int
13170main ()
13171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013172return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 ;
13174 return 0;
13175}
13176_ACEOF
13177rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013178if { (ac_try="$ac_link"
13179case "(($ac_try" in
13180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13181 *) ac_try_echo=$ac_try;;
13182esac
13183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13184 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013186 grep -v '^ *+' conftest.er1 >conftest.err
13187 rm -f conftest.er1
13188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013190 (exit $ac_status); } && {
13191 test -z "$ac_c_werror_flag" ||
13192 test ! -s conftest.err
13193 } && test -s conftest$ac_exeext &&
13194 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013196else
Martin v. Löwis11437992002-04-12 09:54:03 +000013197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013198sed 's/^/| /' conftest.$ac_ext >&5
13199
Martin v. Löwiseba40652007-08-30 20:10:57 +000013200 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013202
13203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013205LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013207{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13208echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013209if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013210 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013211fi
13212 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013213
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013214case "$ac_sys_system" in
13215BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013216{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13217echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013218if test "${ac_cv_lib_net_socket+set}" = set; then
13219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013220else
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013222LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* confdefs.h. */
13225_ACEOF
13226cat confdefs.h >>conftest.$ac_ext
13227cat >>conftest.$ac_ext <<_ACEOF
13228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Martin v. Löwiseba40652007-08-30 20:10:57 +000013230/* Override any GCC internal prototype to avoid an error.
13231 Use char because int might match the return type of a GCC
13232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013233#ifdef __cplusplus
13234extern "C"
13235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013236char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013240return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 ;
13242 return 0;
13243}
13244_ACEOF
13245rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013246if { (ac_try="$ac_link"
13247case "(($ac_try" in
13248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13249 *) ac_try_echo=$ac_try;;
13250esac
13251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13252 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013254 grep -v '^ *+' conftest.er1 >conftest.err
13255 rm -f conftest.er1
13256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013258 (exit $ac_status); } && {
13259 test -z "$ac_c_werror_flag" ||
13260 test ! -s conftest.err
13261 } && test -s conftest$ac_exeext &&
13262 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013264else
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013266sed 's/^/| /' conftest.$ac_ext >&5
13267
Martin v. Löwiseba40652007-08-30 20:10:57 +000013268 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013270
13271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13276echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013277if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013278 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013279fi
13280 # BeOS
13281;;
13282esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013283
Martin v. Löwiseba40652007-08-30 20:10:57 +000013284{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13285echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Martin v. Löwiseba40652007-08-30 20:10:57 +000013287# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013288if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013289 withval=$with_libs;
13290{ echo "$as_me:$LINENO: result: $withval" >&5
13291echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013292LIBS="$withval $LIBS"
13293
13294else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013295 { echo "$as_me:$LINENO: result: no" >&5
13296echo "${ECHO_T}no" >&6; }
13297fi
13298
Guido van Rossum7f43da71994-08-01 12:15:30 +000013299
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013300# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013301{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13302echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013303
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013305if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306 withval=$with_system_ffi;
13307fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013308
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013309
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13311echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013312
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013313# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013314
13315
Martin v. Löwiseba40652007-08-30 20:10:57 +000013316{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13317echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013320if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013321 withval=$with_signal_module;
13322fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013323
13324
13325if test -z "$with_signal_module"
13326then with_signal_module="yes"
13327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013328{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13329echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013330
13331if test "${with_signal_module}" = "yes"; then
13332 USE_SIGNAL_MODULE=""
13333 SIGNAL_OBJS=""
13334else
13335 USE_SIGNAL_MODULE="#"
13336 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13337fi
13338
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013339# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013340
Barry Warsawc0d24d82000-06-29 16:12:00 +000013341USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013342
Martin v. Löwiseba40652007-08-30 20:10:57 +000013343{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13344echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
Guido van Rossumec2f0731997-01-22 20:54:01 +000013346
Martin v. Löwiseba40652007-08-30 20:10:57 +000013347# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013348if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013349 withval=$with_dec_threads;
13350{ echo "$as_me:$LINENO: result: $withval" >&5
13351echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013352LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013353if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013354 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013355fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013356else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013357 { echo "$as_me:$LINENO: result: no" >&5
13358echo "${ECHO_T}no" >&6; }
13359fi
13360
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
13362# Templates for things AC_DEFINEd more than once.
13363# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013364
13365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
13367
13368
13369
13370
Martin v. Löwiseba40652007-08-30 20:10:57 +000013371{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13372echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
Martin v. Löwiseba40652007-08-30 20:10:57 +000013374# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013375if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013376 withval=$with_threads;
13377fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013378
13379
Barry Warsawc0d24d82000-06-29 16:12:00 +000013380# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Martin v. Löwiseba40652007-08-30 20:10:57 +000013382# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013383if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013384 withval=$with_thread; with_threads=$with_thread
13385fi
13386
Barry Warsawc0d24d82000-06-29 16:12:00 +000013387
13388if test -z "$with_threads"
13389then with_threads="yes"
13390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013391{ echo "$as_me:$LINENO: result: $with_threads" >&5
13392echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013393
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013394
Barry Warsawc0d24d82000-06-29 16:12:00 +000013395if test "$with_threads" = "no"
13396then
13397 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013398elif test "$ac_cv_pthread_is_default" = yes
13399then
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013401#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013402_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013403
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013404 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013405 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013406#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013407_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013408
13409 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013411elif test "$ac_cv_kpthread" = "yes"
13412then
13413 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013414 if test "$ac_cv_cxx_thread" = "yes"; then
13415 CXX="$CXX -Kpthread"
13416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013418#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013419_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013420
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013421 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013422 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013423elif test "$ac_cv_kthread" = "yes"
13424then
13425 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013426 if test "$ac_cv_cxx_thread" = "yes"; then
13427 CXX="$CXX -Kthread"
13428 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013429 cat >>confdefs.h <<\_ACEOF
13430#define WITH_THREAD 1
13431_ACEOF
13432
13433 posix_threads=yes
13434 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013435elif test "$ac_cv_pthread" = "yes"
13436then
13437 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013438 if test "$ac_cv_cxx_thread" = "yes"; then
13439 CXX="$CXX -pthread"
13440 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013441 cat >>confdefs.h <<\_ACEOF
13442#define WITH_THREAD 1
13443_ACEOF
13444
13445 posix_threads=yes
13446 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013447else
13448 if test ! -z "$with_threads" -a -d "$with_threads"
13449 then LDFLAGS="$LDFLAGS -L$with_threads"
13450 fi
13451 if test ! -z "$withval" -a -d "$withval"
13452 then LDFLAGS="$LDFLAGS -L$withval"
13453 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013454
13455 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013456 # define _POSIX_THREADS in unistd.h. Some apparently don't
13457 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013458 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13459echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013461/* confdefs.h. */
13462_ACEOF
13463cat confdefs.h >>conftest.$ac_ext
13464cat >>conftest.$ac_ext <<_ACEOF
13465/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013466
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013467#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013468#ifdef _POSIX_THREADS
13469yes
13470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
13472_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013474 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013475 unistd_defines_pthreads=yes
13476else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013477 unistd_defines_pthreads=no
13478fi
13479rm -f conftest*
13480
Martin v. Löwiseba40652007-08-30 20:10:57 +000013481 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13482echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013485#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013486_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013489 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13490echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013491if test "${ac_cv_header_cthreads_h+set}" = set; then
13492 echo $ECHO_N "(cached) $ECHO_C" >&6
13493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013494{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13495echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013496else
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13499echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013500cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* confdefs.h. */
13502_ACEOF
13503cat confdefs.h >>conftest.$ac_ext
13504cat >>conftest.$ac_ext <<_ACEOF
13505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013506$ac_includes_default
13507#include <cthreads.h>
13508_ACEOF
13509rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510if { (ac_try="$ac_compile"
13511case "(($ac_try" in
13512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13513 *) ac_try_echo=$ac_try;;
13514esac
13515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013518 grep -v '^ *+' conftest.er1 >conftest.err
13519 rm -f conftest.er1
13520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522 (exit $ac_status); } && {
13523 test -z "$ac_c_werror_flag" ||
13524 test ! -s conftest.err
13525 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ac_header_compiler=yes
13527else
13528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013529sed 's/^/| /' conftest.$ac_ext >&5
13530
Martin v. Löwiseba40652007-08-30 20:10:57 +000013531 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013533
13534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13535{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13536echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
13538# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013539{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13540echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013542/* confdefs.h. */
13543_ACEOF
13544cat confdefs.h >>conftest.$ac_ext
13545cat >>conftest.$ac_ext <<_ACEOF
13546/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013547#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013548_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013549if { (ac_try="$ac_cpp conftest.$ac_ext"
13550case "(($ac_try" in
13551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13552 *) ac_try_echo=$ac_try;;
13553esac
13554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13555 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013557 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 rm -f conftest.er1
13559 cat conftest.err >&5
13560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013561 (exit $ac_status); } >/dev/null && {
13562 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13563 test ! -s conftest.err
13564 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 ac_header_preproc=yes
13566else
13567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013568sed 's/^/| /' conftest.$ac_ext >&5
13569
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013572
Martin v. Löwis11437992002-04-12 09:54:03 +000013573rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13575echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
13577# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013578case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13579 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13581echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013582 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13583echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13584 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013585 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013586 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013587 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13588echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013589 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13590echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13591 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13592echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13593 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13594echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013595 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13596echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013597 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13598echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013599 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013600## ------------------------------------------------ ##
13601## Report this to http://www.python.org/python-bugs ##
13602## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013603_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013604 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013605 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013606esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13608echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013609if test "${ac_cv_header_cthreads_h+set}" = set; then
13610 echo $ECHO_N "(cached) $ECHO_C" >&6
13611else
13612 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13615echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013616
13617fi
13618if test $ac_cv_header_cthreads_h = yes; then
13619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013620#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013621_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013624#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013625_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013626
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
13628cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013629#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013630_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013631
13632 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013633 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013634else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013637 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13638echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013639if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13640 echo $ECHO_N "(cached) $ECHO_C" >&6
13641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13643echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013644else
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013646{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13647echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* confdefs.h. */
13650_ACEOF
13651cat confdefs.h >>conftest.$ac_ext
13652cat >>conftest.$ac_ext <<_ACEOF
13653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013654$ac_includes_default
13655#include <mach/cthreads.h>
13656_ACEOF
13657rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013658if { (ac_try="$ac_compile"
13659case "(($ac_try" in
13660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13661 *) ac_try_echo=$ac_try;;
13662esac
13663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013666 grep -v '^ *+' conftest.er1 >conftest.err
13667 rm -f conftest.er1
13668 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670 (exit $ac_status); } && {
13671 test -z "$ac_c_werror_flag" ||
13672 test ! -s conftest.err
13673 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 ac_header_compiler=yes
13675else
13676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013677sed 's/^/| /' conftest.$ac_ext >&5
13678
Martin v. Löwiseba40652007-08-30 20:10:57 +000013679 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681
13682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13683{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13684echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013685
13686# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013687{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13688echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013690/* confdefs.h. */
13691_ACEOF
13692cat confdefs.h >>conftest.$ac_ext
13693cat >>conftest.$ac_ext <<_ACEOF
13694/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013695#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013696_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013697if { (ac_try="$ac_cpp conftest.$ac_ext"
13698case "(($ac_try" in
13699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13700 *) ac_try_echo=$ac_try;;
13701esac
13702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13703 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013705 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013706 rm -f conftest.er1
13707 cat conftest.err >&5
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013709 (exit $ac_status); } >/dev/null && {
13710 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13711 test ! -s conftest.err
13712 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 ac_header_preproc=yes
13714else
13715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013716sed 's/^/| /' conftest.$ac_ext >&5
13717
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013722{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13723echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
13725# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013726case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13727 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13729echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013730 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13731echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13732 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013733 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013734 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013735 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13736echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013737 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13738echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13739 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13740echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13741 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13742echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013743 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13744echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013745 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13746echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013747 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013748## ------------------------------------------------ ##
13749## Report this to http://www.python.org/python-bugs ##
13750## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013751_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013752 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013753 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013754esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013755{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13756echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013757if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13758 echo $ECHO_N "(cached) $ECHO_C" >&6
13759else
13760 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013762{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13763echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
13765fi
13766if test $ac_cv_header_mach_cthreads_h = yes; then
13767 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013768#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013769_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013772#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013773_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013774
Martin v. Löwis11437992002-04-12 09:54:03 +000013775
13776cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013777#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013778_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013779
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013780 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013781else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013782
Martin v. Löwiseba40652007-08-30 20:10:57 +000013783 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13784echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013787if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13789echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013790 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013791#define WITH_THREAD 1
13792_ACEOF
13793
13794
13795cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013796#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013797_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013798
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013799 LIBS="-lpth $LIBS"
13800 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013801else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013802 { echo "$as_me:$LINENO: result: no" >&5
13803echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013804
13805 # Just looking for pthread_create in libpthread is not enough:
13806 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13807 # So we really have to include pthread.h, and then link.
13808 _libs=$LIBS
13809 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013810 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13811echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* confdefs.h. */
13814_ACEOF
13815cat confdefs.h >>conftest.$ac_ext
13816cat >>conftest.$ac_ext <<_ACEOF
13817/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013818#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013819
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013820void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013821int
13822main ()
13823{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013824
13825pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ;
13827 return 0;
13828}
13829_ACEOF
13830rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831if { (ac_try="$ac_link"
13832case "(($ac_try" in
13833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13834 *) ac_try_echo=$ac_try;;
13835esac
13836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13837 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013839 grep -v '^ *+' conftest.er1 >conftest.err
13840 rm -f conftest.er1
13841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013843 (exit $ac_status); } && {
13844 test -z "$ac_c_werror_flag" ||
13845 test ! -s conftest.err
13846 } && test -s conftest$ac_exeext &&
13847 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Martin v. Löwiseba40652007-08-30 20:10:57 +000013849 { echo "$as_me:$LINENO: result: yes" >&5
13850echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013852#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013853_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013854
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013855 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013856 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013857else
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013859sed 's/^/| /' conftest.$ac_ext >&5
13860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013862 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13864echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013865if test "${ac_cv_func_pthread_detach+set}" = set; then
13866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013867else
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013869/* confdefs.h. */
13870_ACEOF
13871cat confdefs.h >>conftest.$ac_ext
13872cat >>conftest.$ac_ext <<_ACEOF
13873/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013874/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13876#define pthread_detach innocuous_pthread_detach
13877
Guido van Rossumad678af1998-10-02 14:42:15 +000013878/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013879 which can conflict with char pthread_detach (); below.
13880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013881 <limits.h> exists even on freestanding compilers. */
13882
13883#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013884# include <limits.h>
13885#else
13886# include <assert.h>
13887#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013888
13889#undef pthread_detach
13890
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891/* Override any GCC internal prototype to avoid an error.
13892 Use char because int might match the return type of a GCC
13893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013894#ifdef __cplusplus
13895extern "C"
13896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013897char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013898/* The GNU C library defines this for functions which it implements
13899 to always fail with ENOSYS. Some functions are actually named
13900 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013902choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013903#endif
13904
Skip Montanaro6dead952003-09-25 14:50:04 +000013905int
13906main ()
13907{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 ;
13910 return 0;
13911}
13912_ACEOF
13913rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914if { (ac_try="$ac_link"
13915case "(($ac_try" in
13916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13917 *) ac_try_echo=$ac_try;;
13918esac
13919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13920 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013922 grep -v '^ *+' conftest.er1 >conftest.err
13923 rm -f conftest.er1
13924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926 (exit $ac_status); } && {
13927 test -z "$ac_c_werror_flag" ||
13928 test ! -s conftest.err
13929 } && test -s conftest$ac_exeext &&
13930 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013932else
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013934sed 's/^/| /' conftest.$ac_ext >&5
13935
Martin v. Löwiseba40652007-08-30 20:10:57 +000013936 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938
13939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013940 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13943echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013944if test $ac_cv_func_pthread_detach = yes; then
13945 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013946#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013947_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013948
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013949 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013950 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013951else
Guido van Rossumad678af1998-10-02 14:42:15 +000013952
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013953 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13955echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013956if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13957 echo $ECHO_N "(cached) $ECHO_C" >&6
13958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13960echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013961else
13962 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013963{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13964echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* confdefs.h. */
13967_ACEOF
13968cat confdefs.h >>conftest.$ac_ext
13969cat >>conftest.$ac_ext <<_ACEOF
13970/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013971$ac_includes_default
13972#include <atheos/threads.h>
13973_ACEOF
13974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975if { (ac_try="$ac_compile"
13976case "(($ac_try" in
13977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13978 *) ac_try_echo=$ac_try;;
13979esac
13980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013983 grep -v '^ *+' conftest.er1 >conftest.err
13984 rm -f conftest.er1
13985 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987 (exit $ac_status); } && {
13988 test -z "$ac_c_werror_flag" ||
13989 test ! -s conftest.err
13990 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013991 ac_header_compiler=yes
13992else
13993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013994sed 's/^/| /' conftest.$ac_ext >&5
13995
Martin v. Löwiseba40652007-08-30 20:10:57 +000013996 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998
13999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14000{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14001echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014002
14003# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14005echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014007/* confdefs.h. */
14008_ACEOF
14009cat confdefs.h >>conftest.$ac_ext
14010cat >>conftest.$ac_ext <<_ACEOF
14011/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014012#include <atheos/threads.h>
14013_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014014if { (ac_try="$ac_cpp conftest.$ac_ext"
14015case "(($ac_try" in
14016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14017 *) ac_try_echo=$ac_try;;
14018esac
14019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14020 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014021 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014022 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014023 rm -f conftest.er1
14024 cat conftest.err >&5
14025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026 (exit $ac_status); } >/dev/null && {
14027 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14028 test ! -s conftest.err
14029 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014030 ac_header_preproc=yes
14031else
14032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014033sed 's/^/| /' conftest.$ac_ext >&5
14034
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014035 ac_header_preproc=no
14036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014037
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014038rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014039{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14040echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014041
14042# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014043case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14044 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014045 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14046echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14048echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14049 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014051 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014052 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14053echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014054 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14055echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14056 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14057echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14058 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14059echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014060 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14061echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014062 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14063echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014065## ------------------------------------------------ ##
14066## Report this to http://www.python.org/python-bugs ##
14067## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014068_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014070 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014071esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014072{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14073echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014074if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14075 echo $ECHO_N "(cached) $ECHO_C" >&6
14076else
14077 ac_cv_header_atheos_threads_h=$ac_header_preproc
14078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14080echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014081
14082fi
14083if test $ac_cv_header_atheos_threads_h = yes; then
14084 cat >>confdefs.h <<\_ACEOF
14085#define WITH_THREAD 1
14086_ACEOF
14087
14088
14089cat >>confdefs.h <<\_ACEOF
14090#define ATHEOS_THREADS 1
14091_ACEOF
14092
14093 THREADOBJ="Python/thread.o"
14094else
14095
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014097 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14098echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014099if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14100 echo $ECHO_N "(cached) $ECHO_C" >&6
14101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14103echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014104else
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14107echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014109/* confdefs.h. */
14110_ACEOF
14111cat confdefs.h >>conftest.$ac_ext
14112cat >>conftest.$ac_ext <<_ACEOF
14113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014114$ac_includes_default
14115#include <kernel/OS.h>
14116_ACEOF
14117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014118if { (ac_try="$ac_compile"
14119case "(($ac_try" in
14120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14121 *) ac_try_echo=$ac_try;;
14122esac
14123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014126 grep -v '^ *+' conftest.er1 >conftest.err
14127 rm -f conftest.er1
14128 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014130 (exit $ac_status); } && {
14131 test -z "$ac_c_werror_flag" ||
14132 test ! -s conftest.err
14133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 ac_header_compiler=yes
14135else
14136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014137sed 's/^/| /' conftest.$ac_ext >&5
14138
Martin v. Löwiseba40652007-08-30 20:10:57 +000014139 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014141
14142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14143{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14144echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014145
14146# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014147{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14148echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014150/* confdefs.h. */
14151_ACEOF
14152cat confdefs.h >>conftest.$ac_ext
14153cat >>conftest.$ac_ext <<_ACEOF
14154/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014155#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014156_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014157if { (ac_try="$ac_cpp conftest.$ac_ext"
14158case "(($ac_try" in
14159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14160 *) ac_try_echo=$ac_try;;
14161esac
14162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14163 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014165 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 rm -f conftest.er1
14167 cat conftest.err >&5
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014169 (exit $ac_status); } >/dev/null && {
14170 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14171 test ! -s conftest.err
14172 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ac_header_preproc=yes
14174else
14175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014176sed 's/^/| /' conftest.$ac_ext >&5
14177
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014180
Martin v. Löwis11437992002-04-12 09:54:03 +000014181rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014182{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14183echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014184
Martin v. Löwis11437992002-04-12 09:54:03 +000014185# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14187 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14189echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014190 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14191echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14192 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014193 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014194 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014195 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14196echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014197 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14198echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14199 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14200echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14201 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14202echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014203 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14204echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14206echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014207 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014208## ------------------------------------------------ ##
14209## Report this to http://www.python.org/python-bugs ##
14210## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014211_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014213 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014214esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14216echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014217if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14218 echo $ECHO_N "(cached) $ECHO_C" >&6
14219else
14220 ac_cv_header_kernel_OS_h=$ac_header_preproc
14221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14223echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
14225fi
14226if test $ac_cv_header_kernel_OS_h = yes; then
14227 cat >>confdefs.h <<\_ACEOF
14228#define WITH_THREAD 1
14229_ACEOF
14230
14231
14232cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014233#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014234_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014235
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014236 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014237else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014238
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14240echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014241if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014243else
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014245LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014247/* confdefs.h. */
14248_ACEOF
14249cat confdefs.h >>conftest.$ac_ext
14250cat >>conftest.$ac_ext <<_ACEOF
14251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014252
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253/* Override any GCC internal prototype to avoid an error.
14254 Use char because int might match the return type of a GCC
14255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014256#ifdef __cplusplus
14257extern "C"
14258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014259char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014260int
14261main ()
14262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014263return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 ;
14265 return 0;
14266}
14267_ACEOF
14268rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014269if { (ac_try="$ac_link"
14270case "(($ac_try" in
14271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14272 *) ac_try_echo=$ac_try;;
14273esac
14274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14275 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014277 grep -v '^ *+' conftest.er1 >conftest.err
14278 rm -f conftest.er1
14279 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281 (exit $ac_status); } && {
14282 test -z "$ac_c_werror_flag" ||
14283 test ! -s conftest.err
14284 } && test -s conftest$ac_exeext &&
14285 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014287else
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014289sed 's/^/| /' conftest.$ac_ext >&5
14290
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014293
14294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014296LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014298{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14299echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014300if test $ac_cv_lib_pthreads_pthread_create = yes; then
14301 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014303_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014306 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014307 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014308else
Greg Steinadf63d62000-07-05 10:38:09 +000014309
Martin v. Löwiseba40652007-08-30 20:10:57 +000014310 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14311echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014312if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14313 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014314else
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014316LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014318/* confdefs.h. */
14319_ACEOF
14320cat confdefs.h >>conftest.$ac_ext
14321cat >>conftest.$ac_ext <<_ACEOF
14322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324/* Override any GCC internal prototype to avoid an error.
14325 Use char because int might match the return type of a GCC
14326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014327#ifdef __cplusplus
14328extern "C"
14329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014330char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014331int
14332main ()
14333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ;
14336 return 0;
14337}
14338_ACEOF
14339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014340if { (ac_try="$ac_link"
14341case "(($ac_try" in
14342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14343 *) ac_try_echo=$ac_try;;
14344esac
14345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014348 grep -v '^ *+' conftest.er1 >conftest.err
14349 rm -f conftest.er1
14350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352 (exit $ac_status); } && {
14353 test -z "$ac_c_werror_flag" ||
14354 test ! -s conftest.err
14355 } && test -s conftest$ac_exeext &&
14356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014358else
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014360sed 's/^/| /' conftest.$ac_ext >&5
14361
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364
14365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014369{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14370echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014371if test $ac_cv_lib_c_r_pthread_create = yes; then
14372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014374_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014377 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014378 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014379else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014380
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14382echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014383if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014385else
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014387LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014389/* confdefs.h. */
14390_ACEOF
14391cat confdefs.h >>conftest.$ac_ext
14392cat >>conftest.$ac_ext <<_ACEOF
14393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395/* Override any GCC internal prototype to avoid an error.
14396 Use char because int might match the return type of a GCC
14397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014398#ifdef __cplusplus
14399extern "C"
14400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014401char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014402int
14403main ()
14404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 ;
14407 return 0;
14408}
14409_ACEOF
14410rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411if { (ac_try="$ac_link"
14412case "(($ac_try" in
14413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14414 *) ac_try_echo=$ac_try;;
14415esac
14416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14417 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014419 grep -v '^ *+' conftest.er1 >conftest.err
14420 rm -f conftest.er1
14421 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423 (exit $ac_status); } && {
14424 test -z "$ac_c_werror_flag" ||
14425 test ! -s conftest.err
14426 } && test -s conftest$ac_exeext &&
14427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014431sed 's/^/| /' conftest.$ac_ext >&5
14432
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435
14436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014438LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014440{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14441echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014442if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014445_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014446
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014447 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014448 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014449 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014450else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014451
Martin v. Löwiseba40652007-08-30 20:10:57 +000014452 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14453echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014454if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14455 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014456else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014458LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014460/* confdefs.h. */
14461_ACEOF
14462cat confdefs.h >>conftest.$ac_ext
14463cat >>conftest.$ac_ext <<_ACEOF
14464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466/* Override any GCC internal prototype to avoid an error.
14467 Use char because int might match the return type of a GCC
14468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014469#ifdef __cplusplus
14470extern "C"
14471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014472char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014473int
14474main ()
14475{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014476return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 ;
14478 return 0;
14479}
14480_ACEOF
14481rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482if { (ac_try="$ac_link"
14483case "(($ac_try" in
14484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14485 *) ac_try_echo=$ac_try;;
14486esac
14487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14488 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014490 grep -v '^ *+' conftest.er1 >conftest.err
14491 rm -f conftest.er1
14492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494 (exit $ac_status); } && {
14495 test -z "$ac_c_werror_flag" ||
14496 test ! -s conftest.err
14497 } && test -s conftest$ac_exeext &&
14498 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014500else
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014502sed 's/^/| /' conftest.$ac_ext >&5
14503
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014506
14507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014509LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14512echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014513if test $ac_cv_lib_cma_pthread_create = yes; then
14514 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014515#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014516_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014517
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014518 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014519 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014520 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014521else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014522
Martin v. Löwis130fb172001-07-19 11:00:41 +000014523 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014524fi
14525
Guido van Rossum627b2d71993-12-24 10:39:16 +000014526
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014527fi
14528
Guido van Rossum0be3e491997-05-22 20:33:33 +000014529fi
14530
Guido van Rossum49545951997-12-02 19:28:29 +000014531fi
14532
Guido van Rossumb93a8621998-05-07 13:27:32 +000014533fi
14534
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014535
Michael W. Hudson54241132001-12-07 15:38:26 +000014536fi
14537
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014538
14539fi
14540
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542
14543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545fi
14546
Martin v. Löwis11437992002-04-12 09:54:03 +000014547fi
14548
14549
14550fi
14551
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014552
Michael W. Hudson54241132001-12-07 15:38:26 +000014553
Martin v. Löwiseba40652007-08-30 20:10:57 +000014554 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14555echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014556if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014558else
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014560LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014562/* confdefs.h. */
14563_ACEOF
14564cat confdefs.h >>conftest.$ac_ext
14565cat >>conftest.$ac_ext <<_ACEOF
14566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014567
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568/* Override any GCC internal prototype to avoid an error.
14569 Use char because int might match the return type of a GCC
14570 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014571#ifdef __cplusplus
14572extern "C"
14573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014574char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014575int
14576main ()
14577{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 ;
14580 return 0;
14581}
14582_ACEOF
14583rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584if { (ac_try="$ac_link"
14585case "(($ac_try" in
14586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14587 *) ac_try_echo=$ac_try;;
14588esac
14589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14590 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014592 grep -v '^ *+' conftest.er1 >conftest.err
14593 rm -f conftest.er1
14594 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596 (exit $ac_status); } && {
14597 test -z "$ac_c_werror_flag" ||
14598 test ! -s conftest.err
14599 } && test -s conftest$ac_exeext &&
14600 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014602else
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014604sed 's/^/| /' conftest.$ac_ext >&5
14605
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608
14609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014610 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014611LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014613{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14614echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014615if test $ac_cv_lib_mpc_usconfig = yes; then
14616 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014617#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014618_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014619
Martin v. Löwis130fb172001-07-19 11:00:41 +000014620 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014621 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014622 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014623fi
14624
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014625
Neal Norwitza978ab02002-11-02 16:58:05 +000014626 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14628echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014629if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014631else
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014633LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014635/* confdefs.h. */
14636_ACEOF
14637cat confdefs.h >>conftest.$ac_ext
14638cat >>conftest.$ac_ext <<_ACEOF
14639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641/* Override any GCC internal prototype to avoid an error.
14642 Use char because int might match the return type of a GCC
14643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014644#ifdef __cplusplus
14645extern "C"
14646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014647char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014648int
14649main ()
14650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 ;
14653 return 0;
14654}
14655_ACEOF
14656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657if { (ac_try="$ac_link"
14658case "(($ac_try" in
14659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14660 *) ac_try_echo=$ac_try;;
14661esac
14662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014665 grep -v '^ *+' conftest.er1 >conftest.err
14666 rm -f conftest.er1
14667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 (exit $ac_status); } && {
14670 test -z "$ac_c_werror_flag" ||
14671 test ! -s conftest.err
14672 } && test -s conftest$ac_exeext &&
14673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014674 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014675else
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014677sed 's/^/| /' conftest.$ac_ext >&5
14678
Martin v. Löwiseba40652007-08-30 20:10:57 +000014679 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014681
14682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014686{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14687echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014688if test $ac_cv_lib_thread_thr_create = yes; then
14689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014690#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014691_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014692
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014693 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014694 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014695 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014696fi
14697
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014698 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014699
Martin v. Löwis130fb172001-07-19 11:00:41 +000014700 if test "$USE_THREAD_MODULE" != "#"
14701 then
14702 # If the above checks didn't disable threads, (at least) OSF1
14703 # needs this '-threads' argument during linking.
14704 case $ac_sys_system in
14705 OSF1) LDLAST=-threads;;
14706 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014707 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014708fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014709
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014710if test "$posix_threads" = "yes"; then
14711 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014712
14713cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014714#define _POSIX_THREADS 1
14715_ACEOF
14716
14717 fi
14718
14719 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14720 case $ac_sys_system/$ac_sys_release in
14721 SunOS/5.6)
14722cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014723#define HAVE_PTHREAD_DESTRUCTOR 1
14724_ACEOF
14725
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014726 ;;
14727 SunOS/5.8)
14728cat >>confdefs.h <<\_ACEOF
14729#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14730_ACEOF
14731
14732 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014733 AIX/5)
14734cat >>confdefs.h <<\_ACEOF
14735#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14736_ACEOF
14737
14738 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014739 esac
14740
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14742echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014743 if test "${ac_cv_pthread_system_supported+set}" = set; then
14744 echo $ECHO_N "(cached) $ECHO_C" >&6
14745else
14746 if test "$cross_compiling" = yes; then
14747 ac_cv_pthread_system_supported=no
14748else
14749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014750/* confdefs.h. */
14751_ACEOF
14752cat confdefs.h >>conftest.$ac_ext
14753cat >>conftest.$ac_ext <<_ACEOF
14754/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014755#include <pthread.h>
14756 void *foo(void *parm) {
14757 return NULL;
14758 }
14759 main() {
14760 pthread_attr_t attr;
14761 pthread_t id;
14762 if (pthread_attr_init(&attr)) exit(-1);
14763 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14764 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14765 exit(0);
14766 }
14767_ACEOF
14768rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769if { (ac_try="$ac_link"
14770case "(($ac_try" in
14771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14772 *) ac_try_echo=$ac_try;;
14773esac
14774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14775 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014776 ac_status=$?
14777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14778 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779 { (case "(($ac_try" in
14780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14781 *) ac_try_echo=$ac_try;;
14782esac
14783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14784 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014785 ac_status=$?
14786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14787 (exit $ac_status); }; }; then
14788 ac_cv_pthread_system_supported=yes
14789else
14790 echo "$as_me: program exited with status $ac_status" >&5
14791echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014792sed 's/^/| /' conftest.$ac_ext >&5
14793
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014794( exit $ac_status )
14795ac_cv_pthread_system_supported=no
14796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797rm -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 +000014798fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014799
Martin v. Löwiseba40652007-08-30 20:10:57 +000014800
14801
Guido van Rossum627b2d71993-12-24 10:39:16 +000014802fi
14803
Martin v. Löwiseba40652007-08-30 20:10:57 +000014804 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14805echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014806 if test "$ac_cv_pthread_system_supported" = "yes"; then
14807
14808cat >>confdefs.h <<\_ACEOF
14809#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14810_ACEOF
14811
14812 fi
14813
14814for ac_func in pthread_sigmask
14815do
14816as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014817{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14818echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14819if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014820 echo $ECHO_N "(cached) $ECHO_C" >&6
14821else
14822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014823/* confdefs.h. */
14824_ACEOF
14825cat confdefs.h >>conftest.$ac_ext
14826cat >>conftest.$ac_ext <<_ACEOF
14827/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014828/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14829 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14830#define $ac_func innocuous_$ac_func
14831
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014832/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014833 which can conflict with char $ac_func (); below.
14834 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014835 <limits.h> exists even on freestanding compilers. */
14836
14837#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014838# include <limits.h>
14839#else
14840# include <assert.h>
14841#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014842
14843#undef $ac_func
14844
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845/* Override any GCC internal prototype to avoid an error.
14846 Use char because int might match the return type of a GCC
14847 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014848#ifdef __cplusplus
14849extern "C"
14850#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014851char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014852/* The GNU C library defines this for functions which it implements
14853 to always fail with ENOSYS. Some functions are actually named
14854 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014856choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014857#endif
14858
Skip Montanaro6dead952003-09-25 14:50:04 +000014859int
14860main ()
14861{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014863 ;
14864 return 0;
14865}
14866_ACEOF
14867rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868if { (ac_try="$ac_link"
14869case "(($ac_try" in
14870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14871 *) ac_try_echo=$ac_try;;
14872esac
14873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14874 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014876 grep -v '^ *+' conftest.er1 >conftest.err
14877 rm -f conftest.er1
14878 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014880 (exit $ac_status); } && {
14881 test -z "$ac_c_werror_flag" ||
14882 test ! -s conftest.err
14883 } && test -s conftest$ac_exeext &&
14884 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014885 eval "$as_ac_var=yes"
14886else
14887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014888sed 's/^/| /' conftest.$ac_ext >&5
14889
Martin v. Löwiseba40652007-08-30 20:10:57 +000014890 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892
14893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896ac_res=`eval echo '${'$as_ac_var'}'`
14897 { echo "$as_me:$LINENO: result: $ac_res" >&5
14898echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014899if test `eval echo '${'$as_ac_var'}'` = yes; then
14900 cat >>confdefs.h <<_ACEOF
14901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14902_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014903 case $ac_sys_system in
14904 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014905
Jason Tishlerfac083d2003-07-22 15:20:49 +000014906cat >>confdefs.h <<\_ACEOF
14907#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14908_ACEOF
14909
14910 ;;
14911 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014912fi
14913done
14914
14915fi
14916
14917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014918# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
14920
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14922echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14923# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014924if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014926 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927 { echo "$as_me:$LINENO: result: no" >&5
14928echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014929 ipv6=no
14930 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931 *) { echo "$as_me:$LINENO: result: yes" >&5
14932echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014934#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014935_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014936
14937 ipv6=yes
14938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014940else
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014942 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014943 { echo "$as_me:$LINENO: result: no" >&5
14944echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014945 ipv6=no
14946
14947else
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* confdefs.h. */
14950_ACEOF
14951cat confdefs.h >>conftest.$ac_ext
14952cat >>conftest.$ac_ext <<_ACEOF
14953/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014954 /* AF_INET6 available check */
14955#include <sys/types.h>
14956#include <sys/socket.h>
14957main()
14958{
14959 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14960 exit(1);
14961 else
14962 exit(0);
14963}
14964
Martin v. Löwis11437992002-04-12 09:54:03 +000014965_ACEOF
14966rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967if { (ac_try="$ac_link"
14968case "(($ac_try" in
14969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14970 *) ac_try_echo=$ac_try;;
14971esac
14972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14973 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 ac_status=$?
14975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 { (case "(($ac_try" in
14978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14979 *) ac_try_echo=$ac_try;;
14980esac
14981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14982 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ac_status=$?
14984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 { echo "$as_me:$LINENO: result: yes" >&5
14987echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014988 ipv6=yes
14989else
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 echo "$as_me: program exited with status $ac_status" >&5
14991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014992sed 's/^/| /' conftest.$ac_ext >&5
14993
Martin v. Löwis11437992002-04-12 09:54:03 +000014994( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995{ echo "$as_me:$LINENO: result: no" >&5
14996echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014997 ipv6=no
14998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999rm -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 +000015000fi
15001
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002
15003
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015004if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15006echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015008/* confdefs.h. */
15009_ACEOF
15010cat confdefs.h >>conftest.$ac_ext
15011cat >>conftest.$ac_ext <<_ACEOF
15012/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015013#include <sys/types.h>
15014#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015015int
15016main ()
15017{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015018struct sockaddr_in6 x;
15019x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ;
15021 return 0;
15022}
15023_ACEOF
15024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025if { (ac_try="$ac_compile"
15026case "(($ac_try" in
15027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15028 *) ac_try_echo=$ac_try;;
15029esac
15030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015033 grep -v '^ *+' conftest.er1 >conftest.err
15034 rm -f conftest.er1
15035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037 (exit $ac_status); } && {
15038 test -z "$ac_c_werror_flag" ||
15039 test ! -s conftest.err
15040 } && test -s conftest.$ac_objext; then
15041 { echo "$as_me:$LINENO: result: yes" >&5
15042echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015043 ipv6=yes
15044else
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015046sed 's/^/| /' conftest.$ac_ext >&5
15047
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 { echo "$as_me:$LINENO: result: no" >&5
15049echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015050 ipv6=no
15051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052
15053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015054fi
15055
15056if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015058#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015059_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015060
15061fi
15062
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063fi
15064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015065
15066ipv6type=unknown
15067ipv6lib=none
15068ipv6trylibc=no
15069
15070if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15072echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015073 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15074 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015075 case $i in
15076 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015078/* confdefs.h. */
15079_ACEOF
15080cat confdefs.h >>conftest.$ac_ext
15081cat >>conftest.$ac_ext <<_ACEOF
15082/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015083
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015084#include <netinet/in.h>
15085#ifdef IPV6_INRIA_VERSION
15086yes
15087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015088_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015090 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015091 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015092fi
15093rm -f conftest*
15094
15095 ;;
15096 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015098/* confdefs.h. */
15099_ACEOF
15100cat confdefs.h >>conftest.$ac_ext
15101cat >>conftest.$ac_ext <<_ACEOF
15102/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015103
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015104#include <netinet/in.h>
15105#ifdef __KAME__
15106yes
15107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015108_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015110 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015111 ipv6type=$i;
15112 ipv6lib=inet6
15113 ipv6libdir=/usr/local/v6/lib
15114 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015115fi
15116rm -f conftest*
15117
15118 ;;
15119 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015121/* confdefs.h. */
15122_ACEOF
15123cat confdefs.h >>conftest.$ac_ext
15124cat >>conftest.$ac_ext <<_ACEOF
15125/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015126
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015127#include <features.h>
15128#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15129yes
15130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015131_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015133 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015134 ipv6type=$i;
15135 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015136fi
15137rm -f conftest*
15138
15139 ;;
15140 linux-inet6)
15141 if test -d /usr/inet6; then
15142 ipv6type=$i
15143 ipv6lib=inet6
15144 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015145 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015146 fi
15147 ;;
15148 solaris)
15149 if test -f /etc/netconfig; then
15150 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15151 ipv6type=$i
15152 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015153 fi
15154 fi
15155 ;;
15156 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015158/* confdefs.h. */
15159_ACEOF
15160cat confdefs.h >>conftest.$ac_ext
15161cat >>conftest.$ac_ext <<_ACEOF
15162/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015163
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015164#include <sys/param.h>
15165#ifdef _TOSHIBA_INET6
15166yes
15167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015168_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015170 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015171 ipv6type=$i;
15172 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015173 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015174fi
15175rm -f conftest*
15176
15177 ;;
15178 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015180/* confdefs.h. */
15181_ACEOF
15182cat confdefs.h >>conftest.$ac_ext
15183cat >>conftest.$ac_ext <<_ACEOF
15184/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015185
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015186#include </usr/local/v6/include/sys/v6config.h>
15187#ifdef __V6D__
15188yes
15189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015192 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015193 ipv6type=$i;
15194 ipv6lib=v6;
15195 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015196 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015197fi
15198rm -f conftest*
15199
15200 ;;
15201 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015203/* confdefs.h. */
15204_ACEOF
15205cat confdefs.h >>conftest.$ac_ext
15206cat >>conftest.$ac_ext <<_ACEOF
15207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015209#include <sys/param.h>
15210#ifdef _ZETA_MINAMI_INET6
15211yes
15212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015215 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015216 ipv6type=$i;
15217 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015218 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015219fi
15220rm -f conftest*
15221
15222 ;;
15223 esac
15224 if test "$ipv6type" != "unknown"; then
15225 break
15226 fi
15227 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015228 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15229echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015230fi
15231
15232if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15233 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15234 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15235 echo "using lib$ipv6lib"
15236 else
15237 if test $ipv6trylibc = "yes"; then
15238 echo "using libc"
15239 else
15240 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15241 echo "You need to fetch lib$ipv6lib.a from appropriate"
15242 echo 'ipv6 kit and compile beforehand.'
15243 exit 1
15244 fi
15245 fi
15246fi
15247
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015248# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015249{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15250echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015251
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015253if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015254 withval=$with_doc_strings;
15255fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015256
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015257
15258if test -z "$with_doc_strings"
15259then with_doc_strings="yes"
15260fi
15261if test "$with_doc_strings" != "no"
15262then
15263
15264cat >>confdefs.h <<\_ACEOF
15265#define WITH_DOC_STRINGS 1
15266_ACEOF
15267
15268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15270echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015271
Neil Schemenauera35c6882001-02-27 04:45:05 +000015272# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015273{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15274echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015275
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015277if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015279if test "$withval" != no
15280then
15281
15282cat >>confdefs.h <<\_ACEOF
15283#define WITH_TSC 1
15284_ACEOF
15285
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286 { echo "$as_me:$LINENO: result: yes" >&5
15287echo "${ECHO_T}yes" >&6; }
15288else { echo "$as_me:$LINENO: result: no" >&5
15289echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015290fi
15291else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292 { echo "$as_me:$LINENO: result: no" >&5
15293echo "${ECHO_T}no" >&6; }
15294fi
15295
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015296
15297# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015298{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15299echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015300
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015302if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303 withval=$with_pymalloc;
15304fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015305
Neil Schemenauera35c6882001-02-27 04:45:05 +000015306
Neil Schemenauer16c22972002-03-22 15:34:49 +000015307if test -z "$with_pymalloc"
15308then with_pymalloc="yes"
15309fi
15310if test "$with_pymalloc" != "no"
15311then
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
15313cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015314#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015315_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015316
15317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15319echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015320
Barry Warsawef82cd72000-06-30 16:21:01 +000015321# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15323echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015324
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015326if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015328if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015329then
15330
15331cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015332#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015333_ACEOF
15334
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335 { echo "$as_me:$LINENO: result: yes" >&5
15336echo "${ECHO_T}yes" >&6; }
15337else { echo "$as_me:$LINENO: result: no" >&5
15338echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015339fi
15340else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341 { echo "$as_me:$LINENO: result: no" >&5
15342echo "${ECHO_T}no" >&6; }
15343fi
15344
Barry Warsawef82cd72000-06-30 16:21:01 +000015345
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015346# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015347
Guido van Rossum98935bf2001-09-05 19:13:16 +000015348DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015349
Guido van Rossume97ee181999-12-20 21:27:22 +000015350# the dlopen() function means we might want to use dynload_shlib.o. some
15351# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
Thomas Wouters3a584202000-08-05 23:28:51 +000015353for ac_func in dlopen
15354do
Martin v. Löwis11437992002-04-12 09:54:03 +000015355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15358if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015360else
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015362/* confdefs.h. */
15363_ACEOF
15364cat confdefs.h >>conftest.$ac_ext
15365cat >>conftest.$ac_ext <<_ACEOF
15366/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015367/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15368 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15369#define $ac_func innocuous_$ac_func
15370
Guido van Rossume97ee181999-12-20 21:27:22 +000015371/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015372 which can conflict with char $ac_func (); below.
15373 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015374 <limits.h> exists even on freestanding compilers. */
15375
15376#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015377# include <limits.h>
15378#else
15379# include <assert.h>
15380#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015381
15382#undef $ac_func
15383
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384/* Override any GCC internal prototype to avoid an error.
15385 Use char because int might match the return type of a GCC
15386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015387#ifdef __cplusplus
15388extern "C"
15389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015390char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015391/* The GNU C library defines this for functions which it implements
15392 to always fail with ENOSYS. Some functions are actually named
15393 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015395choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015396#endif
15397
Skip Montanaro6dead952003-09-25 14:50:04 +000015398int
15399main ()
15400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ;
15403 return 0;
15404}
15405_ACEOF
15406rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407if { (ac_try="$ac_link"
15408case "(($ac_try" in
15409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15410 *) ac_try_echo=$ac_try;;
15411esac
15412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15413 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015415 grep -v '^ *+' conftest.er1 >conftest.err
15416 rm -f conftest.er1
15417 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419 (exit $ac_status); } && {
15420 test -z "$ac_c_werror_flag" ||
15421 test ! -s conftest.err
15422 } && test -s conftest$ac_exeext &&
15423 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015424 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015425else
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015427sed 's/^/| /' conftest.$ac_ext >&5
15428
Martin v. Löwiseba40652007-08-30 20:10:57 +000015429 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015431
15432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015433 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015435ac_res=`eval echo '${'$as_ac_var'}'`
15436 { echo "$as_me:$LINENO: result: $ac_res" >&5
15437echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015438if test `eval echo '${'$as_ac_var'}'` = yes; then
15439 cat >>confdefs.h <<_ACEOF
15440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15441_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015442
Guido van Rossume97ee181999-12-20 21:27:22 +000015443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015444done
Guido van Rossume97ee181999-12-20 21:27:22 +000015445
Michael W. Hudson54241132001-12-07 15:38:26 +000015446
Guido van Rossume97ee181999-12-20 21:27:22 +000015447# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15448# loading of modules.
15449
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15451echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015452if test -z "$DYNLOADFILE"
15453then
15454 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015455 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15456 if test "$ac_cv_func_dlopen" = yes
15457 then DYNLOADFILE="dynload_shlib.o"
15458 else DYNLOADFILE="dynload_aix.o"
15459 fi
15460 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015461 BeOS*) DYNLOADFILE="dynload_beos.o";;
15462 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015463 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15464 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015465 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015466 *)
15467 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15468 # out any dynamic loading
15469 if test "$ac_cv_func_dlopen" = yes
15470 then DYNLOADFILE="dynload_shlib.o"
15471 else DYNLOADFILE="dynload_stub.o"
15472 fi
15473 ;;
15474 esac
15475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015476{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15477echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015478if test "$DYNLOADFILE" != "dynload_stub.o"
15479then
Martin v. Löwis11437992002-04-12 09:54:03 +000015480
15481cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015482#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015483_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015484
15485fi
15486
Neil Schemenauer4e425612001-06-19 15:44:15 +000015487# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15488
Michael W. Hudson54241132001-12-07 15:38:26 +000015489
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15491echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015492if test -z "$MACHDEP_OBJS"
15493then
Jack Jansene578a632001-08-15 01:27:14 +000015494 MACHDEP_OBJS=$extra_machdep_objs
15495else
15496 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015498{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15499echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015500
Guido van Rossum627b2d71993-12-24 10:39:16 +000015501# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
Martin v. Löwisd6320502004-08-12 13:45:08 +000015573
Martin v. Löwisc3001752005-01-23 09:27:24 +000015574
15575
Neal Norwitz05a45592006-03-20 06:30:08 +000015576
15577
Martin v. Löwis382abef2007-02-19 10:55:19 +000015578
15579
Christian Heimes36281872007-11-30 21:11:28 +000015580
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015581
15582
15583for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15584 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015585 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015586 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015587 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015588 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015589 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015590 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015591 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015592 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015593 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015594 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015595do
Martin v. Löwis11437992002-04-12 09:54:03 +000015596as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15598echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15599if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015601else
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015603/* confdefs.h. */
15604_ACEOF
15605cat confdefs.h >>conftest.$ac_ext
15606cat >>conftest.$ac_ext <<_ACEOF
15607/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015608/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15610#define $ac_func innocuous_$ac_func
15611
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015612/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015613 which can conflict with char $ac_func (); below.
15614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015615 <limits.h> exists even on freestanding compilers. */
15616
15617#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015618# include <limits.h>
15619#else
15620# include <assert.h>
15621#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015622
15623#undef $ac_func
15624
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625/* Override any GCC internal prototype to avoid an error.
15626 Use char because int might match the return type of a GCC
15627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015628#ifdef __cplusplus
15629extern "C"
15630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015631char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015632/* The GNU C library defines this for functions which it implements
15633 to always fail with ENOSYS. Some functions are actually named
15634 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015636choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015637#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015638
Skip Montanaro6dead952003-09-25 14:50:04 +000015639int
15640main ()
15641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015642return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 ;
15644 return 0;
15645}
15646_ACEOF
15647rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648if { (ac_try="$ac_link"
15649case "(($ac_try" in
15650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15651 *) ac_try_echo=$ac_try;;
15652esac
15653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15654 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015656 grep -v '^ *+' conftest.er1 >conftest.err
15657 rm -f conftest.er1
15658 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015660 (exit $ac_status); } && {
15661 test -z "$ac_c_werror_flag" ||
15662 test ! -s conftest.err
15663 } && test -s conftest$ac_exeext &&
15664 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015666else
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015668sed 's/^/| /' conftest.$ac_ext >&5
15669
Martin v. Löwiseba40652007-08-30 20:10:57 +000015670 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672
15673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015674 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015676ac_res=`eval echo '${'$as_ac_var'}'`
15677 { echo "$as_me:$LINENO: result: $ac_res" >&5
15678echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015679if test `eval echo '${'$as_ac_var'}'` = yes; then
15680 cat >>confdefs.h <<_ACEOF
15681#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15682_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015683
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015684fi
15685done
15686
Michael W. Hudson54241132001-12-07 15:38:26 +000015687
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015688# For some functions, having a definition is not sufficient, since
15689# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015690{ echo "$as_me:$LINENO: checking for chroot" >&5
15691echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015693/* confdefs.h. */
15694_ACEOF
15695cat confdefs.h >>conftest.$ac_ext
15696cat >>conftest.$ac_ext <<_ACEOF
15697/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015698#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015699int
15700main ()
15701{
15702void *x=chroot
15703 ;
15704 return 0;
15705}
15706_ACEOF
15707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708if { (ac_try="$ac_compile"
15709case "(($ac_try" in
15710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15711 *) ac_try_echo=$ac_try;;
15712esac
15713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015716 grep -v '^ *+' conftest.er1 >conftest.err
15717 rm -f conftest.er1
15718 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015720 (exit $ac_status); } && {
15721 test -z "$ac_c_werror_flag" ||
15722 test ! -s conftest.err
15723 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015724
15725cat >>confdefs.h <<\_ACEOF
15726#define HAVE_CHROOT 1
15727_ACEOF
15728
Martin v. Löwiseba40652007-08-30 20:10:57 +000015729 { echo "$as_me:$LINENO: result: yes" >&5
15730echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015731else
15732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015733sed 's/^/| /' conftest.$ac_ext >&5
15734
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 { echo "$as_me:$LINENO: result: no" >&5
15736echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015737
15738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739
15740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15741{ echo "$as_me:$LINENO: checking for link" >&5
15742echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015749#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015750int
15751main ()
15752{
15753void *x=link
15754 ;
15755 return 0;
15756}
15757_ACEOF
15758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759if { (ac_try="$ac_compile"
15760case "(($ac_try" in
15761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15762 *) ac_try_echo=$ac_try;;
15763esac
15764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015767 grep -v '^ *+' conftest.er1 >conftest.err
15768 rm -f conftest.er1
15769 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 (exit $ac_status); } && {
15772 test -z "$ac_c_werror_flag" ||
15773 test ! -s conftest.err
15774 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015775
15776cat >>confdefs.h <<\_ACEOF
15777#define HAVE_LINK 1
15778_ACEOF
15779
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780 { echo "$as_me:$LINENO: result: yes" >&5
15781echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015782else
15783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015784sed 's/^/| /' conftest.$ac_ext >&5
15785
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 { echo "$as_me:$LINENO: result: no" >&5
15787echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015788
15789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790
15791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15792{ echo "$as_me:$LINENO: checking for symlink" >&5
15793echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015795/* confdefs.h. */
15796_ACEOF
15797cat confdefs.h >>conftest.$ac_ext
15798cat >>conftest.$ac_ext <<_ACEOF
15799/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015800#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015801int
15802main ()
15803{
15804void *x=symlink
15805 ;
15806 return 0;
15807}
15808_ACEOF
15809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810if { (ac_try="$ac_compile"
15811case "(($ac_try" in
15812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15813 *) ac_try_echo=$ac_try;;
15814esac
15815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015818 grep -v '^ *+' conftest.er1 >conftest.err
15819 rm -f conftest.er1
15820 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822 (exit $ac_status); } && {
15823 test -z "$ac_c_werror_flag" ||
15824 test ! -s conftest.err
15825 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015826
15827cat >>confdefs.h <<\_ACEOF
15828#define HAVE_SYMLINK 1
15829_ACEOF
15830
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831 { echo "$as_me:$LINENO: result: yes" >&5
15832echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015833else
15834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015835sed 's/^/| /' conftest.$ac_ext >&5
15836
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837 { echo "$as_me:$LINENO: result: no" >&5
15838echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015839
15840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841
15842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15843{ echo "$as_me:$LINENO: checking for fchdir" >&5
15844echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015846/* confdefs.h. */
15847_ACEOF
15848cat confdefs.h >>conftest.$ac_ext
15849cat >>conftest.$ac_ext <<_ACEOF
15850/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015851#include <unistd.h>
15852int
15853main ()
15854{
15855void *x=fchdir
15856 ;
15857 return 0;
15858}
15859_ACEOF
15860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861if { (ac_try="$ac_compile"
15862case "(($ac_try" in
15863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15864 *) ac_try_echo=$ac_try;;
15865esac
15866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15867 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015869 grep -v '^ *+' conftest.er1 >conftest.err
15870 rm -f conftest.er1
15871 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015873 (exit $ac_status); } && {
15874 test -z "$ac_c_werror_flag" ||
15875 test ! -s conftest.err
15876 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015877
15878cat >>confdefs.h <<\_ACEOF
15879#define HAVE_FCHDIR 1
15880_ACEOF
15881
Martin v. Löwiseba40652007-08-30 20:10:57 +000015882 { echo "$as_me:$LINENO: result: yes" >&5
15883echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015884else
15885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015886sed 's/^/| /' conftest.$ac_ext >&5
15887
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888 { echo "$as_me:$LINENO: result: no" >&5
15889echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015890
15891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892
15893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15894{ echo "$as_me:$LINENO: checking for fsync" >&5
15895echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015897/* confdefs.h. */
15898_ACEOF
15899cat confdefs.h >>conftest.$ac_ext
15900cat >>conftest.$ac_ext <<_ACEOF
15901/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015902#include <unistd.h>
15903int
15904main ()
15905{
15906void *x=fsync
15907 ;
15908 return 0;
15909}
15910_ACEOF
15911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912if { (ac_try="$ac_compile"
15913case "(($ac_try" in
15914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15915 *) ac_try_echo=$ac_try;;
15916esac
15917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015920 grep -v '^ *+' conftest.er1 >conftest.err
15921 rm -f conftest.er1
15922 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015924 (exit $ac_status); } && {
15925 test -z "$ac_c_werror_flag" ||
15926 test ! -s conftest.err
15927 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015928
15929cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015930#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015931_ACEOF
15932
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933 { echo "$as_me:$LINENO: result: yes" >&5
15934echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015935else
15936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015937sed 's/^/| /' conftest.$ac_ext >&5
15938
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939 { echo "$as_me:$LINENO: result: no" >&5
15940echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015941
15942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943
15944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15945{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15946echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015953#include <unistd.h>
15954int
15955main ()
15956{
15957void *x=fdatasync
15958 ;
15959 return 0;
15960}
15961_ACEOF
15962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015963if { (ac_try="$ac_compile"
15964case "(($ac_try" in
15965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15966 *) ac_try_echo=$ac_try;;
15967esac
15968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971 grep -v '^ *+' conftest.er1 >conftest.err
15972 rm -f conftest.er1
15973 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975 (exit $ac_status); } && {
15976 test -z "$ac_c_werror_flag" ||
15977 test ! -s conftest.err
15978 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015979
15980cat >>confdefs.h <<\_ACEOF
15981#define HAVE_FDATASYNC 1
15982_ACEOF
15983
Martin v. Löwiseba40652007-08-30 20:10:57 +000015984 { echo "$as_me:$LINENO: result: yes" >&5
15985echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015986else
15987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015988sed 's/^/| /' conftest.$ac_ext >&5
15989
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990 { echo "$as_me:$LINENO: result: no" >&5
15991echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015992
15993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015994
15995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015996{ echo "$as_me:$LINENO: checking for epoll" >&5
15997echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15998cat >conftest.$ac_ext <<_ACEOF
15999/* confdefs.h. */
16000_ACEOF
16001cat confdefs.h >>conftest.$ac_ext
16002cat >>conftest.$ac_ext <<_ACEOF
16003/* end confdefs.h. */
16004#include <sys/epoll.h>
16005int
16006main ()
16007{
16008void *x=epoll_create
16009 ;
16010 return 0;
16011}
16012_ACEOF
16013rm -f conftest.$ac_objext
16014if { (ac_try="$ac_compile"
16015case "(($ac_try" in
16016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16017 *) ac_try_echo=$ac_try;;
16018esac
16019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16020 (eval "$ac_compile") 2>conftest.er1
16021 ac_status=$?
16022 grep -v '^ *+' conftest.er1 >conftest.err
16023 rm -f conftest.er1
16024 cat conftest.err >&5
16025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16026 (exit $ac_status); } && {
16027 test -z "$ac_c_werror_flag" ||
16028 test ! -s conftest.err
16029 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016030
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016031cat >>confdefs.h <<\_ACEOF
16032#define HAVE_EPOLL 1
16033_ACEOF
16034
16035 { echo "$as_me:$LINENO: result: yes" >&5
16036echo "${ECHO_T}yes" >&6; }
16037else
16038 echo "$as_me: failed program was:" >&5
16039sed 's/^/| /' conftest.$ac_ext >&5
16040
16041 { echo "$as_me:$LINENO: result: no" >&5
16042echo "${ECHO_T}no" >&6; }
16043
16044fi
16045
16046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16047{ echo "$as_me:$LINENO: checking for kqueue" >&5
16048echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16049cat >conftest.$ac_ext <<_ACEOF
16050/* confdefs.h. */
16051_ACEOF
16052cat confdefs.h >>conftest.$ac_ext
16053cat >>conftest.$ac_ext <<_ACEOF
16054/* end confdefs.h. */
16055
16056#include <sys/types.h>
16057#include <sys/event.h>
16058
16059int
16060main ()
16061{
16062int x=kqueue()
16063 ;
16064 return 0;
16065}
16066_ACEOF
16067rm -f conftest.$ac_objext
16068if { (ac_try="$ac_compile"
16069case "(($ac_try" in
16070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16071 *) ac_try_echo=$ac_try;;
16072esac
16073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16074 (eval "$ac_compile") 2>conftest.er1
16075 ac_status=$?
16076 grep -v '^ *+' conftest.er1 >conftest.err
16077 rm -f conftest.er1
16078 cat conftest.err >&5
16079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16080 (exit $ac_status); } && {
16081 test -z "$ac_c_werror_flag" ||
16082 test ! -s conftest.err
16083 } && test -s conftest.$ac_objext; then
16084
16085cat >>confdefs.h <<\_ACEOF
16086#define HAVE_KQUEUE 1
16087_ACEOF
16088
16089 { echo "$as_me:$LINENO: result: yes" >&5
16090echo "${ECHO_T}yes" >&6; }
16091else
16092 echo "$as_me: failed program was:" >&5
16093sed 's/^/| /' conftest.$ac_ext >&5
16094
16095 { echo "$as_me:$LINENO: result: no" >&5
16096echo "${ECHO_T}no" >&6; }
16097
16098fi
16099
16100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016101# On some systems (eg. FreeBSD 5), we would find a definition of the
16102# functions ctermid_r, setgroups in the library, but no prototype
16103# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16104# address to avoid compiler warnings and potential miscompilations
16105# because of the missing prototypes.
16106
Martin v. Löwiseba40652007-08-30 20:10:57 +000016107{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16108echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016110/* confdefs.h. */
16111_ACEOF
16112cat confdefs.h >>conftest.$ac_ext
16113cat >>conftest.$ac_ext <<_ACEOF
16114/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016115
16116#include "confdefs.h"
16117#include <stdio.h>
16118
Martin v. Löwisd5843682002-11-21 20:41:28 +000016119int
16120main ()
16121{
16122void* p = ctermid_r
16123 ;
16124 return 0;
16125}
16126_ACEOF
16127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016128if { (ac_try="$ac_compile"
16129case "(($ac_try" in
16130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16131 *) ac_try_echo=$ac_try;;
16132esac
16133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016136 grep -v '^ *+' conftest.er1 >conftest.err
16137 rm -f conftest.er1
16138 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016140 (exit $ac_status); } && {
16141 test -z "$ac_c_werror_flag" ||
16142 test ! -s conftest.err
16143 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016144
16145cat >>confdefs.h <<\_ACEOF
16146#define HAVE_CTERMID_R 1
16147_ACEOF
16148
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149 { echo "$as_me:$LINENO: result: yes" >&5
16150echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016151else
16152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016153sed 's/^/| /' conftest.$ac_ext >&5
16154
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155 { echo "$as_me:$LINENO: result: no" >&5
16156echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016157
16158fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016159
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16161
16162{ echo "$as_me:$LINENO: checking for flock" >&5
16163echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016164cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016165/* confdefs.h. */
16166_ACEOF
16167cat confdefs.h >>conftest.$ac_ext
16168cat >>conftest.$ac_ext <<_ACEOF
16169/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016170
16171#include "confdefs.h"
16172#include <sys/file.h>
16173
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016174int
16175main ()
16176{
16177void* p = flock
16178 ;
16179 return 0;
16180}
16181_ACEOF
16182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016183if { (ac_try="$ac_compile"
16184case "(($ac_try" in
16185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16186 *) ac_try_echo=$ac_try;;
16187esac
16188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016191 grep -v '^ *+' conftest.er1 >conftest.err
16192 rm -f conftest.er1
16193 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016195 (exit $ac_status); } && {
16196 test -z "$ac_c_werror_flag" ||
16197 test ! -s conftest.err
16198 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016199
16200cat >>confdefs.h <<\_ACEOF
16201#define HAVE_FLOCK 1
16202_ACEOF
16203
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204 { echo "$as_me:$LINENO: result: yes" >&5
16205echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016206else
16207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016208sed 's/^/| /' conftest.$ac_ext >&5
16209
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210 { echo "$as_me:$LINENO: result: no" >&5
16211echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016212
16213fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016214
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16216
16217{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16218echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016220/* confdefs.h. */
16221_ACEOF
16222cat confdefs.h >>conftest.$ac_ext
16223cat >>conftest.$ac_ext <<_ACEOF
16224/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016225
16226#include "confdefs.h"
16227#include <unistd.h>
16228
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016229int
16230main ()
16231{
16232void* p = getpagesize
16233 ;
16234 return 0;
16235}
16236_ACEOF
16237rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016238if { (ac_try="$ac_compile"
16239case "(($ac_try" in
16240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16241 *) ac_try_echo=$ac_try;;
16242esac
16243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016246 grep -v '^ *+' conftest.er1 >conftest.err
16247 rm -f conftest.er1
16248 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016250 (exit $ac_status); } && {
16251 test -z "$ac_c_werror_flag" ||
16252 test ! -s conftest.err
16253 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016254
16255cat >>confdefs.h <<\_ACEOF
16256#define HAVE_GETPAGESIZE 1
16257_ACEOF
16258
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259 { echo "$as_me:$LINENO: result: yes" >&5
16260echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016261else
16262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016263sed 's/^/| /' conftest.$ac_ext >&5
16264
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265 { echo "$as_me:$LINENO: result: no" >&5
16266echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016267
16268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269
16270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016271
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016272for ac_prog in true
16273do
16274 # Extract the first word of "$ac_prog", so it can be a program name with args.
16275set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16277echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016278if test "${ac_cv_prog_TRUE+set}" = set; then
16279 echo $ECHO_N "(cached) $ECHO_C" >&6
16280else
16281 if test -n "$TRUE"; then
16282 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16283else
16284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16285for as_dir in $PATH
16286do
16287 IFS=$as_save_IFS
16288 test -z "$as_dir" && as_dir=.
16289 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016290 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 +000016291 ac_cv_prog_TRUE="$ac_prog"
16292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16293 break 2
16294 fi
16295done
16296done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016297IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016298
16299fi
16300fi
16301TRUE=$ac_cv_prog_TRUE
16302if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303 { echo "$as_me:$LINENO: result: $TRUE" >&5
16304echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016305else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306 { echo "$as_me:$LINENO: result: no" >&5
16307echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016308fi
16309
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016311 test -n "$TRUE" && break
16312done
16313test -n "$TRUE" || TRUE="/bin/true"
16314
16315
Martin v. Löwiseba40652007-08-30 20:10:57 +000016316{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16317echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016318if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16319 echo $ECHO_N "(cached) $ECHO_C" >&6
16320else
16321 ac_check_lib_save_LIBS=$LIBS
16322LIBS="-lc $LIBS"
16323cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016324/* confdefs.h. */
16325_ACEOF
16326cat confdefs.h >>conftest.$ac_ext
16327cat >>conftest.$ac_ext <<_ACEOF
16328/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016329
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330/* Override any GCC internal prototype to avoid an error.
16331 Use char because int might match the return type of a GCC
16332 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016333#ifdef __cplusplus
16334extern "C"
16335#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016336char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016337int
16338main ()
16339{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016340return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016341 ;
16342 return 0;
16343}
16344_ACEOF
16345rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016346if { (ac_try="$ac_link"
16347case "(($ac_try" in
16348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16349 *) ac_try_echo=$ac_try;;
16350esac
16351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16352 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016354 grep -v '^ *+' conftest.er1 >conftest.err
16355 rm -f conftest.er1
16356 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016358 (exit $ac_status); } && {
16359 test -z "$ac_c_werror_flag" ||
16360 test ! -s conftest.err
16361 } && test -s conftest$ac_exeext &&
16362 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016363 ac_cv_lib_c_inet_aton=yes
16364else
16365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016366sed 's/^/| /' conftest.$ac_ext >&5
16367
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370
16371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016373LIBS=$ac_check_lib_save_LIBS
16374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016375{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16376echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016377if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016378 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016379else
16380
Martin v. Löwiseba40652007-08-30 20:10:57 +000016381{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16382echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016383if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16384 echo $ECHO_N "(cached) $ECHO_C" >&6
16385else
16386 ac_check_lib_save_LIBS=$LIBS
16387LIBS="-lresolv $LIBS"
16388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016389/* confdefs.h. */
16390_ACEOF
16391cat confdefs.h >>conftest.$ac_ext
16392cat >>conftest.$ac_ext <<_ACEOF
16393/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016394
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395/* Override any GCC internal prototype to avoid an error.
16396 Use char because int might match the return type of a GCC
16397 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016398#ifdef __cplusplus
16399extern "C"
16400#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016401char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016402int
16403main ()
16404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016405return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016406 ;
16407 return 0;
16408}
16409_ACEOF
16410rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016411if { (ac_try="$ac_link"
16412case "(($ac_try" in
16413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16414 *) ac_try_echo=$ac_try;;
16415esac
16416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16417 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016419 grep -v '^ *+' conftest.er1 >conftest.err
16420 rm -f conftest.er1
16421 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016423 (exit $ac_status); } && {
16424 test -z "$ac_c_werror_flag" ||
16425 test ! -s conftest.err
16426 } && test -s conftest$ac_exeext &&
16427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016428 ac_cv_lib_resolv_inet_aton=yes
16429else
16430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431sed 's/^/| /' conftest.$ac_ext >&5
16432
Martin v. Löwiseba40652007-08-30 20:10:57 +000016433 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435
16436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016438LIBS=$ac_check_lib_save_LIBS
16439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16441echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016442if test $ac_cv_lib_resolv_inet_aton = yes; then
16443 cat >>confdefs.h <<_ACEOF
16444#define HAVE_LIBRESOLV 1
16445_ACEOF
16446
16447 LIBS="-lresolv $LIBS"
16448
16449fi
16450
16451
16452fi
16453
16454
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016455# On Tru64, chflags seems to be present, but calling it will
16456# exit Python
16457{ echo "$as_me:$LINENO: checking for chflags" >&5
16458echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16459if test "$cross_compiling" = yes; then
16460 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16461See \`config.log' for more details." >&5
16462echo "$as_me: error: cannot run test program while cross compiling
16463See \`config.log' for more details." >&2;}
16464 { (exit 1); exit 1; }; }
16465else
16466 cat >conftest.$ac_ext <<_ACEOF
16467/* confdefs.h. */
16468_ACEOF
16469cat confdefs.h >>conftest.$ac_ext
16470cat >>conftest.$ac_ext <<_ACEOF
16471/* end confdefs.h. */
16472
16473#include <sys/stat.h>
16474#include <unistd.h>
16475int main(int argc, char*argv[])
16476{
16477 if(chflags(argv[0], 0) != 0)
16478 return 1;
16479 return 0;
16480}
16481
16482_ACEOF
16483rm -f conftest$ac_exeext
16484if { (ac_try="$ac_link"
16485case "(($ac_try" in
16486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16487 *) ac_try_echo=$ac_try;;
16488esac
16489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16490 (eval "$ac_link") 2>&5
16491 ac_status=$?
16492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16494 { (case "(($ac_try" in
16495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16496 *) ac_try_echo=$ac_try;;
16497esac
16498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16499 (eval "$ac_try") 2>&5
16500 ac_status=$?
16501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16502 (exit $ac_status); }; }; then
16503
16504cat >>confdefs.h <<\_ACEOF
16505#define HAVE_CHFLAGS 1
16506_ACEOF
16507
16508 { echo "$as_me:$LINENO: result: yes" >&5
16509echo "${ECHO_T}yes" >&6; }
16510else
16511 echo "$as_me: program exited with status $ac_status" >&5
16512echo "$as_me: failed program was:" >&5
16513sed 's/^/| /' conftest.$ac_ext >&5
16514
16515( exit $ac_status )
16516{ echo "$as_me:$LINENO: result: no" >&5
16517echo "${ECHO_T}no" >&6; }
16518
16519fi
16520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16521fi
16522
16523
16524
16525{ echo "$as_me:$LINENO: checking for lchflags" >&5
16526echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16527if test "$cross_compiling" = yes; then
16528 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16529See \`config.log' for more details." >&5
16530echo "$as_me: error: cannot run test program while cross compiling
16531See \`config.log' for more details." >&2;}
16532 { (exit 1); exit 1; }; }
16533else
16534 cat >conftest.$ac_ext <<_ACEOF
16535/* confdefs.h. */
16536_ACEOF
16537cat confdefs.h >>conftest.$ac_ext
16538cat >>conftest.$ac_ext <<_ACEOF
16539/* end confdefs.h. */
16540
16541#include <sys/stat.h>
16542#include <unistd.h>
16543int main(int argc, char*argv[])
16544{
16545 if(lchflags(argv[0], 0) != 0)
16546 return 1;
16547 return 0;
16548}
16549
16550_ACEOF
16551rm -f conftest$ac_exeext
16552if { (ac_try="$ac_link"
16553case "(($ac_try" in
16554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16555 *) ac_try_echo=$ac_try;;
16556esac
16557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16558 (eval "$ac_link") 2>&5
16559 ac_status=$?
16560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16562 { (case "(($ac_try" in
16563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16564 *) ac_try_echo=$ac_try;;
16565esac
16566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16567 (eval "$ac_try") 2>&5
16568 ac_status=$?
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
16571
16572cat >>confdefs.h <<\_ACEOF
16573#define HAVE_LCHFLAGS 1
16574_ACEOF
16575
16576 { echo "$as_me:$LINENO: result: yes" >&5
16577echo "${ECHO_T}yes" >&6; }
16578else
16579 echo "$as_me: program exited with status $ac_status" >&5
16580echo "$as_me: failed program was:" >&5
16581sed 's/^/| /' conftest.$ac_ext >&5
16582
16583( exit $ac_status )
16584{ echo "$as_me:$LINENO: result: no" >&5
16585echo "${ECHO_T}no" >&6; }
16586
16587fi
16588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16589fi
16590
16591
16592
Ronald Oussorenf8752642006-07-06 10:13:35 +000016593case $ac_sys_system/$ac_sys_release in
16594Darwin/*)
16595 _CUR_CFLAGS="${CFLAGS}"
16596 _CUR_LDFLAGS="${LDFLAGS}"
16597 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16598 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16599 ;;
16600esac
16601
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16603echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016604if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16605 echo $ECHO_N "(cached) $ECHO_C" >&6
16606else
16607 ac_check_lib_save_LIBS=$LIBS
16608LIBS="-lz $LIBS"
16609cat >conftest.$ac_ext <<_ACEOF
16610/* confdefs.h. */
16611_ACEOF
16612cat confdefs.h >>conftest.$ac_ext
16613cat >>conftest.$ac_ext <<_ACEOF
16614/* end confdefs.h. */
16615
Martin v. Löwiseba40652007-08-30 20:10:57 +000016616/* Override any GCC internal prototype to avoid an error.
16617 Use char because int might match the return type of a GCC
16618 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016619#ifdef __cplusplus
16620extern "C"
16621#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016622char inflateCopy ();
16623int
16624main ()
16625{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016627 ;
16628 return 0;
16629}
16630_ACEOF
16631rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632if { (ac_try="$ac_link"
16633case "(($ac_try" in
16634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16635 *) ac_try_echo=$ac_try;;
16636esac
16637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16638 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016639 ac_status=$?
16640 grep -v '^ *+' conftest.er1 >conftest.err
16641 rm -f conftest.er1
16642 cat conftest.err >&5
16643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016644 (exit $ac_status); } && {
16645 test -z "$ac_c_werror_flag" ||
16646 test ! -s conftest.err
16647 } && test -s conftest$ac_exeext &&
16648 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016649 ac_cv_lib_z_inflateCopy=yes
16650else
16651 echo "$as_me: failed program was:" >&5
16652sed 's/^/| /' conftest.$ac_ext >&5
16653
Martin v. Löwiseba40652007-08-30 20:10:57 +000016654 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016656
16657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016658 conftest$ac_exeext conftest.$ac_ext
16659LIBS=$ac_check_lib_save_LIBS
16660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16662echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016663if test $ac_cv_lib_z_inflateCopy = yes; then
16664
16665cat >>confdefs.h <<\_ACEOF
16666#define HAVE_ZLIB_COPY 1
16667_ACEOF
16668
16669fi
16670
16671
Ronald Oussorenf8752642006-07-06 10:13:35 +000016672case $ac_sys_system/$ac_sys_release in
16673Darwin/*)
16674 CFLAGS="${_CUR_CFLAGS}"
16675 LDFLAGS="${_CUR_LDFLAGS}"
16676 ;;
16677esac
16678
Martin v. Löwiseba40652007-08-30 20:10:57 +000016679{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16680echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016682/* confdefs.h. */
16683_ACEOF
16684cat confdefs.h >>conftest.$ac_ext
16685cat >>conftest.$ac_ext <<_ACEOF
16686/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016687
16688#include "confdefs.h"
16689#include <netdb.h>
16690
Martin v. Löwise9416172003-05-03 10:12:45 +000016691int
16692main ()
16693{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016694void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016695 ;
16696 return 0;
16697}
16698_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016699rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016700if { (ac_try="$ac_link"
16701case "(($ac_try" in
16702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16703 *) ac_try_echo=$ac_try;;
16704esac
16705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16706 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016708 grep -v '^ *+' conftest.er1 >conftest.err
16709 rm -f conftest.er1
16710 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016712 (exit $ac_status); } && {
16713 test -z "$ac_c_werror_flag" ||
16714 test ! -s conftest.err
16715 } && test -s conftest$ac_exeext &&
16716 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016717
16718cat >>confdefs.h <<\_ACEOF
16719#define HAVE_HSTRERROR 1
16720_ACEOF
16721
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722 { echo "$as_me:$LINENO: result: yes" >&5
16723echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016724else
16725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016726sed 's/^/| /' conftest.$ac_ext >&5
16727
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728 { echo "$as_me:$LINENO: result: no" >&5
16729echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016730
16731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016732
16733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016735
Martin v. Löwiseba40652007-08-30 20:10:57 +000016736{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16737echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016739/* confdefs.h. */
16740_ACEOF
16741cat confdefs.h >>conftest.$ac_ext
16742cat >>conftest.$ac_ext <<_ACEOF
16743/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016744
16745#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016746#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016747#include <sys/socket.h>
16748#include <netinet/in.h>
16749#include <arpa/inet.h>
16750
Martin v. Löwise9416172003-05-03 10:12:45 +000016751int
16752main ()
16753{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016754void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016755 ;
16756 return 0;
16757}
16758_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016759rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016760if { (ac_try="$ac_link"
16761case "(($ac_try" in
16762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16763 *) ac_try_echo=$ac_try;;
16764esac
16765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16766 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016768 grep -v '^ *+' conftest.er1 >conftest.err
16769 rm -f conftest.er1
16770 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016772 (exit $ac_status); } && {
16773 test -z "$ac_c_werror_flag" ||
16774 test ! -s conftest.err
16775 } && test -s conftest$ac_exeext &&
16776 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016777
16778cat >>confdefs.h <<\_ACEOF
16779#define HAVE_INET_ATON 1
16780_ACEOF
16781
Martin v. Löwiseba40652007-08-30 20:10:57 +000016782 { echo "$as_me:$LINENO: result: yes" >&5
16783echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016784else
16785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016786sed 's/^/| /' conftest.$ac_ext >&5
16787
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788 { echo "$as_me:$LINENO: result: no" >&5
16789echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016790
16791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792
16793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016795
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16797echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016799/* confdefs.h. */
16800_ACEOF
16801cat confdefs.h >>conftest.$ac_ext
16802cat >>conftest.$ac_ext <<_ACEOF
16803/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016804
16805#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016806#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016807#include <sys/socket.h>
16808#include <netinet/in.h>
16809#include <arpa/inet.h>
16810
Martin v. Löwise9416172003-05-03 10:12:45 +000016811int
16812main ()
16813{
16814void* p = inet_pton
16815 ;
16816 return 0;
16817}
16818_ACEOF
16819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820if { (ac_try="$ac_compile"
16821case "(($ac_try" in
16822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16823 *) ac_try_echo=$ac_try;;
16824esac
16825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 grep -v '^ *+' conftest.er1 >conftest.err
16829 rm -f conftest.er1
16830 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832 (exit $ac_status); } && {
16833 test -z "$ac_c_werror_flag" ||
16834 test ! -s conftest.err
16835 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016836
16837cat >>confdefs.h <<\_ACEOF
16838#define HAVE_INET_PTON 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.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016853
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016854# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855{ echo "$as_me:$LINENO: checking for setgroups" >&5
16856echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +000016863
16864#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016865#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016866#ifdef HAVE_GRP_H
16867#include <grp.h>
16868#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016869
Martin v. Löwisd5843682002-11-21 20:41:28 +000016870int
16871main ()
16872{
16873void* p = setgroups
16874 ;
16875 return 0;
16876}
16877_ACEOF
16878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +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_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016895
16896cat >>confdefs.h <<\_ACEOF
16897#define HAVE_SETGROUPS 1
16898_ACEOF
16899
Martin v. Löwiseba40652007-08-30 20:10:57 +000016900 { echo "$as_me:$LINENO: result: yes" >&5
16901echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016902else
16903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016904sed 's/^/| /' conftest.$ac_ext >&5
16905
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906 { echo "$as_me:$LINENO: result: no" >&5
16907echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016908
16909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910
16911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016912
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016913# check for openpty and forkpty
16914
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016916for ac_func in openpty
16917do
Martin v. Löwis11437992002-04-12 09:54:03 +000016918as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16920echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16921if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016923else
Martin v. Löwis11437992002-04-12 09:54:03 +000016924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016925/* confdefs.h. */
16926_ACEOF
16927cat confdefs.h >>conftest.$ac_ext
16928cat >>conftest.$ac_ext <<_ACEOF
16929/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016930/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16931 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16932#define $ac_func innocuous_$ac_func
16933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016934/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016935 which can conflict with char $ac_func (); below.
16936 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016937 <limits.h> exists even on freestanding compilers. */
16938
16939#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016940# include <limits.h>
16941#else
16942# include <assert.h>
16943#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016944
16945#undef $ac_func
16946
Martin v. Löwiseba40652007-08-30 20:10:57 +000016947/* Override any GCC internal prototype to avoid an error.
16948 Use char because int might match the return type of a GCC
16949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016950#ifdef __cplusplus
16951extern "C"
16952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016953char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016954/* The GNU C library defines this for functions which it implements
16955 to always fail with ENOSYS. Some functions are actually named
16956 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016957#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016958choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016959#endif
16960
Skip Montanaro6dead952003-09-25 14:50:04 +000016961int
16962main ()
16963{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016965 ;
16966 return 0;
16967}
16968_ACEOF
16969rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970if { (ac_try="$ac_link"
16971case "(($ac_try" in
16972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16973 *) ac_try_echo=$ac_try;;
16974esac
16975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16976 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016978 grep -v '^ *+' conftest.er1 >conftest.err
16979 rm -f conftest.er1
16980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016982 (exit $ac_status); } && {
16983 test -z "$ac_c_werror_flag" ||
16984 test ! -s conftest.err
16985 } && test -s conftest$ac_exeext &&
16986 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016988else
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016990sed 's/^/| /' conftest.$ac_ext >&5
16991
Martin v. Löwiseba40652007-08-30 20:10:57 +000016992 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994
16995rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016996 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016998ac_res=`eval echo '${'$as_ac_var'}'`
16999 { echo "$as_me:$LINENO: result: $ac_res" >&5
17000echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017001if test `eval echo '${'$as_ac_var'}'` = yes; then
17002 cat >>confdefs.h <<_ACEOF
17003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17004_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017005
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017006else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17008echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017009if test "${ac_cv_lib_util_openpty+set}" = set; then
17010 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017011else
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017013LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017014cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017015/* confdefs.h. */
17016_ACEOF
17017cat confdefs.h >>conftest.$ac_ext
17018cat >>conftest.$ac_ext <<_ACEOF
17019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017020
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021/* Override any GCC internal prototype to avoid an error.
17022 Use char because int might match the return type of a GCC
17023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017024#ifdef __cplusplus
17025extern "C"
17026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017027char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017028int
17029main ()
17030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 ;
17033 return 0;
17034}
17035_ACEOF
17036rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037if { (ac_try="$ac_link"
17038case "(($ac_try" in
17039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17040 *) ac_try_echo=$ac_try;;
17041esac
17042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017045 grep -v '^ *+' conftest.er1 >conftest.err
17046 rm -f conftest.er1
17047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017049 (exit $ac_status); } && {
17050 test -z "$ac_c_werror_flag" ||
17051 test ! -s conftest.err
17052 } && test -s conftest$ac_exeext &&
17053 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017055else
Martin v. Löwis11437992002-04-12 09:54:03 +000017056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017057sed 's/^/| /' conftest.$ac_ext >&5
17058
Martin v. Löwiseba40652007-08-30 20:10:57 +000017059 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017061
17062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017064LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017066{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17067echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017068if test $ac_cv_lib_util_openpty = yes; then
17069 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017070#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017071_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017072 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017073else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017074 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17075echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017076if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17077 echo $ECHO_N "(cached) $ECHO_C" >&6
17078else
17079 ac_check_lib_save_LIBS=$LIBS
17080LIBS="-lbsd $LIBS"
17081cat >conftest.$ac_ext <<_ACEOF
17082/* confdefs.h. */
17083_ACEOF
17084cat confdefs.h >>conftest.$ac_ext
17085cat >>conftest.$ac_ext <<_ACEOF
17086/* end confdefs.h. */
17087
Martin v. Löwiseba40652007-08-30 20:10:57 +000017088/* Override any GCC internal prototype to avoid an error.
17089 Use char because int might match the return type of a GCC
17090 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017091#ifdef __cplusplus
17092extern "C"
17093#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017094char openpty ();
17095int
17096main ()
17097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017098return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017099 ;
17100 return 0;
17101}
17102_ACEOF
17103rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017104if { (ac_try="$ac_link"
17105case "(($ac_try" in
17106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17107 *) ac_try_echo=$ac_try;;
17108esac
17109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017111 ac_status=$?
17112 grep -v '^ *+' conftest.er1 >conftest.err
17113 rm -f conftest.er1
17114 cat conftest.err >&5
17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017116 (exit $ac_status); } && {
17117 test -z "$ac_c_werror_flag" ||
17118 test ! -s conftest.err
17119 } && test -s conftest$ac_exeext &&
17120 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017121 ac_cv_lib_bsd_openpty=yes
17122else
17123 echo "$as_me: failed program was:" >&5
17124sed 's/^/| /' conftest.$ac_ext >&5
17125
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017128
17129rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017130 conftest$ac_exeext conftest.$ac_ext
17131LIBS=$ac_check_lib_save_LIBS
17132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17134echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017135if test $ac_cv_lib_bsd_openpty = yes; then
17136 cat >>confdefs.h <<\_ACEOF
17137#define HAVE_OPENPTY 1
17138_ACEOF
17139 LIBS="$LIBS -lbsd"
17140fi
17141
17142
17143fi
17144
Fred Drake8cef4cf2000-06-28 16:40:38 +000017145
17146fi
17147done
17148
Martin v. Löwis11437992002-04-12 09:54:03 +000017149
Fred Drake8cef4cf2000-06-28 16:40:38 +000017150for ac_func in forkpty
17151do
Martin v. Löwis11437992002-04-12 09:54:03 +000017152as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017153{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17154echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17155if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017156 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017157else
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017159/* confdefs.h. */
17160_ACEOF
17161cat confdefs.h >>conftest.$ac_ext
17162cat >>conftest.$ac_ext <<_ACEOF
17163/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017164/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17165 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17166#define $ac_func innocuous_$ac_func
17167
Fred Drake8cef4cf2000-06-28 16:40:38 +000017168/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017169 which can conflict with char $ac_func (); below.
17170 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017171 <limits.h> exists even on freestanding compilers. */
17172
17173#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017174# include <limits.h>
17175#else
17176# include <assert.h>
17177#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017178
17179#undef $ac_func
17180
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181/* Override any GCC internal prototype to avoid an error.
17182 Use char because int might match the return type of a GCC
17183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017184#ifdef __cplusplus
17185extern "C"
17186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017187char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017188/* The GNU C library defines this for functions which it implements
17189 to always fail with ENOSYS. Some functions are actually named
17190 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017191#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017192choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017193#endif
17194
Skip Montanaro6dead952003-09-25 14:50:04 +000017195int
17196main ()
17197{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017198return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 ;
17200 return 0;
17201}
17202_ACEOF
17203rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017204if { (ac_try="$ac_link"
17205case "(($ac_try" in
17206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17207 *) ac_try_echo=$ac_try;;
17208esac
17209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017212 grep -v '^ *+' conftest.er1 >conftest.err
17213 rm -f conftest.er1
17214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017216 (exit $ac_status); } && {
17217 test -z "$ac_c_werror_flag" ||
17218 test ! -s conftest.err
17219 } && test -s conftest$ac_exeext &&
17220 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017222else
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017224sed 's/^/| /' conftest.$ac_ext >&5
17225
Martin v. Löwiseba40652007-08-30 20:10:57 +000017226 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228
17229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017230 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017232ac_res=`eval echo '${'$as_ac_var'}'`
17233 { echo "$as_me:$LINENO: result: $ac_res" >&5
17234echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017235if test `eval echo '${'$as_ac_var'}'` = yes; then
17236 cat >>confdefs.h <<_ACEOF
17237#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17238_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017239
Fred Drake8cef4cf2000-06-28 16:40:38 +000017240else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17242echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017243if test "${ac_cv_lib_util_forkpty+set}" = set; then
17244 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017245else
Martin v. Löwis11437992002-04-12 09:54:03 +000017246 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017247LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017249/* confdefs.h. */
17250_ACEOF
17251cat confdefs.h >>conftest.$ac_ext
17252cat >>conftest.$ac_ext <<_ACEOF
17253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017254
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255/* Override any GCC internal prototype to avoid an error.
17256 Use char because int might match the return type of a GCC
17257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017258#ifdef __cplusplus
17259extern "C"
17260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017261char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017262int
17263main ()
17264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 ;
17267 return 0;
17268}
17269_ACEOF
17270rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271if { (ac_try="$ac_link"
17272case "(($ac_try" in
17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274 *) ac_try_echo=$ac_try;;
17275esac
17276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283 (exit $ac_status); } && {
17284 test -z "$ac_c_werror_flag" ||
17285 test ! -s conftest.err
17286 } && test -s conftest$ac_exeext &&
17287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017288 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017289else
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017291sed 's/^/| /' conftest.$ac_ext >&5
17292
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295
17296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017298LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017300{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17301echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017302if test $ac_cv_lib_util_forkpty = yes; then
17303 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017304#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017305_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017306 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017307else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017308 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17309echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017310if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17311 echo $ECHO_N "(cached) $ECHO_C" >&6
17312else
17313 ac_check_lib_save_LIBS=$LIBS
17314LIBS="-lbsd $LIBS"
17315cat >conftest.$ac_ext <<_ACEOF
17316/* confdefs.h. */
17317_ACEOF
17318cat confdefs.h >>conftest.$ac_ext
17319cat >>conftest.$ac_ext <<_ACEOF
17320/* end confdefs.h. */
17321
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322/* Override any GCC internal prototype to avoid an error.
17323 Use char because int might match the return type of a GCC
17324 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017325#ifdef __cplusplus
17326extern "C"
17327#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017328char forkpty ();
17329int
17330main ()
17331{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017332return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017333 ;
17334 return 0;
17335}
17336_ACEOF
17337rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017338if { (ac_try="$ac_link"
17339case "(($ac_try" in
17340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17341 *) ac_try_echo=$ac_try;;
17342esac
17343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17344 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017345 ac_status=$?
17346 grep -v '^ *+' conftest.er1 >conftest.err
17347 rm -f conftest.er1
17348 cat conftest.err >&5
17349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017350 (exit $ac_status); } && {
17351 test -z "$ac_c_werror_flag" ||
17352 test ! -s conftest.err
17353 } && test -s conftest$ac_exeext &&
17354 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017355 ac_cv_lib_bsd_forkpty=yes
17356else
17357 echo "$as_me: failed program was:" >&5
17358sed 's/^/| /' conftest.$ac_ext >&5
17359
Martin v. Löwiseba40652007-08-30 20:10:57 +000017360 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017362
17363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017364 conftest$ac_exeext conftest.$ac_ext
17365LIBS=$ac_check_lib_save_LIBS
17366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017367{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17368echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017369if test $ac_cv_lib_bsd_forkpty = yes; then
17370 cat >>confdefs.h <<\_ACEOF
17371#define HAVE_FORKPTY 1
17372_ACEOF
17373 LIBS="$LIBS -lbsd"
17374fi
17375
17376
17377fi
17378
Fred Drake8cef4cf2000-06-28 16:40:38 +000017379
17380fi
17381done
17382
Jack Jansendd19cf82001-12-06 22:36:17 +000017383
Brett Cannonaa5778d2008-03-18 04:09:00 +000017384# Stuff for expat.
17385
17386for ac_func in memmove
17387do
17388as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17389{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17390echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17391if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17392 echo $ECHO_N "(cached) $ECHO_C" >&6
17393else
17394 cat >conftest.$ac_ext <<_ACEOF
17395/* confdefs.h. */
17396_ACEOF
17397cat confdefs.h >>conftest.$ac_ext
17398cat >>conftest.$ac_ext <<_ACEOF
17399/* end confdefs.h. */
17400/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17401 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17402#define $ac_func innocuous_$ac_func
17403
17404/* System header to define __stub macros and hopefully few prototypes,
17405 which can conflict with char $ac_func (); below.
17406 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17407 <limits.h> exists even on freestanding compilers. */
17408
17409#ifdef __STDC__
17410# include <limits.h>
17411#else
17412# include <assert.h>
17413#endif
17414
17415#undef $ac_func
17416
17417/* Override any GCC internal prototype to avoid an error.
17418 Use char because int might match the return type of a GCC
17419 builtin and then its argument prototype would still apply. */
17420#ifdef __cplusplus
17421extern "C"
17422#endif
17423char $ac_func ();
17424/* The GNU C library defines this for functions which it implements
17425 to always fail with ENOSYS. Some functions are actually named
17426 something starting with __ and the normal name is an alias. */
17427#if defined __stub_$ac_func || defined __stub___$ac_func
17428choke me
17429#endif
17430
17431int
17432main ()
17433{
17434return $ac_func ();
17435 ;
17436 return 0;
17437}
17438_ACEOF
17439rm -f conftest.$ac_objext conftest$ac_exeext
17440if { (ac_try="$ac_link"
17441case "(($ac_try" in
17442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17443 *) ac_try_echo=$ac_try;;
17444esac
17445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17446 (eval "$ac_link") 2>conftest.er1
17447 ac_status=$?
17448 grep -v '^ *+' conftest.er1 >conftest.err
17449 rm -f conftest.er1
17450 cat conftest.err >&5
17451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17452 (exit $ac_status); } && {
17453 test -z "$ac_c_werror_flag" ||
17454 test ! -s conftest.err
17455 } && test -s conftest$ac_exeext &&
17456 $as_test_x conftest$ac_exeext; then
17457 eval "$as_ac_var=yes"
17458else
17459 echo "$as_me: failed program was:" >&5
17460sed 's/^/| /' conftest.$ac_ext >&5
17461
17462 eval "$as_ac_var=no"
17463fi
17464
17465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17466 conftest$ac_exeext conftest.$ac_ext
17467fi
17468ac_res=`eval echo '${'$as_ac_var'}'`
17469 { echo "$as_me:$LINENO: result: $ac_res" >&5
17470echo "${ECHO_T}$ac_res" >&6; }
17471if test `eval echo '${'$as_ac_var'}'` = yes; then
17472 cat >>confdefs.h <<_ACEOF
17473#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17474_ACEOF
17475
17476fi
17477done
17478
17479
Michael W. Hudson54241132001-12-07 15:38:26 +000017480# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017481
17482
17483
17484
17485
17486
Fred Drake8cef4cf2000-06-28 16:40:38 +000017487for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17488do
Martin v. Löwis11437992002-04-12 09:54:03 +000017489as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017490{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17491echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17492if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017494else
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017496/* confdefs.h. */
17497_ACEOF
17498cat confdefs.h >>conftest.$ac_ext
17499cat >>conftest.$ac_ext <<_ACEOF
17500/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017501/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17503#define $ac_func innocuous_$ac_func
17504
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017505/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017506 which can conflict with char $ac_func (); below.
17507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017508 <limits.h> exists even on freestanding compilers. */
17509
17510#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017511# include <limits.h>
17512#else
17513# include <assert.h>
17514#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017515
17516#undef $ac_func
17517
Martin v. Löwiseba40652007-08-30 20:10:57 +000017518/* Override any GCC internal prototype to avoid an error.
17519 Use char because int might match the return type of a GCC
17520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017521#ifdef __cplusplus
17522extern "C"
17523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017524char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017525/* The GNU C library defines this for functions which it implements
17526 to always fail with ENOSYS. Some functions are actually named
17527 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017528#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017529choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017530#endif
17531
Skip Montanaro6dead952003-09-25 14:50:04 +000017532int
17533main ()
17534{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017535return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 ;
17537 return 0;
17538}
17539_ACEOF
17540rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017541if { (ac_try="$ac_link"
17542case "(($ac_try" in
17543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17544 *) ac_try_echo=$ac_try;;
17545esac
17546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17547 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017549 grep -v '^ *+' conftest.er1 >conftest.err
17550 rm -f conftest.er1
17551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017553 (exit $ac_status); } && {
17554 test -z "$ac_c_werror_flag" ||
17555 test ! -s conftest.err
17556 } && test -s conftest$ac_exeext &&
17557 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017558 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017559else
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017561sed 's/^/| /' conftest.$ac_ext >&5
17562
Martin v. Löwiseba40652007-08-30 20:10:57 +000017563 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017565
17566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017567 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017569ac_res=`eval echo '${'$as_ac_var'}'`
17570 { echo "$as_me:$LINENO: result: $ac_res" >&5
17571echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017572if test `eval echo '${'$as_ac_var'}'` = yes; then
17573 cat >>confdefs.h <<_ACEOF
17574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17575_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017576
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017577fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017578done
17579
Michael W. Hudson54241132001-12-07 15:38:26 +000017580
Martin v. Löwis11437992002-04-12 09:54:03 +000017581
17582
17583
Brett Cannonaa5778d2008-03-18 04:09:00 +000017584for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017585do
Martin v. Löwis11437992002-04-12 09:54:03 +000017586as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017587{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17588echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17589if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017591else
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017593/* confdefs.h. */
17594_ACEOF
17595cat confdefs.h >>conftest.$ac_ext
17596cat >>conftest.$ac_ext <<_ACEOF
17597/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017598/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17599 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17600#define $ac_func innocuous_$ac_func
17601
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017602/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017603 which can conflict with char $ac_func (); below.
17604 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017605 <limits.h> exists even on freestanding compilers. */
17606
17607#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017608# include <limits.h>
17609#else
17610# include <assert.h>
17611#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017612
17613#undef $ac_func
17614
Martin v. Löwiseba40652007-08-30 20:10:57 +000017615/* Override any GCC internal prototype to avoid an error.
17616 Use char because int might match the return type of a GCC
17617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017618#ifdef __cplusplus
17619extern "C"
17620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017621char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017622/* The GNU C library defines this for functions which it implements
17623 to always fail with ENOSYS. Some functions are actually named
17624 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017625#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017626choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017627#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017628
Skip Montanaro6dead952003-09-25 14:50:04 +000017629int
17630main ()
17631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017632return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 ;
17634 return 0;
17635}
17636_ACEOF
17637rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017638if { (ac_try="$ac_link"
17639case "(($ac_try" in
17640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17641 *) ac_try_echo=$ac_try;;
17642esac
17643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17644 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017646 grep -v '^ *+' conftest.er1 >conftest.err
17647 rm -f conftest.er1
17648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017650 (exit $ac_status); } && {
17651 test -z "$ac_c_werror_flag" ||
17652 test ! -s conftest.err
17653 } && test -s conftest$ac_exeext &&
17654 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017656else
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017658sed 's/^/| /' conftest.$ac_ext >&5
17659
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017662
17663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017664 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666ac_res=`eval echo '${'$as_ac_var'}'`
17667 { echo "$as_me:$LINENO: result: $ac_res" >&5
17668echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017669if test `eval echo '${'$as_ac_var'}'` = yes; then
17670 cat >>confdefs.h <<_ACEOF
17671#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17672_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017673
Martin v. Löwis1142de32002-03-29 16:28:31 +000017674else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017675 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017676 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017677 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17678 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017679esac
17680
Martin v. Löwis1142de32002-03-29 16:28:31 +000017681fi
17682done
17683
17684
Martin v. Löwis11437992002-04-12 09:54:03 +000017685
Martin v. Löwis1142de32002-03-29 16:28:31 +000017686for ac_func in getpgrp
17687do
Martin v. Löwis11437992002-04-12 09:54:03 +000017688as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017689{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17690echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17691if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017693else
Martin v. Löwis11437992002-04-12 09:54:03 +000017694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017695/* confdefs.h. */
17696_ACEOF
17697cat confdefs.h >>conftest.$ac_ext
17698cat >>conftest.$ac_ext <<_ACEOF
17699/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017700/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17701 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17702#define $ac_func innocuous_$ac_func
17703
Martin v. Löwis1142de32002-03-29 16:28:31 +000017704/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017705 which can conflict with char $ac_func (); below.
17706 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017707 <limits.h> exists even on freestanding compilers. */
17708
17709#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017710# include <limits.h>
17711#else
17712# include <assert.h>
17713#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017714
17715#undef $ac_func
17716
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717/* Override any GCC internal prototype to avoid an error.
17718 Use char because int might match the return type of a GCC
17719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017720#ifdef __cplusplus
17721extern "C"
17722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017723char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017724/* The GNU C library defines this for functions which it implements
17725 to always fail with ENOSYS. Some functions are actually named
17726 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017728choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017729#endif
17730
Skip Montanaro6dead952003-09-25 14:50:04 +000017731int
17732main ()
17733{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017734return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 ;
17736 return 0;
17737}
17738_ACEOF
17739rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017740if { (ac_try="$ac_link"
17741case "(($ac_try" in
17742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17743 *) ac_try_echo=$ac_try;;
17744esac
17745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17746 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017748 grep -v '^ *+' conftest.er1 >conftest.err
17749 rm -f conftest.er1
17750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017752 (exit $ac_status); } && {
17753 test -z "$ac_c_werror_flag" ||
17754 test ! -s conftest.err
17755 } && test -s conftest$ac_exeext &&
17756 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017758else
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017760sed 's/^/| /' conftest.$ac_ext >&5
17761
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017764
17765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017766 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017768ac_res=`eval echo '${'$as_ac_var'}'`
17769 { echo "$as_me:$LINENO: result: $ac_res" >&5
17770echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017771if test `eval echo '${'$as_ac_var'}'` = yes; then
17772 cat >>confdefs.h <<_ACEOF
17773#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17774_ACEOF
17775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017776/* confdefs.h. */
17777_ACEOF
17778cat confdefs.h >>conftest.$ac_ext
17779cat >>conftest.$ac_ext <<_ACEOF
17780/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017781#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017782int
17783main ()
17784{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017785getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017786 ;
17787 return 0;
17788}
17789_ACEOF
17790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791if { (ac_try="$ac_compile"
17792case "(($ac_try" in
17793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17794 *) ac_try_echo=$ac_try;;
17795esac
17796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017799 grep -v '^ *+' conftest.er1 >conftest.err
17800 rm -f conftest.er1
17801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017803 (exit $ac_status); } && {
17804 test -z "$ac_c_werror_flag" ||
17805 test ! -s conftest.err
17806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
17808cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017809#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017810_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017811
Martin v. Löwis11437992002-04-12 09:54:03 +000017812
Guido van Rossumf78abae1997-01-21 22:02:36 +000017813else
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017815sed 's/^/| /' conftest.$ac_ext >&5
17816
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817
Guido van Rossum627b2d71993-12-24 10:39:16 +000017818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017819
17820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017821
Guido van Rossum627b2d71993-12-24 10:39:16 +000017822fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017823done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017824
Jack Jansen150753c2003-03-29 22:07:47 +000017825
17826for ac_func in setpgrp
17827do
17828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17831if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017833else
Martin v. Löwis11437992002-04-12 09:54:03 +000017834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017835/* confdefs.h. */
17836_ACEOF
17837cat confdefs.h >>conftest.$ac_ext
17838cat >>conftest.$ac_ext <<_ACEOF
17839/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017840/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17841 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17842#define $ac_func innocuous_$ac_func
17843
Jack Jansen150753c2003-03-29 22:07:47 +000017844/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017845 which can conflict with char $ac_func (); below.
17846 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017847 <limits.h> exists even on freestanding compilers. */
17848
17849#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017850# include <limits.h>
17851#else
17852# include <assert.h>
17853#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017854
17855#undef $ac_func
17856
Martin v. Löwiseba40652007-08-30 20:10:57 +000017857/* Override any GCC internal prototype to avoid an error.
17858 Use char because int might match the return type of a GCC
17859 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017860#ifdef __cplusplus
17861extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017862#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017863char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017864/* The GNU C library defines this for functions which it implements
17865 to always fail with ENOSYS. Some functions are actually named
17866 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017867#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017868choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017869#endif
17870
Skip Montanaro6dead952003-09-25 14:50:04 +000017871int
17872main ()
17873{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017875 ;
17876 return 0;
17877}
17878_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017879rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017880if { (ac_try="$ac_link"
17881case "(($ac_try" in
17882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17883 *) ac_try_echo=$ac_try;;
17884esac
17885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017888 grep -v '^ *+' conftest.er1 >conftest.err
17889 rm -f conftest.er1
17890 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017892 (exit $ac_status); } && {
17893 test -z "$ac_c_werror_flag" ||
17894 test ! -s conftest.err
17895 } && test -s conftest$ac_exeext &&
17896 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017897 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017898else
Jack Jansen150753c2003-03-29 22:07:47 +000017899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017900sed 's/^/| /' conftest.$ac_ext >&5
17901
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017904
17905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017906 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017908ac_res=`eval echo '${'$as_ac_var'}'`
17909 { echo "$as_me:$LINENO: result: $ac_res" >&5
17910echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017911if test `eval echo '${'$as_ac_var'}'` = yes; then
17912 cat >>confdefs.h <<_ACEOF
17913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17914_ACEOF
17915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017916/* confdefs.h. */
17917_ACEOF
17918cat confdefs.h >>conftest.$ac_ext
17919cat >>conftest.$ac_ext <<_ACEOF
17920/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017921#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017922int
17923main ()
17924{
17925setpgrp(0,0);
17926 ;
17927 return 0;
17928}
17929_ACEOF
17930rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017931if { (ac_try="$ac_compile"
17932case "(($ac_try" in
17933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17934 *) ac_try_echo=$ac_try;;
17935esac
17936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17937 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017939 grep -v '^ *+' conftest.er1 >conftest.err
17940 rm -f conftest.er1
17941 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017943 (exit $ac_status); } && {
17944 test -z "$ac_c_werror_flag" ||
17945 test ! -s conftest.err
17946 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017947
17948cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017949#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017950_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017951
Jack Jansen150753c2003-03-29 22:07:47 +000017952
17953else
17954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017955sed 's/^/| /' conftest.$ac_ext >&5
17956
Martin v. Löwiseba40652007-08-30 20:10:57 +000017957
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017959
17960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017961
17962fi
17963done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017964
Martin v. Löwis11437992002-04-12 09:54:03 +000017965
Thomas Wouters3a584202000-08-05 23:28:51 +000017966for ac_func in gettimeofday
17967do
Martin v. Löwis11437992002-04-12 09:54:03 +000017968as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017969{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17970echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17971if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017973else
Martin v. Löwis11437992002-04-12 09:54:03 +000017974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017975/* confdefs.h. */
17976_ACEOF
17977cat confdefs.h >>conftest.$ac_ext
17978cat >>conftest.$ac_ext <<_ACEOF
17979/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017980/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17981 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17982#define $ac_func innocuous_$ac_func
17983
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017984/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017985 which can conflict with char $ac_func (); below.
17986 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017987 <limits.h> exists even on freestanding compilers. */
17988
17989#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017990# include <limits.h>
17991#else
17992# include <assert.h>
17993#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017994
17995#undef $ac_func
17996
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997/* Override any GCC internal prototype to avoid an error.
17998 Use char because int might match the return type of a GCC
17999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018000#ifdef __cplusplus
18001extern "C"
18002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018003char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018004/* The GNU C library defines this for functions which it implements
18005 to always fail with ENOSYS. Some functions are actually named
18006 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018007#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018008choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018009#endif
18010
Skip Montanaro6dead952003-09-25 14:50:04 +000018011int
18012main ()
18013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018014return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020if { (ac_try="$ac_link"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
18025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032 (exit $ac_status); } && {
18033 test -z "$ac_c_werror_flag" ||
18034 test ! -s conftest.err
18035 } && test -s conftest$ac_exeext &&
18036 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018037 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018038else
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018040sed 's/^/| /' conftest.$ac_ext >&5
18041
Martin v. Löwiseba40652007-08-30 20:10:57 +000018042 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018044
18045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018046 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018048ac_res=`eval echo '${'$as_ac_var'}'`
18049 { echo "$as_me:$LINENO: result: $ac_res" >&5
18050echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018051if test `eval echo '${'$as_ac_var'}'` = yes; then
18052 cat >>confdefs.h <<_ACEOF
18053#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18054_ACEOF
18055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018056/* confdefs.h. */
18057_ACEOF
18058cat confdefs.h >>conftest.$ac_ext
18059cat >>conftest.$ac_ext <<_ACEOF
18060/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018061#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018062int
18063main ()
18064{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018065gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018066 ;
18067 return 0;
18068}
18069_ACEOF
18070rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071if { (ac_try="$ac_compile"
18072case "(($ac_try" in
18073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18074 *) ac_try_echo=$ac_try;;
18075esac
18076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079 grep -v '^ *+' conftest.er1 >conftest.err
18080 rm -f conftest.er1
18081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083 (exit $ac_status); } && {
18084 test -z "$ac_c_werror_flag" ||
18085 test ! -s conftest.err
18086 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018087 :
18088else
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018090sed 's/^/| /' conftest.$ac_ext >&5
18091
Martin v. Löwis11437992002-04-12 09:54:03 +000018092
18093cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018094#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018095_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018096
Martin v. Löwis11437992002-04-12 09:54:03 +000018097
Guido van Rossum627b2d71993-12-24 10:39:16 +000018098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018099
18100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018102fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018103done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018104
Michael W. Hudson54241132001-12-07 15:38:26 +000018105
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106{ echo "$as_me:$LINENO: checking for major" >&5
18107echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018109/* confdefs.h. */
18110_ACEOF
18111cat confdefs.h >>conftest.$ac_ext
18112cat >>conftest.$ac_ext <<_ACEOF
18113/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018114
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018115#if defined(MAJOR_IN_MKDEV)
18116#include <sys/mkdev.h>
18117#elif defined(MAJOR_IN_SYSMACROS)
18118#include <sys/sysmacros.h>
18119#else
18120#include <sys/types.h>
18121#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018122
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018123int
18124main ()
18125{
18126
18127 makedev(major(0),minor(0));
18128
18129 ;
18130 return 0;
18131}
18132_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018133rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018134if { (ac_try="$ac_link"
18135case "(($ac_try" in
18136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18137 *) ac_try_echo=$ac_try;;
18138esac
18139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018142 grep -v '^ *+' conftest.er1 >conftest.err
18143 rm -f conftest.er1
18144 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146 (exit $ac_status); } && {
18147 test -z "$ac_c_werror_flag" ||
18148 test ! -s conftest.err
18149 } && test -s conftest$ac_exeext &&
18150 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018151
18152
18153cat >>confdefs.h <<\_ACEOF
18154#define HAVE_DEVICE_MACROS 1
18155_ACEOF
18156
Martin v. Löwiseba40652007-08-30 20:10:57 +000018157 { echo "$as_me:$LINENO: result: yes" >&5
18158echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018159
18160else
18161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018162sed 's/^/| /' conftest.$ac_ext >&5
18163
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018164
Martin v. Löwiseba40652007-08-30 20:10:57 +000018165 { echo "$as_me:$LINENO: result: no" >&5
18166echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018167
18168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018169
18170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018171 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018172
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018173# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018174# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018175{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18176echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018183
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018184#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018185#include <sys/socket.h>
18186#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018187#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018188
Martin v. Löwis11437992002-04-12 09:54:03 +000018189int
18190main ()
18191{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018192
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018193getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018194
Martin v. Löwis11437992002-04-12 09:54:03 +000018195 ;
18196 return 0;
18197}
18198_ACEOF
18199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018200if { (ac_try="$ac_link"
18201case "(($ac_try" in
18202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18203 *) ac_try_echo=$ac_try;;
18204esac
18205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018208 grep -v '^ *+' conftest.er1 >conftest.err
18209 rm -f conftest.er1
18210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018212 (exit $ac_status); } && {
18213 test -z "$ac_c_werror_flag" ||
18214 test ! -s conftest.err
18215 } && test -s conftest$ac_exeext &&
18216 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018217
Martin v. Löwiseba40652007-08-30 20:10:57 +000018218{ echo "$as_me:$LINENO: result: yes" >&5
18219echo "${ECHO_T}yes" >&6; }
18220{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18221echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018222if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018223 { echo "$as_me:$LINENO: result: buggy" >&5
18224echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018225buggygetaddrinfo=yes
18226else
Martin v. Löwis11437992002-04-12 09:54:03 +000018227 cat >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öwis01dfdb32001-06-23 16:30:13 +000018233
18234#include <sys/types.h>
18235#include <netdb.h>
18236#include <string.h>
18237#include <sys/socket.h>
18238#include <netinet/in.h>
18239
18240main()
18241{
18242 int passive, gaierr, inet4 = 0, inet6 = 0;
18243 struct addrinfo hints, *ai, *aitop;
18244 char straddr[INET6_ADDRSTRLEN], strport[16];
18245
18246 for (passive = 0; passive <= 1; passive++) {
18247 memset(&hints, 0, sizeof(hints));
18248 hints.ai_family = AF_UNSPEC;
18249 hints.ai_flags = passive ? AI_PASSIVE : 0;
18250 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018251 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018252 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18253 (void)gai_strerror(gaierr);
18254 goto bad;
18255 }
18256 for (ai = aitop; ai; ai = ai->ai_next) {
18257 if (ai->ai_addr == NULL ||
18258 ai->ai_addrlen == 0 ||
18259 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18260 straddr, sizeof(straddr), strport, sizeof(strport),
18261 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18262 goto bad;
18263 }
18264 switch (ai->ai_family) {
18265 case AF_INET:
18266 if (strcmp(strport, "54321") != 0) {
18267 goto bad;
18268 }
18269 if (passive) {
18270 if (strcmp(straddr, "0.0.0.0") != 0) {
18271 goto bad;
18272 }
18273 } else {
18274 if (strcmp(straddr, "127.0.0.1") != 0) {
18275 goto bad;
18276 }
18277 }
18278 inet4++;
18279 break;
18280 case AF_INET6:
18281 if (strcmp(strport, "54321") != 0) {
18282 goto bad;
18283 }
18284 if (passive) {
18285 if (strcmp(straddr, "::") != 0) {
18286 goto bad;
18287 }
18288 } else {
18289 if (strcmp(straddr, "::1") != 0) {
18290 goto bad;
18291 }
18292 }
18293 inet6++;
18294 break;
18295 case AF_UNSPEC:
18296 goto bad;
18297 break;
18298 default:
18299 /* another family support? */
18300 break;
18301 }
18302 }
18303 }
18304
18305 if (!(inet4 == 0 || inet4 == 2))
18306 goto bad;
18307 if (!(inet6 == 0 || inet6 == 2))
18308 goto bad;
18309
18310 if (aitop)
18311 freeaddrinfo(aitop);
18312 exit(0);
18313
18314 bad:
18315 if (aitop)
18316 freeaddrinfo(aitop);
18317 exit(1);
18318}
18319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320_ACEOF
18321rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018322if { (ac_try="$ac_link"
18323case "(($ac_try" in
18324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18325 *) ac_try_echo=$ac_try;;
18326esac
18327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18328 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018329 ac_status=$?
18330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018332 { (case "(($ac_try" in
18333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18334 *) ac_try_echo=$ac_try;;
18335esac
18336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18337 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 ac_status=$?
18339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18340 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018341 { echo "$as_me:$LINENO: result: good" >&5
18342echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018343buggygetaddrinfo=no
18344else
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 echo "$as_me: program exited with status $ac_status" >&5
18346echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018347sed 's/^/| /' conftest.$ac_ext >&5
18348
Martin v. Löwis11437992002-04-12 09:54:03 +000018349( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350{ echo "$as_me:$LINENO: result: buggy" >&5
18351echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018352buggygetaddrinfo=yes
18353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018354rm -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 +000018355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356
18357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018358else
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018360sed 's/^/| /' conftest.$ac_ext >&5
18361
Martin v. Löwis11437992002-04-12 09:54:03 +000018362
Martin v. Löwiseba40652007-08-30 20:10:57 +000018363{ echo "$as_me:$LINENO: result: no" >&5
18364echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018365buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018366
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018368
18369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018371
18372if test "$buggygetaddrinfo" = "yes"; then
18373 if test "$ipv6" = "yes"; then
18374 echo 'Fatal: You must get working getaddrinfo() function.'
18375 echo ' or you can specify "--disable-ipv6"'.
18376 exit 1
18377 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018378else
Martin v. Löwis11437992002-04-12 09:54:03 +000018379
18380cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018381#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018382_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018383
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018385
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018386for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018387do
Martin v. Löwis11437992002-04-12 09:54:03 +000018388as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18390echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18391if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018393else
Martin v. Löwis11437992002-04-12 09:54:03 +000018394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018395/* confdefs.h. */
18396_ACEOF
18397cat confdefs.h >>conftest.$ac_ext
18398cat >>conftest.$ac_ext <<_ACEOF
18399/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018400/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18401 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18402#define $ac_func innocuous_$ac_func
18403
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018404/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018405 which can conflict with char $ac_func (); below.
18406 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018407 <limits.h> exists even on freestanding compilers. */
18408
18409#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018410# include <limits.h>
18411#else
18412# include <assert.h>
18413#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018414
18415#undef $ac_func
18416
Martin v. Löwiseba40652007-08-30 20:10:57 +000018417/* Override any GCC internal prototype to avoid an error.
18418 Use char because int might match the return type of a GCC
18419 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018420#ifdef __cplusplus
18421extern "C"
18422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018423char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018424/* The GNU C library defines this for functions which it implements
18425 to always fail with ENOSYS. Some functions are actually named
18426 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018427#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018428choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018429#endif
18430
Skip Montanaro6dead952003-09-25 14:50:04 +000018431int
18432main ()
18433{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018434return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018435 ;
18436 return 0;
18437}
18438_ACEOF
18439rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018440if { (ac_try="$ac_link"
18441case "(($ac_try" in
18442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18443 *) ac_try_echo=$ac_try;;
18444esac
18445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18446 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018448 grep -v '^ *+' conftest.er1 >conftest.err
18449 rm -f conftest.er1
18450 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452 (exit $ac_status); } && {
18453 test -z "$ac_c_werror_flag" ||
18454 test ! -s conftest.err
18455 } && test -s conftest$ac_exeext &&
18456 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018458else
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018460sed 's/^/| /' conftest.$ac_ext >&5
18461
Martin v. Löwiseba40652007-08-30 20:10:57 +000018462 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018464
18465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018466 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018468ac_res=`eval echo '${'$as_ac_var'}'`
18469 { echo "$as_me:$LINENO: result: $ac_res" >&5
18470echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018471if test `eval echo '${'$as_ac_var'}'` = yes; then
18472 cat >>confdefs.h <<_ACEOF
18473#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18474_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018475
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018476fi
18477done
18478
Michael W. Hudson54241132001-12-07 15:38:26 +000018479
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018480# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018481{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18482echo $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 +000018483if test "${ac_cv_header_time+set}" = set; then
18484 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018485else
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018487/* confdefs.h. */
18488_ACEOF
18489cat confdefs.h >>conftest.$ac_ext
18490cat >>conftest.$ac_ext <<_ACEOF
18491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018492#include <sys/types.h>
18493#include <sys/time.h>
18494#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018495
Martin v. Löwis11437992002-04-12 09:54:03 +000018496int
18497main ()
18498{
18499if ((struct tm *) 0)
18500return 0;
18501 ;
18502 return 0;
18503}
18504_ACEOF
18505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018506if { (ac_try="$ac_compile"
18507case "(($ac_try" in
18508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18509 *) ac_try_echo=$ac_try;;
18510esac
18511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018514 grep -v '^ *+' conftest.er1 >conftest.err
18515 rm -f conftest.er1
18516 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518 (exit $ac_status); } && {
18519 test -z "$ac_c_werror_flag" ||
18520 test ! -s conftest.err
18521 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018522 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018523else
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018525sed 's/^/| /' conftest.$ac_ext >&5
18526
Martin v. Löwiseba40652007-08-30 20:10:57 +000018527 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018529
18530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018532{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18533echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018534if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018535
18536cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018537#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018538_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018539
18540fi
18541
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18543echo $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 +000018544if test "${ac_cv_struct_tm+set}" = set; then
18545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018546else
Martin v. Löwis11437992002-04-12 09:54:03 +000018547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018553#include <sys/types.h>
18554#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018555
Martin v. Löwis11437992002-04-12 09:54:03 +000018556int
18557main ()
18558{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018559struct tm tm;
18560 int *p = &tm.tm_sec;
18561 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018562 ;
18563 return 0;
18564}
18565_ACEOF
18566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018567if { (ac_try="$ac_compile"
18568case "(($ac_try" in
18569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18570 *) ac_try_echo=$ac_try;;
18571esac
18572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018575 grep -v '^ *+' conftest.er1 >conftest.err
18576 rm -f conftest.er1
18577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018579 (exit $ac_status); } && {
18580 test -z "$ac_c_werror_flag" ||
18581 test ! -s conftest.err
18582 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018583 ac_cv_struct_tm=time.h
18584else
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018586sed 's/^/| /' conftest.$ac_ext >&5
18587
Martin v. Löwiseba40652007-08-30 20:10:57 +000018588 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018590
18591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18594echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018595if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018596
18597cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018598#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018600
18601fi
18602
Martin v. Löwiseba40652007-08-30 20:10:57 +000018603{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18604echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018605if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18606 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018607else
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018609/* confdefs.h. */
18610_ACEOF
18611cat confdefs.h >>conftest.$ac_ext
18612cat >>conftest.$ac_ext <<_ACEOF
18613/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018614#include <sys/types.h>
18615#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018616
18617
Martin v. Löwis11437992002-04-12 09:54:03 +000018618int
18619main ()
18620{
18621static struct tm ac_aggr;
18622if (ac_aggr.tm_zone)
18623return 0;
18624 ;
18625 return 0;
18626}
18627_ACEOF
18628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018629if { (ac_try="$ac_compile"
18630case "(($ac_try" in
18631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18632 *) ac_try_echo=$ac_try;;
18633esac
18634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018637 grep -v '^ *+' conftest.er1 >conftest.err
18638 rm -f conftest.er1
18639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641 (exit $ac_status); } && {
18642 test -z "$ac_c_werror_flag" ||
18643 test ! -s conftest.err
18644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018646else
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018648sed 's/^/| /' conftest.$ac_ext >&5
18649
Martin v. Löwiseba40652007-08-30 20:10:57 +000018650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018651/* confdefs.h. */
18652_ACEOF
18653cat confdefs.h >>conftest.$ac_ext
18654cat >>conftest.$ac_ext <<_ACEOF
18655/* end confdefs.h. */
18656#include <sys/types.h>
18657#include <$ac_cv_struct_tm>
18658
18659
18660int
18661main ()
18662{
18663static struct tm ac_aggr;
18664if (sizeof ac_aggr.tm_zone)
18665return 0;
18666 ;
18667 return 0;
18668}
18669_ACEOF
18670rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671if { (ac_try="$ac_compile"
18672case "(($ac_try" in
18673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18674 *) ac_try_echo=$ac_try;;
18675esac
18676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18677 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018679 grep -v '^ *+' conftest.er1 >conftest.err
18680 rm -f conftest.er1
18681 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018683 (exit $ac_status); } && {
18684 test -z "$ac_c_werror_flag" ||
18685 test ! -s conftest.err
18686 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018687 ac_cv_member_struct_tm_tm_zone=yes
18688else
18689 echo "$as_me: failed program was:" >&5
18690sed 's/^/| /' conftest.$ac_ext >&5
18691
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694
18695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018697
18698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18701echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018702if test $ac_cv_member_struct_tm_tm_zone = yes; then
18703
18704cat >>confdefs.h <<_ACEOF
18705#define HAVE_STRUCT_TM_TM_ZONE 1
18706_ACEOF
18707
18708
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018709fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018710
Martin v. Löwis11437992002-04-12 09:54:03 +000018711if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18712
18713cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018714#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018715_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018716
18717else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018718 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18719echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18720if test "${ac_cv_have_decl_tzname+set}" = set; then
18721 echo $ECHO_N "(cached) $ECHO_C" >&6
18722else
18723 cat >conftest.$ac_ext <<_ACEOF
18724/* confdefs.h. */
18725_ACEOF
18726cat confdefs.h >>conftest.$ac_ext
18727cat >>conftest.$ac_ext <<_ACEOF
18728/* end confdefs.h. */
18729#include <time.h>
18730
18731int
18732main ()
18733{
18734#ifndef tzname
18735 (void) tzname;
18736#endif
18737
18738 ;
18739 return 0;
18740}
18741_ACEOF
18742rm -f conftest.$ac_objext
18743if { (ac_try="$ac_compile"
18744case "(($ac_try" in
18745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18746 *) ac_try_echo=$ac_try;;
18747esac
18748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18749 (eval "$ac_compile") 2>conftest.er1
18750 ac_status=$?
18751 grep -v '^ *+' conftest.er1 >conftest.err
18752 rm -f conftest.er1
18753 cat conftest.err >&5
18754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18755 (exit $ac_status); } && {
18756 test -z "$ac_c_werror_flag" ||
18757 test ! -s conftest.err
18758 } && test -s conftest.$ac_objext; then
18759 ac_cv_have_decl_tzname=yes
18760else
18761 echo "$as_me: failed program was:" >&5
18762sed 's/^/| /' conftest.$ac_ext >&5
18763
18764 ac_cv_have_decl_tzname=no
18765fi
18766
18767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18768fi
18769{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18770echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18771if test $ac_cv_have_decl_tzname = yes; then
18772
18773cat >>confdefs.h <<_ACEOF
18774#define HAVE_DECL_TZNAME 1
18775_ACEOF
18776
18777
18778else
18779 cat >>confdefs.h <<_ACEOF
18780#define HAVE_DECL_TZNAME 0
18781_ACEOF
18782
18783
18784fi
18785
18786
18787 { echo "$as_me:$LINENO: checking for tzname" >&5
18788echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018789if test "${ac_cv_var_tzname+set}" = set; then
18790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018791else
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018793/* confdefs.h. */
18794_ACEOF
18795cat confdefs.h >>conftest.$ac_ext
18796cat >>conftest.$ac_ext <<_ACEOF
18797/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018798#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018799#if !HAVE_DECL_TZNAME
18800extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018802
Martin v. Löwis11437992002-04-12 09:54:03 +000018803int
18804main ()
18805{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018806return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 ;
18808 return 0;
18809}
18810_ACEOF
18811rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018812if { (ac_try="$ac_link"
18813case "(($ac_try" in
18814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18815 *) ac_try_echo=$ac_try;;
18816esac
18817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18818 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018820 grep -v '^ *+' conftest.er1 >conftest.err
18821 rm -f conftest.er1
18822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018824 (exit $ac_status); } && {
18825 test -z "$ac_c_werror_flag" ||
18826 test ! -s conftest.err
18827 } && test -s conftest$ac_exeext &&
18828 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018829 ac_cv_var_tzname=yes
18830else
Martin v. Löwis11437992002-04-12 09:54:03 +000018831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018832sed 's/^/| /' conftest.$ac_ext >&5
18833
Martin v. Löwiseba40652007-08-30 20:10:57 +000018834 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018836
18837rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018838 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018840{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18841echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018842 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018843
18844cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018845#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018846_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018847
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018848 fi
18849fi
18850
Martin v. Löwiseba40652007-08-30 20:10:57 +000018851{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18852echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018853if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18854 echo $ECHO_N "(cached) $ECHO_C" >&6
18855else
18856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018857/* confdefs.h. */
18858_ACEOF
18859cat confdefs.h >>conftest.$ac_ext
18860cat >>conftest.$ac_ext <<_ACEOF
18861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018862$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018863int
18864main ()
18865{
18866static struct stat ac_aggr;
18867if (ac_aggr.st_rdev)
18868return 0;
18869 ;
18870 return 0;
18871}
18872_ACEOF
18873rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018874if { (ac_try="$ac_compile"
18875case "(($ac_try" in
18876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18877 *) ac_try_echo=$ac_try;;
18878esac
18879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018882 grep -v '^ *+' conftest.er1 >conftest.err
18883 rm -f conftest.er1
18884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018886 (exit $ac_status); } && {
18887 test -z "$ac_c_werror_flag" ||
18888 test ! -s conftest.err
18889 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018890 ac_cv_member_struct_stat_st_rdev=yes
18891else
18892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018893sed 's/^/| /' conftest.$ac_ext >&5
18894
Martin v. Löwiseba40652007-08-30 20:10:57 +000018895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018896/* confdefs.h. */
18897_ACEOF
18898cat confdefs.h >>conftest.$ac_ext
18899cat >>conftest.$ac_ext <<_ACEOF
18900/* end confdefs.h. */
18901$ac_includes_default
18902int
18903main ()
18904{
18905static struct stat ac_aggr;
18906if (sizeof ac_aggr.st_rdev)
18907return 0;
18908 ;
18909 return 0;
18910}
18911_ACEOF
18912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913if { (ac_try="$ac_compile"
18914case "(($ac_try" in
18915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18916 *) ac_try_echo=$ac_try;;
18917esac
18918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18919 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018921 grep -v '^ *+' conftest.er1 >conftest.err
18922 rm -f conftest.er1
18923 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925 (exit $ac_status); } && {
18926 test -z "$ac_c_werror_flag" ||
18927 test ! -s conftest.err
18928 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018929 ac_cv_member_struct_stat_st_rdev=yes
18930else
18931 echo "$as_me: failed program was:" >&5
18932sed 's/^/| /' conftest.$ac_ext >&5
18933
Martin v. Löwiseba40652007-08-30 20:10:57 +000018934 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936
18937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018939
18940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18943echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018944if test $ac_cv_member_struct_stat_st_rdev = yes; then
18945
18946cat >>confdefs.h <<_ACEOF
18947#define HAVE_STRUCT_STAT_ST_RDEV 1
18948_ACEOF
18949
18950
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018951fi
18952
Martin v. Löwiseba40652007-08-30 20:10:57 +000018953{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18954echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018955if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018957else
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018959/* confdefs.h. */
18960_ACEOF
18961cat confdefs.h >>conftest.$ac_ext
18962cat >>conftest.$ac_ext <<_ACEOF
18963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018964$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018965int
18966main ()
18967{
18968static struct stat ac_aggr;
18969if (ac_aggr.st_blksize)
18970return 0;
18971 ;
18972 return 0;
18973}
18974_ACEOF
18975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018976if { (ac_try="$ac_compile"
18977case "(($ac_try" in
18978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18979 *) ac_try_echo=$ac_try;;
18980esac
18981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018984 grep -v '^ *+' conftest.er1 >conftest.err
18985 rm -f conftest.er1
18986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018988 (exit $ac_status); } && {
18989 test -z "$ac_c_werror_flag" ||
18990 test ! -s conftest.err
18991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018992 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018993else
Martin v. Löwis11437992002-04-12 09:54:03 +000018994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018995sed 's/^/| /' conftest.$ac_ext >&5
18996
Martin v. Löwiseba40652007-08-30 20:10:57 +000018997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018998/* confdefs.h. */
18999_ACEOF
19000cat confdefs.h >>conftest.$ac_ext
19001cat >>conftest.$ac_ext <<_ACEOF
19002/* end confdefs.h. */
19003$ac_includes_default
19004int
19005main ()
19006{
19007static struct stat ac_aggr;
19008if (sizeof ac_aggr.st_blksize)
19009return 0;
19010 ;
19011 return 0;
19012}
19013_ACEOF
19014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019015if { (ac_try="$ac_compile"
19016case "(($ac_try" in
19017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19018 *) ac_try_echo=$ac_try;;
19019esac
19020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19021 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019023 grep -v '^ *+' conftest.er1 >conftest.err
19024 rm -f conftest.er1
19025 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027 (exit $ac_status); } && {
19028 test -z "$ac_c_werror_flag" ||
19029 test ! -s conftest.err
19030 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019031 ac_cv_member_struct_stat_st_blksize=yes
19032else
19033 echo "$as_me: failed program was:" >&5
19034sed 's/^/| /' conftest.$ac_ext >&5
19035
Martin v. Löwiseba40652007-08-30 20:10:57 +000019036 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038
19039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041
19042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019044{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19045echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019046if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019047
Martin v. Löwis11437992002-04-12 09:54:03 +000019048cat >>confdefs.h <<_ACEOF
19049#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19050_ACEOF
19051
19052
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019053fi
19054
Martin v. Löwiseba40652007-08-30 20:10:57 +000019055{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19056echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019057if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19058 echo $ECHO_N "(cached) $ECHO_C" >&6
19059else
19060 cat >conftest.$ac_ext <<_ACEOF
19061/* confdefs.h. */
19062_ACEOF
19063cat confdefs.h >>conftest.$ac_ext
19064cat >>conftest.$ac_ext <<_ACEOF
19065/* end confdefs.h. */
19066$ac_includes_default
19067int
19068main ()
19069{
19070static struct stat ac_aggr;
19071if (ac_aggr.st_flags)
19072return 0;
19073 ;
19074 return 0;
19075}
19076_ACEOF
19077rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078if { (ac_try="$ac_compile"
19079case "(($ac_try" in
19080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19081 *) ac_try_echo=$ac_try;;
19082esac
19083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19084 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019085 ac_status=$?
19086 grep -v '^ *+' conftest.er1 >conftest.err
19087 rm -f conftest.er1
19088 cat conftest.err >&5
19089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019090 (exit $ac_status); } && {
19091 test -z "$ac_c_werror_flag" ||
19092 test ! -s conftest.err
19093 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019094 ac_cv_member_struct_stat_st_flags=yes
19095else
19096 echo "$as_me: failed program was:" >&5
19097sed 's/^/| /' conftest.$ac_ext >&5
19098
Martin v. Löwiseba40652007-08-30 20:10:57 +000019099 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019100/* confdefs.h. */
19101_ACEOF
19102cat confdefs.h >>conftest.$ac_ext
19103cat >>conftest.$ac_ext <<_ACEOF
19104/* end confdefs.h. */
19105$ac_includes_default
19106int
19107main ()
19108{
19109static struct stat ac_aggr;
19110if (sizeof ac_aggr.st_flags)
19111return 0;
19112 ;
19113 return 0;
19114}
19115_ACEOF
19116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019117if { (ac_try="$ac_compile"
19118case "(($ac_try" in
19119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19120 *) ac_try_echo=$ac_try;;
19121esac
19122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19123 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019124 ac_status=$?
19125 grep -v '^ *+' conftest.er1 >conftest.err
19126 rm -f conftest.er1
19127 cat conftest.err >&5
19128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129 (exit $ac_status); } && {
19130 test -z "$ac_c_werror_flag" ||
19131 test ! -s conftest.err
19132 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019133 ac_cv_member_struct_stat_st_flags=yes
19134else
19135 echo "$as_me: failed program was:" >&5
19136sed 's/^/| /' conftest.$ac_ext >&5
19137
Martin v. Löwiseba40652007-08-30 20:10:57 +000019138 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019140
19141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019143
19144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019146{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19147echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019148if test $ac_cv_member_struct_stat_st_flags = yes; then
19149
19150cat >>confdefs.h <<_ACEOF
19151#define HAVE_STRUCT_STAT_ST_FLAGS 1
19152_ACEOF
19153
19154
19155fi
19156
Martin v. Löwiseba40652007-08-30 20:10:57 +000019157{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19158echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019159if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19160 echo $ECHO_N "(cached) $ECHO_C" >&6
19161else
19162 cat >conftest.$ac_ext <<_ACEOF
19163/* confdefs.h. */
19164_ACEOF
19165cat confdefs.h >>conftest.$ac_ext
19166cat >>conftest.$ac_ext <<_ACEOF
19167/* end confdefs.h. */
19168$ac_includes_default
19169int
19170main ()
19171{
19172static struct stat ac_aggr;
19173if (ac_aggr.st_gen)
19174return 0;
19175 ;
19176 return 0;
19177}
19178_ACEOF
19179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019180if { (ac_try="$ac_compile"
19181case "(($ac_try" in
19182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19183 *) ac_try_echo=$ac_try;;
19184esac
19185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019187 ac_status=$?
19188 grep -v '^ *+' conftest.er1 >conftest.err
19189 rm -f conftest.er1
19190 cat conftest.err >&5
19191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019192 (exit $ac_status); } && {
19193 test -z "$ac_c_werror_flag" ||
19194 test ! -s conftest.err
19195 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019196 ac_cv_member_struct_stat_st_gen=yes
19197else
19198 echo "$as_me: failed program was:" >&5
19199sed 's/^/| /' conftest.$ac_ext >&5
19200
Martin v. Löwiseba40652007-08-30 20:10:57 +000019201 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019202/* confdefs.h. */
19203_ACEOF
19204cat confdefs.h >>conftest.$ac_ext
19205cat >>conftest.$ac_ext <<_ACEOF
19206/* end confdefs.h. */
19207$ac_includes_default
19208int
19209main ()
19210{
19211static struct stat ac_aggr;
19212if (sizeof ac_aggr.st_gen)
19213return 0;
19214 ;
19215 return 0;
19216}
19217_ACEOF
19218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019219if { (ac_try="$ac_compile"
19220case "(($ac_try" in
19221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19222 *) ac_try_echo=$ac_try;;
19223esac
19224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019226 ac_status=$?
19227 grep -v '^ *+' conftest.er1 >conftest.err
19228 rm -f conftest.er1
19229 cat conftest.err >&5
19230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231 (exit $ac_status); } && {
19232 test -z "$ac_c_werror_flag" ||
19233 test ! -s conftest.err
19234 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019235 ac_cv_member_struct_stat_st_gen=yes
19236else
19237 echo "$as_me: failed program was:" >&5
19238sed 's/^/| /' conftest.$ac_ext >&5
19239
Martin v. Löwiseba40652007-08-30 20:10:57 +000019240 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019242
19243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019245
19246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019248{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19249echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019250if test $ac_cv_member_struct_stat_st_gen = yes; then
19251
19252cat >>confdefs.h <<_ACEOF
19253#define HAVE_STRUCT_STAT_ST_GEN 1
19254_ACEOF
19255
19256
19257fi
19258
Martin v. Löwiseba40652007-08-30 20:10:57 +000019259{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19260echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019261if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19262 echo $ECHO_N "(cached) $ECHO_C" >&6
19263else
19264 cat >conftest.$ac_ext <<_ACEOF
19265/* confdefs.h. */
19266_ACEOF
19267cat confdefs.h >>conftest.$ac_ext
19268cat >>conftest.$ac_ext <<_ACEOF
19269/* end confdefs.h. */
19270$ac_includes_default
19271int
19272main ()
19273{
19274static struct stat ac_aggr;
19275if (ac_aggr.st_birthtime)
19276return 0;
19277 ;
19278 return 0;
19279}
19280_ACEOF
19281rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019282if { (ac_try="$ac_compile"
19283case "(($ac_try" in
19284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19285 *) ac_try_echo=$ac_try;;
19286esac
19287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019289 ac_status=$?
19290 grep -v '^ *+' conftest.er1 >conftest.err
19291 rm -f conftest.er1
19292 cat conftest.err >&5
19293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294 (exit $ac_status); } && {
19295 test -z "$ac_c_werror_flag" ||
19296 test ! -s conftest.err
19297 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019298 ac_cv_member_struct_stat_st_birthtime=yes
19299else
19300 echo "$as_me: failed program was:" >&5
19301sed 's/^/| /' conftest.$ac_ext >&5
19302
Martin v. Löwiseba40652007-08-30 20:10:57 +000019303 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019304/* confdefs.h. */
19305_ACEOF
19306cat confdefs.h >>conftest.$ac_ext
19307cat >>conftest.$ac_ext <<_ACEOF
19308/* end confdefs.h. */
19309$ac_includes_default
19310int
19311main ()
19312{
19313static struct stat ac_aggr;
19314if (sizeof ac_aggr.st_birthtime)
19315return 0;
19316 ;
19317 return 0;
19318}
19319_ACEOF
19320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019321if { (ac_try="$ac_compile"
19322case "(($ac_try" in
19323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19324 *) ac_try_echo=$ac_try;;
19325esac
19326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019328 ac_status=$?
19329 grep -v '^ *+' conftest.er1 >conftest.err
19330 rm -f conftest.er1
19331 cat conftest.err >&5
19332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333 (exit $ac_status); } && {
19334 test -z "$ac_c_werror_flag" ||
19335 test ! -s conftest.err
19336 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019337 ac_cv_member_struct_stat_st_birthtime=yes
19338else
19339 echo "$as_me: failed program was:" >&5
19340sed 's/^/| /' conftest.$ac_ext >&5
19341
Martin v. Löwiseba40652007-08-30 20:10:57 +000019342 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019344
19345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019347
19348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019350{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19351echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019352if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19353
19354cat >>confdefs.h <<_ACEOF
19355#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19356_ACEOF
19357
19358
19359fi
19360
Martin v. Löwiseba40652007-08-30 20:10:57 +000019361{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19362echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019363if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019365else
Martin v. Löwis11437992002-04-12 09:54:03 +000019366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019367/* confdefs.h. */
19368_ACEOF
19369cat confdefs.h >>conftest.$ac_ext
19370cat >>conftest.$ac_ext <<_ACEOF
19371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019372$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019373int
19374main ()
19375{
19376static struct stat ac_aggr;
19377if (ac_aggr.st_blocks)
19378return 0;
19379 ;
19380 return 0;
19381}
19382_ACEOF
19383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019384if { (ac_try="$ac_compile"
19385case "(($ac_try" in
19386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19387 *) ac_try_echo=$ac_try;;
19388esac
19389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019392 grep -v '^ *+' conftest.er1 >conftest.err
19393 rm -f conftest.er1
19394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019396 (exit $ac_status); } && {
19397 test -z "$ac_c_werror_flag" ||
19398 test ! -s conftest.err
19399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019400 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019401else
Martin v. Löwis11437992002-04-12 09:54:03 +000019402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019403sed 's/^/| /' conftest.$ac_ext >&5
19404
Martin v. Löwiseba40652007-08-30 20:10:57 +000019405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019406/* confdefs.h. */
19407_ACEOF
19408cat confdefs.h >>conftest.$ac_ext
19409cat >>conftest.$ac_ext <<_ACEOF
19410/* end confdefs.h. */
19411$ac_includes_default
19412int
19413main ()
19414{
19415static struct stat ac_aggr;
19416if (sizeof ac_aggr.st_blocks)
19417return 0;
19418 ;
19419 return 0;
19420}
19421_ACEOF
19422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019423if { (ac_try="$ac_compile"
19424case "(($ac_try" in
19425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19426 *) ac_try_echo=$ac_try;;
19427esac
19428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19429 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019431 grep -v '^ *+' conftest.er1 >conftest.err
19432 rm -f conftest.er1
19433 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435 (exit $ac_status); } && {
19436 test -z "$ac_c_werror_flag" ||
19437 test ! -s conftest.err
19438 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019439 ac_cv_member_struct_stat_st_blocks=yes
19440else
19441 echo "$as_me: failed program was:" >&5
19442sed 's/^/| /' conftest.$ac_ext >&5
19443
Martin v. Löwiseba40652007-08-30 20:10:57 +000019444 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019446
19447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019449
19450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019452{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19453echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019454if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019455
Martin v. Löwis11437992002-04-12 09:54:03 +000019456cat >>confdefs.h <<_ACEOF
19457#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19458_ACEOF
19459
19460
19461cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019462#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019463_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019464
19465else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019466 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019467 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19469 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019470esac
19471
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019472fi
19473
Michael W. Hudson54241132001-12-07 15:38:26 +000019474
Martin v. Löwis11437992002-04-12 09:54:03 +000019475
Martin v. Löwiseba40652007-08-30 20:10:57 +000019476{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19477echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019478if test "${ac_cv_header_time_altzone+set}" = set; then
19479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019480else
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019482/* confdefs.h. */
19483_ACEOF
19484cat confdefs.h >>conftest.$ac_ext
19485cat >>conftest.$ac_ext <<_ACEOF
19486/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019488int
19489main ()
19490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019491return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019492 ;
19493 return 0;
19494}
19495_ACEOF
19496rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019497if { (ac_try="$ac_compile"
19498case "(($ac_try" in
19499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19500 *) ac_try_echo=$ac_try;;
19501esac
19502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019505 grep -v '^ *+' conftest.er1 >conftest.err
19506 rm -f conftest.er1
19507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509 (exit $ac_status); } && {
19510 test -z "$ac_c_werror_flag" ||
19511 test ! -s conftest.err
19512 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019513 ac_cv_header_time_altzone=yes
19514else
Martin v. Löwis11437992002-04-12 09:54:03 +000019515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019516sed 's/^/| /' conftest.$ac_ext >&5
19517
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019519fi
19520
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19522fi
19523
19524{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19525echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019526if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019527
19528cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019529#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019530_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019531
19532fi
19533
Guido van Rossumda88dad1995-01-26 00:46:29 +000019534was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019535{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19536echo $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 +000019537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019538/* confdefs.h. */
19539_ACEOF
19540cat confdefs.h >>conftest.$ac_ext
19541cat >>conftest.$ac_ext <<_ACEOF
19542/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019543
19544#include <sys/types.h>
19545#include <sys/select.h>
19546#include <sys/time.h>
19547
Martin v. Löwis11437992002-04-12 09:54:03 +000019548int
19549main ()
19550{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019551;
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 ;
19553 return 0;
19554}
19555_ACEOF
19556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019557if { (ac_try="$ac_compile"
19558case "(($ac_try" in
19559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19560 *) ac_try_echo=$ac_try;;
19561esac
19562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019565 grep -v '^ *+' conftest.er1 >conftest.err
19566 rm -f conftest.er1
19567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019569 (exit $ac_status); } && {
19570 test -z "$ac_c_werror_flag" ||
19571 test ! -s conftest.err
19572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019573
19574
19575cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019576#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019577_ACEOF
19578
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019579 was_it_defined=yes
19580
Guido van Rossumf78abae1997-01-21 22:02:36 +000019581else
Martin v. Löwis11437992002-04-12 09:54:03 +000019582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019583sed 's/^/| /' conftest.$ac_ext >&5
19584
Brett Cannon19fab762007-06-02 03:02:29 +000019585
Martin v. Löwiseba40652007-08-30 20:10:57 +000019586fi
19587
19588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19589{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19590echo "${ECHO_T}$was_it_defined" >&6; }
19591
19592{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19593echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019594if test "${ac_cv_struct_addrinfo+set}" = set; then
19595 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019596else
Martin v. Löwis11437992002-04-12 09:54:03 +000019597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019598/* confdefs.h. */
19599_ACEOF
19600cat confdefs.h >>conftest.$ac_ext
19601cat >>conftest.$ac_ext <<_ACEOF
19602/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019603
19604# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019605int
19606main ()
19607{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019608struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019609 ;
19610 return 0;
19611}
19612_ACEOF
19613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019614if { (ac_try="$ac_compile"
19615case "(($ac_try" in
19616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19617 *) ac_try_echo=$ac_try;;
19618esac
19619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019622 grep -v '^ *+' conftest.er1 >conftest.err
19623 rm -f conftest.er1
19624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626 (exit $ac_status); } && {
19627 test -z "$ac_c_werror_flag" ||
19628 test ! -s conftest.err
19629 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019630 ac_cv_struct_addrinfo=yes
19631else
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019633sed 's/^/| /' conftest.$ac_ext >&5
19634
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019636fi
19637
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19639fi
19640
19641{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19642echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019643if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019644
19645cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019646#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019647_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019648
19649fi
19650
Martin v. Löwiseba40652007-08-30 20:10:57 +000019651{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19652echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019653if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19654 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019655else
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 cat >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. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019662
19663# include <sys/types.h>
19664# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019665int
19666main ()
19667{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019668struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019669 ;
19670 return 0;
19671}
19672_ACEOF
19673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019674if { (ac_try="$ac_compile"
19675case "(($ac_try" in
19676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19677 *) ac_try_echo=$ac_try;;
19678esac
19679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019682 grep -v '^ *+' conftest.er1 >conftest.err
19683 rm -f conftest.er1
19684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686 (exit $ac_status); } && {
19687 test -z "$ac_c_werror_flag" ||
19688 test ! -s conftest.err
19689 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019690 ac_cv_struct_sockaddr_storage=yes
19691else
Martin v. Löwis11437992002-04-12 09:54:03 +000019692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019693sed 's/^/| /' conftest.$ac_ext >&5
19694
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019696fi
19697
Martin v. Löwiseba40652007-08-30 20:10:57 +000019698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19699fi
19700
19701{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19702echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019703if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019704
19705cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019706#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019707_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019708
19709fi
19710
Guido van Rossum627b2d71993-12-24 10:39:16 +000019711# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019712
Michael W. Hudson54241132001-12-07 15:38:26 +000019713
Martin v. Löwiseba40652007-08-30 20:10:57 +000019714{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19715echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019716if test "${ac_cv_c_char_unsigned+set}" = set; then
19717 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019718else
Martin v. Löwis11437992002-04-12 09:54:03 +000019719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019720/* confdefs.h. */
19721_ACEOF
19722cat confdefs.h >>conftest.$ac_ext
19723cat >>conftest.$ac_ext <<_ACEOF
19724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019725$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019726int
19727main ()
19728{
19729static int test_array [1 - 2 * !(((char) -1) < 0)];
19730test_array [0] = 0
19731
19732 ;
19733 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019734}
Martin v. Löwis11437992002-04-12 09:54:03 +000019735_ACEOF
19736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019737if { (ac_try="$ac_compile"
19738case "(($ac_try" in
19739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19740 *) ac_try_echo=$ac_try;;
19741esac
19742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019745 grep -v '^ *+' conftest.er1 >conftest.err
19746 rm -f conftest.er1
19747 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019749 (exit $ac_status); } && {
19750 test -z "$ac_c_werror_flag" ||
19751 test ! -s conftest.err
19752 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019753 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019754else
19755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019756sed 's/^/| /' conftest.$ac_ext >&5
19757
Martin v. Löwiseba40652007-08-30 20:10:57 +000019758 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760
19761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19764echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019765if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019766 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019767#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019768_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019769
19770fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019771
Martin v. Löwiseba40652007-08-30 20:10:57 +000019772{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19773echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019774if test "${ac_cv_c_const+set}" = set; then
19775 echo $ECHO_N "(cached) $ECHO_C" >&6
19776else
19777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019778/* confdefs.h. */
19779_ACEOF
19780cat confdefs.h >>conftest.$ac_ext
19781cat >>conftest.$ac_ext <<_ACEOF
19782/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019783
Martin v. Löwis11437992002-04-12 09:54:03 +000019784int
19785main ()
19786{
19787/* FIXME: Include the comments suggested by Paul. */
19788#ifndef __cplusplus
19789 /* Ultrix mips cc rejects this. */
19790 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019791 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019793 char const *const *pcpcc;
19794 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019795 /* NEC SVR4.0.2 mips cc rejects this. */
19796 struct point {int x, y;};
19797 static struct point const zero = {0,0};
19798 /* AIX XL C 1.02.0.0 rejects this.
19799 It does not let you subtract one const X* pointer from another in
19800 an arm of an if-expression whose if-part is not a constant
19801 expression */
19802 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019803 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805 ++pcpcc;
19806 ppc = (char**) pcpcc;
19807 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 { /* SCO 3.2v4 cc rejects this. */
19809 char *t;
19810 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019811
Martin v. Löwis11437992002-04-12 09:54:03 +000019812 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019813 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019814 }
19815 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19816 int x[] = {25, 17};
19817 const int *foo = &x[0];
19818 ++foo;
19819 }
19820 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19821 typedef const int *iptr;
19822 iptr p = 0;
19823 ++p;
19824 }
19825 { /* AIX XL C 1.02.0.0 rejects this saying
19826 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19827 struct s { int j; const int *ap[3]; };
19828 struct s *b; b->j = 5;
19829 }
19830 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19831 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019832 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019833 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019835#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019836
Martin v. Löwis11437992002-04-12 09:54:03 +000019837 ;
19838 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019839}
Martin v. Löwis11437992002-04-12 09:54:03 +000019840_ACEOF
19841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019842if { (ac_try="$ac_compile"
19843case "(($ac_try" in
19844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19845 *) ac_try_echo=$ac_try;;
19846esac
19847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019850 grep -v '^ *+' conftest.er1 >conftest.err
19851 rm -f conftest.er1
19852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854 (exit $ac_status); } && {
19855 test -z "$ac_c_werror_flag" ||
19856 test ! -s conftest.err
19857 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019858 ac_cv_c_const=yes
19859else
Martin v. Löwis11437992002-04-12 09:54:03 +000019860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019861sed 's/^/| /' conftest.$ac_ext >&5
19862
Martin v. Löwiseba40652007-08-30 20:10:57 +000019863 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865
19866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19869echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019870if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019871
19872cat >>confdefs.h <<\_ACEOF
19873#define const
19874_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019875
19876fi
19877
Michael W. Hudson54241132001-12-07 15:38:26 +000019878
Guido van Rossumda88dad1995-01-26 00:46:29 +000019879works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019880{ echo "$as_me:$LINENO: checking for working volatile" >&5
19881echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019883/* confdefs.h. */
19884_ACEOF
19885cat confdefs.h >>conftest.$ac_ext
19886cat >>conftest.$ac_ext <<_ACEOF
19887/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019888
Martin v. Löwis11437992002-04-12 09:54:03 +000019889int
19890main ()
19891{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019892volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019893 ;
19894 return 0;
19895}
19896_ACEOF
19897rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898if { (ac_try="$ac_compile"
19899case "(($ac_try" in
19900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19901 *) ac_try_echo=$ac_try;;
19902esac
19903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019906 grep -v '^ *+' conftest.er1 >conftest.err
19907 rm -f conftest.er1
19908 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019910 (exit $ac_status); } && {
19911 test -z "$ac_c_werror_flag" ||
19912 test ! -s conftest.err
19913 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019914 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019915else
Martin v. Löwis11437992002-04-12 09:54:03 +000019916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019917sed 's/^/| /' conftest.$ac_ext >&5
19918
Martin v. Löwis11437992002-04-12 09:54:03 +000019919
19920cat >>confdefs.h <<\_ACEOF
19921#define volatile
19922_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019923
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019924
Guido van Rossum627b2d71993-12-24 10:39:16 +000019925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926
19927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19928{ echo "$as_me:$LINENO: result: $works" >&5
19929echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019930
Guido van Rossumda88dad1995-01-26 00:46:29 +000019931works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932{ echo "$as_me:$LINENO: checking for working signed char" >&5
19933echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019935/* confdefs.h. */
19936_ACEOF
19937cat confdefs.h >>conftest.$ac_ext
19938cat >>conftest.$ac_ext <<_ACEOF
19939/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019940
Martin v. Löwis11437992002-04-12 09:54:03 +000019941int
19942main ()
19943{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019944signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019945 ;
19946 return 0;
19947}
19948_ACEOF
19949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950if { (ac_try="$ac_compile"
19951case "(($ac_try" in
19952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19953 *) ac_try_echo=$ac_try;;
19954esac
19955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019958 grep -v '^ *+' conftest.er1 >conftest.err
19959 rm -f conftest.er1
19960 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019962 (exit $ac_status); } && {
19963 test -z "$ac_c_werror_flag" ||
19964 test ! -s conftest.err
19965 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019966 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019967else
Martin v. Löwis11437992002-04-12 09:54:03 +000019968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019969sed 's/^/| /' conftest.$ac_ext >&5
19970
Martin v. Löwis11437992002-04-12 09:54:03 +000019971
19972cat >>confdefs.h <<\_ACEOF
19973#define signed
19974_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019975
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019976
Guido van Rossum7f43da71994-08-01 12:15:30 +000019977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019978
19979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19980{ echo "$as_me:$LINENO: result: $works" >&5
19981echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019982
Guido van Rossumda88dad1995-01-26 00:46:29 +000019983have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984{ echo "$as_me:$LINENO: checking for prototypes" >&5
19985echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019987/* confdefs.h. */
19988_ACEOF
19989cat confdefs.h >>conftest.$ac_ext
19990cat >>conftest.$ac_ext <<_ACEOF
19991/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019992int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019993int
19994main ()
19995{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019996return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 ;
19998 return 0;
19999}
20000_ACEOF
20001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020002if { (ac_try="$ac_compile"
20003case "(($ac_try" in
20004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20005 *) ac_try_echo=$ac_try;;
20006esac
20007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020010 grep -v '^ *+' conftest.er1 >conftest.err
20011 rm -f conftest.er1
20012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020014 (exit $ac_status); } && {
20015 test -z "$ac_c_werror_flag" ||
20016 test ! -s conftest.err
20017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020018
20019
20020cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020021#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020022_ACEOF
20023
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020024 have_prototypes=yes
20025
Guido van Rossumf78abae1997-01-21 22:02:36 +000020026else
Martin v. Löwis11437992002-04-12 09:54:03 +000020027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020028sed 's/^/| /' conftest.$ac_ext >&5
20029
Martin v. Löwiseba40652007-08-30 20:10:57 +000020030
Guido van Rossum7f43da71994-08-01 12:15:30 +000020031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032
20033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20034{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20035echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020036
Guido van Rossumda88dad1995-01-26 00:46:29 +000020037works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20039echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020041/* confdefs.h. */
20042_ACEOF
20043cat confdefs.h >>conftest.$ac_ext
20044cat >>conftest.$ac_ext <<_ACEOF
20045/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020046
20047#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020048int foo(int x, ...) {
20049 va_list va;
20050 va_start(va, x);
20051 va_arg(va, int);
20052 va_arg(va, char *);
20053 va_arg(va, double);
20054 return 0;
20055}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020056
Martin v. Löwis11437992002-04-12 09:54:03 +000020057int
20058main ()
20059{
Guido van Rossum90eea071996-08-30 20:58:57 +000020060return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020061 ;
20062 return 0;
20063}
20064_ACEOF
20065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066if { (ac_try="$ac_compile"
20067case "(($ac_try" in
20068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20069 *) ac_try_echo=$ac_try;;
20070esac
20071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020074 grep -v '^ *+' conftest.er1 >conftest.err
20075 rm -f conftest.er1
20076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020078 (exit $ac_status); } && {
20079 test -z "$ac_c_werror_flag" ||
20080 test ! -s conftest.err
20081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020082
20083
20084cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020085#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020086_ACEOF
20087
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020088 works=yes
20089
Guido van Rossumf78abae1997-01-21 22:02:36 +000020090else
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020092sed 's/^/| /' conftest.$ac_ext >&5
20093
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094
Guido van Rossum627b2d71993-12-24 10:39:16 +000020095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020096
20097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20098{ echo "$as_me:$LINENO: result: $works" >&5
20099echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020100
Martin v. Löwisd6320502004-08-12 13:45:08 +000020101# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102{ echo "$as_me:$LINENO: checking for socketpair" >&5
20103echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020104cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020105/* confdefs.h. */
20106_ACEOF
20107cat confdefs.h >>conftest.$ac_ext
20108cat >>conftest.$ac_ext <<_ACEOF
20109/* end confdefs.h. */
20110
20111#include <sys/types.h>
20112#include <sys/socket.h>
20113
20114int
20115main ()
20116{
20117void *x=socketpair
20118 ;
20119 return 0;
20120}
20121_ACEOF
20122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123if { (ac_try="$ac_compile"
20124case "(($ac_try" in
20125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20126 *) ac_try_echo=$ac_try;;
20127esac
20128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020131 grep -v '^ *+' conftest.er1 >conftest.err
20132 rm -f conftest.er1
20133 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020135 (exit $ac_status); } && {
20136 test -z "$ac_c_werror_flag" ||
20137 test ! -s conftest.err
20138 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020139
20140cat >>confdefs.h <<\_ACEOF
20141#define HAVE_SOCKETPAIR 1
20142_ACEOF
20143
Martin v. Löwiseba40652007-08-30 20:10:57 +000020144 { echo "$as_me:$LINENO: result: yes" >&5
20145echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020146else
20147 echo "$as_me: failed program was:" >&5
20148sed 's/^/| /' conftest.$ac_ext >&5
20149
Martin v. Löwiseba40652007-08-30 20:10:57 +000020150 { echo "$as_me:$LINENO: result: no" >&5
20151echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020152
20153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020154
20155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020156
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020157# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020158{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20159echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020161/* confdefs.h. */
20162_ACEOF
20163cat confdefs.h >>conftest.$ac_ext
20164cat >>conftest.$ac_ext <<_ACEOF
20165/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020166#include <sys/types.h>
20167#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020168int
20169main ()
20170{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020171struct sockaddr x;
20172x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020173 ;
20174 return 0;
20175}
20176_ACEOF
20177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020178if { (ac_try="$ac_compile"
20179case "(($ac_try" in
20180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20181 *) ac_try_echo=$ac_try;;
20182esac
20183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020186 grep -v '^ *+' conftest.er1 >conftest.err
20187 rm -f conftest.er1
20188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020190 (exit $ac_status); } && {
20191 test -z "$ac_c_werror_flag" ||
20192 test ! -s conftest.err
20193 } && test -s conftest.$ac_objext; then
20194 { echo "$as_me:$LINENO: result: yes" >&5
20195echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020196
20197cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020198#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020199_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020200
20201else
Martin v. Löwis11437992002-04-12 09:54:03 +000020202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020203sed 's/^/| /' conftest.$ac_ext >&5
20204
Martin v. Löwiseba40652007-08-30 20:10:57 +000020205 { echo "$as_me:$LINENO: result: no" >&5
20206echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208
20209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020210
Guido van Rossumda88dad1995-01-26 00:46:29 +000020211va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20213echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020215/* confdefs.h. */
20216_ACEOF
20217cat confdefs.h >>conftest.$ac_ext
20218cat >>conftest.$ac_ext <<_ACEOF
20219/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020220
20221#ifdef HAVE_STDARG_PROTOTYPES
20222#include <stdarg.h>
20223#else
20224#include <varargs.h>
20225#endif
20226
Martin v. Löwis11437992002-04-12 09:54:03 +000020227int
20228main ()
20229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020230va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 ;
20232 return 0;
20233}
20234_ACEOF
20235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020236if { (ac_try="$ac_compile"
20237case "(($ac_try" in
20238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20239 *) ac_try_echo=$ac_try;;
20240esac
20241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020244 grep -v '^ *+' conftest.er1 >conftest.err
20245 rm -f conftest.er1
20246 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020248 (exit $ac_status); } && {
20249 test -z "$ac_c_werror_flag" ||
20250 test ! -s conftest.err
20251 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020252 :
20253else
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020255sed 's/^/| /' conftest.$ac_ext >&5
20256
Martin v. Löwis11437992002-04-12 09:54:03 +000020257
20258
20259cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020260#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020261_ACEOF
20262
Guido van Rossumda88dad1995-01-26 00:46:29 +000020263 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020264
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020266
20267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20268{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20269echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020270
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020271# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020272
20273
20274
Martin v. Löwiseba40652007-08-30 20:10:57 +000020275{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20276echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020277if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020279else
Martin v. Löwis11437992002-04-12 09:54:03 +000020280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020281/* confdefs.h. */
20282_ACEOF
20283cat confdefs.h >>conftest.$ac_ext
20284cat >>conftest.$ac_ext <<_ACEOF
20285/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020286/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20288#define gethostbyname_r innocuous_gethostbyname_r
20289
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020290/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020291 which can conflict with char gethostbyname_r (); below.
20292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020293 <limits.h> exists even on freestanding compilers. */
20294
20295#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020296# include <limits.h>
20297#else
20298# include <assert.h>
20299#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020300
20301#undef gethostbyname_r
20302
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303/* Override any GCC internal prototype to avoid an error.
20304 Use char because int might match the return type of a GCC
20305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020306#ifdef __cplusplus
20307extern "C"
20308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020309char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020310/* The GNU C library defines this for functions which it implements
20311 to always fail with ENOSYS. Some functions are actually named
20312 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020313#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020314choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020315#endif
20316
Skip Montanaro6dead952003-09-25 14:50:04 +000020317int
20318main ()
20319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 ;
20322 return 0;
20323}
20324_ACEOF
20325rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020326if { (ac_try="$ac_link"
20327case "(($ac_try" in
20328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20329 *) ac_try_echo=$ac_try;;
20330esac
20331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020334 grep -v '^ *+' conftest.er1 >conftest.err
20335 rm -f conftest.er1
20336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020338 (exit $ac_status); } && {
20339 test -z "$ac_c_werror_flag" ||
20340 test ! -s conftest.err
20341 } && test -s conftest$ac_exeext &&
20342 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020343 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020344else
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020346sed 's/^/| /' conftest.$ac_ext >&5
20347
Martin v. Löwiseba40652007-08-30 20:10:57 +000020348 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020350
20351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020352 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020354{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20355echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020356if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020357
Martin v. Löwis11437992002-04-12 09:54:03 +000020358 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020359#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020360_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020361
Martin v. Löwiseba40652007-08-30 20:10:57 +000020362 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20363echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020364 OLD_CFLAGS=$CFLAGS
20365 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020367/* confdefs.h. */
20368_ACEOF
20369cat confdefs.h >>conftest.$ac_ext
20370cat >>conftest.$ac_ext <<_ACEOF
20371/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020372
20373# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020374
Martin v. Löwis11437992002-04-12 09:54:03 +000020375int
20376main ()
20377{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020378
20379 char *name;
20380 struct hostent *he, *res;
20381 char buffer[2048];
20382 int buflen = 2048;
20383 int h_errnop;
20384
20385 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020386
20387 ;
20388 return 0;
20389}
20390_ACEOF
20391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020392if { (ac_try="$ac_compile"
20393case "(($ac_try" in
20394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395 *) ac_try_echo=$ac_try;;
20396esac
20397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020400 grep -v '^ *+' conftest.er1 >conftest.err
20401 rm -f conftest.er1
20402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020404 (exit $ac_status); } && {
20405 test -z "$ac_c_werror_flag" ||
20406 test ! -s conftest.err
20407 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020408
20409 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020410#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020411_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020412
Martin v. Löwis11437992002-04-12 09:54:03 +000020413
20414cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020415#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020416_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020417
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418 { echo "$as_me:$LINENO: result: yes" >&5
20419echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020421else
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020423sed 's/^/| /' conftest.$ac_ext >&5
20424
Martin v. Löwis11437992002-04-12 09:54:03 +000020425
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426 { echo "$as_me:$LINENO: result: no" >&5
20427echo "${ECHO_T}no" >&6; }
20428 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20429echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020431/* confdefs.h. */
20432_ACEOF
20433cat confdefs.h >>conftest.$ac_ext
20434cat >>conftest.$ac_ext <<_ACEOF
20435/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020436
20437# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020438
Martin v. Löwis11437992002-04-12 09:54:03 +000020439int
20440main ()
20441{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020442
20443 char *name;
20444 struct hostent *he;
20445 char buffer[2048];
20446 int buflen = 2048;
20447 int h_errnop;
20448
20449 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020450
20451 ;
20452 return 0;
20453}
20454_ACEOF
20455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456if { (ac_try="$ac_compile"
20457case "(($ac_try" in
20458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20459 *) ac_try_echo=$ac_try;;
20460esac
20461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020464 grep -v '^ *+' conftest.er1 >conftest.err
20465 rm -f conftest.er1
20466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020468 (exit $ac_status); } && {
20469 test -z "$ac_c_werror_flag" ||
20470 test ! -s conftest.err
20471 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020472
20473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020474#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020475_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020476
Martin v. Löwis11437992002-04-12 09:54:03 +000020477
20478cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020479#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020480_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020481
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482 { echo "$as_me:$LINENO: result: yes" >&5
20483echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020485else
Martin v. Löwis11437992002-04-12 09:54:03 +000020486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020487sed 's/^/| /' conftest.$ac_ext >&5
20488
Martin v. Löwis11437992002-04-12 09:54:03 +000020489
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490 { echo "$as_me:$LINENO: result: no" >&5
20491echo "${ECHO_T}no" >&6; }
20492 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20493echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020495/* confdefs.h. */
20496_ACEOF
20497cat confdefs.h >>conftest.$ac_ext
20498cat >>conftest.$ac_ext <<_ACEOF
20499/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020500
20501# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020502
Martin v. Löwis11437992002-04-12 09:54:03 +000020503int
20504main ()
20505{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020506
20507 char *name;
20508 struct hostent *he;
20509 struct hostent_data data;
20510
20511 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020512
20513 ;
20514 return 0;
20515}
20516_ACEOF
20517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020518if { (ac_try="$ac_compile"
20519case "(($ac_try" in
20520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20521 *) ac_try_echo=$ac_try;;
20522esac
20523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020526 grep -v '^ *+' conftest.er1 >conftest.err
20527 rm -f conftest.er1
20528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530 (exit $ac_status); } && {
20531 test -z "$ac_c_werror_flag" ||
20532 test ! -s conftest.err
20533 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020534
20535 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020536#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020537_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020538
Martin v. Löwis11437992002-04-12 09:54:03 +000020539
20540cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020541#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020542_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020543
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544 { echo "$as_me:$LINENO: result: yes" >&5
20545echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020547else
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020549sed 's/^/| /' conftest.$ac_ext >&5
20550
Martin v. Löwis11437992002-04-12 09:54:03 +000020551
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 { echo "$as_me:$LINENO: result: no" >&5
20553echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020556
20557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020558
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020560
20561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020564
20565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020566 CFLAGS=$OLD_CFLAGS
20567
20568else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020569
Martin v. Löwis11437992002-04-12 09:54:03 +000020570
20571for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020572do
Martin v. Löwis11437992002-04-12 09:54:03 +000020573as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020574{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20575echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20576if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020578else
Martin v. Löwis11437992002-04-12 09:54:03 +000020579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020580/* confdefs.h. */
20581_ACEOF
20582cat confdefs.h >>conftest.$ac_ext
20583cat >>conftest.$ac_ext <<_ACEOF
20584/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020585/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20586 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20587#define $ac_func innocuous_$ac_func
20588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020589/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020590 which can conflict with char $ac_func (); below.
20591 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020592 <limits.h> exists even on freestanding compilers. */
20593
20594#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020595# include <limits.h>
20596#else
20597# include <assert.h>
20598#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020599
20600#undef $ac_func
20601
Martin v. Löwiseba40652007-08-30 20:10:57 +000020602/* Override any GCC internal prototype to avoid an error.
20603 Use char because int might match the return type of a GCC
20604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020605#ifdef __cplusplus
20606extern "C"
20607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020608char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020609/* The GNU C library defines this for functions which it implements
20610 to always fail with ENOSYS. Some functions are actually named
20611 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020613choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020614#endif
20615
Skip Montanaro6dead952003-09-25 14:50:04 +000020616int
20617main ()
20618{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020619return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 ;
20621 return 0;
20622}
20623_ACEOF
20624rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625if { (ac_try="$ac_link"
20626case "(($ac_try" in
20627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20628 *) ac_try_echo=$ac_try;;
20629esac
20630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20631 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020633 grep -v '^ *+' conftest.er1 >conftest.err
20634 rm -f conftest.er1
20635 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637 (exit $ac_status); } && {
20638 test -z "$ac_c_werror_flag" ||
20639 test ! -s conftest.err
20640 } && test -s conftest$ac_exeext &&
20641 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020642 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020643else
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020645sed 's/^/| /' conftest.$ac_ext >&5
20646
Martin v. Löwiseba40652007-08-30 20:10:57 +000020647 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020649
20650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020651 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020653ac_res=`eval echo '${'$as_ac_var'}'`
20654 { echo "$as_me:$LINENO: result: $ac_res" >&5
20655echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020656if test `eval echo '${'$as_ac_var'}'` = yes; then
20657 cat >>confdefs.h <<_ACEOF
20658#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20659_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020660
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020661fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020662done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020663
Michael W. Hudson54241132001-12-07 15:38:26 +000020664
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020665fi
20666
Michael W. Hudson54241132001-12-07 15:38:26 +000020667
20668
20669
20670
20671
20672
Guido van Rossum627b2d71993-12-24 10:39:16 +000020673# checks for system services
20674# (none yet)
20675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020676# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20678echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020679if test "${ac_cv_func___fpu_control+set}" = set; then
20680 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020681else
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020683/* confdefs.h. */
20684_ACEOF
20685cat confdefs.h >>conftest.$ac_ext
20686cat >>conftest.$ac_ext <<_ACEOF
20687/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020688/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20689 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20690#define __fpu_control innocuous___fpu_control
20691
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020692/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020693 which can conflict with char __fpu_control (); below.
20694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020695 <limits.h> exists even on freestanding compilers. */
20696
20697#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020698# include <limits.h>
20699#else
20700# include <assert.h>
20701#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020702
20703#undef __fpu_control
20704
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705/* Override any GCC internal prototype to avoid an error.
20706 Use char because int might match the return type of a GCC
20707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020708#ifdef __cplusplus
20709extern "C"
20710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020711char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020712/* The GNU C library defines this for functions which it implements
20713 to always fail with ENOSYS. Some functions are actually named
20714 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020715#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020716choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020717#endif
20718
Skip Montanaro6dead952003-09-25 14:50:04 +000020719int
20720main ()
20721{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020723 ;
20724 return 0;
20725}
20726_ACEOF
20727rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020728if { (ac_try="$ac_link"
20729case "(($ac_try" in
20730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20731 *) ac_try_echo=$ac_try;;
20732esac
20733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020736 grep -v '^ *+' conftest.er1 >conftest.err
20737 rm -f conftest.er1
20738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020740 (exit $ac_status); } && {
20741 test -z "$ac_c_werror_flag" ||
20742 test ! -s conftest.err
20743 } && test -s conftest$ac_exeext &&
20744 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020745 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020746else
Martin v. Löwis11437992002-04-12 09:54:03 +000020747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020748sed 's/^/| /' conftest.$ac_ext >&5
20749
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020752
20753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020754 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020756{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20757echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020758if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020759 :
20760else
Martin v. Löwis11437992002-04-12 09:54:03 +000020761
Martin v. Löwiseba40652007-08-30 20:10:57 +000020762{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20763echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020764if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020766else
Martin v. Löwis11437992002-04-12 09:54:03 +000020767 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020768LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020770/* confdefs.h. */
20771_ACEOF
20772cat confdefs.h >>conftest.$ac_ext
20773cat >>conftest.$ac_ext <<_ACEOF
20774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020775
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776/* Override any GCC internal prototype to avoid an error.
20777 Use char because int might match the return type of a GCC
20778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020779#ifdef __cplusplus
20780extern "C"
20781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020782char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020783int
20784main ()
20785{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 ;
20788 return 0;
20789}
20790_ACEOF
20791rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792if { (ac_try="$ac_link"
20793case "(($ac_try" in
20794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20795 *) ac_try_echo=$ac_try;;
20796esac
20797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20798 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020800 grep -v '^ *+' conftest.er1 >conftest.err
20801 rm -f conftest.er1
20802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804 (exit $ac_status); } && {
20805 test -z "$ac_c_werror_flag" ||
20806 test ! -s conftest.err
20807 } && test -s conftest$ac_exeext &&
20808 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020810else
Martin v. Löwis11437992002-04-12 09:54:03 +000020811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020812sed 's/^/| /' conftest.$ac_ext >&5
20813
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816
20817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020819LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20822echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020823if test $ac_cv_lib_ieee___fpu_control = yes; then
20824 cat >>confdefs.h <<_ACEOF
20825#define HAVE_LIBIEEE 1
20826_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020827
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020828 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020829
Guido van Rossum627b2d71993-12-24 10:39:16 +000020830fi
20831
Michael W. Hudson54241132001-12-07 15:38:26 +000020832
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020833fi
20834
Michael W. Hudson54241132001-12-07 15:38:26 +000020835
Guido van Rossum7f253911997-05-09 02:42:48 +000020836# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20838echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020839
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020841if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020842 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020843if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020844then
20845
20846cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020847#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020848_ACEOF
20849
Martin v. Löwiseba40652007-08-30 20:10:57 +000020850 { echo "$as_me:$LINENO: result: yes" >&5
20851echo "${ECHO_T}yes" >&6; }
20852else { echo "$as_me:$LINENO: result: no" >&5
20853echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020854fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020855else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856 { echo "$as_me:$LINENO: result: no" >&5
20857echo "${ECHO_T}no" >&6; }
20858fi
20859
Guido van Rossum7f253911997-05-09 02:42:48 +000020860
Guido van Rossum7f43da71994-08-01 12:15:30 +000020861# check for --with-libm=...
20862
Guido van Rossum563e7081996-09-10 18:20:48 +000020863case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020864Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020865BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020866*) LIBM=-lm
20867esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20869echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020870
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020872if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020873 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020874if test "$withval" = no
20875then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20877echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020878elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020879then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020880 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20881echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020882else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20883echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20884 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020885fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020886else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020887 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20888echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20889fi
20890
Guido van Rossum7f43da71994-08-01 12:15:30 +000020891
20892# check for --with-libc=...
20893
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20895echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020896
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020898if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020900if test "$withval" = no
20901then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020902 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20903echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020904elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020905then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20907echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020908else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20909echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20910 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020911fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020912else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020913 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20914echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20915fi
20916
Guido van Rossum7f43da71994-08-01 12:15:30 +000020917
Christian Heimes0a8143f2007-12-18 23:22:54 +000020918# ************************************
20919# * Check for mathematical functions *
20920# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020921
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020922LIBS_SAVE=$LIBS
20923LIBS="$LIBS $LIBM"
20924
Mark Dickinson265d7382008-04-21 22:32:24 +000020925# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20926# -0. on some architectures.
20927{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20928echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20929if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20930 echo $ECHO_N "(cached) $ECHO_C" >&6
20931else
20932
20933if test "$cross_compiling" = yes; then
20934 ac_cv_tanh_preserves_zero_sign=no
20935else
20936 cat >conftest.$ac_ext <<_ACEOF
20937/* confdefs.h. */
20938_ACEOF
20939cat confdefs.h >>conftest.$ac_ext
20940cat >>conftest.$ac_ext <<_ACEOF
20941/* end confdefs.h. */
20942
20943#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020944#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000020945int main() {
20946 /* return 0 if either negative zeros don't exist
20947 on this platform or if negative zeros exist
20948 and tanh(-0.) == -0. */
20949 if (atan2(0., -1.) == atan2(-0., -1.) ||
20950 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
20951 else exit(1);
20952}
20953
20954_ACEOF
20955rm -f conftest$ac_exeext
20956if { (ac_try="$ac_link"
20957case "(($ac_try" in
20958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20959 *) ac_try_echo=$ac_try;;
20960esac
20961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20962 (eval "$ac_link") 2>&5
20963 ac_status=$?
20964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20966 { (case "(($ac_try" in
20967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20968 *) ac_try_echo=$ac_try;;
20969esac
20970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20971 (eval "$ac_try") 2>&5
20972 ac_status=$?
20973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20974 (exit $ac_status); }; }; then
20975 ac_cv_tanh_preserves_zero_sign=yes
20976else
20977 echo "$as_me: program exited with status $ac_status" >&5
20978echo "$as_me: failed program was:" >&5
20979sed 's/^/| /' conftest.$ac_ext >&5
20980
20981( exit $ac_status )
20982ac_cv_tanh_preserves_zero_sign=no
20983fi
20984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20985fi
20986
20987
20988fi
20989
20990{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
20991echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
20992if test "$ac_cv_tanh_preserves_zero_sign" = yes
20993then
20994
20995cat >>confdefs.h <<\_ACEOF
20996#define TANH_PRESERVES_ZERO_SIGN 1
20997_ACEOF
20998
20999fi
21000
Martin v. Löwis11437992002-04-12 09:54:03 +000021001
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021002for ac_func in hypot
21003do
Martin v. Löwis11437992002-04-12 09:54:03 +000021004as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21006echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21007if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021008 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021009else
Martin v. Löwis11437992002-04-12 09:54:03 +000021010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021011/* confdefs.h. */
21012_ACEOF
21013cat confdefs.h >>conftest.$ac_ext
21014cat >>conftest.$ac_ext <<_ACEOF
21015/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021016/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21017 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21018#define $ac_func innocuous_$ac_func
21019
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021020/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021021 which can conflict with char $ac_func (); below.
21022 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021023 <limits.h> exists even on freestanding compilers. */
21024
21025#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021026# include <limits.h>
21027#else
21028# include <assert.h>
21029#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021030
21031#undef $ac_func
21032
Martin v. Löwiseba40652007-08-30 20:10:57 +000021033/* Override any GCC internal prototype to avoid an error.
21034 Use char because int might match the return type of a GCC
21035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021036#ifdef __cplusplus
21037extern "C"
21038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021039char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021040/* The GNU C library defines this for functions which it implements
21041 to always fail with ENOSYS. Some functions are actually named
21042 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021043#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021044choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021045#endif
21046
Skip Montanaro6dead952003-09-25 14:50:04 +000021047int
21048main ()
21049{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021050return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021051 ;
21052 return 0;
21053}
21054_ACEOF
21055rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021056if { (ac_try="$ac_link"
21057case "(($ac_try" in
21058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21059 *) ac_try_echo=$ac_try;;
21060esac
21061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21062 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021064 grep -v '^ *+' conftest.er1 >conftest.err
21065 rm -f conftest.er1
21066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021068 (exit $ac_status); } && {
21069 test -z "$ac_c_werror_flag" ||
21070 test ! -s conftest.err
21071 } && test -s conftest$ac_exeext &&
21072 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021073 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021074else
Martin v. Löwis11437992002-04-12 09:54:03 +000021075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021076sed 's/^/| /' conftest.$ac_ext >&5
21077
Martin v. Löwiseba40652007-08-30 20:10:57 +000021078 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021080
21081rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021082 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021084ac_res=`eval echo '${'$as_ac_var'}'`
21085 { echo "$as_me:$LINENO: result: $ac_res" >&5
21086echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021087if test `eval echo '${'$as_ac_var'}'` = yes; then
21088 cat >>confdefs.h <<_ACEOF
21089#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21090_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021091
Michael W. Hudson54241132001-12-07 15:38:26 +000021092else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021093 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021094 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021095 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21096 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021097esac
21098
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021099fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021100done
21101
Michael W. Hudson54241132001-12-07 15:38:26 +000021102
Christian Heimes0a8143f2007-12-18 23:22:54 +000021103
21104
21105
21106
21107
Christian Heimes48723512008-01-20 14:28:28 +000021108
21109
21110
21111
21112
21113for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021114do
21115as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21116{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21117echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21118if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21119 echo $ECHO_N "(cached) $ECHO_C" >&6
21120else
21121 cat >conftest.$ac_ext <<_ACEOF
21122/* confdefs.h. */
21123_ACEOF
21124cat confdefs.h >>conftest.$ac_ext
21125cat >>conftest.$ac_ext <<_ACEOF
21126/* end confdefs.h. */
21127/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21128 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21129#define $ac_func innocuous_$ac_func
21130
21131/* System header to define __stub macros and hopefully few prototypes,
21132 which can conflict with char $ac_func (); below.
21133 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21134 <limits.h> exists even on freestanding compilers. */
21135
21136#ifdef __STDC__
21137# include <limits.h>
21138#else
21139# include <assert.h>
21140#endif
21141
21142#undef $ac_func
21143
21144/* Override any GCC internal prototype to avoid an error.
21145 Use char because int might match the return type of a GCC
21146 builtin and then its argument prototype would still apply. */
21147#ifdef __cplusplus
21148extern "C"
21149#endif
21150char $ac_func ();
21151/* The GNU C library defines this for functions which it implements
21152 to always fail with ENOSYS. Some functions are actually named
21153 something starting with __ and the normal name is an alias. */
21154#if defined __stub_$ac_func || defined __stub___$ac_func
21155choke me
21156#endif
21157
21158int
21159main ()
21160{
21161return $ac_func ();
21162 ;
21163 return 0;
21164}
21165_ACEOF
21166rm -f conftest.$ac_objext conftest$ac_exeext
21167if { (ac_try="$ac_link"
21168case "(($ac_try" in
21169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21170 *) ac_try_echo=$ac_try;;
21171esac
21172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21173 (eval "$ac_link") 2>conftest.er1
21174 ac_status=$?
21175 grep -v '^ *+' conftest.er1 >conftest.err
21176 rm -f conftest.er1
21177 cat conftest.err >&5
21178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21179 (exit $ac_status); } && {
21180 test -z "$ac_c_werror_flag" ||
21181 test ! -s conftest.err
21182 } && test -s conftest$ac_exeext &&
21183 $as_test_x conftest$ac_exeext; then
21184 eval "$as_ac_var=yes"
21185else
21186 echo "$as_me: failed program was:" >&5
21187sed 's/^/| /' conftest.$ac_ext >&5
21188
21189 eval "$as_ac_var=no"
21190fi
21191
21192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21193 conftest$ac_exeext conftest.$ac_ext
21194fi
21195ac_res=`eval echo '${'$as_ac_var'}'`
21196 { echo "$as_me:$LINENO: result: $ac_res" >&5
21197echo "${ECHO_T}$ac_res" >&6; }
21198if test `eval echo '${'$as_ac_var'}'` = yes; then
21199 cat >>confdefs.h <<_ACEOF
21200#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21201_ACEOF
21202
21203fi
21204done
21205
21206
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021207LIBS=$LIBS_SAVE
21208
Guido van Rossumef2255b2000-03-10 22:30:29 +000021209# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021210if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021211 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21212echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021213if test "${ac_cv_header_wchar_h+set}" = set; then
21214 echo $ECHO_N "(cached) $ECHO_C" >&6
21215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021216{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21217echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021218else
Martin v. Löwis11437992002-04-12 09:54:03 +000021219 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21221echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021223/* confdefs.h. */
21224_ACEOF
21225cat confdefs.h >>conftest.$ac_ext
21226cat >>conftest.$ac_ext <<_ACEOF
21227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021228$ac_includes_default
21229#include <wchar.h>
21230_ACEOF
21231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021232if { (ac_try="$ac_compile"
21233case "(($ac_try" in
21234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21235 *) ac_try_echo=$ac_try;;
21236esac
21237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021240 grep -v '^ *+' conftest.er1 >conftest.err
21241 rm -f conftest.er1
21242 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244 (exit $ac_status); } && {
21245 test -z "$ac_c_werror_flag" ||
21246 test ! -s conftest.err
21247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021248 ac_header_compiler=yes
21249else
21250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021251sed 's/^/| /' conftest.$ac_ext >&5
21252
Martin v. Löwiseba40652007-08-30 20:10:57 +000021253 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021255
21256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21257{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21258echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021259
21260# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021261{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21262echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021264/* confdefs.h. */
21265_ACEOF
21266cat confdefs.h >>conftest.$ac_ext
21267cat >>conftest.$ac_ext <<_ACEOF
21268/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021269#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021270_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021271if { (ac_try="$ac_cpp conftest.$ac_ext"
21272case "(($ac_try" in
21273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21274 *) ac_try_echo=$ac_try;;
21275esac
21276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21277 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021279 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021280 rm -f conftest.er1
21281 cat conftest.err >&5
21282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021283 (exit $ac_status); } >/dev/null && {
21284 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21285 test ! -s conftest.err
21286 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 ac_header_preproc=yes
21288else
21289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021290sed 's/^/| /' conftest.$ac_ext >&5
21291
Martin v. Löwis11437992002-04-12 09:54:03 +000021292 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021294
Martin v. Löwis11437992002-04-12 09:54:03 +000021295rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021296{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21297echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021298
21299# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021300case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21301 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021302 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21303echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021304 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21305echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21306 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021307 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021309 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21310echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021311 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21312echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21313 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21314echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21315 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21316echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021317 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21318echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021319 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21320echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021322## ------------------------------------------------ ##
21323## Report this to http://www.python.org/python-bugs ##
21324## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021325_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021327 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021328esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021329{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21330echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021331if test "${ac_cv_header_wchar_h+set}" = set; then
21332 echo $ECHO_N "(cached) $ECHO_C" >&6
21333else
21334 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021336{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21337echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021338
21339fi
21340if test $ac_cv_header_wchar_h = yes; then
21341
21342
21343cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021344#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021345_ACEOF
21346
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021347 wchar_h="yes"
21348
Guido van Rossumef2255b2000-03-10 22:30:29 +000021349else
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021351
21352fi
21353
Michael W. Hudson54241132001-12-07 15:38:26 +000021354
Martin v. Löwis11437992002-04-12 09:54:03 +000021355
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021356# determine wchar_t size
21357if test "$wchar_h" = yes
21358then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21360echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021361if test "${ac_cv_type_wchar_t+set}" = set; then
21362 echo $ECHO_N "(cached) $ECHO_C" >&6
21363else
21364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021365/* confdefs.h. */
21366_ACEOF
21367cat confdefs.h >>conftest.$ac_ext
21368cat >>conftest.$ac_ext <<_ACEOF
21369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021370#include <wchar.h>
21371
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021373int
21374main ()
21375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021377 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 return 0;
21380 ;
21381 return 0;
21382}
21383_ACEOF
21384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385if { (ac_try="$ac_compile"
21386case "(($ac_try" in
21387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21388 *) ac_try_echo=$ac_try;;
21389esac
21390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021393 grep -v '^ *+' conftest.er1 >conftest.err
21394 rm -f conftest.er1
21395 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021397 (exit $ac_status); } && {
21398 test -z "$ac_c_werror_flag" ||
21399 test ! -s conftest.err
21400 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 ac_cv_type_wchar_t=yes
21402else
21403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021404sed 's/^/| /' conftest.$ac_ext >&5
21405
Martin v. Löwiseba40652007-08-30 20:10:57 +000021406 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021407fi
Brett Cannon19fab762007-06-02 03:02:29 +000021408
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21410fi
21411{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21412echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21413
21414# The cast to long int works around a bug in the HP C Compiler
21415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21417# This bug is HP SR number 8606223364.
21418{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21419echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021420if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21421 echo $ECHO_N "(cached) $ECHO_C" >&6
21422else
Martin v. Löwis11437992002-04-12 09:54:03 +000021423 if test "$cross_compiling" = yes; then
21424 # Depending upon the size, compute the lo and hi bounds.
21425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021426/* confdefs.h. */
21427_ACEOF
21428cat confdefs.h >>conftest.$ac_ext
21429cat >>conftest.$ac_ext <<_ACEOF
21430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021431#include <wchar.h>
21432
Martin v. Löwiseba40652007-08-30 20:10:57 +000021433 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021434int
21435main ()
21436{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021438test_array [0] = 0
21439
21440 ;
21441 return 0;
21442}
21443_ACEOF
21444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021445if { (ac_try="$ac_compile"
21446case "(($ac_try" in
21447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21448 *) ac_try_echo=$ac_try;;
21449esac
21450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021453 grep -v '^ *+' conftest.er1 >conftest.err
21454 rm -f conftest.er1
21455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457 (exit $ac_status); } && {
21458 test -z "$ac_c_werror_flag" ||
21459 test ! -s conftest.err
21460 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021461 ac_lo=0 ac_mid=0
21462 while :; do
21463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021464/* confdefs.h. */
21465_ACEOF
21466cat confdefs.h >>conftest.$ac_ext
21467cat >>conftest.$ac_ext <<_ACEOF
21468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021469#include <wchar.h>
21470
Martin v. Löwiseba40652007-08-30 20:10:57 +000021471 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021472int
21473main ()
21474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021476test_array [0] = 0
21477
21478 ;
21479 return 0;
21480}
21481_ACEOF
21482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483if { (ac_try="$ac_compile"
21484case "(($ac_try" in
21485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21486 *) ac_try_echo=$ac_try;;
21487esac
21488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021491 grep -v '^ *+' conftest.er1 >conftest.err
21492 rm -f conftest.er1
21493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 (exit $ac_status); } && {
21496 test -z "$ac_c_werror_flag" ||
21497 test ! -s conftest.err
21498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_hi=$ac_mid; break
21500else
21501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021502sed 's/^/| /' conftest.$ac_ext >&5
21503
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 ac_lo=`expr $ac_mid + 1`
21505 if test $ac_lo -le $ac_mid; then
21506 ac_lo= ac_hi=
21507 break
21508 fi
21509 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511
21512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021513 done
21514else
21515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021516sed 's/^/| /' conftest.$ac_ext >&5
21517
Martin v. Löwiseba40652007-08-30 20:10:57 +000021518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021519/* confdefs.h. */
21520_ACEOF
21521cat confdefs.h >>conftest.$ac_ext
21522cat >>conftest.$ac_ext <<_ACEOF
21523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021524#include <wchar.h>
21525
Martin v. Löwiseba40652007-08-30 20:10:57 +000021526 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021527int
21528main ()
21529{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021530static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021531test_array [0] = 0
21532
21533 ;
21534 return 0;
21535}
21536_ACEOF
21537rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021538if { (ac_try="$ac_compile"
21539case "(($ac_try" in
21540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21541 *) ac_try_echo=$ac_try;;
21542esac
21543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021546 grep -v '^ *+' conftest.er1 >conftest.err
21547 rm -f conftest.er1
21548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550 (exit $ac_status); } && {
21551 test -z "$ac_c_werror_flag" ||
21552 test ! -s conftest.err
21553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021554 ac_hi=-1 ac_mid=-1
21555 while :; do
21556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021557/* confdefs.h. */
21558_ACEOF
21559cat confdefs.h >>conftest.$ac_ext
21560cat >>conftest.$ac_ext <<_ACEOF
21561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021562#include <wchar.h>
21563
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021565int
21566main ()
21567{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021568static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021569test_array [0] = 0
21570
21571 ;
21572 return 0;
21573}
21574_ACEOF
21575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021576if { (ac_try="$ac_compile"
21577case "(($ac_try" in
21578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21579 *) ac_try_echo=$ac_try;;
21580esac
21581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021584 grep -v '^ *+' conftest.er1 >conftest.err
21585 rm -f conftest.er1
21586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021588 (exit $ac_status); } && {
21589 test -z "$ac_c_werror_flag" ||
21590 test ! -s conftest.err
21591 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021592 ac_lo=$ac_mid; break
21593else
21594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021595sed 's/^/| /' conftest.$ac_ext >&5
21596
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597 ac_hi=`expr '(' $ac_mid ')' - 1`
21598 if test $ac_mid -le $ac_hi; then
21599 ac_lo= ac_hi=
21600 break
21601 fi
21602 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021604
21605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021606 done
21607else
21608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021609sed 's/^/| /' conftest.$ac_ext >&5
21610
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613
21614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021616
21617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021618# Binary search between lo and hi bounds.
21619while test "x$ac_lo" != "x$ac_hi"; do
21620 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021622/* confdefs.h. */
21623_ACEOF
21624cat confdefs.h >>conftest.$ac_ext
21625cat >>conftest.$ac_ext <<_ACEOF
21626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021627#include <wchar.h>
21628
Martin v. Löwiseba40652007-08-30 20:10:57 +000021629 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021630int
21631main ()
21632{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021634test_array [0] = 0
21635
21636 ;
21637 return 0;
21638}
21639_ACEOF
21640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641if { (ac_try="$ac_compile"
21642case "(($ac_try" in
21643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21644 *) ac_try_echo=$ac_try;;
21645esac
21646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021649 grep -v '^ *+' conftest.er1 >conftest.err
21650 rm -f conftest.er1
21651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653 (exit $ac_status); } && {
21654 test -z "$ac_c_werror_flag" ||
21655 test ! -s conftest.err
21656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 ac_hi=$ac_mid
21658else
21659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021660sed 's/^/| /' conftest.$ac_ext >&5
21661
Martin v. Löwiseba40652007-08-30 20:10:57 +000021662 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021664
21665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021666done
21667case $ac_lo in
21668?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021669'') if test "$ac_cv_type_wchar_t" = yes; then
21670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021671See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021673See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674 { (exit 77); exit 77; }; }
21675 else
21676 ac_cv_sizeof_wchar_t=0
21677 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021678esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021679else
Martin v. Löwis11437992002-04-12 09:54:03 +000021680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021681/* confdefs.h. */
21682_ACEOF
21683cat confdefs.h >>conftest.$ac_ext
21684cat >>conftest.$ac_ext <<_ACEOF
21685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021686#include <wchar.h>
21687
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688 typedef wchar_t ac__type_sizeof_;
21689static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21690static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021691#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021692#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021693int
21694main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021695{
Martin v. Löwis11437992002-04-12 09:54:03 +000021696
21697 FILE *f = fopen ("conftest.val", "w");
21698 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699 return 1;
21700 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021701 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021702 long int i = longval ();
21703 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21704 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 fprintf (f, "%ld\n", i);
21706 }
21707 else
21708 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709 unsigned long int i = ulongval ();
21710 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21711 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 fprintf (f, "%lu\n", i);
21713 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021715
21716 ;
21717 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021718}
Martin v. Löwis11437992002-04-12 09:54:03 +000021719_ACEOF
21720rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721if { (ac_try="$ac_link"
21722case "(($ac_try" in
21723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21724 *) ac_try_echo=$ac_try;;
21725esac
21726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21727 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021728 ac_status=$?
21729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021731 { (case "(($ac_try" in
21732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21733 *) ac_try_echo=$ac_try;;
21734esac
21735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021737 ac_status=$?
21738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21739 (exit $ac_status); }; }; then
21740 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021741else
Martin v. Löwis11437992002-04-12 09:54:03 +000021742 echo "$as_me: program exited with status $ac_status" >&5
21743echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021744sed 's/^/| /' conftest.$ac_ext >&5
21745
Martin v. Löwis11437992002-04-12 09:54:03 +000021746( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021747if test "$ac_cv_type_wchar_t" = yes; then
21748 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021749See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021750echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021751See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752 { (exit 77); exit 77; }; }
21753 else
21754 ac_cv_sizeof_wchar_t=0
21755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757rm -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 +000021758fi
21759rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021761{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21762echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21763
21764
21765
Martin v. Löwis11437992002-04-12 09:54:03 +000021766cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021767#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021768_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021769
Michael W. Hudson54241132001-12-07 15:38:26 +000021770
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021771fi
21772
Martin v. Löwiseba40652007-08-30 20:10:57 +000021773{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21774echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021775have_ucs4_tcl=no
21776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021777/* confdefs.h. */
21778_ACEOF
21779cat confdefs.h >>conftest.$ac_ext
21780cat >>conftest.$ac_ext <<_ACEOF
21781/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021782
21783#include <tcl.h>
21784#if TCL_UTF_MAX != 6
21785# error "NOT UCS4_TCL"
21786#endif
21787int
21788main ()
21789{
21790
21791 ;
21792 return 0;
21793}
21794_ACEOF
21795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021796if { (ac_try="$ac_compile"
21797case "(($ac_try" in
21798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21799 *) ac_try_echo=$ac_try;;
21800esac
21801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021804 grep -v '^ *+' conftest.er1 >conftest.err
21805 rm -f conftest.er1
21806 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021808 (exit $ac_status); } && {
21809 test -z "$ac_c_werror_flag" ||
21810 test ! -s conftest.err
21811 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021812
21813
21814cat >>confdefs.h <<\_ACEOF
21815#define HAVE_UCS4_TCL 1
21816_ACEOF
21817
21818 have_ucs4_tcl=yes
21819
21820else
21821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021822sed 's/^/| /' conftest.$ac_ext >&5
21823
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021826
21827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21828{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21829echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021830
Skip Montanaro6dead952003-09-25 14:50:04 +000021831# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021832if test "$wchar_h" = yes
21833then
21834 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021835 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21836echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021837 if test "${ac_cv_wchar_t_signed+set}" = set; then
21838 echo $ECHO_N "(cached) $ECHO_C" >&6
21839else
21840
21841 if test "$cross_compiling" = yes; then
21842 ac_cv_wchar_t_signed=yes
21843else
21844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021845/* confdefs.h. */
21846_ACEOF
21847cat confdefs.h >>conftest.$ac_ext
21848cat >>conftest.$ac_ext <<_ACEOF
21849/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021850
21851 #include <wchar.h>
21852 int main()
21853 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021854 /* Success: exit code 0 */
21855 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021856 }
21857
21858_ACEOF
21859rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860if { (ac_try="$ac_link"
21861case "(($ac_try" in
21862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21863 *) ac_try_echo=$ac_try;;
21864esac
21865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21866 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021867 ac_status=$?
21868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021870 { (case "(($ac_try" in
21871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21872 *) ac_try_echo=$ac_try;;
21873esac
21874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21875 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021876 ac_status=$?
21877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21878 (exit $ac_status); }; }; then
21879 ac_cv_wchar_t_signed=yes
21880else
21881 echo "$as_me: program exited with status $ac_status" >&5
21882echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021883sed 's/^/| /' conftest.$ac_ext >&5
21884
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021885( exit $ac_status )
21886ac_cv_wchar_t_signed=no
21887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888rm -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 +000021889fi
21890
Martin v. Löwiseba40652007-08-30 20:10:57 +000021891
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021892fi
21893
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21895echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21896fi
21897
21898{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21899echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21900# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021901if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021903else
21904 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021905fi
21906
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021907
21908if test $enable_unicode = yes
21909then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021910 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021911 case "$have_ucs4_tcl" in
21912 yes) enable_unicode="ucs4"
21913 ;;
21914 *) enable_unicode="ucs2"
21915 ;;
21916 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021917fi
21918
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021919
21920
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021921case "$enable_unicode" in
21922ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021923 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021924#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021925_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021926
21927 ;;
21928ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021929 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021930#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021931_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021932
21933 ;;
21934esac
21935
Michael W. Hudson54241132001-12-07 15:38:26 +000021936
Martin v. Löwis11437992002-04-12 09:54:03 +000021937
21938
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021939
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021940if test "$enable_unicode" = "no"
21941then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021942 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021943 { echo "$as_me:$LINENO: result: not used" >&5
21944echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021945else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021946 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021947
21948cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021949#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021950_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021951
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021952
21953 # wchar_t is only usable if it maps to an unsigned type
21954 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021955 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021956 then
21957 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021958
Martin v. Löwis11437992002-04-12 09:54:03 +000021959cat >>confdefs.h <<\_ACEOF
21960#define HAVE_USABLE_WCHAR_T 1
21961_ACEOF
21962
21963 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021964#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021965_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021966
21967 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21968 then
21969 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021970 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021971#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021972_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021973
21974 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21975 then
21976 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021978#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021979_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021980
21981 else
21982 PY_UNICODE_TYPE="no type found"
21983 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021984 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21985echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021986fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021987
21988# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21990echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021991if test "${ac_cv_c_bigendian+set}" = set; then
21992 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021993else
Martin v. Löwis11437992002-04-12 09:54:03 +000021994 # See if sys/param.h defines the BYTE_ORDER macro.
21995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021996/* confdefs.h. */
21997_ACEOF
21998cat confdefs.h >>conftest.$ac_ext
21999cat >>conftest.$ac_ext <<_ACEOF
22000/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022001#include <sys/types.h>
22002#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022003
Martin v. Löwis11437992002-04-12 09:54:03 +000022004int
22005main ()
22006{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22008 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022009 bogus endian macros
22010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022011
22012 ;
22013 return 0;
22014}
22015_ACEOF
22016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022017if { (ac_try="$ac_compile"
22018case "(($ac_try" in
22019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22020 *) ac_try_echo=$ac_try;;
22021esac
22022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022025 grep -v '^ *+' conftest.er1 >conftest.err
22026 rm -f conftest.er1
22027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022029 (exit $ac_status); } && {
22030 test -z "$ac_c_werror_flag" ||
22031 test ! -s conftest.err
22032 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022033 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022035/* confdefs.h. */
22036_ACEOF
22037cat confdefs.h >>conftest.$ac_ext
22038cat >>conftest.$ac_ext <<_ACEOF
22039/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022040#include <sys/types.h>
22041#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022042
Martin v. Löwis11437992002-04-12 09:54:03 +000022043int
22044main ()
22045{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022046#if BYTE_ORDER != BIG_ENDIAN
22047 not big endian
22048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022049
22050 ;
22051 return 0;
22052}
22053_ACEOF
22054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022055if { (ac_try="$ac_compile"
22056case "(($ac_try" in
22057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22058 *) ac_try_echo=$ac_try;;
22059esac
22060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022063 grep -v '^ *+' conftest.er1 >conftest.err
22064 rm -f conftest.er1
22065 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 (exit $ac_status); } && {
22068 test -z "$ac_c_werror_flag" ||
22069 test ! -s conftest.err
22070 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022071 ac_cv_c_bigendian=yes
22072else
Martin v. Löwis11437992002-04-12 09:54:03 +000022073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022074sed 's/^/| /' conftest.$ac_ext >&5
22075
Martin v. Löwiseba40652007-08-30 20:10:57 +000022076 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022078
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022080else
Martin v. Löwis11437992002-04-12 09:54:03 +000022081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022082sed 's/^/| /' conftest.$ac_ext >&5
22083
Martin v. Löwiseba40652007-08-30 20:10:57 +000022084 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022085if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022086 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022087 ac_cv_c_bigendian=unknown
22088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022089/* confdefs.h. */
22090_ACEOF
22091cat confdefs.h >>conftest.$ac_ext
22092cat >>conftest.$ac_ext <<_ACEOF
22093/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022094short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22095short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022096void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022097short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22098short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022099void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022100int
22101main ()
22102{
22103 _ascii (); _ebcdic ();
22104 ;
22105 return 0;
22106}
22107_ACEOF
22108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022109if { (ac_try="$ac_compile"
22110case "(($ac_try" in
22111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22112 *) ac_try_echo=$ac_try;;
22113esac
22114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022117 grep -v '^ *+' conftest.er1 >conftest.err
22118 rm -f conftest.er1
22119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022121 (exit $ac_status); } && {
22122 test -z "$ac_c_werror_flag" ||
22123 test ! -s conftest.err
22124 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022125 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022126 ac_cv_c_bigendian=yes
22127fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022128if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 if test "$ac_cv_c_bigendian" = unknown; then
22130 ac_cv_c_bigendian=no
22131 else
22132 # finding both strings is unlikely to happen, but who knows?
22133 ac_cv_c_bigendian=unknown
22134 fi
22135fi
22136else
22137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022138sed 's/^/| /' conftest.$ac_ext >&5
22139
Martin v. Löwiseba40652007-08-30 20:10:57 +000022140
Martin v. Löwis11437992002-04-12 09:54:03 +000022141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142
22143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022144else
22145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022146/* confdefs.h. */
22147_ACEOF
22148cat confdefs.h >>conftest.$ac_ext
22149cat >>conftest.$ac_ext <<_ACEOF
22150/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022152int
22153main ()
22154{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022155
Guido van Rossumef2255b2000-03-10 22:30:29 +000022156 /* Are we little or big endian? From Harbison&Steele. */
22157 union
22158 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022159 long int l;
22160 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022161 } u;
22162 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163 return u.c[sizeof (long int) - 1] == 1;
22164
22165 ;
22166 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022167}
Martin v. Löwis11437992002-04-12 09:54:03 +000022168_ACEOF
22169rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170if { (ac_try="$ac_link"
22171case "(($ac_try" in
22172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22173 *) ac_try_echo=$ac_try;;
22174esac
22175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22176 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022177 ac_status=$?
22178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022180 { (case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
22184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22185 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022186 ac_status=$?
22187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22188 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022189 ac_cv_c_bigendian=no
22190else
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 echo "$as_me: program exited with status $ac_status" >&5
22192echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022193sed 's/^/| /' conftest.$ac_ext >&5
22194
Martin v. Löwis11437992002-04-12 09:54:03 +000022195( exit $ac_status )
22196ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022198rm -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 +000022199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022200
22201
Martin v. Löwis11437992002-04-12 09:54:03 +000022202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022203
22204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022206{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22207echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022208case $ac_cv_c_bigendian in
22209 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022210
Martin v. Löwis11437992002-04-12 09:54:03 +000022211cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022212#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022213_ACEOF
22214 ;;
22215 no)
22216 ;;
22217 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022218 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022219presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022220echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022221presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22222 { (exit 1); exit 1; }; } ;;
22223esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022224
Michael W. Hudson54241132001-12-07 15:38:26 +000022225
Ronald Oussoren988117f2006-04-29 11:31:35 +000022226
22227
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022228# Check whether right shifting a negative integer extends the sign bit
22229# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022230{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22231echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022232if test "${ac_cv_rshift_extends_sign+set}" = set; then
22233 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022234else
Martin v. Löwis11437992002-04-12 09:54:03 +000022235
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022236if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022237 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022238else
Martin v. Löwis11437992002-04-12 09:54:03 +000022239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022240/* confdefs.h. */
22241_ACEOF
22242cat confdefs.h >>conftest.$ac_ext
22243cat >>conftest.$ac_ext <<_ACEOF
22244/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022245
22246int main()
22247{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022248 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022249}
22250
Martin v. Löwis11437992002-04-12 09:54:03 +000022251_ACEOF
22252rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022253if { (ac_try="$ac_link"
22254case "(($ac_try" in
22255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22256 *) ac_try_echo=$ac_try;;
22257esac
22258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22259 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022260 ac_status=$?
22261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022263 { (case "(($ac_try" in
22264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22265 *) ac_try_echo=$ac_try;;
22266esac
22267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22268 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ac_status=$?
22270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22271 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022272 ac_cv_rshift_extends_sign=yes
22273else
Martin v. Löwis11437992002-04-12 09:54:03 +000022274 echo "$as_me: program exited with status $ac_status" >&5
22275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022276sed 's/^/| /' conftest.$ac_ext >&5
22277
Martin v. Löwis11437992002-04-12 09:54:03 +000022278( exit $ac_status )
22279ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022281rm -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 +000022282fi
22283
Martin v. Löwiseba40652007-08-30 20:10:57 +000022284
22285fi
22286
22287{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22288echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022289if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022290then
Martin v. Löwis11437992002-04-12 09:54:03 +000022291
22292cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022293#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022294_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022295
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022296fi
22297
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022298# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022299{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22300echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022301if test "${ac_cv_have_getc_unlocked+set}" = set; then
22302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022303else
Martin v. Löwis11437992002-04-12 09:54:03 +000022304
22305cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022306/* confdefs.h. */
22307_ACEOF
22308cat confdefs.h >>conftest.$ac_ext
22309cat >>conftest.$ac_ext <<_ACEOF
22310/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022311#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022312int
22313main ()
22314{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022315
22316 FILE *f = fopen("/dev/null", "r");
22317 flockfile(f);
22318 getc_unlocked(f);
22319 funlockfile(f);
22320
Martin v. Löwis11437992002-04-12 09:54:03 +000022321 ;
22322 return 0;
22323}
22324_ACEOF
22325rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022326if { (ac_try="$ac_link"
22327case "(($ac_try" in
22328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22329 *) ac_try_echo=$ac_try;;
22330esac
22331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022334 grep -v '^ *+' conftest.er1 >conftest.err
22335 rm -f conftest.er1
22336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022338 (exit $ac_status); } && {
22339 test -z "$ac_c_werror_flag" ||
22340 test ! -s conftest.err
22341 } && test -s conftest$ac_exeext &&
22342 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022343 ac_cv_have_getc_unlocked=yes
22344else
Martin v. Löwis11437992002-04-12 09:54:03 +000022345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022346sed 's/^/| /' conftest.$ac_ext >&5
22347
Martin v. Löwiseba40652007-08-30 20:10:57 +000022348 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022350
22351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022352 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022353fi
22354
Martin v. Löwiseba40652007-08-30 20:10:57 +000022355{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22356echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022357if test "$ac_cv_have_getc_unlocked" = yes
22358then
Martin v. Löwis11437992002-04-12 09:54:03 +000022359
22360cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022361#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022362_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022363
22364fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022365
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022366# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022367# save the value of LIBS so we don't actually link Python with readline
22368LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022369
Martin v. Löwiseba40652007-08-30 20:10:57 +000022370{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22371echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022372if test "${ac_cv_lib_readline_readline+set}" = set; then
22373 echo $ECHO_N "(cached) $ECHO_C" >&6
22374else
22375 ac_check_lib_save_LIBS=$LIBS
22376LIBS="-lreadline $LIBS"
22377cat >conftest.$ac_ext <<_ACEOF
22378/* confdefs.h. */
22379_ACEOF
22380cat confdefs.h >>conftest.$ac_ext
22381cat >>conftest.$ac_ext <<_ACEOF
22382/* end confdefs.h. */
22383
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384/* Override any GCC internal prototype to avoid an error.
22385 Use char because int might match the return type of a GCC
22386 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022387#ifdef __cplusplus
22388extern "C"
22389#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022390char readline ();
22391int
22392main ()
22393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022395 ;
22396 return 0;
22397}
22398_ACEOF
22399rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400if { (ac_try="$ac_link"
22401case "(($ac_try" in
22402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22403 *) ac_try_echo=$ac_try;;
22404esac
22405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22406 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022407 ac_status=$?
22408 grep -v '^ *+' conftest.er1 >conftest.err
22409 rm -f conftest.er1
22410 cat conftest.err >&5
22411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412 (exit $ac_status); } && {
22413 test -z "$ac_c_werror_flag" ||
22414 test ! -s conftest.err
22415 } && test -s conftest$ac_exeext &&
22416 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022417 ac_cv_lib_readline_readline=yes
22418else
22419 echo "$as_me: failed program was:" >&5
22420sed 's/^/| /' conftest.$ac_ext >&5
22421
Martin v. Löwiseba40652007-08-30 20:10:57 +000022422 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022424
22425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022426 conftest$ac_exeext conftest.$ac_ext
22427LIBS=$ac_check_lib_save_LIBS
22428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022429{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22430echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022431if test $ac_cv_lib_readline_readline = yes; then
22432 cat >>confdefs.h <<_ACEOF
22433#define HAVE_LIBREADLINE 1
22434_ACEOF
22435
22436 LIBS="-lreadline $LIBS"
22437
22438fi
22439
22440if test "$ac_cv_have_readline_readline" = no
22441then
22442
Martin v. Löwiseba40652007-08-30 20:10:57 +000022443{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22444echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022445if test "${ac_cv_lib_termcap_readline+set}" = set; then
22446 echo $ECHO_N "(cached) $ECHO_C" >&6
22447else
22448 ac_check_lib_save_LIBS=$LIBS
22449LIBS="-ltermcap $LIBS"
22450cat >conftest.$ac_ext <<_ACEOF
22451/* confdefs.h. */
22452_ACEOF
22453cat confdefs.h >>conftest.$ac_ext
22454cat >>conftest.$ac_ext <<_ACEOF
22455/* end confdefs.h. */
22456
Martin v. Löwiseba40652007-08-30 20:10:57 +000022457/* Override any GCC internal prototype to avoid an error.
22458 Use char because int might match the return type of a GCC
22459 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022460#ifdef __cplusplus
22461extern "C"
22462#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022463char readline ();
22464int
22465main ()
22466{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022468 ;
22469 return 0;
22470}
22471_ACEOF
22472rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022473if { (ac_try="$ac_link"
22474case "(($ac_try" in
22475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22476 *) ac_try_echo=$ac_try;;
22477esac
22478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22479 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022480 ac_status=$?
22481 grep -v '^ *+' conftest.er1 >conftest.err
22482 rm -f conftest.er1
22483 cat conftest.err >&5
22484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485 (exit $ac_status); } && {
22486 test -z "$ac_c_werror_flag" ||
22487 test ! -s conftest.err
22488 } && test -s conftest$ac_exeext &&
22489 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022490 ac_cv_lib_termcap_readline=yes
22491else
22492 echo "$as_me: failed program was:" >&5
22493sed 's/^/| /' conftest.$ac_ext >&5
22494
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022497
22498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022499 conftest$ac_exeext conftest.$ac_ext
22500LIBS=$ac_check_lib_save_LIBS
22501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22503echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022504if test $ac_cv_lib_termcap_readline = yes; then
22505 cat >>confdefs.h <<_ACEOF
22506#define HAVE_LIBTERMCAP 1
22507_ACEOF
22508
22509 LIBS="-ltermcap $LIBS"
22510
22511fi
22512
22513fi
22514
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022515# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022516{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22517echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022518if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22519 echo $ECHO_N "(cached) $ECHO_C" >&6
22520else
22521 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022522LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022523cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022524/* confdefs.h. */
22525_ACEOF
22526cat confdefs.h >>conftest.$ac_ext
22527cat >>conftest.$ac_ext <<_ACEOF
22528/* end confdefs.h. */
22529
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530/* Override any GCC internal prototype to avoid an error.
22531 Use char because int might match the return type of a GCC
22532 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022533#ifdef __cplusplus
22534extern "C"
22535#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022536char rl_callback_handler_install ();
22537int
22538main ()
22539{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022541 ;
22542 return 0;
22543}
22544_ACEOF
22545rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546if { (ac_try="$ac_link"
22547case "(($ac_try" in
22548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22549 *) ac_try_echo=$ac_try;;
22550esac
22551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22552 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022554 grep -v '^ *+' conftest.er1 >conftest.err
22555 rm -f conftest.er1
22556 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558 (exit $ac_status); } && {
22559 test -z "$ac_c_werror_flag" ||
22560 test ! -s conftest.err
22561 } && test -s conftest$ac_exeext &&
22562 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022563 ac_cv_lib_readline_rl_callback_handler_install=yes
22564else
22565 echo "$as_me: failed program was:" >&5
22566sed 's/^/| /' conftest.$ac_ext >&5
22567
Martin v. Löwiseba40652007-08-30 20:10:57 +000022568 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570
22571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022572 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022573LIBS=$ac_check_lib_save_LIBS
22574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22576echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022577if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22578
22579cat >>confdefs.h <<\_ACEOF
22580#define HAVE_RL_CALLBACK 1
22581_ACEOF
22582
22583fi
22584
22585
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022586# check for readline 2.2
22587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022588/* confdefs.h. */
22589_ACEOF
22590cat confdefs.h >>conftest.$ac_ext
22591cat >>conftest.$ac_ext <<_ACEOF
22592/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022593#include <readline/readline.h>
22594_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022595if { (ac_try="$ac_cpp conftest.$ac_ext"
22596case "(($ac_try" in
22597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22598 *) ac_try_echo=$ac_try;;
22599esac
22600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22601 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022602 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022603 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022604 rm -f conftest.er1
22605 cat conftest.err >&5
22606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607 (exit $ac_status); } >/dev/null && {
22608 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22609 test ! -s conftest.err
22610 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022611 have_readline=yes
22612else
22613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022614sed 's/^/| /' conftest.$ac_ext >&5
22615
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022616 have_readline=no
22617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022618
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022619rm -f conftest.err conftest.$ac_ext
22620if test $have_readline = yes
22621then
22622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022623/* confdefs.h. */
22624_ACEOF
22625cat confdefs.h >>conftest.$ac_ext
22626cat >>conftest.$ac_ext <<_ACEOF
22627/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022628#include <readline/readline.h>
22629
22630_ACEOF
22631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022632 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022633
22634cat >>confdefs.h <<\_ACEOF
22635#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22636_ACEOF
22637
22638fi
22639rm -f conftest*
22640
22641fi
22642
Martin v. Löwis0daad592001-09-30 21:09:59 +000022643# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022644{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22645echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022646if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022648else
Martin v. Löwis11437992002-04-12 09:54:03 +000022649 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022650LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022652/* confdefs.h. */
22653_ACEOF
22654cat confdefs.h >>conftest.$ac_ext
22655cat >>conftest.$ac_ext <<_ACEOF
22656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022657
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658/* Override any GCC internal prototype to avoid an error.
22659 Use char because int might match the return type of a GCC
22660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022661#ifdef __cplusplus
22662extern "C"
22663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022664char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022665int
22666main ()
22667{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022668return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022669 ;
22670 return 0;
22671}
22672_ACEOF
22673rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674if { (ac_try="$ac_link"
22675case "(($ac_try" in
22676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22677 *) ac_try_echo=$ac_try;;
22678esac
22679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22680 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022682 grep -v '^ *+' conftest.er1 >conftest.err
22683 rm -f conftest.er1
22684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022686 (exit $ac_status); } && {
22687 test -z "$ac_c_werror_flag" ||
22688 test ! -s conftest.err
22689 } && test -s conftest$ac_exeext &&
22690 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022692else
Martin v. Löwis11437992002-04-12 09:54:03 +000022693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022694sed 's/^/| /' conftest.$ac_ext >&5
22695
Martin v. Löwiseba40652007-08-30 20:10:57 +000022696 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022698
22699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022701LIBS=$ac_check_lib_save_LIBS
22702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022703{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22704echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022705if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022706
Martin v. Löwis11437992002-04-12 09:54:03 +000022707cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022708#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022709_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022710
Martin v. Löwis0daad592001-09-30 21:09:59 +000022711fi
22712
Michael W. Hudson54241132001-12-07 15:38:26 +000022713
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022714# also in 4.0
22715{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22716echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22717if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22718 echo $ECHO_N "(cached) $ECHO_C" >&6
22719else
22720 ac_check_lib_save_LIBS=$LIBS
22721LIBS="-lreadline $LIBS"
22722cat >conftest.$ac_ext <<_ACEOF
22723/* confdefs.h. */
22724_ACEOF
22725cat confdefs.h >>conftest.$ac_ext
22726cat >>conftest.$ac_ext <<_ACEOF
22727/* end confdefs.h. */
22728
22729/* Override any GCC internal prototype to avoid an error.
22730 Use char because int might match the return type of a GCC
22731 builtin and then its argument prototype would still apply. */
22732#ifdef __cplusplus
22733extern "C"
22734#endif
22735char rl_completion_display_matches_hook ();
22736int
22737main ()
22738{
22739return rl_completion_display_matches_hook ();
22740 ;
22741 return 0;
22742}
22743_ACEOF
22744rm -f conftest.$ac_objext conftest$ac_exeext
22745if { (ac_try="$ac_link"
22746case "(($ac_try" in
22747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22748 *) ac_try_echo=$ac_try;;
22749esac
22750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22751 (eval "$ac_link") 2>conftest.er1
22752 ac_status=$?
22753 grep -v '^ *+' conftest.er1 >conftest.err
22754 rm -f conftest.er1
22755 cat conftest.err >&5
22756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22757 (exit $ac_status); } && {
22758 test -z "$ac_c_werror_flag" ||
22759 test ! -s conftest.err
22760 } && test -s conftest$ac_exeext &&
22761 $as_test_x conftest$ac_exeext; then
22762 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22763else
22764 echo "$as_me: failed program was:" >&5
22765sed 's/^/| /' conftest.$ac_ext >&5
22766
22767 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22768fi
22769
22770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22771 conftest$ac_exeext conftest.$ac_ext
22772LIBS=$ac_check_lib_save_LIBS
22773fi
22774{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22775echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22776if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22777
22778cat >>confdefs.h <<\_ACEOF
22779#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22780_ACEOF
22781
22782fi
22783
22784
Martin v. Löwis0daad592001-09-30 21:09:59 +000022785# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22787echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022788if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22789 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022790else
Martin v. Löwis11437992002-04-12 09:54:03 +000022791 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022792LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022794/* confdefs.h. */
22795_ACEOF
22796cat confdefs.h >>conftest.$ac_ext
22797cat >>conftest.$ac_ext <<_ACEOF
22798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022799
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800/* Override any GCC internal prototype to avoid an error.
22801 Use char because int might match the return type of a GCC
22802 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022803#ifdef __cplusplus
22804extern "C"
22805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022806char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022807int
22808main ()
22809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022810return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022811 ;
22812 return 0;
22813}
22814_ACEOF
22815rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022816if { (ac_try="$ac_link"
22817case "(($ac_try" in
22818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22819 *) ac_try_echo=$ac_try;;
22820esac
22821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22822 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022824 grep -v '^ *+' conftest.er1 >conftest.err
22825 rm -f conftest.er1
22826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022828 (exit $ac_status); } && {
22829 test -z "$ac_c_werror_flag" ||
22830 test ! -s conftest.err
22831 } && test -s conftest$ac_exeext &&
22832 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022833 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022834else
Martin v. Löwis11437992002-04-12 09:54:03 +000022835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022836sed 's/^/| /' conftest.$ac_ext >&5
22837
Martin v. Löwiseba40652007-08-30 20:10:57 +000022838 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022840
22841rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022843LIBS=$ac_check_lib_save_LIBS
22844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22846echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022847if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022848
Martin v. Löwis11437992002-04-12 09:54:03 +000022849cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022850#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022851_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022852
Guido van Rossum353ae582001-07-10 16:45:32 +000022853fi
22854
Jack Jansendd19cf82001-12-06 22:36:17 +000022855
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022856# also in readline 4.2
22857cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022858/* confdefs.h. */
22859_ACEOF
22860cat confdefs.h >>conftest.$ac_ext
22861cat >>conftest.$ac_ext <<_ACEOF
22862/* end confdefs.h. */
22863#include <readline/readline.h>
22864_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865if { (ac_try="$ac_cpp conftest.$ac_ext"
22866case "(($ac_try" in
22867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22868 *) ac_try_echo=$ac_try;;
22869esac
22870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22871 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022872 ac_status=$?
22873 grep -v '^ *+' conftest.er1 >conftest.err
22874 rm -f conftest.er1
22875 cat conftest.err >&5
22876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877 (exit $ac_status); } >/dev/null && {
22878 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22879 test ! -s conftest.err
22880 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022881 have_readline=yes
22882else
22883 echo "$as_me: failed program was:" >&5
22884sed 's/^/| /' conftest.$ac_ext >&5
22885
22886 have_readline=no
22887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022888
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022889rm -f conftest.err conftest.$ac_ext
22890if test $have_readline = yes
22891then
22892 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022893/* confdefs.h. */
22894_ACEOF
22895cat confdefs.h >>conftest.$ac_ext
22896cat >>conftest.$ac_ext <<_ACEOF
22897/* end confdefs.h. */
22898#include <readline/readline.h>
22899
22900_ACEOF
22901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22902 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22903
22904cat >>confdefs.h <<\_ACEOF
22905#define HAVE_RL_CATCH_SIGNAL 1
22906_ACEOF
22907
22908fi
22909rm -f conftest*
22910
22911fi
22912
Martin v. Löwis82bca632006-02-10 20:49:30 +000022913# End of readline checks: restore LIBS
22914LIBS=$LIBS_no_readline
22915
Martin v. Löwiseba40652007-08-30 20:10:57 +000022916{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22917echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022918if test "${ac_cv_broken_nice+set}" = set; then
22919 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022920else
Martin v. Löwis11437992002-04-12 09:54:03 +000022921
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022922if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022923 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022924else
Martin v. Löwis11437992002-04-12 09:54:03 +000022925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022926/* confdefs.h. */
22927_ACEOF
22928cat confdefs.h >>conftest.$ac_ext
22929cat >>conftest.$ac_ext <<_ACEOF
22930/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022931
22932int main()
22933{
22934 int val1 = nice(1);
22935 if (val1 != -1 && val1 == nice(2))
22936 exit(0);
22937 exit(1);
22938}
22939
Martin v. Löwis11437992002-04-12 09:54:03 +000022940_ACEOF
22941rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942if { (ac_try="$ac_link"
22943case "(($ac_try" in
22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22945 *) ac_try_echo=$ac_try;;
22946esac
22947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22948 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022949 ac_status=$?
22950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022952 { (case "(($ac_try" in
22953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22954 *) ac_try_echo=$ac_try;;
22955esac
22956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22957 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022958 ac_status=$?
22959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22960 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022961 ac_cv_broken_nice=yes
22962else
Martin v. Löwis11437992002-04-12 09:54:03 +000022963 echo "$as_me: program exited with status $ac_status" >&5
22964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022965sed 's/^/| /' conftest.$ac_ext >&5
22966
Martin v. Löwis11437992002-04-12 09:54:03 +000022967( exit $ac_status )
22968ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022970rm -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 +000022971fi
22972
Martin v. Löwiseba40652007-08-30 20:10:57 +000022973
22974fi
22975
22976{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22977echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022978if test "$ac_cv_broken_nice" = yes
22979then
Martin v. Löwis11437992002-04-12 09:54:03 +000022980
22981cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022982#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022983_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022984
22985fi
22986
Martin v. Löwiseba40652007-08-30 20:10:57 +000022987{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22988echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022989if test "$cross_compiling" = yes; then
22990 ac_cv_broken_poll=no
22991else
22992 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022993/* confdefs.h. */
22994_ACEOF
22995cat confdefs.h >>conftest.$ac_ext
22996cat >>conftest.$ac_ext <<_ACEOF
22997/* end confdefs.h. */
22998
22999#include <poll.h>
23000
23001int main (void)
23002 {
23003 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23004
23005 close (42);
23006
23007 int poll_test = poll (&poll_struct, 1, 0);
23008
23009 if (poll_test < 0)
23010 {
23011 exit(0);
23012 }
23013 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23014 {
23015 exit(0);
23016 }
23017 else
23018 {
23019 exit(1);
23020 }
23021 }
23022
23023_ACEOF
23024rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023025if { (ac_try="$ac_link"
23026case "(($ac_try" in
23027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23028 *) ac_try_echo=$ac_try;;
23029esac
23030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23031 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023032 ac_status=$?
23033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035 { (case "(($ac_try" in
23036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23037 *) ac_try_echo=$ac_try;;
23038esac
23039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23040 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023041 ac_status=$?
23042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23043 (exit $ac_status); }; }; then
23044 ac_cv_broken_poll=yes
23045else
23046 echo "$as_me: program exited with status $ac_status" >&5
23047echo "$as_me: failed program was:" >&5
23048sed 's/^/| /' conftest.$ac_ext >&5
23049
23050( exit $ac_status )
23051ac_cv_broken_poll=no
23052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023053rm -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 +000023054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023055
23056
23057{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23058echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023059if test "$ac_cv_broken_poll" = yes
23060then
23061
23062cat >>confdefs.h <<\_ACEOF
23063#define HAVE_BROKEN_POLL 1
23064_ACEOF
23065
23066fi
23067
Brett Cannon43802422005-02-10 20:48:03 +000023068# 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 +000023069# (which is not required by ISO C or UNIX spec) and/or if we support
23070# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023071{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23072echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023073if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23074 echo $ECHO_N "(cached) $ECHO_C" >&6
23075else
23076 cat >conftest.$ac_ext <<_ACEOF
23077/* confdefs.h. */
23078_ACEOF
23079cat confdefs.h >>conftest.$ac_ext
23080cat >>conftest.$ac_ext <<_ACEOF
23081/* end confdefs.h. */
23082#include <sys/types.h>
23083#include <$ac_cv_struct_tm>
23084
23085
23086int
23087main ()
23088{
23089static struct tm ac_aggr;
23090if (ac_aggr.tm_zone)
23091return 0;
23092 ;
23093 return 0;
23094}
23095_ACEOF
23096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023097if { (ac_try="$ac_compile"
23098case "(($ac_try" in
23099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23100 *) ac_try_echo=$ac_try;;
23101esac
23102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23103 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023104 ac_status=$?
23105 grep -v '^ *+' conftest.er1 >conftest.err
23106 rm -f conftest.er1
23107 cat conftest.err >&5
23108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023109 (exit $ac_status); } && {
23110 test -z "$ac_c_werror_flag" ||
23111 test ! -s conftest.err
23112 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023113 ac_cv_member_struct_tm_tm_zone=yes
23114else
23115 echo "$as_me: failed program was:" >&5
23116sed 's/^/| /' conftest.$ac_ext >&5
23117
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023119/* confdefs.h. */
23120_ACEOF
23121cat confdefs.h >>conftest.$ac_ext
23122cat >>conftest.$ac_ext <<_ACEOF
23123/* end confdefs.h. */
23124#include <sys/types.h>
23125#include <$ac_cv_struct_tm>
23126
23127
23128int
23129main ()
23130{
23131static struct tm ac_aggr;
23132if (sizeof ac_aggr.tm_zone)
23133return 0;
23134 ;
23135 return 0;
23136}
23137_ACEOF
23138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023139if { (ac_try="$ac_compile"
23140case "(($ac_try" in
23141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23142 *) ac_try_echo=$ac_try;;
23143esac
23144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23145 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023146 ac_status=$?
23147 grep -v '^ *+' conftest.er1 >conftest.err
23148 rm -f conftest.er1
23149 cat conftest.err >&5
23150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023151 (exit $ac_status); } && {
23152 test -z "$ac_c_werror_flag" ||
23153 test ! -s conftest.err
23154 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023155 ac_cv_member_struct_tm_tm_zone=yes
23156else
23157 echo "$as_me: failed program was:" >&5
23158sed 's/^/| /' conftest.$ac_ext >&5
23159
Martin v. Löwiseba40652007-08-30 20:10:57 +000023160 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023162
23163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023165
23166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023168{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23169echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023170if test $ac_cv_member_struct_tm_tm_zone = yes; then
23171
23172cat >>confdefs.h <<_ACEOF
23173#define HAVE_STRUCT_TM_TM_ZONE 1
23174_ACEOF
23175
23176
23177fi
23178
23179if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23180
23181cat >>confdefs.h <<\_ACEOF
23182#define HAVE_TM_ZONE 1
23183_ACEOF
23184
23185else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023186 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23187echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23188if test "${ac_cv_have_decl_tzname+set}" = set; then
23189 echo $ECHO_N "(cached) $ECHO_C" >&6
23190else
23191 cat >conftest.$ac_ext <<_ACEOF
23192/* confdefs.h. */
23193_ACEOF
23194cat confdefs.h >>conftest.$ac_ext
23195cat >>conftest.$ac_ext <<_ACEOF
23196/* end confdefs.h. */
23197#include <time.h>
23198
23199int
23200main ()
23201{
23202#ifndef tzname
23203 (void) tzname;
23204#endif
23205
23206 ;
23207 return 0;
23208}
23209_ACEOF
23210rm -f conftest.$ac_objext
23211if { (ac_try="$ac_compile"
23212case "(($ac_try" in
23213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23214 *) ac_try_echo=$ac_try;;
23215esac
23216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23217 (eval "$ac_compile") 2>conftest.er1
23218 ac_status=$?
23219 grep -v '^ *+' conftest.er1 >conftest.err
23220 rm -f conftest.er1
23221 cat conftest.err >&5
23222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23223 (exit $ac_status); } && {
23224 test -z "$ac_c_werror_flag" ||
23225 test ! -s conftest.err
23226 } && test -s conftest.$ac_objext; then
23227 ac_cv_have_decl_tzname=yes
23228else
23229 echo "$as_me: failed program was:" >&5
23230sed 's/^/| /' conftest.$ac_ext >&5
23231
23232 ac_cv_have_decl_tzname=no
23233fi
23234
23235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23236fi
23237{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23238echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23239if test $ac_cv_have_decl_tzname = yes; then
23240
23241cat >>confdefs.h <<_ACEOF
23242#define HAVE_DECL_TZNAME 1
23243_ACEOF
23244
23245
23246else
23247 cat >>confdefs.h <<_ACEOF
23248#define HAVE_DECL_TZNAME 0
23249_ACEOF
23250
23251
23252fi
23253
23254
23255 { echo "$as_me:$LINENO: checking for tzname" >&5
23256echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023257if test "${ac_cv_var_tzname+set}" = set; then
23258 echo $ECHO_N "(cached) $ECHO_C" >&6
23259else
23260 cat >conftest.$ac_ext <<_ACEOF
23261/* confdefs.h. */
23262_ACEOF
23263cat confdefs.h >>conftest.$ac_ext
23264cat >>conftest.$ac_ext <<_ACEOF
23265/* end confdefs.h. */
23266#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023267#if !HAVE_DECL_TZNAME
23268extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023269#endif
23270
23271int
23272main ()
23273{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023275 ;
23276 return 0;
23277}
23278_ACEOF
23279rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280if { (ac_try="$ac_link"
23281case "(($ac_try" in
23282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23283 *) ac_try_echo=$ac_try;;
23284esac
23285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23286 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023287 ac_status=$?
23288 grep -v '^ *+' conftest.er1 >conftest.err
23289 rm -f conftest.er1
23290 cat conftest.err >&5
23291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023292 (exit $ac_status); } && {
23293 test -z "$ac_c_werror_flag" ||
23294 test ! -s conftest.err
23295 } && test -s conftest$ac_exeext &&
23296 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023297 ac_cv_var_tzname=yes
23298else
23299 echo "$as_me: failed program was:" >&5
23300sed 's/^/| /' conftest.$ac_ext >&5
23301
Martin v. Löwiseba40652007-08-30 20:10:57 +000023302 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023304
23305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023306 conftest$ac_exeext conftest.$ac_ext
23307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023308{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23309echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023310 if test $ac_cv_var_tzname = yes; then
23311
23312cat >>confdefs.h <<\_ACEOF
23313#define HAVE_TZNAME 1
23314_ACEOF
23315
23316 fi
23317fi
23318
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023319
Martin v. Löwis1d459062005-03-14 21:23:33 +000023320# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023321{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23322echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023323if test "${ac_cv_working_tzset+set}" = set; then
23324 echo $ECHO_N "(cached) $ECHO_C" >&6
23325else
23326
23327if test "$cross_compiling" = yes; then
23328 ac_cv_working_tzset=no
23329else
23330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023331/* confdefs.h. */
23332_ACEOF
23333cat confdefs.h >>conftest.$ac_ext
23334cat >>conftest.$ac_ext <<_ACEOF
23335/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023336
23337#include <stdlib.h>
23338#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023339#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023340
23341#if HAVE_TZNAME
23342extern char *tzname[];
23343#endif
23344
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023345int main()
23346{
Brett Cannon18367812003-09-19 00:59:16 +000023347 /* Note that we need to ensure that not only does tzset(3)
23348 do 'something' with localtime, but it works as documented
23349 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023350 This includes making sure that tzname is set properly if
23351 tm->tm_zone does not exist since it is the alternative way
23352 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023353
23354 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023355 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023356 */
23357
Martin v. Löwis1d459062005-03-14 21:23:33 +000023358 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023359 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23360
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023361 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023362 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023363 if (localtime(&groundhogday)->tm_hour != 0)
23364 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023365#if HAVE_TZNAME
23366 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23367 if (strcmp(tzname[0], "UTC") ||
23368 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23369 exit(1);
23370#endif
Brett Cannon18367812003-09-19 00:59:16 +000023371
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023372 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023373 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023374 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023375 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023376#if HAVE_TZNAME
23377 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23378 exit(1);
23379#endif
Brett Cannon18367812003-09-19 00:59:16 +000023380
23381 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23382 tzset();
23383 if (localtime(&groundhogday)->tm_hour != 11)
23384 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023385#if HAVE_TZNAME
23386 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23387 exit(1);
23388#endif
23389
23390#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023391 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23392 exit(1);
23393 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23394 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023395#endif
Brett Cannon18367812003-09-19 00:59:16 +000023396
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023397 exit(0);
23398}
23399
23400_ACEOF
23401rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023402if { (ac_try="$ac_link"
23403case "(($ac_try" in
23404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23405 *) ac_try_echo=$ac_try;;
23406esac
23407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23408 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023409 ac_status=$?
23410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023412 { (case "(($ac_try" in
23413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23414 *) ac_try_echo=$ac_try;;
23415esac
23416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23417 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023418 ac_status=$?
23419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23420 (exit $ac_status); }; }; then
23421 ac_cv_working_tzset=yes
23422else
23423 echo "$as_me: program exited with status $ac_status" >&5
23424echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023425sed 's/^/| /' conftest.$ac_ext >&5
23426
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023427( exit $ac_status )
23428ac_cv_working_tzset=no
23429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023430rm -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 +000023431fi
23432
Martin v. Löwiseba40652007-08-30 20:10:57 +000023433
23434fi
23435
23436{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23437echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023438if test "$ac_cv_working_tzset" = yes
23439then
23440
23441cat >>confdefs.h <<\_ACEOF
23442#define HAVE_WORKING_TZSET 1
23443_ACEOF
23444
23445fi
23446
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023447# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023448{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23449echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023450if test "${ac_cv_stat_tv_nsec+set}" = set; then
23451 echo $ECHO_N "(cached) $ECHO_C" >&6
23452else
23453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023454/* confdefs.h. */
23455_ACEOF
23456cat confdefs.h >>conftest.$ac_ext
23457cat >>conftest.$ac_ext <<_ACEOF
23458/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023459#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023460int
23461main ()
23462{
23463
23464struct stat st;
23465st.st_mtim.tv_nsec = 1;
23466
23467 ;
23468 return 0;
23469}
23470_ACEOF
23471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023472if { (ac_try="$ac_compile"
23473case "(($ac_try" in
23474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23475 *) ac_try_echo=$ac_try;;
23476esac
23477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023480 grep -v '^ *+' conftest.er1 >conftest.err
23481 rm -f conftest.er1
23482 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484 (exit $ac_status); } && {
23485 test -z "$ac_c_werror_flag" ||
23486 test ! -s conftest.err
23487 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023488 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023489else
23490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023491sed 's/^/| /' conftest.$ac_ext >&5
23492
Martin v. Löwiseba40652007-08-30 20:10:57 +000023493 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023494fi
23495
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23497fi
23498
23499{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23500echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023501if test "$ac_cv_stat_tv_nsec" = yes
23502then
23503
23504cat >>confdefs.h <<\_ACEOF
23505#define HAVE_STAT_TV_NSEC 1
23506_ACEOF
23507
23508fi
23509
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023510# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023511{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23512echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023513if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23514 echo $ECHO_N "(cached) $ECHO_C" >&6
23515else
23516 cat >conftest.$ac_ext <<_ACEOF
23517/* confdefs.h. */
23518_ACEOF
23519cat confdefs.h >>conftest.$ac_ext
23520cat >>conftest.$ac_ext <<_ACEOF
23521/* end confdefs.h. */
23522#include <sys/stat.h>
23523int
23524main ()
23525{
23526
23527struct stat st;
23528st.st_mtimespec.tv_nsec = 1;
23529
23530 ;
23531 return 0;
23532}
23533_ACEOF
23534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023535if { (ac_try="$ac_compile"
23536case "(($ac_try" in
23537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23538 *) ac_try_echo=$ac_try;;
23539esac
23540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023542 ac_status=$?
23543 grep -v '^ *+' conftest.er1 >conftest.err
23544 rm -f conftest.er1
23545 cat conftest.err >&5
23546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547 (exit $ac_status); } && {
23548 test -z "$ac_c_werror_flag" ||
23549 test ! -s conftest.err
23550 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023551 ac_cv_stat_tv_nsec2=yes
23552else
23553 echo "$as_me: failed program was:" >&5
23554sed 's/^/| /' conftest.$ac_ext >&5
23555
Martin v. Löwiseba40652007-08-30 20:10:57 +000023556 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023557fi
23558
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23560fi
23561
23562{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23563echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023564if test "$ac_cv_stat_tv_nsec2" = yes
23565then
23566
23567cat >>confdefs.h <<\_ACEOF
23568#define HAVE_STAT_TV_NSEC2 1
23569_ACEOF
23570
23571fi
23572
Jack Jansen666b1e72001-10-31 12:11:48 +000023573# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023574{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23575echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023576if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23577 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023578else
Martin v. Löwis11437992002-04-12 09:54:03 +000023579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023580/* confdefs.h. */
23581_ACEOF
23582cat confdefs.h >>conftest.$ac_ext
23583cat >>conftest.$ac_ext <<_ACEOF
23584/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023585#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023586int
23587main ()
23588{
Jack Jansen666b1e72001-10-31 12:11:48 +000023589
23590 int rtn;
23591 rtn = mvwdelch(0,0,0);
23592
Martin v. Löwis11437992002-04-12 09:54:03 +000023593 ;
23594 return 0;
23595}
23596_ACEOF
23597rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023598if { (ac_try="$ac_compile"
23599case "(($ac_try" in
23600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23601 *) ac_try_echo=$ac_try;;
23602esac
23603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023606 grep -v '^ *+' conftest.er1 >conftest.err
23607 rm -f conftest.er1
23608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610 (exit $ac_status); } && {
23611 test -z "$ac_c_werror_flag" ||
23612 test ! -s conftest.err
23613 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023614 ac_cv_mvwdelch_is_expression=yes
23615else
Martin v. Löwis11437992002-04-12 09:54:03 +000023616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023617sed 's/^/| /' conftest.$ac_ext >&5
23618
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023620fi
23621
Martin v. Löwiseba40652007-08-30 20:10:57 +000023622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23623fi
23624
23625{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23626echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023627
23628if test "$ac_cv_mvwdelch_is_expression" = yes
23629then
Martin v. Löwis11437992002-04-12 09:54:03 +000023630
23631cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023632#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023633_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023634
23635fi
23636
Martin v. Löwiseba40652007-08-30 20:10:57 +000023637{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23638echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023639if test "${ac_cv_window_has_flags+set}" = set; then
23640 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023641else
Martin v. Löwis11437992002-04-12 09:54:03 +000023642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023643/* confdefs.h. */
23644_ACEOF
23645cat confdefs.h >>conftest.$ac_ext
23646cat >>conftest.$ac_ext <<_ACEOF
23647/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023648#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023649int
23650main ()
23651{
Jack Jansen666b1e72001-10-31 12:11:48 +000023652
23653 WINDOW *w;
23654 w->_flags = 0;
23655
Martin v. Löwis11437992002-04-12 09:54:03 +000023656 ;
23657 return 0;
23658}
23659_ACEOF
23660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023661if { (ac_try="$ac_compile"
23662case "(($ac_try" in
23663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23664 *) ac_try_echo=$ac_try;;
23665esac
23666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023669 grep -v '^ *+' conftest.er1 >conftest.err
23670 rm -f conftest.er1
23671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673 (exit $ac_status); } && {
23674 test -z "$ac_c_werror_flag" ||
23675 test ! -s conftest.err
23676 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023677 ac_cv_window_has_flags=yes
23678else
Martin v. Löwis11437992002-04-12 09:54:03 +000023679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023680sed 's/^/| /' conftest.$ac_ext >&5
23681
Martin v. Löwiseba40652007-08-30 20:10:57 +000023682 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023683fi
23684
Martin v. Löwiseba40652007-08-30 20:10:57 +000023685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23686fi
23687
23688{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23689echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023690
Jack Jansen666b1e72001-10-31 12:11:48 +000023691
23692if test "$ac_cv_window_has_flags" = yes
23693then
Martin v. Löwis11437992002-04-12 09:54:03 +000023694
23695cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023696#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023697_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023698
23699fi
23700
Martin v. Löwiseba40652007-08-30 20:10:57 +000023701{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23702echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023703cat >conftest.$ac_ext <<_ACEOF
23704/* confdefs.h. */
23705_ACEOF
23706cat confdefs.h >>conftest.$ac_ext
23707cat >>conftest.$ac_ext <<_ACEOF
23708/* end confdefs.h. */
23709#include <curses.h>
23710int
23711main ()
23712{
23713void *x=is_term_resized
23714 ;
23715 return 0;
23716}
23717_ACEOF
23718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023719if { (ac_try="$ac_compile"
23720case "(($ac_try" in
23721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23722 *) ac_try_echo=$ac_try;;
23723esac
23724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23725 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023726 ac_status=$?
23727 grep -v '^ *+' conftest.er1 >conftest.err
23728 rm -f conftest.er1
23729 cat conftest.err >&5
23730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731 (exit $ac_status); } && {
23732 test -z "$ac_c_werror_flag" ||
23733 test ! -s conftest.err
23734 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023735
23736cat >>confdefs.h <<\_ACEOF
23737#define HAVE_CURSES_IS_TERM_RESIZED 1
23738_ACEOF
23739
Martin v. Löwiseba40652007-08-30 20:10:57 +000023740 { echo "$as_me:$LINENO: result: yes" >&5
23741echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023742else
23743 echo "$as_me: failed program was:" >&5
23744sed 's/^/| /' conftest.$ac_ext >&5
23745
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746 { echo "$as_me:$LINENO: result: no" >&5
23747echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023748
23749fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023750
Martin v. Löwiseba40652007-08-30 20:10:57 +000023751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23752
23753{ echo "$as_me:$LINENO: checking for resize_term" >&5
23754echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023755cat >conftest.$ac_ext <<_ACEOF
23756/* confdefs.h. */
23757_ACEOF
23758cat confdefs.h >>conftest.$ac_ext
23759cat >>conftest.$ac_ext <<_ACEOF
23760/* end confdefs.h. */
23761#include <curses.h>
23762int
23763main ()
23764{
23765void *x=resize_term
23766 ;
23767 return 0;
23768}
23769_ACEOF
23770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023771if { (ac_try="$ac_compile"
23772case "(($ac_try" in
23773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23774 *) ac_try_echo=$ac_try;;
23775esac
23776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23777 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023778 ac_status=$?
23779 grep -v '^ *+' conftest.er1 >conftest.err
23780 rm -f conftest.er1
23781 cat conftest.err >&5
23782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023783 (exit $ac_status); } && {
23784 test -z "$ac_c_werror_flag" ||
23785 test ! -s conftest.err
23786 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023787
23788cat >>confdefs.h <<\_ACEOF
23789#define HAVE_CURSES_RESIZE_TERM 1
23790_ACEOF
23791
Martin v. Löwiseba40652007-08-30 20:10:57 +000023792 { echo "$as_me:$LINENO: result: yes" >&5
23793echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023794else
23795 echo "$as_me: failed program was:" >&5
23796sed 's/^/| /' conftest.$ac_ext >&5
23797
Martin v. Löwiseba40652007-08-30 20:10:57 +000023798 { echo "$as_me:$LINENO: result: no" >&5
23799echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023800
23801fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023802
Martin v. Löwiseba40652007-08-30 20:10:57 +000023803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23804
23805{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23806echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023807cat >conftest.$ac_ext <<_ACEOF
23808/* confdefs.h. */
23809_ACEOF
23810cat confdefs.h >>conftest.$ac_ext
23811cat >>conftest.$ac_ext <<_ACEOF
23812/* end confdefs.h. */
23813#include <curses.h>
23814int
23815main ()
23816{
23817void *x=resizeterm
23818 ;
23819 return 0;
23820}
23821_ACEOF
23822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023823if { (ac_try="$ac_compile"
23824case "(($ac_try" in
23825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23826 *) ac_try_echo=$ac_try;;
23827esac
23828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23829 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023830 ac_status=$?
23831 grep -v '^ *+' conftest.er1 >conftest.err
23832 rm -f conftest.er1
23833 cat conftest.err >&5
23834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023835 (exit $ac_status); } && {
23836 test -z "$ac_c_werror_flag" ||
23837 test ! -s conftest.err
23838 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023839
23840cat >>confdefs.h <<\_ACEOF
23841#define HAVE_CURSES_RESIZETERM 1
23842_ACEOF
23843
Martin v. Löwiseba40652007-08-30 20:10:57 +000023844 { echo "$as_me:$LINENO: result: yes" >&5
23845echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023846else
23847 echo "$as_me: failed program was:" >&5
23848sed 's/^/| /' conftest.$ac_ext >&5
23849
Martin v. Löwiseba40652007-08-30 20:10:57 +000023850 { echo "$as_me:$LINENO: result: no" >&5
23851echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023852
23853fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023854
Martin v. Löwiseba40652007-08-30 20:10:57 +000023855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23856
23857{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23858echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023859
23860if test -r /dev/ptmx
23861then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023862 { echo "$as_me:$LINENO: result: yes" >&5
23863echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023864
23865cat >>confdefs.h <<\_ACEOF
23866#define HAVE_DEV_PTMX 1
23867_ACEOF
23868
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023869else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023870 { echo "$as_me:$LINENO: result: no" >&5
23871echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023872fi
23873
Martin v. Löwiseba40652007-08-30 20:10:57 +000023874{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23875echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023876
23877if test -r /dev/ptc
23878then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023879 { echo "$as_me:$LINENO: result: yes" >&5
23880echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023881
23882cat >>confdefs.h <<\_ACEOF
23883#define HAVE_DEV_PTC 1
23884_ACEOF
23885
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023886else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023887 { echo "$as_me:$LINENO: result: no" >&5
23888echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023889fi
23890
Martin v. Löwiseba40652007-08-30 20:10:57 +000023891{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23892echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023893if test "$cross_compiling" = yes; then
23894 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23895See \`config.log' for more details." >&5
23896echo "$as_me: error: cannot run test program while cross compiling
23897See \`config.log' for more details." >&2;}
23898 { (exit 1); exit 1; }; }
23899else
23900 cat >conftest.$ac_ext <<_ACEOF
23901/* confdefs.h. */
23902_ACEOF
23903cat confdefs.h >>conftest.$ac_ext
23904cat >>conftest.$ac_ext <<_ACEOF
23905/* end confdefs.h. */
23906#include <stdio.h>
23907#include <stddef.h>
23908#include <string.h>
23909
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023910#ifdef HAVE_SYS_TYPES_H
23911#include <sys/types.h>
23912#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023913
23914#ifdef HAVE_SSIZE_T
23915typedef ssize_t Py_ssize_t;
23916#elif SIZEOF_VOID_P == SIZEOF_LONG
23917typedef long Py_ssize_t;
23918#else
23919typedef int Py_ssize_t;
23920#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023921
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023922int main()
23923{
23924 char buffer[256];
23925
Brett Cannon09d12362006-05-11 05:11:33 +000023926 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23927 return 1;
23928
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023929 if (strcmp(buffer, "123"))
23930 return 1;
23931
23932 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23933 return 1;
23934
23935 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023936 return 1;
23937
23938 return 0;
23939}
23940_ACEOF
23941rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023942if { (ac_try="$ac_link"
23943case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
23947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23948 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023949 ac_status=$?
23950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23951 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023952 { (case "(($ac_try" in
23953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23954 *) ac_try_echo=$ac_try;;
23955esac
23956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23957 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023958 ac_status=$?
23959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23960 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023961 { echo "$as_me:$LINENO: result: yes" >&5
23962echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023963
23964cat >>confdefs.h <<\_ACEOF
23965#define PY_FORMAT_SIZE_T "z"
23966_ACEOF
23967
23968else
23969 echo "$as_me: program exited with status $ac_status" >&5
23970echo "$as_me: failed program was:" >&5
23971sed 's/^/| /' conftest.$ac_ext >&5
23972
23973( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974{ echo "$as_me:$LINENO: result: no" >&5
23975echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023977rm -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 +000023978fi
23979
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980
23981
23982{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23983echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023984if test "${ac_cv_type_socklen_t+set}" = set; then
23985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023986else
Martin v. Löwis11437992002-04-12 09:54:03 +000023987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023988/* confdefs.h. */
23989_ACEOF
23990cat confdefs.h >>conftest.$ac_ext
23991cat >>conftest.$ac_ext <<_ACEOF
23992/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023993
23994#ifdef HAVE_SYS_TYPES_H
23995#include <sys/types.h>
23996#endif
23997#ifdef HAVE_SYS_SOCKET_H
23998#include <sys/socket.h>
23999#endif
24000
24001
Martin v. Löwiseba40652007-08-30 20:10:57 +000024002typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024003int
24004main ()
24005{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024006if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024007 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024009 return 0;
24010 ;
24011 return 0;
24012}
24013_ACEOF
24014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024015if { (ac_try="$ac_compile"
24016case "(($ac_try" in
24017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24018 *) ac_try_echo=$ac_try;;
24019esac
24020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024023 grep -v '^ *+' conftest.er1 >conftest.err
24024 rm -f conftest.er1
24025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024027 (exit $ac_status); } && {
24028 test -z "$ac_c_werror_flag" ||
24029 test ! -s conftest.err
24030 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024031 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024032else
Martin v. Löwis11437992002-04-12 09:54:03 +000024033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024034sed 's/^/| /' conftest.$ac_ext >&5
24035
Martin v. Löwiseba40652007-08-30 20:10:57 +000024036 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024038
24039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024041{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24042echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024043if test $ac_cv_type_socklen_t = yes; then
24044 :
24045else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024046
Martin v. Löwis01c04012002-11-11 14:58:44 +000024047cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024048#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024049_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024050
24051fi
24052
Michael W. Hudson54241132001-12-07 15:38:26 +000024053
Michael W. Hudson54241132001-12-07 15:38:26 +000024054
24055
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024056for h in `(cd $srcdir;echo Python/thread_*.h)`
24057do
24058 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24059done
24060
Michael W. Hudson54241132001-12-07 15:38:26 +000024061
Neal Norwitzd24499d2005-12-18 21:36:39 +000024062SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024063{ echo "$as_me:$LINENO: checking for build directories" >&5
24064echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024065for dir in $SRCDIRS; do
24066 if test ! -d $dir; then
24067 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024068 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024069done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024070{ echo "$as_me:$LINENO: result: done" >&5
24071echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024072
Guido van Rossum627b2d71993-12-24 10:39:16 +000024073# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024074ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024075
Martin v. Löwis11437992002-04-12 09:54:03 +000024076cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024077# This file is a shell script that caches the results of configure
24078# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024079# scripts and configure runs, see configure's option --config-cache.
24080# It is not useful on other systems. If it contains results you don't
24081# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024082#
Martin v. Löwis11437992002-04-12 09:54:03 +000024083# config.status only pays attention to the cache file if you give it
24084# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024085#
Skip Montanaro6dead952003-09-25 14:50:04 +000024086# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024087# loading this file, other *unset* `ac_cv_foo' will be assigned the
24088# following values.
24089
24090_ACEOF
24091
Guido van Rossumf78abae1997-01-21 22:02:36 +000024092# The following way of writing the cache mishandles newlines in values,
24093# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024094# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024095# Ultrix sh set writes to stderr and can't be redirected directly,
24096# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024097(
24098 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24099 eval ac_val=\$$ac_var
24100 case $ac_val in #(
24101 *${as_nl}*)
24102 case $ac_var in #(
24103 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24104echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24105 esac
24106 case $ac_var in #(
24107 _ | IFS | as_nl) ;; #(
24108 *) $as_unset $ac_var ;;
24109 esac ;;
24110 esac
24111 done
24112
Martin v. Löwis11437992002-04-12 09:54:03 +000024113 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024114 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24115 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024116 # `set' does not quote correctly, so add quotes (double-quote
24117 # substitution turns \\\\ into \\, and sed turns \\ into \).
24118 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024119 "s/'/'\\\\''/g;
24120 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024121 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024122 *)
24123 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024124 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024125 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024126 esac |
24127 sort
24128) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024129 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024130 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024131 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024132 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024133 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24134 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024135 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24136 :end' >>confcache
24137if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24138 if test -w "$cache_file"; then
24139 test "x$cache_file" != "x/dev/null" &&
24140 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24141echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024142 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024143 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024144 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24145echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024146 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024147fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024148rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024149
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024150test "x$prefix" = xNONE && prefix=$ac_default_prefix
24151# Let make expand exec_prefix.
24152test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024153
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024154DEFS=-DHAVE_CONFIG_H
24155
Skip Montanaro6dead952003-09-25 14:50:04 +000024156ac_libobjs=
24157ac_ltlibobjs=
24158for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24159 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024160 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24161 ac_i=`echo "$ac_i" | sed "$ac_script"`
24162 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24163 # will be set to the directory where LIBOBJS objects are built.
24164 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24165 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024166done
24167LIBOBJS=$ac_libobjs
24168
24169LTLIBOBJS=$ac_ltlibobjs
24170
24171
Martin v. Löwis11437992002-04-12 09:54:03 +000024172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024173: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024174ac_clean_files_save=$ac_clean_files
24175ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24176{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24177echo "$as_me: creating $CONFIG_STATUS" >&6;}
24178cat >$CONFIG_STATUS <<_ACEOF
24179#! $SHELL
24180# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024181# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024182# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024183# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024184
Martin v. Löwis11437992002-04-12 09:54:03 +000024185debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024186ac_cs_recheck=false
24187ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024188SHELL=\${CONFIG_SHELL-$SHELL}
24189_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024190
Martin v. Löwis11437992002-04-12 09:54:03 +000024191cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024192## --------------------- ##
24193## M4sh Initialization. ##
24194## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024195
Martin v. Löwiseba40652007-08-30 20:10:57 +000024196# Be more Bourne compatible
24197DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024198if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24199 emulate sh
24200 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024201 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24202 # is contrary to our usage. Disable this feature.
24203 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024204 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024205else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024206 case `(set -o) 2>/dev/null` in
24207 *posix*) set -o posix ;;
24208esac
24209
Martin v. Löwis11437992002-04-12 09:54:03 +000024210fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024211
Skip Montanaro6dead952003-09-25 14:50:04 +000024212
Martin v. Löwis11437992002-04-12 09:54:03 +000024213
24214
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024216# Avoid depending upon Character Ranges.
24217as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24218as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24219as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24220as_cr_digits='0123456789'
24221as_cr_alnum=$as_cr_Letters$as_cr_digits
24222
24223# The user is always right.
24224if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024225 echo "#! /bin/sh" >conf$$.sh
24226 echo "exit 0" >>conf$$.sh
24227 chmod +x conf$$.sh
24228 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024229 PATH_SEPARATOR=';'
24230 else
24231 PATH_SEPARATOR=:
24232 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024233 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024234fi
24235
Martin v. Löwiseba40652007-08-30 20:10:57 +000024236# Support unset when possible.
24237if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24238 as_unset=unset
24239else
24240 as_unset=false
24241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024242
Martin v. Löwiseba40652007-08-30 20:10:57 +000024243
24244# IFS
24245# We need space, tab and new line, in precisely that order. Quoting is
24246# there to prevent editors from complaining about space-tab.
24247# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24248# splitting by setting IFS to empty value.)
24249as_nl='
24250'
24251IFS=" "" $as_nl"
24252
24253# Find who we are. Look in the path if we contain no directory separator.
24254case $0 in
24255 *[\\/]* ) as_myself=$0 ;;
24256 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024257for as_dir in $PATH
24258do
24259 IFS=$as_save_IFS
24260 test -z "$as_dir" && as_dir=.
24261 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24262done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024263IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024264
Martin v. Löwiseba40652007-08-30 20:10:57 +000024265 ;;
24266esac
24267# We did not find ourselves, most probably we were run as `sh COMMAND'
24268# in which case we are not to be found in the path.
24269if test "x$as_myself" = x; then
24270 as_myself=$0
24271fi
24272if test ! -f "$as_myself"; then
24273 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24274 { (exit 1); exit 1; }
24275fi
24276
24277# Work around bugs in pre-3.0 UWIN ksh.
24278for as_var in ENV MAIL MAILPATH
24279do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24280done
24281PS1='$ '
24282PS2='> '
24283PS4='+ '
24284
24285# NLS nuisances.
24286for as_var in \
24287 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24288 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24289 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024290do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024291 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24292 eval $as_var=C; export $as_var
24293 else
24294 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24295 fi
24296done
24297
24298# Required to use basename.
24299if expr a : '\(a\)' >/dev/null 2>&1 &&
24300 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24301 as_expr=expr
24302else
24303 as_expr=false
24304fi
24305
24306if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24307 as_basename=basename
24308else
24309 as_basename=false
24310fi
24311
24312
24313# Name of the executable.
24314as_me=`$as_basename -- "$0" ||
24315$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24316 X"$0" : 'X\(//\)$' \| \
24317 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24318echo X/"$0" |
24319 sed '/^.*\/\([^/][^/]*\)\/*$/{
24320 s//\1/
24321 q
24322 }
24323 /^X\/\(\/\/\)$/{
24324 s//\1/
24325 q
24326 }
24327 /^X\/\(\/\).*/{
24328 s//\1/
24329 q
24330 }
24331 s/.*/./; q'`
24332
24333# CDPATH.
24334$as_unset CDPATH
24335
24336
24337
Martin v. Löwis11437992002-04-12 09:54:03 +000024338 as_lineno_1=$LINENO
24339 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024340 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024341 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024342
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24344 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345 # line-number line after each line using $LINENO; the second 'sed'
24346 # does the real work. The second script uses 'N' to pair each
24347 # line-number line with the line containing $LINENO, and appends
24348 # trailing '-' during substitution so that $LINENO is not a special
24349 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024350 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024351 # scripts with optimization help from Paolo Bonzini. Blame Lee
24352 # E. McMahon (1931-1989) for sed's syntax. :-)
24353 sed -n '
24354 p
24355 /[$]LINENO/=
24356 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024357 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024358 s/[$]LINENO.*/&-/
24359 t lineno
24360 b
24361 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024362 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024363 :loop
24364 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024365 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024366 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024367 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024368 chmod +x "$as_me.lineno" ||
24369 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024370 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024371
Martin v. Löwis11437992002-04-12 09:54:03 +000024372 # Don't try to exec as it changes $[0], causing all sort of problems
24373 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024374 # original and so on. Autoconf is especially sensitive to this).
24375 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024376 # Exit status is that of the last command.
24377 exit
24378}
24379
24380
Martin v. Löwiseba40652007-08-30 20:10:57 +000024381if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24382 as_dirname=dirname
24383else
24384 as_dirname=false
24385fi
24386
24387ECHO_C= ECHO_N= ECHO_T=
24388case `echo -n x` in
24389-n*)
24390 case `echo 'x\c'` in
24391 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24392 *) ECHO_C='\c';;
24393 esac;;
24394*)
24395 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024396esac
24397
Martin v. Löwiseba40652007-08-30 20:10:57 +000024398if expr a : '\(a\)' >/dev/null 2>&1 &&
24399 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024400 as_expr=expr
24401else
24402 as_expr=false
24403fi
24404
24405rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024406if test -d conf$$.dir; then
24407 rm -f conf$$.dir/conf$$.file
24408else
24409 rm -f conf$$.dir
24410 mkdir conf$$.dir
24411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024412echo >conf$$.file
24413if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024414 as_ln_s='ln -s'
24415 # ... but there are two gotchas:
24416 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24417 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24418 # In both cases, we have to default to `cp -p'.
24419 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024420 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024421elif ln conf$$.file conf$$ 2>/dev/null; then
24422 as_ln_s=ln
24423else
24424 as_ln_s='cp -p'
24425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024426rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24427rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024428
Skip Montanaro6dead952003-09-25 14:50:04 +000024429if mkdir -p . 2>/dev/null; then
24430 as_mkdir_p=:
24431else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024432 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024433 as_mkdir_p=false
24434fi
24435
Martin v. Löwiseba40652007-08-30 20:10:57 +000024436if test -x / >/dev/null 2>&1; then
24437 as_test_x='test -x'
24438else
24439 if ls -dL / >/dev/null 2>&1; then
24440 as_ls_L_option=L
24441 else
24442 as_ls_L_option=
24443 fi
24444 as_test_x='
24445 eval sh -c '\''
24446 if test -d "$1"; then
24447 test -d "$1/.";
24448 else
24449 case $1 in
24450 -*)set "./$1";;
24451 esac;
24452 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24453 ???[sx]*):;;*)false;;esac;fi
24454 '\'' sh
24455 '
24456fi
24457as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024458
24459# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024460as_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 +000024461
24462# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024463as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024464
24465
Martin v. Löwis11437992002-04-12 09:54:03 +000024466exec 6>&1
24467
Martin v. Löwiseba40652007-08-30 20:10:57 +000024468# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024469# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024470# values after options handling.
24471ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024472This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024473generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024474
24475 CONFIG_FILES = $CONFIG_FILES
24476 CONFIG_HEADERS = $CONFIG_HEADERS
24477 CONFIG_LINKS = $CONFIG_LINKS
24478 CONFIG_COMMANDS = $CONFIG_COMMANDS
24479 $ $0 $@
24480
Martin v. Löwiseba40652007-08-30 20:10:57 +000024481on `(hostname || uname -n) 2>/dev/null | sed 1q`
24482"
24483
Martin v. Löwis11437992002-04-12 09:54:03 +000024484_ACEOF
24485
Martin v. Löwiseba40652007-08-30 20:10:57 +000024486cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024487# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024488config_files="$ac_config_files"
24489config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024490
Martin v. Löwiseba40652007-08-30 20:10:57 +000024491_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024492
24493cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024494ac_cs_usage="\
24495\`$as_me' instantiates files from templates according to the
24496current configuration.
24497
24498Usage: $0 [OPTIONS] [FILE]...
24499
24500 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024501 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024502 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024503 -d, --debug don't remove temporary files
24504 --recheck update $as_me by reconfiguring in the same conditions
24505 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024506 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024507 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024508 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024509
24510Configuration files:
24511$config_files
24512
24513Configuration headers:
24514$config_headers
24515
24516Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024517
Martin v. Löwiseba40652007-08-30 20:10:57 +000024518_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024519cat >>$CONFIG_STATUS <<_ACEOF
24520ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024521python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024522configured by $0, generated by GNU Autoconf 2.61,
24523 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024524
Martin v. Löwiseba40652007-08-30 20:10:57 +000024525Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024526This config.status script is free software; the Free Software Foundation
24527gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024528
24529ac_pwd='$ac_pwd'
24530srcdir='$srcdir'
24531INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024532_ACEOF
24533
24534cat >>$CONFIG_STATUS <<\_ACEOF
24535# If no file are specified by the user, then we need to provide default
24536# value. By we need to know if files were specified by the user.
24537ac_need_defaults=:
24538while test $# != 0
24539do
24540 case $1 in
24541 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024542 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24543 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024544 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024545 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024546 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024547 ac_option=$1
24548 ac_optarg=$2
24549 ac_shift=shift
24550 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024551 esac
24552
Skip Montanaro6dead952003-09-25 14:50:04 +000024553 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024554 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024555 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24556 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024557 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24558 echo "$ac_cs_version"; exit ;;
24559 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024560 debug=: ;;
24561 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024562 $ac_shift
24563 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024564 ac_need_defaults=false;;
24565 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024566 $ac_shift
24567 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024568 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024569 --he | --h)
24570 # Conflict between --help and --header
24571 { echo "$as_me: error: ambiguous option: $1
24572Try \`$0 --help' for more information." >&2
24573 { (exit 1); exit 1; }; };;
24574 --help | --hel | -h )
24575 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024576 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24577 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24578 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024579
24580 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024581 -*) { echo "$as_me: error: unrecognized option: $1
24582Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024583 { (exit 1); exit 1; }; } ;;
24584
Martin v. Löwiseba40652007-08-30 20:10:57 +000024585 *) ac_config_targets="$ac_config_targets $1"
24586 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024587
24588 esac
24589 shift
24590done
24591
Skip Montanaro6dead952003-09-25 14:50:04 +000024592ac_configure_extra_args=
24593
24594if $ac_cs_silent; then
24595 exec 6>/dev/null
24596 ac_configure_extra_args="$ac_configure_extra_args --silent"
24597fi
24598
24599_ACEOF
24600cat >>$CONFIG_STATUS <<_ACEOF
24601if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024602 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24603 CONFIG_SHELL=$SHELL
24604 export CONFIG_SHELL
24605 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024606fi
24607
Martin v. Löwis11437992002-04-12 09:54:03 +000024608_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024609cat >>$CONFIG_STATUS <<\_ACEOF
24610exec 5>>config.log
24611{
24612 echo
24613 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24614## Running $as_me. ##
24615_ASBOX
24616 echo "$ac_log"
24617} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024618
Martin v. Löwiseba40652007-08-30 20:10:57 +000024619_ACEOF
24620cat >>$CONFIG_STATUS <<_ACEOF
24621_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024622
24623cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024624
24625# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024626for ac_config_target in $ac_config_targets
24627do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024628 case $ac_config_target in
24629 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24630 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24631 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24632 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024633 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
24634 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024635 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24636 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24637
Martin v. Löwis11437992002-04-12 09:54:03 +000024638 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24639echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24640 { (exit 1); exit 1; }; };;
24641 esac
24642done
24643
Martin v. Löwiseba40652007-08-30 20:10:57 +000024644
Martin v. Löwis11437992002-04-12 09:54:03 +000024645# If the user did not use the arguments to specify the items to instantiate,
24646# then the envvar interface is used. Set only those that are not.
24647# We use the long form for the default assignment because of an extremely
24648# bizarre bug on SunOS 4.1.3.
24649if $ac_need_defaults; then
24650 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24651 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24652fi
24653
Skip Montanaro6dead952003-09-25 14:50:04 +000024654# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024655# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024656# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024657# Hook for its removal unless debugging.
24658# Note that there is a small window in which the directory will not be cleaned:
24659# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024660$debug ||
24661{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024662 tmp=
24663 trap 'exit_status=$?
24664 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24665' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024666 trap '{ (exit 1); exit 1; }' 1 2 13 15
24667}
Martin v. Löwis11437992002-04-12 09:54:03 +000024668# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024669
Martin v. Löwis11437992002-04-12 09:54:03 +000024670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024671 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024672 test -n "$tmp" && test -d "$tmp"
24673} ||
24674{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024675 tmp=./conf$$-$RANDOM
24676 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024677} ||
24678{
Skip Montanaro6dead952003-09-25 14:50:04 +000024679 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024680 { (exit 1); exit 1; }
24681}
24682
Martin v. Löwis11437992002-04-12 09:54:03 +000024683#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024684# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024685#
24686
24687# No need to generate the scripts if there are no CONFIG_FILES.
24688# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024689if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024690
24691_ACEOF
24692
Martin v. Löwiseba40652007-08-30 20:10:57 +000024693
24694
24695ac_delim='%!_!# '
24696for ac_last_try in false false false false false :; do
24697 cat >conf$$subs.sed <<_ACEOF
24698SHELL!$SHELL$ac_delim
24699PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24700PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24701PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24702PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24703PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24704PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24705exec_prefix!$exec_prefix$ac_delim
24706prefix!$prefix$ac_delim
24707program_transform_name!$program_transform_name$ac_delim
24708bindir!$bindir$ac_delim
24709sbindir!$sbindir$ac_delim
24710libexecdir!$libexecdir$ac_delim
24711datarootdir!$datarootdir$ac_delim
24712datadir!$datadir$ac_delim
24713sysconfdir!$sysconfdir$ac_delim
24714sharedstatedir!$sharedstatedir$ac_delim
24715localstatedir!$localstatedir$ac_delim
24716includedir!$includedir$ac_delim
24717oldincludedir!$oldincludedir$ac_delim
24718docdir!$docdir$ac_delim
24719infodir!$infodir$ac_delim
24720htmldir!$htmldir$ac_delim
24721dvidir!$dvidir$ac_delim
24722pdfdir!$pdfdir$ac_delim
24723psdir!$psdir$ac_delim
24724libdir!$libdir$ac_delim
24725localedir!$localedir$ac_delim
24726mandir!$mandir$ac_delim
24727DEFS!$DEFS$ac_delim
24728ECHO_C!$ECHO_C$ac_delim
24729ECHO_N!$ECHO_N$ac_delim
24730ECHO_T!$ECHO_T$ac_delim
24731LIBS!$LIBS$ac_delim
24732build_alias!$build_alias$ac_delim
24733host_alias!$host_alias$ac_delim
24734target_alias!$target_alias$ac_delim
24735VERSION!$VERSION$ac_delim
24736SOVERSION!$SOVERSION$ac_delim
24737CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24738UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24739PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024740PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24742PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24743PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24744FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24745FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24746FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24747FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24748FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24749MACHDEP!$MACHDEP$ac_delim
24750SGI_ABI!$SGI_ABI$ac_delim
24751EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24752EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24753CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24754EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24755CC!$CC$ac_delim
24756CFLAGS!$CFLAGS$ac_delim
24757LDFLAGS!$LDFLAGS$ac_delim
24758CPPFLAGS!$CPPFLAGS$ac_delim
24759ac_ct_CC!$ac_ct_CC$ac_delim
24760EXEEXT!$EXEEXT$ac_delim
24761OBJEXT!$OBJEXT$ac_delim
24762CXX!$CXX$ac_delim
24763MAINCC!$MAINCC$ac_delim
24764CPP!$CPP$ac_delim
24765GREP!$GREP$ac_delim
24766EGREP!$EGREP$ac_delim
24767BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24768LIBRARY!$LIBRARY$ac_delim
24769LDLIBRARY!$LDLIBRARY$ac_delim
24770DLLLIBRARY!$DLLLIBRARY$ac_delim
24771BLDLIBRARY!$BLDLIBRARY$ac_delim
24772LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24773INSTSONAME!$INSTSONAME$ac_delim
24774RUNSHARED!$RUNSHARED$ac_delim
24775LINKCC!$LINKCC$ac_delim
24776RANLIB!$RANLIB$ac_delim
24777AR!$AR$ac_delim
24778SVNVERSION!$SVNVERSION$ac_delim
24779INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24780INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24781INSTALL_DATA!$INSTALL_DATA$ac_delim
24782LN!$LN$ac_delim
24783OPT!$OPT$ac_delim
24784BASECFLAGS!$BASECFLAGS$ac_delim
24785OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24786LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24787SO!$SO$ac_delim
24788LDSHARED!$LDSHARED$ac_delim
24789BLDSHARED!$BLDSHARED$ac_delim
24790CCSHARED!$CCSHARED$ac_delim
24791LINKFORSHARED!$LINKFORSHARED$ac_delim
24792CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24793SHLIBS!$SHLIBS$ac_delim
24794USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024795_ACEOF
24796
24797 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24798 break
24799 elif $ac_last_try; then
24800 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24801echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24802 { (exit 1); exit 1; }; }
24803 else
24804 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024805 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024806done
24807
24808ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24809if test -n "$ac_eof"; then
24810 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24811 ac_eof=`expr $ac_eof + 1`
24812fi
24813
24814cat >>$CONFIG_STATUS <<_ACEOF
24815cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24816/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24817_ACEOF
24818sed '
24819s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24820s/^/s,@/; s/!/@,|#_!!_#|/
24821:n
24822t n
24823s/'"$ac_delim"'$/,g/; t
24824s/$/\\/; p
24825N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24826' >>$CONFIG_STATUS <conf$$subs.sed
24827rm -f conf$$subs.sed
24828cat >>$CONFIG_STATUS <<_ACEOF
24829CEOF$ac_eof
24830_ACEOF
24831
24832
24833ac_delim='%!_!# '
24834for ac_last_try in false false false false false :; do
24835 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024836SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024837USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24838LDLAST!$LDLAST$ac_delim
24839THREADOBJ!$THREADOBJ$ac_delim
24840DLINCLDIR!$DLINCLDIR$ac_delim
24841DYNLOADFILE!$DYNLOADFILE$ac_delim
24842MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24843TRUE!$TRUE$ac_delim
24844LIBOBJS!$LIBOBJS$ac_delim
24845HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24846HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24847HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24848HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24849HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24850LIBM!$LIBM$ac_delim
24851LIBC!$LIBC$ac_delim
24852UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24853THREADHEADERS!$THREADHEADERS$ac_delim
24854SRCDIRS!$SRCDIRS$ac_delim
24855LTLIBOBJS!$LTLIBOBJS$ac_delim
24856_ACEOF
24857
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024858 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024859 break
24860 elif $ac_last_try; then
24861 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24862echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24863 { (exit 1); exit 1; }; }
24864 else
24865 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24866 fi
24867done
24868
24869ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24870if test -n "$ac_eof"; then
24871 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24872 ac_eof=`expr $ac_eof + 1`
24873fi
24874
24875cat >>$CONFIG_STATUS <<_ACEOF
24876cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24877/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24878_ACEOF
24879sed '
24880s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24881s/^/s,@/; s/!/@,|#_!!_#|/
24882:n
24883t n
24884s/'"$ac_delim"'$/,g/; t
24885s/$/\\/; p
24886N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24887' >>$CONFIG_STATUS <conf$$subs.sed
24888rm -f conf$$subs.sed
24889cat >>$CONFIG_STATUS <<_ACEOF
24890:end
24891s/|#_!!_#|//g
24892CEOF$ac_eof
24893_ACEOF
24894
24895
24896# VPATH may cause trouble with some makes, so we remove $(srcdir),
24897# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24898# trailing colons and then remove the whole line if VPATH becomes empty
24899# (actually we leave an empty line to preserve line numbers).
24900if test "x$srcdir" = x.; then
24901 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24902s/:*\$(srcdir):*/:/
24903s/:*\${srcdir}:*/:/
24904s/:*@srcdir@:*/:/
24905s/^\([^=]*=[ ]*\):*/\1/
24906s/:*$//
24907s/^[^=]*=[ ]*$//
24908}'
24909fi
24910
24911cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024912fi # test -n "$CONFIG_FILES"
24913
Martin v. Löwiseba40652007-08-30 20:10:57 +000024914
24915for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24916do
24917 case $ac_tag in
24918 :[FHLC]) ac_mode=$ac_tag; continue;;
24919 esac
24920 case $ac_mode$ac_tag in
24921 :[FHL]*:*);;
24922 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24923echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24924 { (exit 1); exit 1; }; };;
24925 :[FH]-) ac_tag=-:-;;
24926 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24927 esac
24928 ac_save_IFS=$IFS
24929 IFS=:
24930 set x $ac_tag
24931 IFS=$ac_save_IFS
24932 shift
24933 ac_file=$1
24934 shift
24935
24936 case $ac_mode in
24937 :L) ac_source=$1;;
24938 :[FH])
24939 ac_file_inputs=
24940 for ac_f
24941 do
24942 case $ac_f in
24943 -) ac_f="$tmp/stdin";;
24944 *) # Look for the file first in the build tree, then in the source tree
24945 # (if the path is not absolute). The absolute path cannot be DOS-style,
24946 # because $ac_f cannot contain `:'.
24947 test -f "$ac_f" ||
24948 case $ac_f in
24949 [\\/$]*) false;;
24950 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24951 esac ||
24952 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24953echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24954 { (exit 1); exit 1; }; };;
24955 esac
24956 ac_file_inputs="$ac_file_inputs $ac_f"
24957 done
24958
24959 # Let's still pretend it is `configure' which instantiates (i.e., don't
24960 # use $as_me), people would be surprised to read:
24961 # /* config.h. Generated by config.status. */
24962 configure_input="Generated from "`IFS=:
24963 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24964 if test x"$ac_file" != x-; then
24965 configure_input="$ac_file. $configure_input"
24966 { echo "$as_me:$LINENO: creating $ac_file" >&5
24967echo "$as_me: creating $ac_file" >&6;}
24968 fi
24969
24970 case $ac_tag in
24971 *:-:* | *:-) cat >"$tmp/stdin";;
24972 esac
24973 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024974 esac
24975
Martin v. Löwiseba40652007-08-30 20:10:57 +000024976 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024977$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024978 X"$ac_file" : 'X\(//\)[^/]' \| \
24979 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024980 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024981echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24983 s//\1/
24984 q
24985 }
24986 /^X\(\/\/\)[^/].*/{
24987 s//\1/
24988 q
24989 }
24990 /^X\(\/\/\)$/{
24991 s//\1/
24992 q
24993 }
24994 /^X\(\/\).*/{
24995 s//\1/
24996 q
24997 }
24998 s/.*/./; q'`
24999 { as_dir="$ac_dir"
25000 case $as_dir in #(
25001 -*) as_dir=./$as_dir;;
25002 esac
25003 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025004 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025005 while :; do
25006 case $as_dir in #(
25007 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25008 *) as_qdir=$as_dir;;
25009 esac
25010 as_dirs="'$as_qdir' $as_dirs"
25011 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025012$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025013 X"$as_dir" : 'X\(//\)[^/]' \| \
25014 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025015 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025016echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25018 s//\1/
25019 q
25020 }
25021 /^X\(\/\/\)[^/].*/{
25022 s//\1/
25023 q
25024 }
25025 /^X\(\/\/\)$/{
25026 s//\1/
25027 q
25028 }
25029 /^X\(\/\).*/{
25030 s//\1/
25031 q
25032 }
25033 s/.*/./; q'`
25034 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025035 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025036 test -z "$as_dirs" || eval "mkdir $as_dirs"
25037 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25038echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025039 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025040 ac_builddir=.
25041
Martin v. Löwiseba40652007-08-30 20:10:57 +000025042case "$ac_dir" in
25043.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25044*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025045 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025046 # A ".." for each directory in $ac_dir_suffix.
25047 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25048 case $ac_top_builddir_sub in
25049 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25050 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25051 esac ;;
25052esac
25053ac_abs_top_builddir=$ac_pwd
25054ac_abs_builddir=$ac_pwd$ac_dir_suffix
25055# for backward compatibility:
25056ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025057
25058case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025059 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025060 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025061 ac_top_srcdir=$ac_top_builddir_sub
25062 ac_abs_top_srcdir=$ac_pwd ;;
25063 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025064 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025065 ac_top_srcdir=$srcdir
25066 ac_abs_top_srcdir=$srcdir ;;
25067 *) # Relative name.
25068 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25069 ac_top_srcdir=$ac_top_build_prefix$srcdir
25070 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025071esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025072ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025073
Martin v. Löwis11437992002-04-12 09:54:03 +000025074
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075 case $ac_mode in
25076 :F)
25077 #
25078 # CONFIG_FILE
25079 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025080
25081 case $INSTALL in
25082 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025084 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025085_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025086
25087cat >>$CONFIG_STATUS <<\_ACEOF
25088# If the template does not know about datarootdir, expand it.
25089# FIXME: This hack should be removed a few years after 2.60.
25090ac_datarootdir_hack=; ac_datarootdir_seen=
25091
25092case `sed -n '/datarootdir/ {
25093 p
25094 q
25095}
25096/@datadir@/p
25097/@docdir@/p
25098/@infodir@/p
25099/@localedir@/p
25100/@mandir@/p
25101' $ac_file_inputs` in
25102*datarootdir*) ac_datarootdir_seen=yes;;
25103*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25104 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25105echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25106_ACEOF
25107cat >>$CONFIG_STATUS <<_ACEOF
25108 ac_datarootdir_hack='
25109 s&@datadir@&$datadir&g
25110 s&@docdir@&$docdir&g
25111 s&@infodir@&$infodir&g
25112 s&@localedir@&$localedir&g
25113 s&@mandir@&$mandir&g
25114 s&\\\${datarootdir}&$datarootdir&g' ;;
25115esac
25116_ACEOF
25117
25118# Neutralize VPATH when `$srcdir' = `.'.
25119# Shell code in configure.ac might set extrasub.
25120# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025121cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025122 sed "$ac_vpsub
25123$extrasub
25124_ACEOF
25125cat >>$CONFIG_STATUS <<\_ACEOF
25126:t
25127/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025128s&@configure_input@&$configure_input&;t t
25129s&@top_builddir@&$ac_top_builddir_sub&;t t
25130s&@srcdir@&$ac_srcdir&;t t
25131s&@abs_srcdir@&$ac_abs_srcdir&;t t
25132s&@top_srcdir@&$ac_top_srcdir&;t t
25133s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25134s&@builddir@&$ac_builddir&;t t
25135s&@abs_builddir@&$ac_abs_builddir&;t t
25136s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25137s&@INSTALL@&$ac_INSTALL&;t t
25138$ac_datarootdir_hack
25139" $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 +000025140
Martin v. Löwiseba40652007-08-30 20:10:57 +000025141test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25142 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25143 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25144 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25145which seems to be undefined. Please make sure it is defined." >&5
25146echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25147which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025148
Martin v. Löwiseba40652007-08-30 20:10:57 +000025149 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025150 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151 -) cat "$tmp/out"; rm -f "$tmp/out";;
25152 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025153 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025154 ;;
25155 :H)
25156 #
25157 # CONFIG_HEADER
25158 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025159_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025160
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161# Transform confdefs.h into a sed script `conftest.defines', that
25162# substitutes the proper values into config.h.in to produce config.h.
25163rm -f conftest.defines conftest.tail
25164# First, append a space to every undef/define line, to ease matching.
25165echo 's/$/ /' >conftest.defines
25166# Then, protect against being on the right side of a sed subst, or in
25167# an unquoted here document, in config.status. If some macros were
25168# called several times there might be several #defines for the same
25169# symbol, which is useless. But do not sort them, since the last
25170# AC_DEFINE must be honored.
25171ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25172# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25173# NAME is the cpp macro being defined, VALUE is the value it is being given.
25174# PARAMS is the parameter list in the macro definition--in most cases, it's
25175# just an empty string.
25176ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25177ac_dB='\\)[ (].*,\\1define\\2'
25178ac_dC=' '
25179ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025180
Martin v. Löwiseba40652007-08-30 20:10:57 +000025181uniq confdefs.h |
25182 sed -n '
25183 t rset
25184 :rset
25185 s/^[ ]*#[ ]*define[ ][ ]*//
25186 t ok
25187 d
25188 :ok
25189 s/[\\&,]/\\&/g
25190 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25191 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25192 ' >>conftest.defines
25193
25194# Remove the space that was appended to ease matching.
25195# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025196# example, in the case of _POSIX_SOURCE, which is predefined and required
25197# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198# (The regexp can be short, since the line contains either #define or #undef.)
25199echo 's/ $//
25200s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025201
Martin v. Löwiseba40652007-08-30 20:10:57 +000025202# Break up conftest.defines:
25203ac_max_sed_lines=50
25204
25205# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25206# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25207# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25208# et cetera.
25209ac_in='$ac_file_inputs'
25210ac_out='"$tmp/out1"'
25211ac_nxt='"$tmp/out2"'
25212
25213while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025214do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215 # Write a here document:
25216 cat >>$CONFIG_STATUS <<_ACEOF
25217 # First, check the format of the line:
25218 cat >"\$tmp/defines.sed" <<\\CEOF
25219/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25220/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25221b
25222:def
25223_ACEOF
25224 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025225 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025226 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25227 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25228 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25229 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025230 rm -f conftest.defines
25231 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025232done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025234
Martin v. Löwiseba40652007-08-30 20:10:57 +000025235echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025236cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025237 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025238 echo "/* $configure_input */" >"$tmp/config.h"
25239 cat "$ac_result" >>"$tmp/config.h"
25240 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025241 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25242echo "$as_me: $ac_file is unchanged" >&6;}
25243 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025244 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025246 fi
25247 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025248 echo "/* $configure_input */"
25249 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025251 rm -f "$tmp/out12"
25252 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025253
Martin v. Löwiseba40652007-08-30 20:10:57 +000025254
25255 esac
25256
25257done # for ac_tag
25258
Guido van Rossum627b2d71993-12-24 10:39:16 +000025259
Martin v. Löwis11437992002-04-12 09:54:03 +000025260{ (exit 0); exit 0; }
25261_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025262chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025263ac_clean_files=$ac_clean_files_save
25264
25265
25266# configure is writing to config.log, and then calls config.status.
25267# config.status does its own redirection, appending to config.log.
25268# Unfortunately, on DOS this fails, as config.log is still kept open
25269# by configure, so config.status won't be able to write to it; its
25270# output is simply discarded. So we exec the FD to /dev/null,
25271# effectively closing config.log, so it can be properly (re)opened and
25272# appended to by config.status. When coming back to configure, we
25273# need to make the FD available again.
25274if test "$no_create" != yes; then
25275 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025276 ac_config_status_args=
25277 test "$silent" = yes &&
25278 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025279 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025280 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025281 exec 5>>config.log
25282 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25283 # would make configure fail if this is the last instruction.
25284 $ac_cs_success || { (exit 1); exit 1; }
25285fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025286
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025287
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025288echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025289if test ! -f Modules/Setup
25290then
25291 cp $srcdir/Modules/Setup.dist Modules/Setup
25292fi
25293
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025294echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025295if test ! -f Modules/Setup.local
25296then
25297 echo "# Edit this file for local setup changes" >Modules/Setup.local
25298fi
25299
25300echo "creating Makefile"
25301$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25302 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025303 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025304
25305case $ac_sys_system in
25306BeOS)
25307 { echo "$as_me:$LINENO: WARNING:
25308
25309 Support for BeOS is deprecated as of Python 2.6.
25310 See PEP 11 for the gory details.
25311 " >&5
25312echo "$as_me: WARNING:
25313
25314 Support for BeOS is deprecated as of Python 2.6.
25315 See PEP 11 for the gory details.
25316 " >&2;}
25317 ;;
25318*) ;;
25319esac
25320
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025321mv config.c Modules