blob: f7895ba701490865351ef81b0702063b8451b310 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002# From configure.in Revision: 66283 .
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
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001250\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001311 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
1327 --enable-unicode[=ucs[24]]
1328 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
1335 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-signal-module disable/enable signal module
1348 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1349 --with(out)-threads[=DIRECTORY]
1350 disable/enable thread support
1351 --with(out)-thread[=DIRECTORY]
1352 deprecated; use --with(out)-threads
1353 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001355 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-pymalloc disable/enable specialized mallocs
1357 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-fpectl enable SIGFPE catching
1359 --with-libm=STRING math library
1360 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Some influential environment variables:
1363 CC C compiler command
1364 CFLAGS C compiler flags
1365 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1366 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001367 LIBS libraries to pass to the linker, e.g. -l<library>
1368 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1369 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 CPP C preprocessor
1371
1372Use these variables to override the choices made by `configure' or to help
1373it to find libraries and programs with nonstandard names/locations.
1374
Martin v. Löwis1d459062005-03-14 21:23:33 +00001375Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001378fi
1379
1380if test "$ac_init_help" = "recursive"; then
1381 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_builddir=.
1385
Martin v. Löwiseba40652007-08-30 20:10:57 +00001386case "$ac_dir" in
1387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1388*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001390 # A ".." for each directory in $ac_dir_suffix.
1391 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1392 case $ac_top_builddir_sub in
1393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1395 esac ;;
1396esac
1397ac_abs_top_builddir=$ac_pwd
1398ac_abs_builddir=$ac_pwd$ac_dir_suffix
1399# for backward compatibility:
1400ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001403 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 ac_top_srcdir=$ac_top_builddir_sub
1406 ac_abs_top_srcdir=$ac_pwd ;;
1407 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 ac_top_srcdir=$srcdir
1410 ac_abs_top_srcdir=$srcdir ;;
1411 *) # Relative name.
1412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1413 ac_top_srcdir=$ac_top_build_prefix$srcdir
1414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001415esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001417
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 cd "$ac_dir" || { ac_status=$?; continue; }
1419 # Check for guested configure.
1420 if test -f "$ac_srcdir/configure.gnu"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1423 elif test -f "$ac_srcdir/configure"; then
1424 echo &&
1425 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 else
1427 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428 fi || ac_status=$?
1429 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 done
1431fi
1432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001434if $ac_init_version; then
1435 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001436python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001438
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14402002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441This configure script is free software; the Free Software Foundation
1442gives unlimited permission to copy, distribute and modify it.
1443_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This file contains any messages produced by compilers while
1448running configure, to aid debugging if configure makes a mistake.
1449
Neal Norwitz9be57322006-08-18 05:39:20 +00001450It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453 $ $0 $@
1454
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001457{
1458cat <<_ASUNAME
1459## --------- ##
1460## Platform. ##
1461## --------- ##
1462
1463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1464uname -m = `(uname -m) 2>/dev/null || echo unknown`
1465uname -r = `(uname -r) 2>/dev/null || echo unknown`
1466uname -s = `(uname -s) 2>/dev/null || echo unknown`
1467uname -v = `(uname -v) 2>/dev/null || echo unknown`
1468
1469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1471
1472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1479
1480_ASUNAME
1481
1482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483for as_dir in $PATH
1484do
1485 IFS=$as_save_IFS
1486 test -z "$as_dir" && as_dir=.
1487 echo "PATH: $as_dir"
1488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491} >&5
1492
1493cat >&5 <<_ACEOF
1494
1495
1496## ----------- ##
1497## Core tests. ##
1498## ----------- ##
1499
1500_ACEOF
1501
1502
1503# Keep a trace of the command line.
1504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001509ac_configure_args0=
1510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_must_keep_next=false
1512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001513do
Skip Montanaro6dead952003-09-25 14:50:04 +00001514 for ac_arg
1515 do
1516 case $ac_arg in
1517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1519 | -silent | --silent | --silen | --sile | --sil)
1520 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1523 esac
1524 case $ac_pass in
1525 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1526 2)
1527 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 case $ac_arg in
1532 *=* | --config-cache | -C | -disable-* | --disable-* \
1533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1535 | -with-* | --with-* | -without-* | --without-* | --x)
1536 case "$ac_configure_args0 " in
1537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1538 esac
1539 ;;
1540 -* ) ac_must_keep_next=true ;;
1541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001543 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 ;;
1545 esac
1546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001547done
Skip Montanaro6dead952003-09-25 14:50:04 +00001548$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1549$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 +00001550
1551# When interrupted or exit'd, cleanup temporary files, and complete
1552# config.log. We remove comments because anyway the quotes in there
1553# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554# WARNING: Use '\'' to represent an apostrophe within the trap.
1555# 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 +00001556trap 'exit_status=$?
1557 # Save into config.log some information that might help in debugging.
1558 {
1559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001560
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 cat <<\_ASBOX
1562## ---------------- ##
1563## Cache variables. ##
1564## ---------------- ##
1565_ASBOX
1566 echo
1567 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568(
1569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1570 eval ac_val=\$$ac_var
1571 case $ac_val in #(
1572 *${as_nl}*)
1573 case $ac_var in #(
1574 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1575echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1576 esac
1577 case $ac_var in #(
1578 _ | IFS | as_nl) ;; #(
1579 *) $as_unset $ac_var ;;
1580 esac ;;
1581 esac
1582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001587 "s/'\''/'\''\\\\'\'''\''/g;
1588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1589 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001590 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 esac |
1594 sort
1595)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001597
1598 cat <<\_ASBOX
1599## ----------------- ##
1600## Output variables. ##
1601## ----------------- ##
1602_ASBOX
1603 echo
1604 for ac_var in $ac_subst_vars
1605 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 eval ac_val=\$$ac_var
1607 case $ac_val in
1608 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1609 esac
1610 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001611 done | sort
1612 echo
1613
1614 if test -n "$ac_subst_files"; then
1615 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616## ------------------- ##
1617## File substitutions. ##
1618## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001619_ASBOX
1620 echo
1621 for ac_var in $ac_subst_files
1622 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 eval ac_val=\$$ac_var
1624 case $ac_val in
1625 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1626 esac
1627 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001628 done | sort
1629 echo
1630 fi
1631
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 if test -s confdefs.h; then
1633 cat <<\_ASBOX
1634## ----------- ##
1635## confdefs.h. ##
1636## ----------- ##
1637_ASBOX
1638 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001639 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 echo
1641 fi
1642 test "$ac_signal" != 0 &&
1643 echo "$as_me: caught signal $ac_signal"
1644 echo "$as_me: exit $exit_status"
1645 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001646 rm -f core *.core core.conftest.* &&
1647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001649' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001650for ac_signal in 1 2 13 15; do
1651 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1652done
1653ac_signal=0
1654
1655# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
1658# Predefined preprocessor variables.
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_NAME "$PACKAGE_NAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_VERSION "$PACKAGE_VERSION"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_STRING "$PACKAGE_STRING"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1682_ACEOF
1683
1684
1685# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001687if test -n "$CONFIG_SITE"; then
1688 set x "$CONFIG_SITE"
1689elif test "x$prefix" != xNONE; then
1690 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1691else
1692 set x "$ac_default_prefix/share/config.site" \
1693 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695shift
1696for ac_site_file
1697do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1700echo "$as_me: loading site script $ac_site_file" >&6;}
1701 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 . "$ac_site_file"
1703 fi
1704done
1705
1706if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001707 # Some versions of bash will fail to source /dev/null (special
1708 # files actually), so we avoid doing that.
1709 if test -f "$cache_file"; then
1710 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1711echo "$as_me: loading cache $cache_file" >&6;}
1712 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1714 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 esac
1716 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717else
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1719echo "$as_me: creating cache $cache_file" >&6;}
1720 >$cache_file
1721fi
1722
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001726for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 case $ac_old_set,$ac_new_set in
1732 set,)
1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 fi;;
1751 esac
1752 # Pass precious variables to config.status.
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
1771
Martin v. Löwiseba40652007-08-30 20:10:57 +00001772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
Guido van Rossum7f43da71994-08-01 12:15:30 +00001796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802
Michael W. Hudson54241132001-12-07 15:38:26 +00001803
Martin v. Löwiseba40652007-08-30 20:10:57 +00001804ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001805
1806
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
1809
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001810
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001811
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001812# We don't use PACKAGE_ variables, and they cause conflicts
1813# with other autoconf-based packages that include Python.h
1814grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1815rm confdefs.h
1816mv confdefs.h.new confdefs.h
1817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Neal Norwitz9be57322006-08-18 05:39:20 +00001819VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwis1142de32002-03-29 16:28:31 +00001821
1822SOVERSION=1.0
1823
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001824# The later defininition of _XOPEN_SOURCE disables certain features
1825# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _GNU_SOURCE 1
1829_ACEOF
1830
1831
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _NETBSD_SOURCE 1
1838_ACEOF
1839
1840
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define __BSD_VISIBLE 1
1847_ACEOF
1848
1849
Martin v. Löwisd6320502004-08-12 13:45:08 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _BSD_TYPES 1
1855_ACEOF
1856
1857
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _DARWIN_C_SOURCE 1
1864_ACEOF
1865
1866
1867
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001868define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001869
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001870# Arguments passed to configure.
1871
1872CONFIG_ARGS="$ac_configure_args"
1873
Martin v. Löwiseba40652007-08-30 20:10:57 +00001874# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001875if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001876 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001877 case $enableval in
1878 yes)
1879 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1880 ;;
1881 esac
1882 case $enableval in
1883 no)
1884 UNIVERSALSDK=
1885 enable_universalsdk=
1886 ;;
1887 *)
1888 UNIVERSALSDK=$enableval
1889 ;;
1890 esac
1891
1892else
1893
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898
1899
Martin v. Löwiseba40652007-08-30 20:10:57 +00001900
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001901ARCH_RUN_32BIT=
1902
1903
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001904UNIVERSAL_ARCHS="32-bit"
1905{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1906echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1907
1908# Check whether --with-universal-archs was given.
1909if test "${with_universal_archs+set}" = set; then
1910 withval=$with_universal_archs;
1911 { echo "$as_me:$LINENO: result: $withval" >&5
1912echo "${ECHO_T}$withval" >&6; }
1913 UNIVERSAL_ARCHS="$withval"
1914
1915else
1916
1917 { echo "$as_me:$LINENO: result: 32-bit" >&5
1918echo "${ECHO_T}32-bit" >&6; }
1919
1920fi
1921
1922
1923
1924
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001925
1926# Check whether --with-framework-name was given.
1927if test "${with_framework_name+set}" = set; then
1928 withval=$with_framework_name;
1929 PYTHONFRAMEWORK=${withval}
1930 PYTHONFRAMEWORKDIR=${withval}.framework
1931 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1932
1933else
1934
1935 PYTHONFRAMEWORK=Python
1936 PYTHONFRAMEWORKDIR=Python.framework
1937 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1938
1939fi
1940
Martin v. Löwiseba40652007-08-30 20:10:57 +00001941# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001942if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001943 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001944 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001945 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001946 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001947 esac
1948 case $enableval in
1949 no)
1950 PYTHONFRAMEWORK=
1951 PYTHONFRAMEWORKDIR=no-framework
1952 PYTHONFRAMEWORKPREFIX=
1953 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001954 FRAMEWORKINSTALLFIRST=
1955 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001956 FRAMEWORKALTINSTALLFIRST=
1957 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001958 if test "x${prefix}" = "xNONE"; then
1959 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1960 else
1961 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1962 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001963 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001964 ;;
1965 *)
1966 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001967 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001968 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001969 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1970 if test "$UNIVERSAL_ARCHS" = "all"
1971 then
1972 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
1973 else
1974 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1975 fi
1976
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001977 if test "x${prefix}" = "xNONE" ; then
1978 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1979 else
1980 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1981 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001982 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001983
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001984 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001986 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987
Martin v. Löwiseba40652007-08-30 20:10:57 +00001988 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001991
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001992 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1993
1994 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1995
Jack Jansene578a632001-08-15 01:27:14 +00001996 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001997
Guido van Rossum563e7081996-09-10 18:20:48 +00001998else
Martin v. Löwis11437992002-04-12 09:54:03 +00001999
Jack Jansene578a632001-08-15 01:27:14 +00002000 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002002 PYTHONFRAMEWORKPREFIX=
2003 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002004 FRAMEWORKINSTALLFIRST=
2005 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002006 FRAMEWORKALTINSTALLFIRST=
2007 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002008 if test "x${prefix}" = "xNONE" ; then
2009 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2010 else
2011 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2012 fi
Jack Jansene578a632001-08-15 01:27:14 +00002013 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002014
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002015 if test "$UNIVERSAL_ARCHS" = "all"
2016 then
2017 FRAMEWORKINSTALLLAST=update4wayuniversal
2018 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2019 fi
2020
Martin v. Löwiseba40652007-08-30 20:10:57 +00002021fi
2022
Michael W. Hudson54241132001-12-07 15:38:26 +00002023
2024
2025
2026
Jack Jansene578a632001-08-15 01:27:14 +00002027
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002028
2029
Ronald Oussoren5b787322006-06-06 19:50:24 +00002030
2031
2032
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002033
Jack Jansene578a632001-08-15 01:27:14 +00002034##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002035## AC_HELP_STRING(--with-dyld,
2036## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002037##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002038# Set name for machine-dependent library files
2039
Martin v. Löwiseba40652007-08-30 20:10:57 +00002040{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2041echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042if test -z "$MACHDEP"
2043then
Guido van Rossum563e7081996-09-10 18:20:48 +00002044 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002045 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2046 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002047 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002048 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_md_system=`echo $ac_sys_system |
2052 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2053 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002054 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002055 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002056
Guido van Rossum07397971997-04-29 21:49:50 +00002057 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002058 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002059 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002060 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002061 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002062 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 esac
2064fi
Guido van Rossum91922671997-10-09 20:24:13 +00002065
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002066# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2067# disable features if it is defined, without any means to access these
2068# features as extensions. For these systems, we skip the definition of
2069# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2070# some feature, make sure there is no alternative way to access this
2071# feature. Also, when using wildcards, make sure you have verified the
2072# need for not defining _XOPEN_SOURCE on all systems matching the
2073# wildcard, and that the wildcard does not include future systems
2074# (which may remove their limitations).
2075case $ac_sys_system/$ac_sys_release in
2076 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2077 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002078 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002079 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002080 define_xopen_source=no
2081 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2082 # also defined. This can be overridden by defining _BSD_SOURCE
2083 # As this has a different meaning on Linux, only define it on OpenBSD
2084
2085cat >>confdefs.h <<\_ACEOF
2086#define _BSD_SOURCE 1
2087_ACEOF
2088
2089 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002090 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2091 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2092 # Marc Recht
2093 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2094 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002095 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2096 # of union __?sigval. Reported by Stuart Bishop.
2097 SunOS/5.6)
2098 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002099 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2100 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002101 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002102 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002103 define_xopen_source=no;;
2104 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002105 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002107 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002108 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2109 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2110 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2111 # This should hopefully be fixed in FreeBSD 4.9
2112 FreeBSD/4.8* | Darwin/6* )
2113 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002114 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2115 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2116 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002117 AIX/4)
2118 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002119 AIX/5)
2120 if test `uname -r` -eq 1; then
2121 define_xopen_source=no
2122 fi
2123 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002127 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002128 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002129 define_xopen_source=no
2130 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002131 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2132 # defining NI_NUMERICHOST.
2133 QNX/6.3.2)
2134 define_xopen_source=no
2135 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002136
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002137esac
2138
2139if test $define_xopen_source = yes
2140then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002141 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2142 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002143 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2144 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002145 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002146 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002147
2148cat >>confdefs.h <<\_ACEOF
2149#define _XOPEN_SOURCE 500
2150_ACEOF
2151
2152 ;;
2153 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002154
2155cat >>confdefs.h <<\_ACEOF
2156#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002157_ACEOF
2158
Skip Montanarof0d5f792004-08-15 14:08:23 +00002159 ;;
2160 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002161
2162 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2163 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2164 # several APIs are not declared. Since this is also needed in some
2165 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002166 # except for Solaris 10, where it must not be defined,
2167 # as it implies XPG4.2
2168 case $ac_sys_system/$ac_sys_release in
2169 SunOS/5.10)
2170 ;;
2171 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002172
2173cat >>confdefs.h <<\_ACEOF
2174#define _XOPEN_SOURCE_EXTENDED 1
2175_ACEOF
2176
Martin v. Löwis7dece662005-11-26 11:38:24 +00002177 ;;
2178 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002179
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002180
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181cat >>confdefs.h <<\_ACEOF
2182#define _POSIX_C_SOURCE 200112L
2183_ACEOF
2184
2185
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002186fi
2187
Guido van Rossum91922671997-10-09 20:24:13 +00002188#
2189# SGI compilers allow the specification of the both the ABI and the
2190# ISA on the command line. Depending on the values of these switches,
2191# different and often incompatable code will be generated.
2192#
2193# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2194# thus supply support for various ABI/ISA combinations. The MACHDEP
2195# variable is also adjusted.
2196#
2197
2198if test ! -z "$SGI_ABI"
2199then
2200 CC="cc $SGI_ABI"
2201 LDFLAGS="$SGI_ABI $LDFLAGS"
2202 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002204{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2205echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002206
Jack Jansen83f898c2002-12-30 22:23:40 +00002207# And add extra plat-mac for darwin
2208
Jack Jansen7b59b422003-03-17 15:44:10 +00002209
Martin v. Löwiseba40652007-08-30 20:10:57 +00002210{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2211echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002212if test -z "$EXTRAPLATDIR"
2213then
2214 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002215 darwin)
2216 EXTRAPLATDIR="\$(PLATMACDIRS)"
2217 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2218 ;;
2219 *)
2220 EXTRAPLATDIR=""
2221 EXTRAMACHDEPPATH=""
2222 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002223 esac
2224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002225{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2226echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002227
Jack Jansen6b08a402004-06-03 12:41:45 +00002228# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2229# it may influence the way we can build extensions, so distutils
2230# needs to check it
2231
Ronald Oussoren988117f2006-04-29 11:31:35 +00002232
Jack Jansen6b08a402004-06-03 12:41:45 +00002233CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002234EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002235
Mark Dickinson65134662008-04-25 16:11:04 +00002236{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2237echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2238ac_sys_machine=`uname -m`
2239{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2240echo "${ECHO_T}$ac_sys_machine" >&6; }
2241
Guido van Rossum627b2d71993-12-24 10:39:16 +00002242# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002243
2244# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2245# for debug/optimization stuff. BASECFLAGS is for flags that are required
2246# just to get things to compile and link. Users are free to override OPT
2247# when running configure or make. The build should not break if they do.
2248# BASECFLAGS should generally not be messed with, however.
2249
2250# XXX shouldn't some/most/all of this code be merged with the stuff later
2251# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2253echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002254
Martin v. Löwiseba40652007-08-30 20:10:57 +00002255# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002256if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002257 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002258 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002259 no) CC=cc
2260 without_gcc=yes;;
2261 yes) CC=gcc
2262 without_gcc=no;;
2263 *) CC=$withval
2264 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002265 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002266else
Martin v. Löwis11437992002-04-12 09:54:03 +00002267
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002268 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002269 AIX*) CC=cc_r
2270 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002271 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002272 case $BE_HOST_CPU in
2273 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002274 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002275 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002276 BASECFLAGS="$BASECFLAGS -export pragma"
2277 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002278 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002279 ;;
2280 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002281 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002282 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002283 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 ;;
2285 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002286 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2287echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2288 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 ;;
2290 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002291 AR="\$(srcdir)/Modules/ar_beos"
2292 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002294 Monterey*)
2295 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002296 without_gcc=;;
2297 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002298 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299fi
2300
2301{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2302echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002303
Guido van Rossum8b131c51995-03-09 14:10:13 +00002304# If the user switches compilers, we can't believe the cache
2305if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2306then
Martin v. Löwis11437992002-04-12 09:54:03 +00002307 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2308(it is also a good idea to do 'make clean' before compiling)" >&5
2309echo "$as_me: error: cached CC is different -- throw away $cache_file
2310(it is also a good idea to do 'make clean' before compiling)" >&2;}
2311 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002312fi
2313
Martin v. Löwis11437992002-04-12 09:54:03 +00002314ac_ext=c
2315ac_cpp='$CPP $CPPFLAGS'
2316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2318ac_compiler_gnu=$ac_cv_c_compiler_gnu
2319if test -n "$ac_tool_prefix"; then
2320 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2321set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002324if test "${ac_cv_prog_CC+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002326else
2327 if test -n "$CC"; then
2328 ac_cv_prog_CC="$CC" # Let the user override the test.
2329else
Martin v. Löwis11437992002-04-12 09:54:03 +00002330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002336 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 +00002337 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2339 break 2
2340 fi
2341done
2342done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
Jack Jansendd19cf82001-12-06 22:36:17 +00002345fi
2346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002347CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002348if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 { echo "$as_me:$LINENO: result: $CC" >&5
2350echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002351else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352 { echo "$as_me:$LINENO: result: no" >&5
2353echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356
Martin v. Löwis11437992002-04-12 09:54:03 +00002357fi
2358if test -z "$ac_cv_prog_CC"; then
2359 ac_ct_CC=$CC
2360 # Extract the first word of "gcc", so it can be a program name with args.
2361set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2365 echo $ECHO_N "(cached) $ECHO_C" >&6
2366else
2367 if test -n "$ac_ct_CC"; then
2368 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2369else
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
2375 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002376 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 +00002377 ac_cv_prog_ac_ct_CC="gcc"
2378 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2379 break 2
2380 fi
2381done
2382done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385fi
2386fi
2387ac_ct_CC=$ac_cv_prog_ac_ct_CC
2388if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002389 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2390echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002391else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392 { echo "$as_me:$LINENO: result: no" >&5
2393echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002394fi
2395
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396 if test "x$ac_ct_CC" = x; then
2397 CC=""
2398 else
2399 case $cross_compiling:$ac_tool_warned in
2400yes:)
2401{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2402whose name does not start with the host triplet. If you think this
2403configuration is useful to you, please write to autoconf@gnu.org." >&5
2404echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2405whose name does not start with the host triplet. If you think this
2406configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2407ac_tool_warned=yes ;;
2408esac
2409 CC=$ac_ct_CC
2410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002411else
2412 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002413fi
2414
Jack Jansendd19cf82001-12-06 22:36:17 +00002415if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002416 if test -n "$ac_tool_prefix"; then
2417 # 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 +00002418set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
2422 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Martin v. Löwis11437992002-04-12 09:54:03 +00002427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2428for as_dir in $PATH
2429do
2430 IFS=$as_save_IFS
2431 test -z "$as_dir" && as_dir=.
2432 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433 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 +00002434 ac_cv_prog_CC="${ac_tool_prefix}cc"
2435 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2436 break 2
2437 fi
2438done
2439done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442fi
2443fi
2444CC=$ac_cv_prog_CC
2445if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002446 { echo "$as_me:$LINENO: result: $CC" >&5
2447echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449 { echo "$as_me:$LINENO: result: no" >&5
2450echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451fi
2452
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002455fi
2456if test -z "$CC"; then
2457 # Extract the first word of "cc", so it can be a program name with args.
2458set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2460echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002461if test "${ac_cv_prog_CC+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2463else
2464 if test -n "$CC"; then
2465 ac_cv_prog_CC="$CC" # Let the user override the test.
2466else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2469for as_dir in $PATH
2470do
2471 IFS=$as_save_IFS
2472 test -z "$as_dir" && as_dir=.
2473 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 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 +00002475 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2476 ac_prog_rejected=yes
2477 continue
2478 fi
2479 ac_cv_prog_CC="cc"
2480 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2481 break 2
2482 fi
2483done
2484done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002486
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002487if test $ac_prog_rejected = yes; then
2488 # We found a bogon in the path, so make sure we never use it.
2489 set dummy $ac_cv_prog_CC
2490 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 # We chose a different compiler from the bogus one.
2493 # However, it has the same basename, so the bogon will be chosen
2494 # first if we set CC to just the basename; use the full file name.
2495 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497 fi
2498fi
2499fi
2500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002501CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002503 { echo "$as_me:$LINENO: result: $CC" >&5
2504echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506 { echo "$as_me:$LINENO: result: no" >&5
2507echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508fi
2509
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510
Martin v. Löwis11437992002-04-12 09:54:03 +00002511fi
2512if test -z "$CC"; then
2513 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 do
2516 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002520if test "${ac_cv_prog_CC+set}" = set; then
2521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002522else
2523 if test -n "$CC"; then
2524 ac_cv_prog_CC="$CC" # Let the user override the test.
2525else
Martin v. Löwis11437992002-04-12 09:54:03 +00002526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 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 +00002533 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2535 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
2541fi
2542fi
2543CC=$ac_cv_prog_CC
2544if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 { echo "$as_me:$LINENO: result: $CC" >&5
2546echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548 { echo "$as_me:$LINENO: result: no" >&5
2549echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002550fi
2551
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 test -n "$CC" && break
2554 done
2555fi
2556if test -z "$CC"; then
2557 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002559do
2560 # Extract the first word of "$ac_prog", so it can be a program name with args.
2561set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2563echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002564if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2565 echo $ECHO_N "(cached) $ECHO_C" >&6
2566else
2567 if test -n "$ac_ct_CC"; then
2568 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2569else
2570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2571for as_dir in $PATH
2572do
2573 IFS=$as_save_IFS
2574 test -z "$as_dir" && as_dir=.
2575 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 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 +00002577 ac_cv_prog_ac_ct_CC="$ac_prog"
2578 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2579 break 2
2580 fi
2581done
2582done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585fi
2586fi
2587ac_ct_CC=$ac_cv_prog_ac_ct_CC
2588if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2590echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592 { echo "$as_me:$LINENO: result: no" >&5
2593echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002594fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002595
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 test -n "$ac_ct_CC" && break
2598done
Michael W. Hudson54241132001-12-07 15:38:26 +00002599
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 if test "x$ac_ct_CC" = x; then
2601 CC=""
2602 else
2603 case $cross_compiling:$ac_tool_warned in
2604yes:)
2605{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2606whose name does not start with the host triplet. If you think this
2607configuration is useful to you, please write to autoconf@gnu.org." >&5
2608echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2609whose name does not start with the host triplet. If you think this
2610configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2611ac_tool_warned=yes ;;
2612esac
2613 CC=$ac_ct_CC
2614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002615fi
2616
2617fi
2618
2619
Skip Montanaro6dead952003-09-25 14:50:04 +00002620test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2621See \`config.log' for more details." >&5
2622echo "$as_me: error: no acceptable C compiler found in \$PATH
2623See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 { (exit 1); exit 1; }; }
2625
2626# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002628ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629{ (ac_try="$ac_compiler --version >&5"
2630case "(($ac_try" in
2631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2632 *) ac_try_echo=$ac_try;;
2633esac
2634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2635 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_status=$?
2637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639{ (ac_try="$ac_compiler -v >&5"
2640case "(($ac_try" in
2641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2642 *) ac_try_echo=$ac_try;;
2643esac
2644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2645 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_status=$?
2647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649{ (ac_try="$ac_compiler -V >&5"
2650case "(($ac_try" in
2651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2652 *) ac_try_echo=$ac_try;;
2653esac
2654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2655 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }
2659
2660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002661/* confdefs.h. */
2662_ACEOF
2663cat confdefs.h >>conftest.$ac_ext
2664cat >>conftest.$ac_ext <<_ACEOF
2665/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667int
2668main ()
2669{
2670
2671 ;
2672 return 0;
2673}
2674_ACEOF
2675ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002676ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002677# Try to create an executable without -o first, disregard a.out.
2678# It will help us diagnose broken compilers, and finding out an intuition
2679# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2681echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683#
2684# List of possible output files, starting from the most likely.
2685# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2686# only as a last resort. b.out is created by i960 compilers.
2687ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2688#
2689# The IRIX 6 linker writes into existing files which may not be
2690# executable, retaining their permissions. Remove them first so a
2691# subsequent execution test works.
2692ac_rmfiles=
2693for ac_file in $ac_files
2694do
2695 case $ac_file in
2696 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2697 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2698 esac
2699done
2700rm -f $ac_rmfiles
2701
2702if { (ac_try="$ac_link_default"
2703case "(($ac_try" in
2704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2705 *) ac_try_echo=$ac_try;;
2706esac
2707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2708 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 ac_status=$?
2710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002712 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2713# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2714# in a Makefile. We should not override ac_cv_exeext if it was cached,
2715# so that the user can short-circuit this test for compilers unknown to
2716# Autoconf.
2717for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002718do
2719 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002722 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002723 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002724 # We found the default executable, but exeext='' is most
2725 # certainly right.
2726 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002727 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002728 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2729 then :; else
2730 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2731 fi
2732 # We set ac_cv_exeext here because the later test for it is not
2733 # safe: cross compilers may not add the suffix if given an `-o'
2734 # argument, so we may need to know it at that point already.
2735 # Even if this section looks crufty: it has the advantage of
2736 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002737 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 esac
2741done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742test "$ac_cv_exeext" = no && ac_cv_exeext=
2743
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002744else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745 ac_file=''
2746fi
2747
2748{ echo "$as_me:$LINENO: result: $ac_file" >&5
2749echo "${ECHO_T}$ac_file" >&6; }
2750if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002752sed 's/^/| /' conftest.$ac_ext >&5
2753
2754{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2755See \`config.log' for more details." >&5
2756echo "$as_me: error: C compiler cannot create executables
2757See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002759fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002760
Martin v. Löwis11437992002-04-12 09:54:03 +00002761ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002764# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2766echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002767# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2768# If not cross compiling, check that we can run a simple program.
2769if test "$cross_compiling" != yes; then
2770 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771 { (case "(($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_try") 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 cross_compiling=no
2781 else
2782 if test "$cross_compiling" = maybe; then
2783 cross_compiling=yes
2784 else
2785 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002786If you meant to cross compile, use \`--host'.
2787See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002788echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002789If you meant to cross compile, use \`--host'.
2790See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 { (exit 1); exit 1; }; }
2792 fi
2793 fi
2794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002795{ echo "$as_me:$LINENO: result: yes" >&5
2796echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
Skip Montanaro6dead952003-09-25 14:50:04 +00002798rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002799ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002801# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2803echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2804{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2805echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002806
Martin v. Löwiseba40652007-08-30 20:10:57 +00002807{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2808echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2809if { (ac_try="$ac_link"
2810case "(($ac_try" in
2811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2812 *) ac_try_echo=$ac_try;;
2813esac
2814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002816 ac_status=$?
2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 (exit $ac_status); }; then
2819 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2820# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2821# work properly (i.e., refer to `conftest.exe'), while it won't with
2822# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002823for ac_file in conftest.exe conftest conftest.*; do
2824 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002828 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 * ) break;;
2830 esac
2831done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002832else
Skip Montanaro6dead952003-09-25 14:50:04 +00002833 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2834See \`config.log' for more details." >&5
2835echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2836See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002838fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002839
Martin v. Löwis11437992002-04-12 09:54:03 +00002840rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002841{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2842echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002843
2844rm -f conftest.$ac_ext
2845EXEEXT=$ac_cv_exeext
2846ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002847{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2848echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002849if test "${ac_cv_objext+set}" = set; then
2850 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002851else
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002853/* confdefs.h. */
2854_ACEOF
2855cat confdefs.h >>conftest.$ac_ext
2856cat >>conftest.$ac_ext <<_ACEOF
2857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002858
Martin v. Löwis11437992002-04-12 09:54:03 +00002859int
2860main ()
2861{
2862
2863 ;
2864 return 0;
2865}
2866_ACEOF
2867rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002868if { (ac_try="$ac_compile"
2869case "(($ac_try" in
2870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2871 *) ac_try_echo=$ac_try;;
2872esac
2873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2874 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 ac_status=$?
2876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2877 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002878 for ac_file in conftest.o conftest.obj conftest.*; do
2879 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2883 break;;
2884 esac
2885done
2886else
2887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002888sed 's/^/| /' conftest.$ac_ext >&5
2889
2890{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2891See \`config.log' for more details." >&5
2892echo "$as_me: error: cannot compute suffix of object files: cannot compile
2893See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 { (exit 1); exit 1; }; }
2895fi
2896
2897rm -f conftest.$ac_cv_objext conftest.$ac_ext
2898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2900echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901OBJEXT=$ac_cv_objext
2902ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2904echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002905if test "${ac_cv_c_compiler_gnu+set}" = set; then
2906 echo $ECHO_N "(cached) $ECHO_C" >&6
2907else
2908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002909/* confdefs.h. */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
Martin v. Löwis11437992002-04-12 09:54:03 +00002915int
2916main ()
2917{
2918#ifndef __GNUC__
2919 choke me
2920#endif
2921
2922 ;
2923 return 0;
2924}
2925_ACEOF
2926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002927if { (ac_try="$ac_compile"
2928case "(($ac_try" in
2929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2930 *) ac_try_echo=$ac_try;;
2931esac
2932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002935 grep -v '^ *+' conftest.er1 >conftest.err
2936 rm -f conftest.er1
2937 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002939 (exit $ac_status); } && {
2940 test -z "$ac_c_werror_flag" ||
2941 test ! -s conftest.err
2942 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002943 ac_compiler_gnu=yes
2944else
2945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002946sed 's/^/| /' conftest.$ac_ext >&5
2947
Martin v. Löwiseba40652007-08-30 20:10:57 +00002948 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950
2951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002952ac_cv_c_compiler_gnu=$ac_compiler_gnu
2953
2954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002955{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2956echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002957GCC=`test $ac_compiler_gnu = yes && echo yes`
2958ac_test_CFLAGS=${CFLAGS+set}
2959ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002960{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2961echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002962if test "${ac_cv_prog_cc_g+set}" = set; then
2963 echo $ECHO_N "(cached) $ECHO_C" >&6
2964else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965 ac_save_c_werror_flag=$ac_c_werror_flag
2966 ac_c_werror_flag=yes
2967 ac_cv_prog_cc_g=no
2968 CFLAGS="-g"
2969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002970/* confdefs.h. */
2971_ACEOF
2972cat confdefs.h >>conftest.$ac_ext
2973cat >>conftest.$ac_ext <<_ACEOF
2974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976int
2977main ()
2978{
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
2990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003001 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003002else
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 CFLAGS=""
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 :
3040else
3041 echo "$as_me: failed program was:" >&5
3042sed 's/^/| /' conftest.$ac_ext >&5
3043
3044 ac_c_werror_flag=$ac_save_c_werror_flag
3045 CFLAGS="-g"
3046 cat >conftest.$ac_ext <<_ACEOF
3047/* confdefs.h. */
3048_ACEOF
3049cat confdefs.h >>conftest.$ac_ext
3050cat >>conftest.$ac_ext <<_ACEOF
3051/* end confdefs.h. */
3052
3053int
3054main ()
3055{
3056
3057 ;
3058 return 0;
3059}
3060_ACEOF
3061rm -f conftest.$ac_objext
3062if { (ac_try="$ac_compile"
3063case "(($ac_try" in
3064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3065 *) ac_try_echo=$ac_try;;
3066esac
3067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3068 (eval "$ac_compile") 2>conftest.er1
3069 ac_status=$?
3070 grep -v '^ *+' conftest.er1 >conftest.err
3071 rm -f conftest.er1
3072 cat conftest.err >&5
3073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3074 (exit $ac_status); } && {
3075 test -z "$ac_c_werror_flag" ||
3076 test ! -s conftest.err
3077 } && test -s conftest.$ac_objext; then
3078 ac_cv_prog_cc_g=yes
3079else
3080 echo "$as_me: failed program was:" >&5
3081sed 's/^/| /' conftest.$ac_ext >&5
3082
3083
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085
3086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003088
3089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3090fi
3091
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093 ac_c_werror_flag=$ac_save_c_werror_flag
3094fi
3095{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3096echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003097if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003098 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099elif test $ac_cv_prog_cc_g = yes; then
3100 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003101 CFLAGS="-g -O2"
3102 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003103 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104 fi
3105else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106 if test "$GCC" = yes; then
3107 CFLAGS="-O2"
3108 else
3109 CFLAGS=
3110 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003112{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3113echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3114if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003115 echo $ECHO_N "(cached) $ECHO_C" >&6
3116else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003117 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003118ac_save_CC=$CC
3119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003120/* confdefs.h. */
3121_ACEOF
3122cat confdefs.h >>conftest.$ac_ext
3123cat >>conftest.$ac_ext <<_ACEOF
3124/* end confdefs.h. */
3125#include <stdarg.h>
3126#include <stdio.h>
3127#include <sys/types.h>
3128#include <sys/stat.h>
3129/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3130struct buf { int x; };
3131FILE * (*rcsopen) (struct buf *, struct stat *, int);
3132static char *e (p, i)
3133 char **p;
3134 int i;
3135{
3136 return p[i];
3137}
3138static char *f (char * (*g) (char **, int), char **p, ...)
3139{
3140 char *s;
3141 va_list v;
3142 va_start (v,p);
3143 s = g (p, va_arg (v,int));
3144 va_end (v);
3145 return s;
3146}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003147
3148/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3149 function prototypes and stuff, but not '\xHH' hex character constants.
3150 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003151 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003152 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3153 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003154 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003155int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3156
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3158 inside strings and character constants. */
3159#define FOO(x) 'x'
3160int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3161
Skip Montanaro6dead952003-09-25 14:50:04 +00003162int test (int i, double x);
3163struct s1 {int (*f) (int a);};
3164struct s2 {int (*f) (double a);};
3165int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3166int argc;
3167char **argv;
3168int
3169main ()
3170{
3171return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3172 ;
3173 return 0;
3174}
3175_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3177 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003178do
3179 CC="$ac_save_CC $ac_arg"
3180 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003181if { (ac_try="$ac_compile"
3182case "(($ac_try" in
3183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3184 *) ac_try_echo=$ac_try;;
3185esac
3186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3187 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003189 grep -v '^ *+' conftest.er1 >conftest.err
3190 rm -f conftest.er1
3191 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193 (exit $ac_status); } && {
3194 test -z "$ac_c_werror_flag" ||
3195 test ! -s conftest.err
3196 } && test -s conftest.$ac_objext; then
3197 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003198else
3199 echo "$as_me: failed program was:" >&5
3200sed 's/^/| /' conftest.$ac_ext >&5
3201
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202
Skip Montanaro6dead952003-09-25 14:50:04 +00003203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204
3205rm -f core conftest.err conftest.$ac_objext
3206 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003207done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003209CC=$ac_save_CC
3210
3211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212# AC_CACHE_VAL
3213case "x$ac_cv_prog_cc_c89" in
3214 x)
3215 { echo "$as_me:$LINENO: result: none needed" >&5
3216echo "${ECHO_T}none needed" >&6; } ;;
3217 xno)
3218 { echo "$as_me:$LINENO: result: unsupported" >&5
3219echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003220 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 CC="$CC $ac_cv_prog_cc_c89"
3222 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3223echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003224esac
3225
Skip Montanaro6dead952003-09-25 14:50:04 +00003226
Martin v. Löwis11437992002-04-12 09:54:03 +00003227ac_ext=c
3228ac_cpp='$CPP $CPPFLAGS'
3229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3231ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003233
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003234
3235
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3237echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003238
Martin v. Löwiseba40652007-08-30 20:10:57 +00003239# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003240if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003241 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003242
3243 case $withval in
3244 no) with_cxx_main=no
3245 MAINCC='$(CC)';;
3246 yes) with_cxx_main=yes
3247 MAINCC='$(CXX)';;
3248 *) with_cxx_main=yes
3249 MAINCC=$withval
3250 if test -z "$CXX"
3251 then
3252 CXX=$withval
3253 fi;;
3254 esac
3255else
3256
3257 with_cxx_main=no
3258 MAINCC='$(CC)'
3259
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260fi
3261
3262{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3263echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003264
3265preset_cxx="$CXX"
3266if test -z "$CXX"
3267then
3268 case "$CC" in
3269 gcc) # Extract the first word of "g++", so it can be a program name with args.
3270set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003273if test "${ac_cv_path_CXX+set}" = set; then
3274 echo $ECHO_N "(cached) $ECHO_C" >&6
3275else
3276 case $CXX in
3277 [\\/]* | ?:[\\/]*)
3278 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3279 ;;
3280 *)
3281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3282for as_dir in notfound
3283do
3284 IFS=$as_save_IFS
3285 test -z "$as_dir" && as_dir=.
3286 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003287 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 +00003288 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3289 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3290 break 2
3291 fi
3292done
3293done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003294IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003295
3296 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3297 ;;
3298esac
3299fi
3300CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003301if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003302 { echo "$as_me:$LINENO: result: $CXX" >&5
3303echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003304else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305 { echo "$as_me:$LINENO: result: no" >&5
3306echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003309 ;;
3310 cc) # Extract the first word of "c++", so it can be a program name with args.
3311set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314if test "${ac_cv_path_CXX+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316else
3317 case $CXX in
3318 [\\/]* | ?:[\\/]*)
3319 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3320 ;;
3321 *)
3322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3323for as_dir in notfound
3324do
3325 IFS=$as_save_IFS
3326 test -z "$as_dir" && as_dir=.
3327 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003328 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 +00003329 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3331 break 2
3332 fi
3333done
3334done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003335IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003336
3337 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3338 ;;
3339esac
3340fi
3341CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003342if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 { echo "$as_me:$LINENO: result: $CXX" >&5
3344echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003345else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346 { echo "$as_me:$LINENO: result: no" >&5
3347echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003350 ;;
3351 esac
3352 if test "$CXX" = "notfound"
3353 then
3354 CXX=""
3355 fi
3356fi
3357if test -z "$CXX"
3358then
3359 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3360do
3361 # Extract the first word of "$ac_prog", so it can be a program name with args.
3362set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003363{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3364echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003365if test "${ac_cv_prog_CXX+set}" = set; then
3366 echo $ECHO_N "(cached) $ECHO_C" >&6
3367else
3368 if test -n "$CXX"; then
3369 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3370else
3371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3372for as_dir in $PATH
3373do
3374 IFS=$as_save_IFS
3375 test -z "$as_dir" && as_dir=.
3376 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003377 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 +00003378 ac_cv_prog_CXX="$ac_prog"
3379 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3380 break 2
3381 fi
3382done
3383done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003384IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003385
3386fi
3387fi
3388CXX=$ac_cv_prog_CXX
3389if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390 { echo "$as_me:$LINENO: result: $CXX" >&5
3391echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393 { echo "$as_me:$LINENO: result: no" >&5
3394echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003395fi
3396
Martin v. Löwiseba40652007-08-30 20:10:57 +00003397
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003398 test -n "$CXX" && break
3399done
3400test -n "$CXX" || CXX="notfound"
3401
3402 if test "$CXX" = "notfound"
3403 then
3404 CXX=""
3405 fi
3406fi
3407if test "$preset_cxx" != "$CXX"
3408then
3409 { echo "$as_me:$LINENO: WARNING:
3410
3411 By default, distutils will build C++ extension modules with \"$CXX\".
3412 If this is not intended, then set CXX on the configure command line.
3413 " >&5
3414echo "$as_me: WARNING:
3415
3416 By default, distutils will build C++ extension modules with \"$CXX\".
3417 If this is not intended, then set CXX on the configure command line.
3418 " >&2;}
3419fi
3420
3421
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003422# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003423
3424ac_ext=c
3425ac_cpp='$CPP $CPPFLAGS'
3426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3428ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3430echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431# On Suns, sometimes $CPP names a directory.
3432if test -n "$CPP" && test -d "$CPP"; then
3433 CPP=
3434fi
3435if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003436 if test "${ac_cv_prog_CPP+set}" = set; then
3437 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003438else
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Double quotes because CPP needs to be expanded
3440 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3441 do
3442 ac_preproc_ok=false
3443for ac_c_preproc_warn_flag in '' yes
3444do
3445 # Use a header file that comes with gcc, so configuring glibc
3446 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003447 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3448 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003449 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # not just through cpp. "Syntax error" is here to catch this case.
3451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003452/* confdefs.h. */
3453_ACEOF
3454cat confdefs.h >>conftest.$ac_ext
3455cat >>conftest.$ac_ext <<_ACEOF
3456/* end confdefs.h. */
3457#ifdef __STDC__
3458# include <limits.h>
3459#else
3460# include <assert.h>
3461#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003462 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464if { (ac_try="$ac_cpp conftest.$ac_ext"
3465case "(($ac_try" in
3466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3467 *) ac_try_echo=$ac_try;;
3468esac
3469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3470 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003472 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 rm -f conftest.er1
3474 cat conftest.err >&5
3475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003476 (exit $ac_status); } >/dev/null && {
3477 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3478 test ! -s conftest.err
3479 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003480 :
3481else
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003483sed 's/^/| /' conftest.$ac_ext >&5
3484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # Broken: fails on valid input.
3486continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003487fi
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
Jack Jansendd19cf82001-12-06 22:36:17 +00003490
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 # can be detected and how.
3493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003494/* confdefs.h. */
3495_ACEOF
3496cat confdefs.h >>conftest.$ac_ext
3497cat >>conftest.$ac_ext <<_ACEOF
3498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003499#include <ac_nonexistent.h>
3500_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501if { (ac_try="$ac_cpp conftest.$ac_ext"
3502case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505esac
3506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3507 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003509 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 rm -f conftest.er1
3511 cat conftest.err >&5
3512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513 (exit $ac_status); } >/dev/null && {
3514 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3515 test ! -s conftest.err
3516 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # Broken: success on invalid input.
3518continue
3519else
3520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003521sed 's/^/| /' conftest.$ac_ext >&5
3522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 # Passes both tests.
3524ac_preproc_ok=:
3525break
3526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528rm -f conftest.err conftest.$ac_ext
3529
3530done
3531# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3532rm -f conftest.err conftest.$ac_ext
3533if $ac_preproc_ok; then
3534 break
3535fi
3536
3537 done
3538 ac_cv_prog_CPP=$CPP
3539
3540fi
3541 CPP=$ac_cv_prog_CPP
3542else
3543 ac_cv_prog_CPP=$CPP
3544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003545{ echo "$as_me:$LINENO: result: $CPP" >&5
3546echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003547ac_preproc_ok=false
3548for ac_c_preproc_warn_flag in '' yes
3549do
3550 # Use a header file that comes with gcc, so configuring glibc
3551 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003552 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3553 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 # On the NeXT, cc -E runs the code through the compiler's parser,
3555 # not just through cpp. "Syntax error" is here to catch this case.
3556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003557/* confdefs.h. */
3558_ACEOF
3559cat confdefs.h >>conftest.$ac_ext
3560cat >>conftest.$ac_ext <<_ACEOF
3561/* end confdefs.h. */
3562#ifdef __STDC__
3563# include <limits.h>
3564#else
3565# include <assert.h>
3566#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003567 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003568_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003569if { (ac_try="$ac_cpp conftest.$ac_ext"
3570case "(($ac_try" in
3571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3572 *) ac_try_echo=$ac_try;;
3573esac
3574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003577 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 rm -f conftest.er1
3579 cat conftest.err >&5
3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581 (exit $ac_status); } >/dev/null && {
3582 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3583 test ! -s conftest.err
3584 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 :
3586else
3587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Broken: fails on valid input.
3591continue
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
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 # can be detected and how.
3598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003599/* confdefs.h. */
3600_ACEOF
3601cat confdefs.h >>conftest.$ac_ext
3602cat >>conftest.$ac_ext <<_ACEOF
3603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003604#include <ac_nonexistent.h>
3605_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606if { (ac_try="$ac_cpp conftest.$ac_ext"
3607case "(($ac_try" in
3608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609 *) ac_try_echo=$ac_try;;
3610esac
3611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3612 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 rm -f conftest.er1
3616 cat conftest.err >&5
3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618 (exit $ac_status); } >/dev/null && {
3619 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3620 test ! -s conftest.err
3621 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # Broken: success on invalid input.
3623continue
3624else
3625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003626sed 's/^/| /' conftest.$ac_ext >&5
3627
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 # Passes both tests.
3629ac_preproc_ok=:
3630break
3631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633rm -f conftest.err conftest.$ac_ext
3634
3635done
3636# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3637rm -f conftest.err conftest.$ac_ext
3638if $ac_preproc_ok; then
3639 :
3640else
Skip Montanaro6dead952003-09-25 14:50:04 +00003641 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3642See \`config.log' for more details." >&5
3643echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3644See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 { (exit 1); exit 1; }; }
3646fi
3647
3648ac_ext=c
3649ac_cpp='$CPP $CPPFLAGS'
3650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3652ac_compiler_gnu=$ac_cv_c_compiler_gnu
3653
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3656echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3657if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 echo $ECHO_N "(cached) $ECHO_C" >&6
3659else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003660 # Extract the first word of "grep ggrep" to use in msg output
3661if test -z "$GREP"; then
3662set dummy grep ggrep; ac_prog_name=$2
3663if test "${ac_cv_path_GREP+set}" = set; then
3664 echo $ECHO_N "(cached) $ECHO_C" >&6
3665else
3666 ac_path_GREP_found=false
3667# Loop through the user's path and test for each of PROGNAME-LIST
3668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3669for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3670do
3671 IFS=$as_save_IFS
3672 test -z "$as_dir" && as_dir=.
3673 for ac_prog in grep ggrep; do
3674 for ac_exec_ext in '' $ac_executable_extensions; do
3675 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3676 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3677 # Check for GNU ac_path_GREP and select it if it is found.
3678 # Check for GNU $ac_path_GREP
3679case `"$ac_path_GREP" --version 2>&1` in
3680*GNU*)
3681 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3682*)
3683 ac_count=0
3684 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3685 while :
3686 do
3687 cat "conftest.in" "conftest.in" >"conftest.tmp"
3688 mv "conftest.tmp" "conftest.in"
3689 cp "conftest.in" "conftest.nl"
3690 echo 'GREP' >> "conftest.nl"
3691 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3692 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3693 ac_count=`expr $ac_count + 1`
3694 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3695 # Best one so far, save it but keep looking for a better one
3696 ac_cv_path_GREP="$ac_path_GREP"
3697 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003698 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699 # 10*(2^10) chars as input seems more than enough
3700 test $ac_count -gt 10 && break
3701 done
3702 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3703esac
3704
3705
3706 $ac_path_GREP_found && break 3
3707 done
3708done
3709
3710done
3711IFS=$as_save_IFS
3712
3713
Skip Montanaro6dead952003-09-25 14:50:04 +00003714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003715
3716GREP="$ac_cv_path_GREP"
3717if test -z "$GREP"; then
3718 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3719echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3720 { (exit 1); exit 1; }; }
3721fi
3722
3723else
3724 ac_cv_path_GREP=$GREP
3725fi
3726
3727
3728fi
3729{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3730echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3731 GREP="$ac_cv_path_GREP"
3732
3733
3734{ echo "$as_me:$LINENO: checking for egrep" >&5
3735echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3736if test "${ac_cv_path_EGREP+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3738else
3739 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3740 then ac_cv_path_EGREP="$GREP -E"
3741 else
3742 # Extract the first word of "egrep" to use in msg output
3743if test -z "$EGREP"; then
3744set dummy egrep; ac_prog_name=$2
3745if test "${ac_cv_path_EGREP+set}" = set; then
3746 echo $ECHO_N "(cached) $ECHO_C" >&6
3747else
3748 ac_path_EGREP_found=false
3749# Loop through the user's path and test for each of PROGNAME-LIST
3750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3752do
3753 IFS=$as_save_IFS
3754 test -z "$as_dir" && as_dir=.
3755 for ac_prog in egrep; do
3756 for ac_exec_ext in '' $ac_executable_extensions; do
3757 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3758 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3759 # Check for GNU ac_path_EGREP and select it if it is found.
3760 # Check for GNU $ac_path_EGREP
3761case `"$ac_path_EGREP" --version 2>&1` in
3762*GNU*)
3763 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3764*)
3765 ac_count=0
3766 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3767 while :
3768 do
3769 cat "conftest.in" "conftest.in" >"conftest.tmp"
3770 mv "conftest.tmp" "conftest.in"
3771 cp "conftest.in" "conftest.nl"
3772 echo 'EGREP' >> "conftest.nl"
3773 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3774 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3775 ac_count=`expr $ac_count + 1`
3776 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3777 # Best one so far, save it but keep looking for a better one
3778 ac_cv_path_EGREP="$ac_path_EGREP"
3779 ac_path_EGREP_max=$ac_count
3780 fi
3781 # 10*(2^10) chars as input seems more than enough
3782 test $ac_count -gt 10 && break
3783 done
3784 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3785esac
3786
3787
3788 $ac_path_EGREP_found && break 3
3789 done
3790done
3791
3792done
3793IFS=$as_save_IFS
3794
3795
3796fi
3797
3798EGREP="$ac_cv_path_EGREP"
3799if test -z "$EGREP"; then
3800 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3801echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3802 { (exit 1); exit 1; }; }
3803fi
3804
3805else
3806 ac_cv_path_EGREP=$EGREP
3807fi
3808
3809
3810 fi
3811fi
3812{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3813echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3814 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003815
3816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818{ echo "$as_me:$LINENO: checking for AIX" >&5
3819echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003821/* confdefs.h. */
3822_ACEOF
3823cat confdefs.h >>conftest.$ac_ext
3824cat >>conftest.$ac_ext <<_ACEOF
3825/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003826#ifdef _AIX
3827 yes
3828#endif
3829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003832 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 { echo "$as_me:$LINENO: result: yes" >&5
3834echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003836#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003837_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003838
3839else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003840 { echo "$as_me:$LINENO: result: no" >&5
3841echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003842fi
3843rm -f conftest*
3844
Michael W. Hudson54241132001-12-07 15:38:26 +00003845
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003846
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003847# Check for unsupported systems
3848case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003849atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003850 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3851 echo See README for details.
3852 exit 1;;
3853esac
3854
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Martin v. Löwiseba40652007-08-30 20:10:57 +00003856{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3857echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003858
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003860if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003862 case $withval in
3863 no) EXEEXT=;;
3864 yes) EXEEXT=.exe;;
3865 *) EXEEXT=$withval;;
3866 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003867fi
3868
3869{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3870echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003871
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003872# Test whether we're running on a non-case-sensitive system, in which
3873# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003874
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3876echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003877if test ! -d CaseSensitiveTestDir; then
3878mkdir CaseSensitiveTestDir
3879fi
3880
3881if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003882then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883 { echo "$as_me:$LINENO: result: yes" >&5
3884echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003885 BUILDEXEEXT=.exe
3886else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003887 { echo "$as_me:$LINENO: result: no" >&5
3888echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003889 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003890fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003891rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003892
Guido van Rossumdd997f71998-10-07 19:58:26 +00003893case $MACHDEP in
3894bsdos*)
3895 case $CC in
3896 gcc) CC="$CC -D_HAVE_BSDI";;
3897 esac;;
3898esac
3899
Guido van Rossum24b1e751997-08-21 02:29:16 +00003900case $ac_sys_system in
3901hp*|HP*)
3902 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003903 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003904 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003905Monterey*)
3906 case $CC in
3907 cc) CC="$CC -Wl,-Bexport";;
3908 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003909SunOS*)
3910 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003911
3912cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003913#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003914_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003915
3916 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003917esac
3918
Michael W. Hudson54241132001-12-07 15:38:26 +00003919
3920
Martin v. Löwiseba40652007-08-30 20:10:57 +00003921{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3922echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003923if test -z "$LIBRARY"
3924then
3925 LIBRARY='libpython$(VERSION).a'
3926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003927{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3928echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003929
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003930# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003931# name of the library into which to insert object files). BLDLIBRARY is also
3932# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3933# is blank as the main program is not linked directly against LDLIBRARY.
3934# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3935# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3936# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3937# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003938#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003939# RUNSHARED is used to run shared python without installed libraries
3940#
3941# INSTSONAME is the name of the shared library that will be use to install
3942# on the system - some systems like version suffix, others don't
3943
3944
Michael W. Hudson54241132001-12-07 15:38:26 +00003945
3946
3947
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003948
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003949LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003950BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003951INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003952DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003953LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003954RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003955
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003956# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003957# If CXX is set, and if it is needed to link a main function that was
3958# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3959# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003960# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003961# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003962
Martin v. Löwiseba40652007-08-30 20:10:57 +00003963{ echo "$as_me:$LINENO: checking LINKCC" >&5
3964echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003965if test -z "$LINKCC"
3966then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003967 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003968 case $ac_sys_system in
3969 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003970 exp_extra="\"\""
3971 if test $ac_sys_release -ge 5 -o \
3972 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3973 exp_extra="."
3974 fi
3975 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003976 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003977 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003978 QNX*)
3979 # qcc must be used because the other compilers do not
3980 # support -N.
3981 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003982 esac
3983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003984{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3985echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003986
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3988echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3989# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003990if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003991 enableval=$enable_shared;
3992fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003993
Martin v. Löwis1142de32002-03-29 16:28:31 +00003994
3995if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003996then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003997 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003998 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003999 enable_shared="yes";;
4000 *)
4001 enable_shared="no";;
4002 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4005echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004006
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4008echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4009# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004010if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004011 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004012 CC="$CC -pg"
4013 if test "$cross_compiling" = yes; then
4014 ac_enable_profiling="no"
4015else
4016 cat >conftest.$ac_ext <<_ACEOF
4017/* confdefs.h. */
4018_ACEOF
4019cat confdefs.h >>conftest.$ac_ext
4020cat >>conftest.$ac_ext <<_ACEOF
4021/* end confdefs.h. */
4022int main() { return 0; }
4023_ACEOF
4024rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004025if { (ac_try="$ac_link"
4026case "(($ac_try" in
4027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4028 *) ac_try_echo=$ac_try;;
4029esac
4030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4031 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004032 ac_status=$?
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004035 { (case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
4039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4040 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004041 ac_status=$?
4042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4043 (exit $ac_status); }; }; then
4044 ac_enable_profiling="yes"
4045else
4046 echo "$as_me: program exited with status $ac_status" >&5
4047echo "$as_me: failed program was:" >&5
4048sed 's/^/| /' conftest.$ac_ext >&5
4049
4050( exit $ac_status )
4051ac_enable_profiling="no"
4052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004053rm -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 +00004054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055
4056
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004057 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004058fi
4059
4060{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4061echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004062
4063case "$ac_enable_profiling" in
4064 "yes")
4065 BASECFLAGS="-pg $BASECFLAGS"
4066 LDFLAGS="-pg $LDFLAGS"
4067 ;;
4068esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004069
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4071echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004072
Guido van Rossumb8552162001-09-05 14:58:11 +00004073# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4074# library that we build, but we do not want to link against it (we
4075# will find it with a -framework option). For this reason there is an
4076# extra variable BLDLIBRARY against which Python and the extension
4077# modules are linked, BLDLIBRARY. This is normally the same as
4078# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004079if test "$enable_framework"
4080then
4081 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004082 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004083 BLDLIBRARY=''
4084else
4085 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004086fi
Jack Jansene578a632001-08-15 01:27:14 +00004087
Martin v. Löwis1142de32002-03-29 16:28:31 +00004088# Other platforms follow
4089if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004090
4091cat >>confdefs.h <<\_ACEOF
4092#define Py_ENABLE_SHARED 1
4093_ACEOF
4094
Martin v. Löwis1142de32002-03-29 16:28:31 +00004095 case $ac_sys_system in
4096 BeOS*)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 ;;
4099 CYGWIN*)
4100 LDLIBRARY='libpython$(VERSION).dll.a'
4101 DLLLIBRARY='libpython$(VERSION).dll'
4102 ;;
4103 SunOS*)
4104 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004105 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004106 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004107 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004108 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004109 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004110 LDLIBRARY='libpython$(VERSION).so'
4111 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004112 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004113 case $ac_sys_system in
4114 FreeBSD*)
4115 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4116 ;;
4117 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004118 INSTSONAME="$LDLIBRARY".$SOVERSION
4119 ;;
4120 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004121 case `uname -m` in
4122 ia64)
4123 LDLIBRARY='libpython$(VERSION).so'
4124 ;;
4125 *)
4126 LDLIBRARY='libpython$(VERSION).sl'
4127 ;;
4128 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004129 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004130 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004131 ;;
4132 OSF*)
4133 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004134 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004135 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004136 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004137 atheos*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-L. -lpython$(VERSION)'
4140 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4141 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004142 esac
Jason Tishler30765592003-09-04 11:04:06 +00004143else # shared is disabled
4144 case $ac_sys_system in
4145 CYGWIN*)
4146 BLDLIBRARY='$(LIBRARY)'
4147 LDLIBRARY='libpython$(VERSION).dll.a'
4148 ;;
4149 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004150fi
4151
Martin v. Löwiseba40652007-08-30 20:10:57 +00004152{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4153echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155if test -n "$ac_tool_prefix"; then
4156 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4157set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004158{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160if test "${ac_cv_prog_RANLIB+set}" = set; then
4161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162else
4163 if test -n "$RANLIB"; then
4164 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
4171 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172 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 +00004173 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4174 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4175 break 2
4176 fi
4177done
4178done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Guido van Rossum627b2d71993-12-24 10:39:16 +00004181fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004183RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4186echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188 { echo "$as_me:$LINENO: result: no" >&5
4189echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
4191
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192
Martin v. Löwis11437992002-04-12 09:54:03 +00004193fi
4194if test -z "$ac_cv_prog_RANLIB"; then
4195 ac_ct_RANLIB=$RANLIB
4196 # Extract the first word of "ranlib", so it can be a program name with args.
4197set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004200if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4201 echo $ECHO_N "(cached) $ECHO_C" >&6
4202else
4203 if test -n "$ac_ct_RANLIB"; then
4204 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4205else
4206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207for as_dir in $PATH
4208do
4209 IFS=$as_save_IFS
4210 test -z "$as_dir" && as_dir=.
4211 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212 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 +00004213 ac_cv_prog_ac_ct_RANLIB="ranlib"
4214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4215 break 2
4216 fi
4217done
4218done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004220
Martin v. Löwis11437992002-04-12 09:54:03 +00004221fi
4222fi
4223ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4224if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4226echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004227else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004228 { echo "$as_me:$LINENO: result: no" >&5
4229echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004230fi
4231
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232 if test "x$ac_ct_RANLIB" = x; then
4233 RANLIB=":"
4234 else
4235 case $cross_compiling:$ac_tool_warned in
4236yes:)
4237{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4238whose name does not start with the host triplet. If you think this
4239configuration is useful to you, please write to autoconf@gnu.org." >&5
4240echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4241whose name does not start with the host triplet. If you think this
4242configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4243ac_tool_warned=yes ;;
4244esac
4245 RANLIB=$ac_ct_RANLIB
4246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004247else
4248 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250
4251
Guido van Rossum7f43da71994-08-01 12:15:30 +00004252for ac_prog in ar aal
4253do
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004258if test "${ac_cv_prog_AR+set}" = set; then
4259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260else
4261 if test -n "$AR"; then
4262 ac_cv_prog_AR="$AR" # Let the user override the test.
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4265for as_dir in $PATH
4266do
4267 IFS=$as_save_IFS
4268 test -z "$as_dir" && as_dir=.
4269 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004270 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 +00004271 ac_cv_prog_AR="$ac_prog"
4272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4273 break 2
4274 fi
4275done
4276done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
Guido van Rossum7f43da71994-08-01 12:15:30 +00004279fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004281AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283 { echo "$as_me:$LINENO: result: $AR" >&5
4284echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286 { echo "$as_me:$LINENO: result: no" >&5
4287echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004289
Martin v. Löwiseba40652007-08-30 20:10:57 +00004290
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004292done
4293test -n "$AR" || AR="ar"
4294
Michael W. Hudson54241132001-12-07 15:38:26 +00004295
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004296
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004297# Extract the first word of "svnversion", so it can be a program name with args.
4298set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004301if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4302 echo $ECHO_N "(cached) $ECHO_C" >&6
4303else
4304 if test -n "$SVNVERSION"; then
4305 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4306else
4307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4308for as_dir in $PATH
4309do
4310 IFS=$as_save_IFS
4311 test -z "$as_dir" && as_dir=.
4312 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 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 +00004314 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4316 break 2
4317 fi
4318done
4319done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004320IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004321
Martin v. Löwisff600232006-04-03 19:12:32 +00004322 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004323fi
4324fi
4325SVNVERSION=$ac_cv_prog_SVNVERSION
4326if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4328echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004329else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330 { echo "$as_me:$LINENO: result: no" >&5
4331echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004332fi
4333
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004335if test $SVNVERSION = found
4336then
4337 SVNVERSION="svnversion \$(srcdir)"
4338else
4339 SVNVERSION="echo exported"
4340fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004341
Neil Schemenauera42c8272001-03-31 00:01:55 +00004342case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004343bsdos*|hp*|HP*)
4344 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004345 if test -z "$INSTALL"
4346 then
4347 INSTALL="${srcdir}/install-sh -c"
4348 fi
4349esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004351for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4352 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install-sh -c"
4355 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004356 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/install.sh -c"
4359 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004360 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004361 ac_aux_dir=$ac_dir
4362 ac_install_sh="$ac_aux_dir/shtool install -c"
4363 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364 fi
4365done
4366if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4368echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004369 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371
4372# These three variables are undocumented and unsupported,
4373# and are intended to be withdrawn in a future Autoconf release.
4374# They can cause serious problems if a builder's source tree is in a directory
4375# whose full name contains unusual characters.
4376ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4377ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4378ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4379
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004380
4381# Find a good install program. We prefer a C program (faster),
4382# so one script is as good as another. But avoid the broken or
4383# incompatible versions:
4384# SysV /etc/install, /usr/sbin/install
4385# SunOS /usr/etc/install
4386# IRIX /sbin/install
4387# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004388# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4390# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4391# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004393# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004394{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4395echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004396if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004397if test "${ac_cv_path_install+set}" = set; then
4398 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004399else
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403 IFS=$as_save_IFS
4404 test -z "$as_dir" && as_dir=.
4405 # Account for people who put trailing slashes in PATH elements.
4406case $as_dir/ in
4407 ./ | .// | /cC/* | \
4408 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004409 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004410 /usr/ucb/* ) ;;
4411 *)
4412 # OSF1 and SCO ODT 3.0 have their own names for install.
4413 # Don't use installbsd from OSF since it installs stuff as root
4414 # by default.
4415 for ac_prog in ginstall scoinst install; do
4416 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417 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 +00004418 if test $ac_prog = install &&
4419 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4420 # AIX install. It has an incompatible calling convention.
4421 :
4422 elif test $ac_prog = install &&
4423 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4424 # program-specific install script used by HP pwplus--don't use.
4425 :
4426 else
4427 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4428 break 3
4429 fi
4430 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004431 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004432 done
4433 ;;
4434esac
4435done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004436IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004437
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004438
4439fi
4440 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004441 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004442 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004443 # As a last resort, use the slow shell script. Don't cache a
4444 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004445 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004446 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004448 fi
4449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4451echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004452
4453# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4454# It thinks the first close brace ends the variable substitution.
4455test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4456
Martin v. Löwis11437992002-04-12 09:54:03 +00004457test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004458
4459test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4460
Michael W. Hudson54241132001-12-07 15:38:26 +00004461
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004462# Not every filesystem supports hard links
4463
4464if test -z "$LN" ; then
4465 case $ac_sys_system in
4466 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004467 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004468 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004469 *) LN=ln;;
4470 esac
4471fi
4472
Fred Drake109d9862001-07-11 06:27:56 +00004473# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004474{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4475echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004476
Martin v. Löwiseba40652007-08-30 20:10:57 +00004477# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004478if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004480if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004481then
4482
4483cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004484#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004485_ACEOF
4486
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 { echo "$as_me:$LINENO: result: yes" >&5
4488echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004489 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004490else { echo "$as_me:$LINENO: result: no" >&5
4491echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004492fi
4493else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494 { echo "$as_me:$LINENO: result: no" >&5
4495echo "${ECHO_T}no" >&6; }
4496fi
4497
Fred Drake109d9862001-07-11 06:27:56 +00004498
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4500# merged with this chunk of code?
4501
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004502# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004503# ------------------------
4504# (The following bit of code is complicated enough - please keep things
4505# indented properly. Just pretend you're editing Python code. ;-)
4506
4507# There are two parallel sets of case statements below, one that checks to
4508# see if OPT was set and one that does BASECFLAGS setting based upon
4509# compiler and platform. BASECFLAGS tweaks need to be made even if the
4510# user set OPT.
4511
4512# tweak OPT based on compiler and platform, only if the user didn't set
4513# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004514
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004515if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004516then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004517 case $GCC in
4518 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004519 if test "$CC" != 'g++' ; then
4520 STRICT_PROTO="-Wstrict-prototypes"
4521 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004522 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4523 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4524 WRAP="-fwrapv"
4525 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004526 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004527 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004528 if test "$Py_DEBUG" = 'true' ; then
4529 # Optimization messes up debuggers, so turn it off for
4530 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004531 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004532 else
Thomas Hellere5529592007-12-13 21:20:29 +00004533 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004534 fi
4535 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004536 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004537 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004538 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004539 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004540 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4542 ;;
4543 esac
Fred Drake109d9862001-07-11 06:27:56 +00004544 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004545
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004546 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547 OPT="-O"
4548 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004549 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550
4551 # The current (beta) Monterey compiler dies with optimizations
4552 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004553 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004554 Monterey*)
4555 OPT=""
4556 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004557 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004558
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004559fi
4560
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004562
4563# The -arch flags for universal builds on OSX
4564UNIVERSAL_ARCH_FLAGS=
4565
4566
Skip Montanarodecc6a42003-01-01 20:07:49 +00004567# tweak BASECFLAGS based on compiler and platform
4568case $GCC in
4569yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004570 # Python violates C99 rules, by casting between incompatible
4571 # pointer types. GCC may generate bad code as a result of that,
4572 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004573 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4574echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004575 ac_save_cc="$CC"
4576 CC="$CC -fno-strict-aliasing"
4577 if test "$cross_compiling" = yes; then
4578 ac_cv_no_strict_aliasing_ok=no
4579else
4580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004581/* confdefs.h. */
4582_ACEOF
4583cat confdefs.h >>conftest.$ac_ext
4584cat >>conftest.$ac_ext <<_ACEOF
4585/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004586int main() { return 0; }
4587_ACEOF
4588rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004589if { (ac_try="$ac_link"
4590case "(($ac_try" in
4591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4592 *) ac_try_echo=$ac_try;;
4593esac
4594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4595 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004596 ac_status=$?
4597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004599 { (case "(($ac_try" in
4600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4601 *) ac_try_echo=$ac_try;;
4602esac
4603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4604 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004605 ac_status=$?
4606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607 (exit $ac_status); }; }; then
4608 ac_cv_no_strict_aliasing_ok=yes
4609else
4610 echo "$as_me: program exited with status $ac_status" >&5
4611echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004612sed 's/^/| /' conftest.$ac_ext >&5
4613
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004614( exit $ac_status )
4615ac_cv_no_strict_aliasing_ok=no
4616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004617rm -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 +00004618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004619
4620
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004621 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004622 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004624 if test $ac_cv_no_strict_aliasing_ok = yes
4625 then
4626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4627 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004628
4629 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4630 # support. Without this, treatment of subnormals doesn't follow
4631 # the standard.
4632 case $ac_sys_machine in
4633 alpha*)
4634 BASECFLAGS="$BASECFLAGS -mieee"
4635 ;;
4636 esac
4637
Skip Montanarodecc6a42003-01-01 20:07:49 +00004638 case $ac_sys_system in
4639 SCO_SV*)
4640 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4641 ;;
4642 # is there any other compiler on Darwin besides gcc?
4643 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004644 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4645 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004646
4647
Ronald Oussoren988117f2006-04-29 11:31:35 +00004648 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004649 UNIVERSAL_ARCH_FLAGS=""
4650 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004652 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004653
4654 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4655 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4656
4657 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4658 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004659 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004660
4661 else
4662 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4663echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4664 { (exit 1); exit 1; }; }
4665
4666 fi
4667
4668
4669 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004670 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004671 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4672 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4673 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004674 fi
4675
Benjamin Peterson4347c442008-07-17 15:59:24 +00004676 # Calculate the right deployment target for this build.
4677 #
4678 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4679 if test ${cur_target} '>' 10.2; then
4680 cur_target=10.3
4681 fi
4682 if test "${UNIVERSAL_ARCHS}" = "all"; then
4683 # Ensure that the default platform for a 4-way
4684 # universal build is OSX 10.5, that's the first
4685 # OS release where 4-way builds make sense.
4686 cur_target='10.5'
4687 fi
4688 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4689
4690 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4691 # environment with a value that is the same as what we'll use
4692 # in the Makefile to ensure that we'll get the same compiler
4693 # environment during configure and build time.
4694 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4695 export MACOSX_DEPLOYMENT_TARGET
4696 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4697
Skip Montanarodecc6a42003-01-01 20:07:49 +00004698 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004699 OSF*)
4700 BASECFLAGS="$BASECFLAGS -mieee"
4701 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004702 esac
4703 ;;
4704
4705*)
4706 case $ac_sys_system in
4707 OpenUNIX*|UnixWare*)
4708 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4709 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004710 OSF*)
4711 BASECFLAGS="$BASECFLAGS -ieee -std"
4712 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004713 SCO_SV*)
4714 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4715 ;;
4716 esac
4717 ;;
4718esac
4719
Fred Drakee1ceaa02001-12-04 20:55:47 +00004720if test "$Py_DEBUG" = 'true'; then
4721 :
4722else
4723 OPT="-DNDEBUG $OPT"
4724fi
4725
Guido van Rossum563e7081996-09-10 18:20:48 +00004726if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004727then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004728 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004729fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004730
Neal Norwitz020c46a2006-01-07 21:39:28 +00004731# disable check for icc since it seems to pass, but generates a warning
4732if test "$CC" = icc
4733then
4734 ac_cv_opt_olimit_ok=no
4735fi
4736
Martin v. Löwiseba40652007-08-30 20:10:57 +00004737{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4738echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004739if test "${ac_cv_opt_olimit_ok+set}" = set; then
4740 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004741else
4742 ac_save_cc="$CC"
4743CC="$CC -OPT:Olimit=0"
4744if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004745 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004746else
Martin v. Löwis11437992002-04-12 09:54:03 +00004747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004748/* confdefs.h. */
4749_ACEOF
4750cat confdefs.h >>conftest.$ac_ext
4751cat >>conftest.$ac_ext <<_ACEOF
4752/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004753int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004754_ACEOF
4755rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004756if { (ac_try="$ac_link"
4757case "(($ac_try" in
4758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4759 *) ac_try_echo=$ac_try;;
4760esac
4761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4762 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004763 ac_status=$?
4764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004766 { (case "(($ac_try" in
4767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4768 *) ac_try_echo=$ac_try;;
4769esac
4770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4771 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 ac_status=$?
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4774 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004775 ac_cv_opt_olimit_ok=yes
4776else
Martin v. Löwis11437992002-04-12 09:54:03 +00004777 echo "$as_me: program exited with status $ac_status" >&5
4778echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004779sed 's/^/| /' conftest.$ac_ext >&5
4780
Martin v. Löwis11437992002-04-12 09:54:03 +00004781( exit $ac_status )
4782ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004784rm -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 +00004785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004786
4787
Guido van Rossum91922671997-10-09 20:24:13 +00004788CC="$ac_save_cc"
4789fi
4790
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4792echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004793if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004794 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004795 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4796 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4797 # environment?
4798 Darwin*)
4799 ;;
4800 *)
4801 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4802 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004803 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004804else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004805 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4806echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 if test "${ac_cv_olimit_ok+set}" = set; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004809else
4810 ac_save_cc="$CC"
4811 CC="$CC -Olimit 1500"
4812 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004813 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004814else
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004816/* confdefs.h. */
4817_ACEOF
4818cat confdefs.h >>conftest.$ac_ext
4819cat >>conftest.$ac_ext <<_ACEOF
4820/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004821int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004822_ACEOF
4823rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004824if { (ac_try="$ac_link"
4825case "(($ac_try" in
4826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827 *) ac_try_echo=$ac_try;;
4828esac
4829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4830 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004831 ac_status=$?
4832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004834 { (case "(($ac_try" in
4835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4836 *) ac_try_echo=$ac_try;;
4837esac
4838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4839 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004840 ac_status=$?
4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4842 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004843 ac_cv_olimit_ok=yes
4844else
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 echo "$as_me: program exited with status $ac_status" >&5
4846echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004847sed 's/^/| /' conftest.$ac_ext >&5
4848
Martin v. Löwis11437992002-04-12 09:54:03 +00004849( exit $ac_status )
4850ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004852rm -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 +00004853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004854
4855
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004856 CC="$ac_save_cc"
4857fi
4858
Martin v. Löwiseba40652007-08-30 20:10:57 +00004859 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4860echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004861 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004862 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004863 fi
4864fi
4865
Martin v. Löwisaac13162006-10-19 10:58:46 +00004866# Check whether GCC supports PyArg_ParseTuple format
4867if test "$GCC" = "yes"
4868then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4870echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004871 save_CFLAGS=$CFLAGS
4872 CFLAGS="$CFLAGS -Werror"
4873 cat >conftest.$ac_ext <<_ACEOF
4874/* confdefs.h. */
4875_ACEOF
4876cat confdefs.h >>conftest.$ac_ext
4877cat >>conftest.$ac_ext <<_ACEOF
4878/* end confdefs.h. */
4879
4880 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4881
4882int
4883main ()
4884{
4885
4886 ;
4887 return 0;
4888}
4889_ACEOF
4890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004891if { (ac_try="$ac_compile"
4892case "(($ac_try" in
4893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4894 *) ac_try_echo=$ac_try;;
4895esac
4896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004898 ac_status=$?
4899 grep -v '^ *+' conftest.er1 >conftest.err
4900 rm -f conftest.er1
4901 cat conftest.err >&5
4902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 (exit $ac_status); } && {
4904 test -z "$ac_c_werror_flag" ||
4905 test ! -s conftest.err
4906 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004907
4908cat >>confdefs.h <<\_ACEOF
4909#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4910_ACEOF
4911
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 { echo "$as_me:$LINENO: result: yes" >&5
4913echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004914else
4915 echo "$as_me: failed program was:" >&5
4916sed 's/^/| /' conftest.$ac_ext >&5
4917
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918 { echo "$as_me:$LINENO: result: no" >&5
4919echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004920
4921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922
4923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004924 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004925fi
4926
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004927# On some compilers, pthreads are available without further options
4928# (e.g. MacOS X). On some of these systems, the compiler will not
4929# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4930# So we have to see first whether pthreads are available without
4931# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4933echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004934if test "${ac_cv_pthread_is_default+set}" = set; then
4935 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004936else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004937 if test "$cross_compiling" = yes; then
4938 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004941/* confdefs.h. */
4942_ACEOF
4943cat confdefs.h >>conftest.$ac_ext
4944cat >>conftest.$ac_ext <<_ACEOF
4945/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004946
Martin v. Löwis130fb172001-07-19 11:00:41 +00004947#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004948
4949void* routine(void* p){return NULL;}
4950
4951int main(){
4952 pthread_t p;
4953 if(pthread_create(&p,NULL,routine,NULL)!=0)
4954 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004955 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004956 return 0;
4957}
4958
Martin v. Löwis11437992002-04-12 09:54:03 +00004959_ACEOF
4960rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004961if { (ac_try="$ac_link"
4962case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971 { (case "(($ac_try" in
4972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4973 *) ac_try_echo=$ac_try;;
4974esac
4975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4976 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004980
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004981 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004982 ac_cv_kthread=no
4983 ac_cv_pthread=no
4984
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004985else
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 echo "$as_me: program exited with status $ac_status" >&5
4987echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004988sed 's/^/| /' conftest.$ac_ext >&5
4989
Martin v. Löwis11437992002-04-12 09:54:03 +00004990( exit $ac_status )
4991ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004993rm -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 +00004994fi
4995
Martin v. Löwiseba40652007-08-30 20:10:57 +00004996
4997
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004998fi
4999
Martin v. Löwiseba40652007-08-30 20:10:57 +00005000{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5001echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005002
Michael W. Hudson54241132001-12-07 15:38:26 +00005003
Martin v. Löwis11437992002-04-12 09:54:03 +00005004if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005005then
5006 ac_cv_kpthread=no
5007else
5008# -Kpthread, if available, provides the right #defines
5009# and linker options to make pthread_create available
5010# Some compilers won't report that they do not support -Kpthread,
5011# so we need to run a program to see whether it really made the
5012# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005013{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5014echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005015if test "${ac_cv_kpthread+set}" = set; then
5016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005017else
5018 ac_save_cc="$CC"
5019CC="$CC -Kpthread"
5020if test "$cross_compiling" = yes; then
5021 ac_cv_kpthread=no
5022else
Martin v. Löwis11437992002-04-12 09:54:03 +00005023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005024/* confdefs.h. */
5025_ACEOF
5026cat confdefs.h >>conftest.$ac_ext
5027cat >>conftest.$ac_ext <<_ACEOF
5028/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005029
5030#include <pthread.h>
5031
5032void* routine(void* p){return NULL;}
5033
5034int main(){
5035 pthread_t p;
5036 if(pthread_create(&p,NULL,routine,NULL)!=0)
5037 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005038 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005039 return 0;
5040}
5041
Martin v. Löwis11437992002-04-12 09:54:03 +00005042_ACEOF
5043rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005044if { (ac_try="$ac_link"
5045case "(($ac_try" in
5046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5047 *) ac_try_echo=$ac_try;;
5048esac
5049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5050 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005051 ac_status=$?
5052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005054 { (case "(($ac_try" in
5055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5056 *) ac_try_echo=$ac_try;;
5057esac
5058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5059 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005060 ac_status=$?
5061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5062 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005063 ac_cv_kpthread=yes
5064else
Martin v. Löwis11437992002-04-12 09:54:03 +00005065 echo "$as_me: program exited with status $ac_status" >&5
5066echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005067sed 's/^/| /' conftest.$ac_ext >&5
5068
Martin v. Löwis11437992002-04-12 09:54:03 +00005069( exit $ac_status )
5070ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005072rm -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 +00005073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005074
5075
Martin v. Löwis130fb172001-07-19 11:00:41 +00005076CC="$ac_save_cc"
5077fi
5078
Martin v. Löwiseba40652007-08-30 20:10:57 +00005079{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5080echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005081fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005082
Skip Montanarod8d39a02003-07-10 20:44:10 +00005083if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005084then
5085# -Kthread, if available, provides the right #defines
5086# and linker options to make pthread_create available
5087# Some compilers won't report that they do not support -Kthread,
5088# so we need to run a program to see whether it really made the
5089# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005090{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5091echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005092if test "${ac_cv_kthread+set}" = set; then
5093 echo $ECHO_N "(cached) $ECHO_C" >&6
5094else
5095 ac_save_cc="$CC"
5096CC="$CC -Kthread"
5097if test "$cross_compiling" = yes; then
5098 ac_cv_kthread=no
5099else
5100 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005101/* confdefs.h. */
5102_ACEOF
5103cat confdefs.h >>conftest.$ac_ext
5104cat >>conftest.$ac_ext <<_ACEOF
5105/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005106
5107#include <pthread.h>
5108
5109void* routine(void* p){return NULL;}
5110
5111int main(){
5112 pthread_t p;
5113 if(pthread_create(&p,NULL,routine,NULL)!=0)
5114 return 1;
5115 (void)pthread_detach(p);
5116 return 0;
5117}
5118
5119_ACEOF
5120rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121if { (ac_try="$ac_link"
5122case "(($ac_try" in
5123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5124 *) ac_try_echo=$ac_try;;
5125esac
5126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5127 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005128 ac_status=$?
5129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005131 { (case "(($ac_try" in
5132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5133 *) ac_try_echo=$ac_try;;
5134esac
5135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5136 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005137 ac_status=$?
5138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); }; }; then
5140 ac_cv_kthread=yes
5141else
5142 echo "$as_me: program exited with status $ac_status" >&5
5143echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005144sed 's/^/| /' conftest.$ac_ext >&5
5145
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005146( exit $ac_status )
5147ac_cv_kthread=no
5148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005149rm -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 +00005150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005151
5152
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005153CC="$ac_save_cc"
5154fi
5155
Martin v. Löwiseba40652007-08-30 20:10:57 +00005156{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5157echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005158fi
5159
Skip Montanarod8d39a02003-07-10 20:44:10 +00005160if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005161then
5162# -pthread, if available, provides the right #defines
5163# and linker options to make pthread_create available
5164# Some compilers won't report that they do not support -pthread,
5165# so we need to run a program to see whether it really made the
5166# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005167{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5168echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005169if test "${ac_cv_thread+set}" = set; then
5170 echo $ECHO_N "(cached) $ECHO_C" >&6
5171else
5172 ac_save_cc="$CC"
5173CC="$CC -pthread"
5174if test "$cross_compiling" = yes; then
5175 ac_cv_pthread=no
5176else
5177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005178/* confdefs.h. */
5179_ACEOF
5180cat confdefs.h >>conftest.$ac_ext
5181cat >>conftest.$ac_ext <<_ACEOF
5182/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005183
5184#include <pthread.h>
5185
5186void* routine(void* p){return NULL;}
5187
5188int main(){
5189 pthread_t p;
5190 if(pthread_create(&p,NULL,routine,NULL)!=0)
5191 return 1;
5192 (void)pthread_detach(p);
5193 return 0;
5194}
5195
5196_ACEOF
5197rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005198if { (ac_try="$ac_link"
5199case "(($ac_try" in
5200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5201 *) ac_try_echo=$ac_try;;
5202esac
5203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5204 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005208 { (case "(($ac_try" in
5209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5210 *) ac_try_echo=$ac_try;;
5211esac
5212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5213 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005214 ac_status=$?
5215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216 (exit $ac_status); }; }; then
5217 ac_cv_pthread=yes
5218else
5219 echo "$as_me: program exited with status $ac_status" >&5
5220echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005221sed 's/^/| /' conftest.$ac_ext >&5
5222
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005223( exit $ac_status )
5224ac_cv_pthread=no
5225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005226rm -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 +00005227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005228
5229
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005230CC="$ac_save_cc"
5231fi
5232
Martin v. Löwiseba40652007-08-30 20:10:57 +00005233{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5234echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005235fi
5236
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005237# If we have set a CC compiler flag for thread support then
5238# check if it works for CXX, too.
5239ac_cv_cxx_thread=no
5240if test ! -z "$CXX"
5241then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005242{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5243echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005244ac_save_cxx="$CXX"
5245
5246if test "$ac_cv_kpthread" = "yes"
5247then
5248 CXX="$CXX -Kpthread"
5249 ac_cv_cxx_thread=yes
5250elif test "$ac_cv_kthread" = "yes"
5251then
5252 CXX="$CXX -Kthread"
5253 ac_cv_cxx_thread=yes
5254elif test "$ac_cv_pthread" = "yes"
5255then
5256 CXX="$CXX -pthread"
5257 ac_cv_cxx_thread=yes
5258fi
5259
5260if test $ac_cv_cxx_thread = yes
5261then
5262 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5263 $CXX -c conftest.$ac_ext 2>&5
5264 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5265 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5266 then
5267 ac_cv_cxx_thread=yes
5268 else
5269 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005270 fi
5271 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005273{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5274echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005275fi
5276CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005277
Michael W. Hudson54241132001-12-07 15:38:26 +00005278
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005279# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005280{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5281echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005282if test "${ac_cv_header_stdc+set}" = set; then
5283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284else
Martin v. Löwis11437992002-04-12 09:54:03 +00005285 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005286/* confdefs.h. */
5287_ACEOF
5288cat confdefs.h >>conftest.$ac_ext
5289cat >>conftest.$ac_ext <<_ACEOF
5290/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005291#include <stdlib.h>
5292#include <stdarg.h>
5293#include <string.h>
5294#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005295
Skip Montanaro6dead952003-09-25 14:50:04 +00005296int
5297main ()
5298{
5299
5300 ;
5301 return 0;
5302}
Martin v. Löwis11437992002-04-12 09:54:03 +00005303_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005304rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005305if { (ac_try="$ac_compile"
5306case "(($ac_try" in
5307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5308 *) ac_try_echo=$ac_try;;
5309esac
5310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5311 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005313 grep -v '^ *+' conftest.er1 >conftest.err
5314 rm -f conftest.er1
5315 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005317 (exit $ac_status); } && {
5318 test -z "$ac_c_werror_flag" ||
5319 test ! -s conftest.err
5320 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321 ac_cv_header_stdc=yes
5322else
Martin v. Löwis11437992002-04-12 09:54:03 +00005323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005324sed 's/^/| /' conftest.$ac_ext >&5
5325
Martin v. Löwiseba40652007-08-30 20:10:57 +00005326 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005328
5329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330
5331if test $ac_cv_header_stdc = yes; then
5332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005334/* confdefs.h. */
5335_ACEOF
5336cat confdefs.h >>conftest.$ac_ext
5337cat >>conftest.$ac_ext <<_ACEOF
5338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005339#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005340
5341_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005343 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344 :
5345else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346 ac_cv_header_stdc=no
5347fi
5348rm -f conftest*
5349
5350fi
5351
5352if test $ac_cv_header_stdc = yes; then
5353 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005355/* confdefs.h. */
5356_ACEOF
5357cat confdefs.h >>conftest.$ac_ext
5358cat >>conftest.$ac_ext <<_ACEOF
5359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005360#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005361
5362_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005364 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365 :
5366else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005367 ac_cv_header_stdc=no
5368fi
5369rm -f conftest*
5370
5371fi
5372
5373if test $ac_cv_header_stdc = yes; then
5374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005375 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005376 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005377else
Martin v. Löwis11437992002-04-12 09:54:03 +00005378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005379/* confdefs.h. */
5380_ACEOF
5381cat confdefs.h >>conftest.$ac_ext
5382cat >>conftest.$ac_ext <<_ACEOF
5383/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005384#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005385#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005386#if ((' ' & 0x0FF) == 0x020)
5387# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5388# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5389#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005390# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005391 (('a' <= (c) && (c) <= 'i') \
5392 || ('j' <= (c) && (c) <= 'r') \
5393 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005394# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5395#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005396
Martin v. Löwis11437992002-04-12 09:54:03 +00005397#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5398int
5399main ()
5400{
5401 int i;
5402 for (i = 0; i < 256; i++)
5403 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005404 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005405 return 2;
5406 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005407}
5408_ACEOF
5409rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005410if { (ac_try="$ac_link"
5411case "(($ac_try" in
5412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5413 *) ac_try_echo=$ac_try;;
5414esac
5415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5416 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005417 ac_status=$?
5418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005420 { (case "(($ac_try" in
5421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5422 *) ac_try_echo=$ac_try;;
5423esac
5424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5425 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005426 ac_status=$?
5427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5428 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005429 :
5430else
Martin v. Löwis11437992002-04-12 09:54:03 +00005431 echo "$as_me: program exited with status $ac_status" >&5
5432echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005433sed 's/^/| /' conftest.$ac_ext >&5
5434
Martin v. Löwis11437992002-04-12 09:54:03 +00005435( exit $ac_status )
5436ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5439fi
5440
5441
Michael W. Hudson54241132001-12-07 15:38:26 +00005442fi
5443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005444{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5445echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005446if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005447
5448cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005449#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005450_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005451
5452fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005453
Skip Montanarob9820a32004-01-17 00:16:12 +00005454# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005465 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005466do
5467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005468{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5469echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5470if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005471 echo $ECHO_N "(cached) $ECHO_C" >&6
5472else
5473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005474/* confdefs.h. */
5475_ACEOF
5476cat confdefs.h >>conftest.$ac_ext
5477cat >>conftest.$ac_ext <<_ACEOF
5478/* end confdefs.h. */
5479$ac_includes_default
5480
5481#include <$ac_header>
5482_ACEOF
5483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005484if { (ac_try="$ac_compile"
5485case "(($ac_try" in
5486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5487 *) ac_try_echo=$ac_try;;
5488esac
5489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5490 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005492 grep -v '^ *+' conftest.er1 >conftest.err
5493 rm -f conftest.er1
5494 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005496 (exit $ac_status); } && {
5497 test -z "$ac_c_werror_flag" ||
5498 test ! -s conftest.err
5499 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005500 eval "$as_ac_Header=yes"
5501else
5502 echo "$as_me: failed program was:" >&5
5503sed 's/^/| /' conftest.$ac_ext >&5
5504
Martin v. Löwiseba40652007-08-30 20:10:57 +00005505 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005507
5508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005510ac_res=`eval echo '${'$as_ac_Header'}'`
5511 { echo "$as_me:$LINENO: result: $ac_res" >&5
5512echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005513if test `eval echo '${'$as_ac_Header'}'` = yes; then
5514 cat >>confdefs.h <<_ACEOF
5515#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5516_ACEOF
5517
5518fi
5519
5520done
5521
5522
Martin v. Löwis11437992002-04-12 09:54:03 +00005523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
Anthony Baxter8a560de2004-10-13 15:30:56 +00005559
Martin v. Löwisc3001752005-01-23 09:27:24 +00005560
Martin v. Löwis11017b12006-01-14 18:12:57 +00005561
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005562
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005563
5564
5565
5566
5567
5568
5569
5570
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005571
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005572
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005573
5574
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005575
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005576
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005577for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5578fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005579ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005580shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005581unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005582sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5583sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005584sys/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 +00005585sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005586sys/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 +00005587sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005588bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005589do
Martin v. Löwis11437992002-04-12 09:54:03 +00005590as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005591if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5592 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5593echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5594if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005595 echo $ECHO_N "(cached) $ECHO_C" >&6
5596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005597ac_res=`eval echo '${'$as_ac_Header'}'`
5598 { echo "$as_me:$LINENO: result: $ac_res" >&5
5599echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005600else
Martin v. Löwis11437992002-04-12 09:54:03 +00005601 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005602{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5603echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005605/* confdefs.h. */
5606_ACEOF
5607cat confdefs.h >>conftest.$ac_ext
5608cat >>conftest.$ac_ext <<_ACEOF
5609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005610$ac_includes_default
5611#include <$ac_header>
5612_ACEOF
5613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005614if { (ac_try="$ac_compile"
5615case "(($ac_try" in
5616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5617 *) ac_try_echo=$ac_try;;
5618esac
5619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005622 grep -v '^ *+' conftest.er1 >conftest.err
5623 rm -f conftest.er1
5624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005626 (exit $ac_status); } && {
5627 test -z "$ac_c_werror_flag" ||
5628 test ! -s conftest.err
5629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005630 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005631else
Martin v. Löwis11437992002-04-12 09:54:03 +00005632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005633sed 's/^/| /' conftest.$ac_ext >&5
5634
Martin v. Löwiseba40652007-08-30 20:10:57 +00005635 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637
5638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5639{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5640echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005641
5642# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005643{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5644echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005645cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005646/* confdefs.h. */
5647_ACEOF
5648cat confdefs.h >>conftest.$ac_ext
5649cat >>conftest.$ac_ext <<_ACEOF
5650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005651#include <$ac_header>
5652_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005653if { (ac_try="$ac_cpp conftest.$ac_ext"
5654case "(($ac_try" in
5655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5656 *) ac_try_echo=$ac_try;;
5657esac
5658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5659 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005660 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005661 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 rm -f conftest.er1
5663 cat conftest.err >&5
5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005665 (exit $ac_status); } >/dev/null && {
5666 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5667 test ! -s conftest.err
5668 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 ac_header_preproc=yes
5670else
5671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005672sed 's/^/| /' conftest.$ac_ext >&5
5673
Martin v. Löwis11437992002-04-12 09:54:03 +00005674 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005676
Martin v. Löwis11437992002-04-12 09:54:03 +00005677rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005678{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5679echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005680
5681# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5683 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5685echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005686 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5687echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5688 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005689 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005691 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5692echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005693 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5694echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5696echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5698echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005699 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5700echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5702echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005704## ------------------------------------------------ ##
5705## Report this to http://www.python.org/python-bugs ##
5706## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005707_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005708 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005709 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005710esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5712echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5713if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005714 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005715else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005716 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718ac_res=`eval echo '${'$as_ac_Header'}'`
5719 { echo "$as_me:$LINENO: result: $ac_res" >&5
5720echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005721
5722fi
5723if test `eval echo '${'$as_ac_Header'}'` = yes; then
5724 cat >>confdefs.h <<_ACEOF
5725#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5726_ACEOF
5727
5728fi
5729
Guido van Rossum627b2d71993-12-24 10:39:16 +00005730done
5731
Martin v. Löwis11437992002-04-12 09:54:03 +00005732
5733
5734
5735
5736
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005737ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005738for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5739 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005740{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5741echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5742if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005743 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005744else
Martin v. Löwis11437992002-04-12 09:54:03 +00005745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005746/* confdefs.h. */
5747_ACEOF
5748cat confdefs.h >>conftest.$ac_ext
5749cat >>conftest.$ac_ext <<_ACEOF
5750/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005751#include <sys/types.h>
5752#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005753
Martin v. Löwis11437992002-04-12 09:54:03 +00005754int
5755main ()
5756{
5757if ((DIR *) 0)
5758return 0;
5759 ;
5760 return 0;
5761}
5762_ACEOF
5763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005764if { (ac_try="$ac_compile"
5765case "(($ac_try" in
5766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5767 *) ac_try_echo=$ac_try;;
5768esac
5769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005772 grep -v '^ *+' conftest.er1 >conftest.err
5773 rm -f conftest.er1
5774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776 (exit $ac_status); } && {
5777 test -z "$ac_c_werror_flag" ||
5778 test ! -s conftest.err
5779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005780 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005781else
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005783sed 's/^/| /' conftest.$ac_ext >&5
5784
Martin v. Löwiseba40652007-08-30 20:10:57 +00005785 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005787
5788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005790ac_res=`eval echo '${'$as_ac_Header'}'`
5791 { echo "$as_me:$LINENO: result: $ac_res" >&5
5792echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005793if test `eval echo '${'$as_ac_Header'}'` = yes; then
5794 cat >>confdefs.h <<_ACEOF
5795#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5796_ACEOF
5797
5798ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005800
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801done
5802# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5803if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5805echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005806if test "${ac_cv_search_opendir+set}" = set; then
5807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005808else
Martin v. Löwis11437992002-04-12 09:54:03 +00005809 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005811/* confdefs.h. */
5812_ACEOF
5813cat confdefs.h >>conftest.$ac_ext
5814cat >>conftest.$ac_ext <<_ACEOF
5815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005816
Martin v. Löwiseba40652007-08-30 20:10:57 +00005817/* Override any GCC internal prototype to avoid an error.
5818 Use char because int might match the return type of a GCC
5819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005820#ifdef __cplusplus
5821extern "C"
5822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005823char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005824int
5825main ()
5826{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005827return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005828 ;
5829 return 0;
5830}
5831_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832for ac_lib in '' dir; do
5833 if test -z "$ac_lib"; then
5834 ac_res="none required"
5835 else
5836 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005837 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838 fi
5839 rm -f conftest.$ac_objext conftest$ac_exeext
5840if { (ac_try="$ac_link"
5841case "(($ac_try" in
5842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5843 *) ac_try_echo=$ac_try;;
5844esac
5845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5846 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005847 ac_status=$?
5848 grep -v '^ *+' conftest.er1 >conftest.err
5849 rm -f conftest.er1
5850 cat conftest.err >&5
5851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852 (exit $ac_status); } && {
5853 test -z "$ac_c_werror_flag" ||
5854 test ! -s conftest.err
5855 } && test -s conftest$ac_exeext &&
5856 $as_test_x conftest$ac_exeext; then
5857 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005858else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005859 echo "$as_me: failed program was:" >&5
5860sed 's/^/| /' conftest.$ac_ext >&5
5861
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862
Brett Cannon19fab762007-06-02 03:02:29 +00005863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005864
5865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5866 conftest$ac_exeext
5867 if test "${ac_cv_search_opendir+set}" = set; then
5868 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870done
5871if test "${ac_cv_search_opendir+set}" = set; then
5872 :
5873else
5874 ac_cv_search_opendir=no
5875fi
5876rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005877LIBS=$ac_func_search_save_LIBS
5878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005879{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5880echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5881ac_res=$ac_cv_search_opendir
5882if test "$ac_res" != no; then
5883 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005884
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005886
Michael W. Hudson54241132001-12-07 15:38:26 +00005887else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005888 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5889echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005890if test "${ac_cv_search_opendir+set}" = set; then
5891 echo $ECHO_N "(cached) $ECHO_C" >&6
5892else
5893 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005895/* confdefs.h. */
5896_ACEOF
5897cat confdefs.h >>conftest.$ac_ext
5898cat >>conftest.$ac_ext <<_ACEOF
5899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005900
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901/* Override any GCC internal prototype to avoid an error.
5902 Use char because int might match the return type of a GCC
5903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005904#ifdef __cplusplus
5905extern "C"
5906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005907char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005908int
5909main ()
5910{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005912 ;
5913 return 0;
5914}
5915_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916for ac_lib in '' x; do
5917 if test -z "$ac_lib"; then
5918 ac_res="none required"
5919 else
5920 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005921 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005922 fi
5923 rm -f conftest.$ac_objext conftest$ac_exeext
5924if { (ac_try="$ac_link"
5925case "(($ac_try" in
5926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5927 *) ac_try_echo=$ac_try;;
5928esac
5929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5930 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005931 ac_status=$?
5932 grep -v '^ *+' conftest.er1 >conftest.err
5933 rm -f conftest.er1
5934 cat conftest.err >&5
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936 (exit $ac_status); } && {
5937 test -z "$ac_c_werror_flag" ||
5938 test ! -s conftest.err
5939 } && test -s conftest$ac_exeext &&
5940 $as_test_x conftest$ac_exeext; then
5941 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005942else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005943 echo "$as_me: failed program was:" >&5
5944sed 's/^/| /' conftest.$ac_ext >&5
5945
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946
Brett Cannon19fab762007-06-02 03:02:29 +00005947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948
5949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5950 conftest$ac_exeext
5951 if test "${ac_cv_search_opendir+set}" = set; then
5952 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005954done
5955if test "${ac_cv_search_opendir+set}" = set; then
5956 :
5957else
5958 ac_cv_search_opendir=no
5959fi
5960rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005961LIBS=$ac_func_search_save_LIBS
5962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005963{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5964echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5965ac_res=$ac_cv_search_opendir
5966if test "$ac_res" != no; then
5967 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005968
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005969fi
5970
5971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005972
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5974echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005975if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5976 echo $ECHO_N "(cached) $ECHO_C" >&6
5977else
5978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005979/* confdefs.h. */
5980_ACEOF
5981cat confdefs.h >>conftest.$ac_ext
5982cat >>conftest.$ac_ext <<_ACEOF
5983/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005985int
5986main ()
5987{
5988return makedev(0, 0);
5989 ;
5990 return 0;
5991}
5992_ACEOF
5993rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005994if { (ac_try="$ac_link"
5995case "(($ac_try" in
5996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5997 *) ac_try_echo=$ac_try;;
5998esac
5999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6000 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006002 grep -v '^ *+' conftest.er1 >conftest.err
6003 rm -f conftest.er1
6004 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006006 (exit $ac_status); } && {
6007 test -z "$ac_c_werror_flag" ||
6008 test ! -s conftest.err
6009 } && test -s conftest$ac_exeext &&
6010 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011 ac_cv_header_sys_types_h_makedev=yes
6012else
6013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006014sed 's/^/| /' conftest.$ac_ext >&5
6015
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006018
6019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021
6022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006023{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6024echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025
6026if test $ac_cv_header_sys_types_h_makedev = no; then
6027if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6029echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6031 echo $ECHO_N "(cached) $ECHO_C" >&6
6032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6034echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035else
6036 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6038echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045$ac_includes_default
6046#include <sys/mkdev.h>
6047_ACEOF
6048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006049if { (ac_try="$ac_compile"
6050case "(($ac_try" in
6051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6052 *) ac_try_echo=$ac_try;;
6053esac
6054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006057 grep -v '^ *+' conftest.er1 >conftest.err
6058 rm -f conftest.er1
6059 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061 (exit $ac_status); } && {
6062 test -z "$ac_c_werror_flag" ||
6063 test ! -s conftest.err
6064 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065 ac_header_compiler=yes
6066else
6067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006068sed 's/^/| /' conftest.$ac_ext >&5
6069
Martin v. Löwiseba40652007-08-30 20:10:57 +00006070 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072
6073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6074{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6075echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076
6077# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6079echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006081/* confdefs.h. */
6082_ACEOF
6083cat confdefs.h >>conftest.$ac_ext
6084cat >>conftest.$ac_ext <<_ACEOF
6085/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086#include <sys/mkdev.h>
6087_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088if { (ac_try="$ac_cpp conftest.$ac_ext"
6089case "(($ac_try" in
6090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6091 *) ac_try_echo=$ac_try;;
6092esac
6093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6094 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006096 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 rm -f conftest.er1
6098 cat conftest.err >&5
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006100 (exit $ac_status); } >/dev/null && {
6101 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6102 test ! -s conftest.err
6103 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104 ac_header_preproc=yes
6105else
6106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006107sed 's/^/| /' conftest.$ac_ext >&5
6108
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 ac_header_preproc=no
6110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006111
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6114echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115
6116# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6118 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6120echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6123 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006124 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6132 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6133echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006139## ------------------------------------------------ ##
6140## Report this to http://www.python.org/python-bugs ##
6141## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006142_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006143 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006144 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6147echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6149 echo $ECHO_N "(cached) $ECHO_C" >&6
6150else
6151 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006153{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6154echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006155
6156fi
6157if test $ac_cv_header_sys_mkdev_h = yes; then
6158
6159cat >>confdefs.h <<\_ACEOF
6160#define MAJOR_IN_MKDEV 1
6161_ACEOF
6162
6163fi
6164
6165
6166
6167 if test $ac_cv_header_sys_mkdev_h = no; then
6168 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6170echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006171if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6172 echo $ECHO_N "(cached) $ECHO_C" >&6
6173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006174{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6175echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176else
6177 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6179echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006181/* confdefs.h. */
6182_ACEOF
6183cat confdefs.h >>conftest.$ac_ext
6184cat >>conftest.$ac_ext <<_ACEOF
6185/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186$ac_includes_default
6187#include <sys/sysmacros.h>
6188_ACEOF
6189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006190if { (ac_try="$ac_compile"
6191case "(($ac_try" in
6192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6193 *) ac_try_echo=$ac_try;;
6194esac
6195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006198 grep -v '^ *+' conftest.er1 >conftest.err
6199 rm -f conftest.er1
6200 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202 (exit $ac_status); } && {
6203 test -z "$ac_c_werror_flag" ||
6204 test ! -s conftest.err
6205 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206 ac_header_compiler=yes
6207else
6208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006209sed 's/^/| /' conftest.$ac_ext >&5
6210
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006213
6214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6215{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6216echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217
6218# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6220echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006222/* confdefs.h. */
6223_ACEOF
6224cat confdefs.h >>conftest.$ac_ext
6225cat >>conftest.$ac_ext <<_ACEOF
6226/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227#include <sys/sysmacros.h>
6228_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229if { (ac_try="$ac_cpp conftest.$ac_ext"
6230case "(($ac_try" in
6231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6232 *) ac_try_echo=$ac_try;;
6233esac
6234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6235 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006237 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238 rm -f conftest.er1
6239 cat conftest.err >&5
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006241 (exit $ac_status); } >/dev/null && {
6242 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6243 test ! -s conftest.err
6244 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245 ac_header_preproc=yes
6246else
6247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006248sed 's/^/| /' conftest.$ac_ext >&5
6249
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250 ac_header_preproc=no
6251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006252
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6255echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256
6257# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6259 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6261echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006262 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6263echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6264 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006265 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6273 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6274echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006280## ------------------------------------------------ ##
6281## Report this to http://www.python.org/python-bugs ##
6282## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006283_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006284 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006285 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6288echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6290 echo $ECHO_N "(cached) $ECHO_C" >&6
6291else
6292 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6295echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006296
6297fi
6298if test $ac_cv_header_sys_sysmacros_h = yes; then
6299
6300cat >>confdefs.h <<\_ACEOF
6301#define MAJOR_IN_SYSMACROS 1
6302_ACEOF
6303
6304fi
6305
6306
6307 fi
6308fi
6309
Michael W. Hudson54241132001-12-07 15:38:26 +00006310
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006311# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006312
6313for ac_header in term.h
6314do
6315as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006316{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6317echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6318if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319 echo $ECHO_N "(cached) $ECHO_C" >&6
6320else
6321 cat >conftest.$ac_ext <<_ACEOF
6322/* confdefs.h. */
6323_ACEOF
6324cat confdefs.h >>conftest.$ac_ext
6325cat >>conftest.$ac_ext <<_ACEOF
6326/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006328#ifdef HAVE_CURSES_H
6329#include <curses.h>
6330#endif
6331
6332
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006333#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006334_ACEOF
6335rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006336if { (ac_try="$ac_compile"
6337case "(($ac_try" in
6338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6339 *) ac_try_echo=$ac_try;;
6340esac
6341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006343 ac_status=$?
6344 grep -v '^ *+' conftest.er1 >conftest.err
6345 rm -f conftest.er1
6346 cat conftest.err >&5
6347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006348 (exit $ac_status); } && {
6349 test -z "$ac_c_werror_flag" ||
6350 test ! -s conftest.err
6351 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006352 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353else
6354 echo "$as_me: failed program was:" >&5
6355sed 's/^/| /' conftest.$ac_ext >&5
6356
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006359
6360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362ac_res=`eval echo '${'$as_ac_Header'}'`
6363 { echo "$as_me:$LINENO: result: $ac_res" >&5
6364echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006365if test `eval echo '${'$as_ac_Header'}'` = yes; then
6366 cat >>confdefs.h <<_ACEOF
6367#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6368_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006370fi
6371
6372done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006373
6374
Martin v. Löwis11017b12006-01-14 18:12:57 +00006375# On Linux, netlink.h requires asm/types.h
6376
6377for ac_header in linux/netlink.h
6378do
6379as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006380{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6381echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6382if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006383 echo $ECHO_N "(cached) $ECHO_C" >&6
6384else
6385 cat >conftest.$ac_ext <<_ACEOF
6386/* confdefs.h. */
6387_ACEOF
6388cat confdefs.h >>conftest.$ac_ext
6389cat >>conftest.$ac_ext <<_ACEOF
6390/* end confdefs.h. */
6391
6392#ifdef HAVE_ASM_TYPES_H
6393#include <asm/types.h>
6394#endif
6395#ifdef HAVE_SYS_SOCKET_H
6396#include <sys/socket.h>
6397#endif
6398
6399
6400#include <$ac_header>
6401_ACEOF
6402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006403if { (ac_try="$ac_compile"
6404case "(($ac_try" in
6405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6406 *) ac_try_echo=$ac_try;;
6407esac
6408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006410 ac_status=$?
6411 grep -v '^ *+' conftest.er1 >conftest.err
6412 rm -f conftest.er1
6413 cat conftest.err >&5
6414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006415 (exit $ac_status); } && {
6416 test -z "$ac_c_werror_flag" ||
6417 test ! -s conftest.err
6418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006419 eval "$as_ac_Header=yes"
6420else
6421 echo "$as_me: failed program was:" >&5
6422sed 's/^/| /' conftest.$ac_ext >&5
6423
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426
6427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006429ac_res=`eval echo '${'$as_ac_Header'}'`
6430 { echo "$as_me:$LINENO: result: $ac_res" >&5
6431echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006432if test `eval echo '${'$as_ac_Header'}'` = yes; then
6433 cat >>confdefs.h <<_ACEOF
6434#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6435_ACEOF
6436
6437fi
6438
6439done
6440
6441
Guido van Rossum627b2d71993-12-24 10:39:16 +00006442# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006443was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006444{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6445echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006447/* confdefs.h. */
6448_ACEOF
6449cat confdefs.h >>conftest.$ac_ext
6450cat >>conftest.$ac_ext <<_ACEOF
6451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006453
6454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006456 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006457 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458else
Martin v. Löwis11437992002-04-12 09:54:03 +00006459
6460
6461cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006463_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006464
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006465
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466fi
6467rm -f conftest*
6468
Martin v. Löwiseba40652007-08-30 20:10:57 +00006469{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6470echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006471
Neal Norwitz11690112002-07-30 01:08:28 +00006472# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006473{ echo "$as_me:$LINENO: checking for makedev" >&5
6474echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006475cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006476/* confdefs.h. */
6477_ACEOF
6478cat confdefs.h >>conftest.$ac_ext
6479cat >>conftest.$ac_ext <<_ACEOF
6480/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006481#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006482int
6483main ()
6484{
6485 makedev(0, 0)
6486 ;
6487 return 0;
6488}
6489_ACEOF
6490rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006491if { (ac_try="$ac_link"
6492case "(($ac_try" in
6493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6494 *) ac_try_echo=$ac_try;;
6495esac
6496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6497 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006499 grep -v '^ *+' conftest.er1 >conftest.err
6500 rm -f conftest.er1
6501 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006503 (exit $ac_status); } && {
6504 test -z "$ac_c_werror_flag" ||
6505 test ! -s conftest.err
6506 } && test -s conftest$ac_exeext &&
6507 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006508 ac_cv_has_makedev=yes
6509else
6510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006511sed 's/^/| /' conftest.$ac_ext >&5
6512
Martin v. Löwiseba40652007-08-30 20:10:57 +00006513 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006515
6516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006517 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006518if test "$ac_cv_has_makedev" = "no"; then
6519 # we didn't link, try if _OSF_SOURCE will allow us to link
6520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006521/* confdefs.h. */
6522_ACEOF
6523cat confdefs.h >>conftest.$ac_ext
6524cat >>conftest.$ac_ext <<_ACEOF
6525/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006526
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006527#define _OSF_SOURCE 1
6528#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006529
Neal Norwitz11690112002-07-30 01:08:28 +00006530int
6531main ()
6532{
6533 makedev(0, 0)
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006539if { (ac_try="$ac_link"
6540case "(($ac_try" in
6541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6542 *) ac_try_echo=$ac_try;;
6543esac
6544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6545 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006547 grep -v '^ *+' conftest.er1 >conftest.err
6548 rm -f conftest.er1
6549 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006551 (exit $ac_status); } && {
6552 test -z "$ac_c_werror_flag" ||
6553 test ! -s conftest.err
6554 } && test -s conftest$ac_exeext &&
6555 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006556 ac_cv_has_makedev=yes
6557else
6558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006559sed 's/^/| /' conftest.$ac_ext >&5
6560
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563
6564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006565 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006566 if test "$ac_cv_has_makedev" = "yes"; then
6567
6568cat >>confdefs.h <<\_ACEOF
6569#define _OSF_SOURCE 1
6570_ACEOF
6571
6572 fi
6573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006574{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6575echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006576if test "$ac_cv_has_makedev" = "yes"; then
6577
6578cat >>confdefs.h <<\_ACEOF
6579#define HAVE_MAKEDEV 1
6580_ACEOF
6581
6582fi
6583
Martin v. Löwis399a6892002-10-04 10:22:02 +00006584# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6585# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6586# defined, but the compiler does not support pragma redefine_extname,
6587# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6588# structures (such as rlimit64) without declaring them. As a
6589# work-around, disable LFS on such configurations
6590
6591use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6593echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006595/* confdefs.h. */
6596_ACEOF
6597cat confdefs.h >>conftest.$ac_ext
6598cat >>conftest.$ac_ext <<_ACEOF
6599/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006600
6601#define _LARGEFILE_SOURCE 1
6602#define _FILE_OFFSET_BITS 64
6603#include <sys/resource.h>
6604
Martin v. Löwis399a6892002-10-04 10:22:02 +00006605int
6606main ()
6607{
6608struct rlimit foo;
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614if { (ac_try="$ac_compile"
6615case "(($ac_try" in
6616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6617 *) ac_try_echo=$ac_try;;
6618esac
6619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006622 grep -v '^ *+' conftest.er1 >conftest.err
6623 rm -f conftest.er1
6624 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626 (exit $ac_status); } && {
6627 test -z "$ac_c_werror_flag" ||
6628 test ! -s conftest.err
6629 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006630 sol_lfs_bug=no
6631else
6632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006633sed 's/^/| /' conftest.$ac_ext >&5
6634
Martin v. Löwiseba40652007-08-30 20:10:57 +00006635 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006637
6638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6639{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6640echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641if test "$sol_lfs_bug" = "yes"; then
6642 use_lfs=no
6643fi
6644
6645if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006646# Two defines needed to enable largefile support on various platforms
6647# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006648
Martin v. Löwis11437992002-04-12 09:54:03 +00006649cat >>confdefs.h <<\_ACEOF
6650#define _LARGEFILE_SOURCE 1
6651_ACEOF
6652
6653
6654cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006655#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006656_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006657
Martin v. Löwis399a6892002-10-04 10:22:02 +00006658fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006659
Guido van Rossum84e7b241996-08-19 21:59:00 +00006660# Add some code to confdefs.h so that the test for off_t works on SCO
6661cat >> confdefs.h <<\EOF
6662#if defined(SCO_DS)
6663#undef _OFF_T
6664#endif
6665EOF
6666
Guido van Rossumef2255b2000-03-10 22:30:29 +00006667# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006668{ echo "$as_me:$LINENO: checking for mode_t" >&5
6669echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006670if test "${ac_cv_type_mode_t+set}" = set; then
6671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006672else
Martin v. Löwis11437992002-04-12 09:54:03 +00006673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006674/* confdefs.h. */
6675_ACEOF
6676cat confdefs.h >>conftest.$ac_ext
6677cat >>conftest.$ac_ext <<_ACEOF
6678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006679$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006680typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006681int
6682main ()
6683{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006685 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006687 return 0;
6688 ;
6689 return 0;
6690}
6691_ACEOF
6692rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006693if { (ac_try="$ac_compile"
6694case "(($ac_try" in
6695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6696 *) ac_try_echo=$ac_try;;
6697esac
6698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006701 grep -v '^ *+' conftest.er1 >conftest.err
6702 rm -f conftest.er1
6703 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705 (exit $ac_status); } && {
6706 test -z "$ac_c_werror_flag" ||
6707 test ! -s conftest.err
6708 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006709 ac_cv_type_mode_t=yes
6710else
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006712sed 's/^/| /' conftest.$ac_ext >&5
6713
Martin v. Löwiseba40652007-08-30 20:10:57 +00006714 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716
6717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006719{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6720echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006721if test $ac_cv_type_mode_t = yes; then
6722 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006723else
Martin v. Löwis11437992002-04-12 09:54:03 +00006724
6725cat >>confdefs.h <<_ACEOF
6726#define mode_t int
6727_ACEOF
6728
6729fi
6730
Martin v. Löwiseba40652007-08-30 20:10:57 +00006731{ echo "$as_me:$LINENO: checking for off_t" >&5
6732echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006733if test "${ac_cv_type_off_t+set}" = set; then
6734 echo $ECHO_N "(cached) $ECHO_C" >&6
6735else
6736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006742$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006744int
6745main ()
6746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006747if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006748 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 return 0;
6751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006756if { (ac_try="$ac_compile"
6757case "(($ac_try" in
6758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6759 *) ac_try_echo=$ac_try;;
6760esac
6761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006764 grep -v '^ *+' conftest.er1 >conftest.err
6765 rm -f conftest.er1
6766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768 (exit $ac_status); } && {
6769 test -z "$ac_c_werror_flag" ||
6770 test ! -s conftest.err
6771 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006772 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006773else
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006775sed 's/^/| /' conftest.$ac_ext >&5
6776
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779
6780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6783echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006784if test $ac_cv_type_off_t = yes; then
6785 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786else
Martin v. Löwis11437992002-04-12 09:54:03 +00006787
6788cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006789#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006790_ACEOF
6791
6792fi
6793
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794{ echo "$as_me:$LINENO: checking for pid_t" >&5
6795echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006796if test "${ac_cv_type_pid_t+set}" = set; then
6797 echo $ECHO_N "(cached) $ECHO_C" >&6
6798else
6799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006800/* confdefs.h. */
6801_ACEOF
6802cat confdefs.h >>conftest.$ac_ext
6803cat >>conftest.$ac_ext <<_ACEOF
6804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006807int
6808main ()
6809{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006811 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 return 0;
6814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819if { (ac_try="$ac_compile"
6820case "(($ac_try" in
6821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6822 *) ac_try_echo=$ac_try;;
6823esac
6824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006827 grep -v '^ *+' conftest.er1 >conftest.err
6828 rm -f conftest.er1
6829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006831 (exit $ac_status); } && {
6832 test -z "$ac_c_werror_flag" ||
6833 test ! -s conftest.err
6834 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006835 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006836else
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842
6843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6846echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006847if test $ac_cv_type_pid_t = yes; then
6848 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849else
Martin v. Löwis11437992002-04-12 09:54:03 +00006850
6851cat >>confdefs.h <<_ACEOF
6852#define pid_t int
6853_ACEOF
6854
6855fi
6856
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6858echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006859if test "${ac_cv_type_signal+set}" = set; then
6860 echo $ECHO_N "(cached) $ECHO_C" >&6
6861else
6862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006863/* confdefs.h. */
6864_ACEOF
6865cat confdefs.h >>conftest.$ac_ext
6866cat >>conftest.$ac_ext <<_ACEOF
6867/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006868#include <sys/types.h>
6869#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006870
Martin v. Löwis11437992002-04-12 09:54:03 +00006871int
6872main ()
6873{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 ;
6876 return 0;
6877}
6878_ACEOF
6879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880if { (ac_try="$ac_compile"
6881case "(($ac_try" in
6882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6883 *) ac_try_echo=$ac_try;;
6884esac
6885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006888 grep -v '^ *+' conftest.er1 >conftest.err
6889 rm -f conftest.er1
6890 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006892 (exit $ac_status); } && {
6893 test -z "$ac_c_werror_flag" ||
6894 test ! -s conftest.err
6895 } && test -s conftest.$ac_objext; then
6896 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006897else
Martin v. Löwis11437992002-04-12 09:54:03 +00006898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006899sed 's/^/| /' conftest.$ac_ext >&5
6900
Martin v. Löwiseba40652007-08-30 20:10:57 +00006901 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006903
6904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6907echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006911_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912
Michael W. Hudson54241132001-12-07 15:38:26 +00006913
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914{ echo "$as_me:$LINENO: checking for size_t" >&5
6915echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006916if test "${ac_cv_type_size_t+set}" = set; then
6917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918else
Martin v. Löwis11437992002-04-12 09:54:03 +00006919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006920/* confdefs.h. */
6921_ACEOF
6922cat confdefs.h >>conftest.$ac_ext
6923cat >>conftest.$ac_ext <<_ACEOF
6924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006925$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006926typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006927int
6928main ()
6929{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006931 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 return 0;
6934 ;
6935 return 0;
6936}
6937_ACEOF
6938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939if { (ac_try="$ac_compile"
6940case "(($ac_try" in
6941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6942 *) ac_try_echo=$ac_try;;
6943esac
6944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006947 grep -v '^ *+' conftest.er1 >conftest.err
6948 rm -f conftest.er1
6949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951 (exit $ac_status); } && {
6952 test -z "$ac_c_werror_flag" ||
6953 test ! -s conftest.err
6954 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006955 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006956else
Martin v. Löwis11437992002-04-12 09:54:03 +00006957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006958sed 's/^/| /' conftest.$ac_ext >&5
6959
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006962
6963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006965{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6966echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006967if test $ac_cv_type_size_t = yes; then
6968 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006969else
Martin v. Löwis11437992002-04-12 09:54:03 +00006970
6971cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006973_ACEOF
6974
6975fi
6976
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6978echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006979if test "${ac_cv_type_uid_t+set}" = set; then
6980 echo $ECHO_N "(cached) $ECHO_C" >&6
6981else
6982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006989
6990_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006992 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993 ac_cv_type_uid_t=yes
6994else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995 ac_cv_type_uid_t=no
6996fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006997rm -f conftest*
6998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7001echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007002if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003
Martin v. Löwis11437992002-04-12 09:54:03 +00007004cat >>confdefs.h <<\_ACEOF
7005#define uid_t int
7006_ACEOF
7007
7008
7009cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007010#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007011_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007012
7013fi
7014
Martin v. Löwiseba40652007-08-30 20:10:57 +00007015{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7016echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007017if test "${ac_cv_type_ssize_t+set}" = set; then
7018 echo $ECHO_N "(cached) $ECHO_C" >&6
7019else
7020 cat >conftest.$ac_ext <<_ACEOF
7021/* confdefs.h. */
7022_ACEOF
7023cat confdefs.h >>conftest.$ac_ext
7024cat >>conftest.$ac_ext <<_ACEOF
7025/* end confdefs.h. */
7026$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007028int
7029main ()
7030{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007032 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007034 return 0;
7035 ;
7036 return 0;
7037}
7038_ACEOF
7039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007040if { (ac_try="$ac_compile"
7041case "(($ac_try" in
7042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7043 *) ac_try_echo=$ac_try;;
7044esac
7045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007047 ac_status=$?
7048 grep -v '^ *+' conftest.er1 >conftest.err
7049 rm -f conftest.er1
7050 cat conftest.err >&5
7051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052 (exit $ac_status); } && {
7053 test -z "$ac_c_werror_flag" ||
7054 test ! -s conftest.err
7055 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007056 ac_cv_type_ssize_t=yes
7057else
7058 echo "$as_me: failed program was:" >&5
7059sed 's/^/| /' conftest.$ac_ext >&5
7060
Martin v. Löwiseba40652007-08-30 20:10:57 +00007061 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063
7064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007066{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7067echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007068if test $ac_cv_type_ssize_t = yes; then
7069
7070cat >>confdefs.h <<\_ACEOF
7071#define HAVE_SSIZE_T 1
7072_ACEOF
7073
7074fi
7075
Jack Jansendd19cf82001-12-06 22:36:17 +00007076
Michael W. Hudson54241132001-12-07 15:38:26 +00007077# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007078# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007079{ echo "$as_me:$LINENO: checking for int" >&5
7080echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007081if test "${ac_cv_type_int+set}" = set; then
7082 echo $ECHO_N "(cached) $ECHO_C" >&6
7083else
7084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007085/* confdefs.h. */
7086_ACEOF
7087cat confdefs.h >>conftest.$ac_ext
7088cat >>conftest.$ac_ext <<_ACEOF
7089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007090$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007091typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007092int
7093main ()
7094{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007095if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007096 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 return 0;
7099 ;
7100 return 0;
7101}
7102_ACEOF
7103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007104if { (ac_try="$ac_compile"
7105case "(($ac_try" in
7106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7107 *) ac_try_echo=$ac_try;;
7108esac
7109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007112 grep -v '^ *+' conftest.er1 >conftest.err
7113 rm -f conftest.er1
7114 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007116 (exit $ac_status); } && {
7117 test -z "$ac_c_werror_flag" ||
7118 test ! -s conftest.err
7119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007120 ac_cv_type_int=yes
7121else
7122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007123sed 's/^/| /' conftest.$ac_ext >&5
7124
Martin v. Löwiseba40652007-08-30 20:10:57 +00007125 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007126fi
Brett Cannon19fab762007-06-02 03:02:29 +00007127
Martin v. Löwiseba40652007-08-30 20:10:57 +00007128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129fi
7130{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7131echo "${ECHO_T}$ac_cv_type_int" >&6; }
7132
7133# The cast to long int works around a bug in the HP C Compiler
7134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7136# This bug is HP SR number 8606223364.
7137{ echo "$as_me:$LINENO: checking size of int" >&5
7138echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007139if test "${ac_cv_sizeof_int+set}" = set; then
7140 echo $ECHO_N "(cached) $ECHO_C" >&6
7141else
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 if test "$cross_compiling" = yes; then
7143 # Depending upon the size, compute the lo and hi bounds.
7144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007145/* confdefs.h. */
7146_ACEOF
7147cat confdefs.h >>conftest.$ac_ext
7148cat >>conftest.$ac_ext <<_ACEOF
7149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007150$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007152int
7153main ()
7154{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007156test_array [0] = 0
7157
7158 ;
7159 return 0;
7160}
7161_ACEOF
7162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163if { (ac_try="$ac_compile"
7164case "(($ac_try" in
7165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7166 *) ac_try_echo=$ac_try;;
7167esac
7168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007171 grep -v '^ *+' conftest.er1 >conftest.err
7172 rm -f conftest.er1
7173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175 (exit $ac_status); } && {
7176 test -z "$ac_c_werror_flag" ||
7177 test ! -s conftest.err
7178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007179 ac_lo=0 ac_mid=0
7180 while :; do
7181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007187$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007189int
7190main ()
7191{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007193test_array [0] = 0
7194
7195 ;
7196 return 0;
7197}
7198_ACEOF
7199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007200if { (ac_try="$ac_compile"
7201case "(($ac_try" in
7202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7203 *) ac_try_echo=$ac_try;;
7204esac
7205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007208 grep -v '^ *+' conftest.er1 >conftest.err
7209 rm -f conftest.er1
7210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212 (exit $ac_status); } && {
7213 test -z "$ac_c_werror_flag" ||
7214 test ! -s conftest.err
7215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007216 ac_hi=$ac_mid; break
7217else
7218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007219sed 's/^/| /' conftest.$ac_ext >&5
7220
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221 ac_lo=`expr $ac_mid + 1`
7222 if test $ac_lo -le $ac_mid; then
7223 ac_lo= ac_hi=
7224 break
7225 fi
7226 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007228
7229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007230 done
7231else
7232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007233sed 's/^/| /' conftest.$ac_ext >&5
7234
Martin v. Löwiseba40652007-08-30 20:10:57 +00007235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007236/* confdefs.h. */
7237_ACEOF
7238cat confdefs.h >>conftest.$ac_ext
7239cat >>conftest.$ac_ext <<_ACEOF
7240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007241$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007243int
7244main ()
7245{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007247test_array [0] = 0
7248
7249 ;
7250 return 0;
7251}
7252_ACEOF
7253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007254if { (ac_try="$ac_compile"
7255case "(($ac_try" in
7256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7257 *) ac_try_echo=$ac_try;;
7258esac
7259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007262 grep -v '^ *+' conftest.er1 >conftest.err
7263 rm -f conftest.er1
7264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007266 (exit $ac_status); } && {
7267 test -z "$ac_c_werror_flag" ||
7268 test ! -s conftest.err
7269 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007270 ac_hi=-1 ac_mid=-1
7271 while :; do
7272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007273/* confdefs.h. */
7274_ACEOF
7275cat confdefs.h >>conftest.$ac_ext
7276cat >>conftest.$ac_ext <<_ACEOF
7277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007278$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007280int
7281main ()
7282{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007284test_array [0] = 0
7285
7286 ;
7287 return 0;
7288}
7289_ACEOF
7290rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291if { (ac_try="$ac_compile"
7292case "(($ac_try" in
7293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7294 *) ac_try_echo=$ac_try;;
7295esac
7296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7297 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007299 grep -v '^ *+' conftest.er1 >conftest.err
7300 rm -f conftest.er1
7301 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007303 (exit $ac_status); } && {
7304 test -z "$ac_c_werror_flag" ||
7305 test ! -s conftest.err
7306 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007307 ac_lo=$ac_mid; break
7308else
7309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007310sed 's/^/| /' conftest.$ac_ext >&5
7311
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312 ac_hi=`expr '(' $ac_mid ')' - 1`
7313 if test $ac_mid -le $ac_hi; then
7314 ac_lo= ac_hi=
7315 break
7316 fi
7317 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007321 done
7322else
7323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007324sed 's/^/| /' conftest.$ac_ext >&5
7325
Martin v. Löwiseba40652007-08-30 20:10:57 +00007326 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328
7329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331
7332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007333# Binary search between lo and hi bounds.
7334while test "x$ac_lo" != "x$ac_hi"; do
7335 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007337/* confdefs.h. */
7338_ACEOF
7339cat confdefs.h >>conftest.$ac_ext
7340cat >>conftest.$ac_ext <<_ACEOF
7341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007342$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007344int
7345main ()
7346{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007348test_array [0] = 0
7349
7350 ;
7351 return 0;
7352}
7353_ACEOF
7354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355if { (ac_try="$ac_compile"
7356case "(($ac_try" in
7357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7358 *) ac_try_echo=$ac_try;;
7359esac
7360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007363 grep -v '^ *+' conftest.er1 >conftest.err
7364 rm -f conftest.er1
7365 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367 (exit $ac_status); } && {
7368 test -z "$ac_c_werror_flag" ||
7369 test ! -s conftest.err
7370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007371 ac_hi=$ac_mid
7372else
7373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007374sed 's/^/| /' conftest.$ac_ext >&5
7375
Martin v. Löwiseba40652007-08-30 20:10:57 +00007376 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378
7379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007380done
7381case $ac_lo in
7382?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383'') if test "$ac_cv_type_int" = yes; then
7384 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007385See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007386echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007387See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388 { (exit 77); exit 77; }; }
7389 else
7390 ac_cv_sizeof_int=0
7391 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007392esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007393else
Martin v. Löwis11437992002-04-12 09:54:03 +00007394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007395/* confdefs.h. */
7396_ACEOF
7397cat confdefs.h >>conftest.$ac_ext
7398cat >>conftest.$ac_ext <<_ACEOF
7399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007400$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007401 typedef int ac__type_sizeof_;
7402static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7403static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007404#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007405#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007406int
7407main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007408{
Martin v. Löwis11437992002-04-12 09:54:03 +00007409
7410 FILE *f = fopen ("conftest.val", "w");
7411 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412 return 1;
7413 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007414 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007415 long int i = longval ();
7416 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7417 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007418 fprintf (f, "%ld\n", i);
7419 }
7420 else
7421 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007422 unsigned long int i = ulongval ();
7423 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7424 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 fprintf (f, "%lu\n", i);
7426 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007428
7429 ;
7430 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007431}
Martin v. Löwis11437992002-04-12 09:54:03 +00007432_ACEOF
7433rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007434if { (ac_try="$ac_link"
7435case "(($ac_try" in
7436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7437 *) ac_try_echo=$ac_try;;
7438esac
7439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7440 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 ac_status=$?
7442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007444 { (case "(($ac_try" in
7445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7446 *) ac_try_echo=$ac_try;;
7447esac
7448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7449 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007450 ac_status=$?
7451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7452 (exit $ac_status); }; }; then
7453 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007454else
Martin v. Löwis11437992002-04-12 09:54:03 +00007455 echo "$as_me: program exited with status $ac_status" >&5
7456echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007457sed 's/^/| /' conftest.$ac_ext >&5
7458
Martin v. Löwis11437992002-04-12 09:54:03 +00007459( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007460if test "$ac_cv_type_int" = yes; then
7461 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007462See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007463echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007464See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465 { (exit 77); exit 77; }; }
7466 else
7467 ac_cv_sizeof_int=0
7468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007470rm -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 +00007471fi
7472rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7475echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7476
7477
7478
Martin v. Löwis11437992002-04-12 09:54:03 +00007479cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007480#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007482
7483
Martin v. Löwiseba40652007-08-30 20:10:57 +00007484{ echo "$as_me:$LINENO: checking for long" >&5
7485echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007486if test "${ac_cv_type_long+set}" = set; then
7487 echo $ECHO_N "(cached) $ECHO_C" >&6
7488else
7489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007490/* confdefs.h. */
7491_ACEOF
7492cat confdefs.h >>conftest.$ac_ext
7493cat >>conftest.$ac_ext <<_ACEOF
7494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007495$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007497int
7498main ()
7499{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007500if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007501 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 return 0;
7504 ;
7505 return 0;
7506}
7507_ACEOF
7508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007509if { (ac_try="$ac_compile"
7510case "(($ac_try" in
7511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7512 *) ac_try_echo=$ac_try;;
7513esac
7514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007517 grep -v '^ *+' conftest.er1 >conftest.err
7518 rm -f conftest.er1
7519 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007521 (exit $ac_status); } && {
7522 test -z "$ac_c_werror_flag" ||
7523 test ! -s conftest.err
7524 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007525 ac_cv_type_long=yes
7526else
7527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007528sed 's/^/| /' conftest.$ac_ext >&5
7529
Martin v. Löwiseba40652007-08-30 20:10:57 +00007530 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007531fi
Brett Cannon19fab762007-06-02 03:02:29 +00007532
Martin v. Löwiseba40652007-08-30 20:10:57 +00007533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7534fi
7535{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7536echo "${ECHO_T}$ac_cv_type_long" >&6; }
7537
7538# The cast to long int works around a bug in the HP C Compiler
7539# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7540# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7541# This bug is HP SR number 8606223364.
7542{ echo "$as_me:$LINENO: checking size of long" >&5
7543echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007544if test "${ac_cv_sizeof_long+set}" = set; then
7545 echo $ECHO_N "(cached) $ECHO_C" >&6
7546else
Martin v. Löwis11437992002-04-12 09:54:03 +00007547 if test "$cross_compiling" = yes; then
7548 # Depending upon the size, compute the lo and hi bounds.
7549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007550/* confdefs.h. */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007555$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007556 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007557int
7558main ()
7559{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007560static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007561test_array [0] = 0
7562
7563 ;
7564 return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007568if { (ac_try="$ac_compile"
7569case "(($ac_try" in
7570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7571 *) ac_try_echo=$ac_try;;
7572esac
7573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007576 grep -v '^ *+' conftest.er1 >conftest.err
7577 rm -f conftest.er1
7578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580 (exit $ac_status); } && {
7581 test -z "$ac_c_werror_flag" ||
7582 test ! -s conftest.err
7583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007584 ac_lo=0 ac_mid=0
7585 while :; do
7586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007587/* confdefs.h. */
7588_ACEOF
7589cat confdefs.h >>conftest.$ac_ext
7590cat >>conftest.$ac_ext <<_ACEOF
7591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007592$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007593 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007597static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007598test_array [0] = 0
7599
7600 ;
7601 return 0;
7602}
7603_ACEOF
7604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605if { (ac_try="$ac_compile"
7606case "(($ac_try" in
7607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7608 *) ac_try_echo=$ac_try;;
7609esac
7610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007613 grep -v '^ *+' conftest.er1 >conftest.err
7614 rm -f conftest.er1
7615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617 (exit $ac_status); } && {
7618 test -z "$ac_c_werror_flag" ||
7619 test ! -s conftest.err
7620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 ac_hi=$ac_mid; break
7622else
7623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007624sed 's/^/| /' conftest.$ac_ext >&5
7625
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626 ac_lo=`expr $ac_mid + 1`
7627 if test $ac_lo -le $ac_mid; then
7628 ac_lo= ac_hi=
7629 break
7630 fi
7631 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007633
7634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 done
7636else
7637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007638sed 's/^/| /' conftest.$ac_ext >&5
7639
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007641/* confdefs.h. */
7642_ACEOF
7643cat confdefs.h >>conftest.$ac_ext
7644cat >>conftest.$ac_ext <<_ACEOF
7645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007646$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007648int
7649main ()
7650{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007651static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007652test_array [0] = 0
7653
7654 ;
7655 return 0;
7656}
7657_ACEOF
7658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007659if { (ac_try="$ac_compile"
7660case "(($ac_try" in
7661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7662 *) ac_try_echo=$ac_try;;
7663esac
7664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007667 grep -v '^ *+' conftest.er1 >conftest.err
7668 rm -f conftest.er1
7669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671 (exit $ac_status); } && {
7672 test -z "$ac_c_werror_flag" ||
7673 test ! -s conftest.err
7674 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007675 ac_hi=-1 ac_mid=-1
7676 while :; do
7677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007678/* confdefs.h. */
7679_ACEOF
7680cat confdefs.h >>conftest.$ac_ext
7681cat >>conftest.$ac_ext <<_ACEOF
7682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007683$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007685int
7686main ()
7687{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007688static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007689test_array [0] = 0
7690
7691 ;
7692 return 0;
7693}
7694_ACEOF
7695rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696if { (ac_try="$ac_compile"
7697case "(($ac_try" in
7698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7699 *) ac_try_echo=$ac_try;;
7700esac
7701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7702 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007704 grep -v '^ *+' conftest.er1 >conftest.err
7705 rm -f conftest.er1
7706 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708 (exit $ac_status); } && {
7709 test -z "$ac_c_werror_flag" ||
7710 test ! -s conftest.err
7711 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007712 ac_lo=$ac_mid; break
7713else
7714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007715sed 's/^/| /' conftest.$ac_ext >&5
7716
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 ac_hi=`expr '(' $ac_mid ')' - 1`
7718 if test $ac_mid -le $ac_hi; then
7719 ac_lo= ac_hi=
7720 break
7721 fi
7722 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007724
7725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 done
7727else
7728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007729sed 's/^/| /' conftest.$ac_ext >&5
7730
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733
7734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736
7737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007738# Binary search between lo and hi bounds.
7739while test "x$ac_lo" != "x$ac_hi"; do
7740 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007742/* confdefs.h. */
7743_ACEOF
7744cat confdefs.h >>conftest.$ac_ext
7745cat >>conftest.$ac_ext <<_ACEOF
7746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007747$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
7751{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007753test_array [0] = 0
7754
7755 ;
7756 return 0;
7757}
7758_ACEOF
7759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760if { (ac_try="$ac_compile"
7761case "(($ac_try" in
7762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7763 *) ac_try_echo=$ac_try;;
7764esac
7765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007768 grep -v '^ *+' conftest.er1 >conftest.err
7769 rm -f conftest.er1
7770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007772 (exit $ac_status); } && {
7773 test -z "$ac_c_werror_flag" ||
7774 test ! -s conftest.err
7775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 ac_hi=$ac_mid
7777else
7778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007779sed 's/^/| /' conftest.$ac_ext >&5
7780
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783
7784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007785done
7786case $ac_lo in
7787?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007788'') if test "$ac_cv_type_long" = yes; then
7789 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007790See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007791echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007792See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793 { (exit 77); exit 77; }; }
7794 else
7795 ac_cv_sizeof_long=0
7796 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007797esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007798else
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007800/* confdefs.h. */
7801_ACEOF
7802cat confdefs.h >>conftest.$ac_ext
7803cat >>conftest.$ac_ext <<_ACEOF
7804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806 typedef long ac__type_sizeof_;
7807static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7808static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007809#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007810#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007811int
7812main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007813{
Martin v. Löwis11437992002-04-12 09:54:03 +00007814
7815 FILE *f = fopen ("conftest.val", "w");
7816 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817 return 1;
7818 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007820 long int i = longval ();
7821 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7822 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 fprintf (f, "%ld\n", i);
7824 }
7825 else
7826 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827 unsigned long int i = ulongval ();
7828 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7829 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 fprintf (f, "%lu\n", i);
7831 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007833
7834 ;
7835 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007836}
Martin v. Löwis11437992002-04-12 09:54:03 +00007837_ACEOF
7838rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839if { (ac_try="$ac_link"
7840case "(($ac_try" in
7841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7842 *) ac_try_echo=$ac_try;;
7843esac
7844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7845 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 ac_status=$?
7847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849 { (case "(($ac_try" in
7850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7851 *) ac_try_echo=$ac_try;;
7852esac
7853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7854 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); }; }; then
7858 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 echo "$as_me: program exited with status $ac_status" >&5
7861echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007862sed 's/^/| /' conftest.$ac_ext >&5
7863
Martin v. Löwis11437992002-04-12 09:54:03 +00007864( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865if test "$ac_cv_type_long" = yes; then
7866 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007867See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007869See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 { (exit 77); exit 77; }; }
7871 else
7872 ac_cv_sizeof_long=0
7873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875rm -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 +00007876fi
7877rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7880echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7881
7882
7883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007885#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007886_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007887
7888
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889{ echo "$as_me:$LINENO: checking for void *" >&5
7890echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007891if test "${ac_cv_type_void_p+set}" = set; then
7892 echo $ECHO_N "(cached) $ECHO_C" >&6
7893else
7894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007895/* confdefs.h. */
7896_ACEOF
7897cat confdefs.h >>conftest.$ac_ext
7898cat >>conftest.$ac_ext <<_ACEOF
7899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007900$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007902int
7903main ()
7904{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007906 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 return 0;
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914if { (ac_try="$ac_compile"
7915case "(($ac_try" in
7916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7917 *) ac_try_echo=$ac_try;;
7918esac
7919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007922 grep -v '^ *+' conftest.er1 >conftest.err
7923 rm -f conftest.er1
7924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007926 (exit $ac_status); } && {
7927 test -z "$ac_c_werror_flag" ||
7928 test ! -s conftest.err
7929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 ac_cv_type_void_p=yes
7931else
7932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007933sed 's/^/| /' conftest.$ac_ext >&5
7934
Martin v. Löwiseba40652007-08-30 20:10:57 +00007935 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007936fi
Brett Cannon19fab762007-06-02 03:02:29 +00007937
Martin v. Löwiseba40652007-08-30 20:10:57 +00007938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7939fi
7940{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7941echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7942
7943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
7947{ echo "$as_me:$LINENO: checking size of void *" >&5
7948echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007949if test "${ac_cv_sizeof_void_p+set}" = set; then
7950 echo $ECHO_N "(cached) $ECHO_C" >&6
7951else
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 if test "$cross_compiling" = yes; then
7953 # Depending upon the size, compute the lo and hi bounds.
7954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007955/* confdefs.h. */
7956_ACEOF
7957cat confdefs.h >>conftest.$ac_ext
7958cat >>conftest.$ac_ext <<_ACEOF
7959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007960$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007962int
7963main ()
7964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007966test_array [0] = 0
7967
7968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973if { (ac_try="$ac_compile"
7974case "(($ac_try" in
7975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7976 *) ac_try_echo=$ac_try;;
7977esac
7978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007981 grep -v '^ *+' conftest.er1 >conftest.err
7982 rm -f conftest.er1
7983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985 (exit $ac_status); } && {
7986 test -z "$ac_c_werror_flag" ||
7987 test ! -s conftest.err
7988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_lo=0 ac_mid=0
7990 while :; do
7991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007992/* confdefs.h. */
7993_ACEOF
7994cat confdefs.h >>conftest.$ac_ext
7995cat >>conftest.$ac_ext <<_ACEOF
7996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007999int
8000main ()
8001{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008003test_array [0] = 0
8004
8005 ;
8006 return 0;
8007}
8008_ACEOF
8009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010if { (ac_try="$ac_compile"
8011case "(($ac_try" in
8012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8013 *) ac_try_echo=$ac_try;;
8014esac
8015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008018 grep -v '^ *+' conftest.er1 >conftest.err
8019 rm -f conftest.er1
8020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 (exit $ac_status); } && {
8023 test -z "$ac_c_werror_flag" ||
8024 test ! -s conftest.err
8025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 ac_hi=$ac_mid; break
8027else
8028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008029sed 's/^/| /' conftest.$ac_ext >&5
8030
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031 ac_lo=`expr $ac_mid + 1`
8032 if test $ac_lo -le $ac_mid; then
8033 ac_lo= ac_hi=
8034 break
8035 fi
8036 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008038
8039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 done
8041else
8042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008043sed 's/^/| /' conftest.$ac_ext >&5
8044
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008046/* confdefs.h. */
8047_ACEOF
8048cat confdefs.h >>conftest.$ac_ext
8049cat >>conftest.$ac_ext <<_ACEOF
8050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008051$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008053int
8054main ()
8055{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008057test_array [0] = 0
8058
8059 ;
8060 return 0;
8061}
8062_ACEOF
8063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064if { (ac_try="$ac_compile"
8065case "(($ac_try" in
8066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8067 *) ac_try_echo=$ac_try;;
8068esac
8069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008072 grep -v '^ *+' conftest.er1 >conftest.err
8073 rm -f conftest.er1
8074 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076 (exit $ac_status); } && {
8077 test -z "$ac_c_werror_flag" ||
8078 test ! -s conftest.err
8079 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_hi=-1 ac_mid=-1
8081 while :; do
8082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008083/* confdefs.h. */
8084_ACEOF
8085cat confdefs.h >>conftest.$ac_ext
8086cat >>conftest.$ac_ext <<_ACEOF
8087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008088$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008090int
8091main ()
8092{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008093static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008094test_array [0] = 0
8095
8096 ;
8097 return 0;
8098}
8099_ACEOF
8100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101if { (ac_try="$ac_compile"
8102case "(($ac_try" in
8103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8104 *) ac_try_echo=$ac_try;;
8105esac
8106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008109 grep -v '^ *+' conftest.er1 >conftest.err
8110 rm -f conftest.er1
8111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 (exit $ac_status); } && {
8114 test -z "$ac_c_werror_flag" ||
8115 test ! -s conftest.err
8116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_lo=$ac_mid; break
8118else
8119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008120sed 's/^/| /' conftest.$ac_ext >&5
8121
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122 ac_hi=`expr '(' $ac_mid ')' - 1`
8123 if test $ac_mid -le $ac_hi; then
8124 ac_lo= ac_hi=
8125 break
8126 fi
8127 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008129
8130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008131 done
8132else
8133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008134sed 's/^/| /' conftest.$ac_ext >&5
8135
Martin v. Löwiseba40652007-08-30 20:10:57 +00008136 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138
8139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141
8142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008143# Binary search between lo and hi bounds.
8144while test "x$ac_lo" != "x$ac_hi"; do
8145 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008147/* confdefs.h. */
8148_ACEOF
8149cat confdefs.h >>conftest.$ac_ext
8150cat >>conftest.$ac_ext <<_ACEOF
8151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008152$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008154int
8155main ()
8156{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008158test_array [0] = 0
8159
8160 ;
8161 return 0;
8162}
8163_ACEOF
8164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165if { (ac_try="$ac_compile"
8166case "(($ac_try" in
8167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8168 *) ac_try_echo=$ac_try;;
8169esac
8170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008173 grep -v '^ *+' conftest.er1 >conftest.err
8174 rm -f conftest.er1
8175 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008177 (exit $ac_status); } && {
8178 test -z "$ac_c_werror_flag" ||
8179 test ! -s conftest.err
8180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008181 ac_hi=$ac_mid
8182else
8183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008184sed 's/^/| /' conftest.$ac_ext >&5
8185
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188
8189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008190done
8191case $ac_lo in
8192?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008193'') if test "$ac_cv_type_void_p" = yes; then
8194 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008195See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008196echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008197See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198 { (exit 77); exit 77; }; }
8199 else
8200 ac_cv_sizeof_void_p=0
8201 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008203else
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008205/* confdefs.h. */
8206_ACEOF
8207cat confdefs.h >>conftest.$ac_ext
8208cat >>conftest.$ac_ext <<_ACEOF
8209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008210$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008211 typedef void * ac__type_sizeof_;
8212static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8213static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008214#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008215#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008216int
8217main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008218{
Martin v. Löwis11437992002-04-12 09:54:03 +00008219
8220 FILE *f = fopen ("conftest.val", "w");
8221 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222 return 1;
8223 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008225 long int i = longval ();
8226 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8227 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008228 fprintf (f, "%ld\n", i);
8229 }
8230 else
8231 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232 unsigned long int i = ulongval ();
8233 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8234 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 fprintf (f, "%lu\n", i);
8236 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
8239 ;
8240 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008241}
Martin v. Löwis11437992002-04-12 09:54:03 +00008242_ACEOF
8243rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244if { (ac_try="$ac_link"
8245case "(($ac_try" in
8246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8247 *) ac_try_echo=$ac_try;;
8248esac
8249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8250 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 ac_status=$?
8252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008254 { (case "(($ac_try" in
8255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8256 *) ac_try_echo=$ac_try;;
8257esac
8258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8259 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008264else
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 echo "$as_me: program exited with status $ac_status" >&5
8266echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008267sed 's/^/| /' conftest.$ac_ext >&5
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270if test "$ac_cv_type_void_p" = yes; then
8271 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008272See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008273echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008274See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 { (exit 77); exit 77; }; }
8276 else
8277 ac_cv_sizeof_void_p=0
8278 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280rm -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 +00008281fi
8282rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008284{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8285echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8286
8287
8288
Martin v. Löwis11437992002-04-12 09:54:03 +00008289cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008290#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008291_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008292
8293
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294{ echo "$as_me:$LINENO: checking for short" >&5
8295echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008296if test "${ac_cv_type_short+set}" = set; then
8297 echo $ECHO_N "(cached) $ECHO_C" >&6
8298else
8299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008300/* confdefs.h. */
8301_ACEOF
8302cat confdefs.h >>conftest.$ac_ext
8303cat >>conftest.$ac_ext <<_ACEOF
8304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008305$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008306typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008307int
8308main ()
8309{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008310if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 return 0;
8314 ;
8315 return 0;
8316}
8317_ACEOF
8318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319if { (ac_try="$ac_compile"
8320case "(($ac_try" in
8321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8322 *) ac_try_echo=$ac_try;;
8323esac
8324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008327 grep -v '^ *+' conftest.er1 >conftest.err
8328 rm -f conftest.er1
8329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008331 (exit $ac_status); } && {
8332 test -z "$ac_c_werror_flag" ||
8333 test ! -s conftest.err
8334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 ac_cv_type_short=yes
8336else
8337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008338sed 's/^/| /' conftest.$ac_ext >&5
8339
Martin v. Löwiseba40652007-08-30 20:10:57 +00008340 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008341fi
Brett Cannon19fab762007-06-02 03:02:29 +00008342
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8344fi
8345{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8346echo "${ECHO_T}$ac_cv_type_short" >&6; }
8347
8348# The cast to long int works around a bug in the HP C Compiler
8349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8351# This bug is HP SR number 8606223364.
8352{ echo "$as_me:$LINENO: checking size of short" >&5
8353echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008354if test "${ac_cv_sizeof_short+set}" = set; then
8355 echo $ECHO_N "(cached) $ECHO_C" >&6
8356else
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 if test "$cross_compiling" = yes; then
8358 # Depending upon the size, compute the lo and hi bounds.
8359cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008360/* confdefs.h. */
8361_ACEOF
8362cat confdefs.h >>conftest.$ac_ext
8363cat >>conftest.$ac_ext <<_ACEOF
8364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008365$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008367int
8368main ()
8369{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008371test_array [0] = 0
8372
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378if { (ac_try="$ac_compile"
8379case "(($ac_try" in
8380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8381 *) ac_try_echo=$ac_try;;
8382esac
8383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008386 grep -v '^ *+' conftest.er1 >conftest.err
8387 rm -f conftest.er1
8388 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390 (exit $ac_status); } && {
8391 test -z "$ac_c_werror_flag" ||
8392 test ! -s conftest.err
8393 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008394 ac_lo=0 ac_mid=0
8395 while :; do
8396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008397/* confdefs.h. */
8398_ACEOF
8399cat confdefs.h >>conftest.$ac_ext
8400cat >>conftest.$ac_ext <<_ACEOF
8401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008402$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008403 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008404int
8405main ()
8406{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008408test_array [0] = 0
8409
8410 ;
8411 return 0;
8412}
8413_ACEOF
8414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008415if { (ac_try="$ac_compile"
8416case "(($ac_try" in
8417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8418 *) ac_try_echo=$ac_try;;
8419esac
8420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008423 grep -v '^ *+' conftest.er1 >conftest.err
8424 rm -f conftest.er1
8425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427 (exit $ac_status); } && {
8428 test -z "$ac_c_werror_flag" ||
8429 test ! -s conftest.err
8430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ac_hi=$ac_mid; break
8432else
8433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008434sed 's/^/| /' conftest.$ac_ext >&5
8435
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436 ac_lo=`expr $ac_mid + 1`
8437 if test $ac_lo -le $ac_mid; then
8438 ac_lo= ac_hi=
8439 break
8440 fi
8441 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008443
8444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 done
8446else
8447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008448sed 's/^/| /' conftest.$ac_ext >&5
8449
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008451/* confdefs.h. */
8452_ACEOF
8453cat confdefs.h >>conftest.$ac_ext
8454cat >>conftest.$ac_ext <<_ACEOF
8455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008456$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008457 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008458int
8459main ()
8460{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008461static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008462test_array [0] = 0
8463
8464 ;
8465 return 0;
8466}
8467_ACEOF
8468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008469if { (ac_try="$ac_compile"
8470case "(($ac_try" in
8471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8472 *) ac_try_echo=$ac_try;;
8473esac
8474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008477 grep -v '^ *+' conftest.er1 >conftest.err
8478 rm -f conftest.er1
8479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481 (exit $ac_status); } && {
8482 test -z "$ac_c_werror_flag" ||
8483 test ! -s conftest.err
8484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ac_hi=-1 ac_mid=-1
8486 while :; do
8487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008488/* confdefs.h. */
8489_ACEOF
8490cat confdefs.h >>conftest.$ac_ext
8491cat >>conftest.$ac_ext <<_ACEOF
8492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008493$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008495int
8496main ()
8497{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008498static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008499test_array [0] = 0
8500
8501 ;
8502 return 0;
8503}
8504_ACEOF
8505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506if { (ac_try="$ac_compile"
8507case "(($ac_try" in
8508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8509 *) ac_try_echo=$ac_try;;
8510esac
8511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008514 grep -v '^ *+' conftest.er1 >conftest.err
8515 rm -f conftest.er1
8516 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518 (exit $ac_status); } && {
8519 test -z "$ac_c_werror_flag" ||
8520 test ! -s conftest.err
8521 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 ac_lo=$ac_mid; break
8523else
8524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008525sed 's/^/| /' conftest.$ac_ext >&5
8526
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527 ac_hi=`expr '(' $ac_mid ')' - 1`
8528 if test $ac_mid -le $ac_hi; then
8529 ac_lo= ac_hi=
8530 break
8531 fi
8532 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008534
8535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 done
8537else
8538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008539sed 's/^/| /' conftest.$ac_ext >&5
8540
Martin v. Löwiseba40652007-08-30 20:10:57 +00008541 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543
8544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546
8547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008548# Binary search between lo and hi bounds.
8549while test "x$ac_lo" != "x$ac_hi"; do
8550 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008559int
8560main ()
8561{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008563test_array [0] = 0
8564
8565 ;
8566 return 0;
8567}
8568_ACEOF
8569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570if { (ac_try="$ac_compile"
8571case "(($ac_try" in
8572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8573 *) ac_try_echo=$ac_try;;
8574esac
8575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008578 grep -v '^ *+' conftest.er1 >conftest.err
8579 rm -f conftest.er1
8580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008582 (exit $ac_status); } && {
8583 test -z "$ac_c_werror_flag" ||
8584 test ! -s conftest.err
8585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 ac_hi=$ac_mid
8587else
8588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008589sed 's/^/| /' conftest.$ac_ext >&5
8590
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593
8594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008595done
8596case $ac_lo in
8597?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008598'') if test "$ac_cv_type_short" = yes; then
8599 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008600See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008601echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008602See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603 { (exit 77); exit 77; }; }
8604 else
8605 ac_cv_sizeof_short=0
8606 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008607esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608else
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008610/* confdefs.h. */
8611_ACEOF
8612cat confdefs.h >>conftest.$ac_ext
8613cat >>conftest.$ac_ext <<_ACEOF
8614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616 typedef short ac__type_sizeof_;
8617static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8618static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008619#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008620#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008621int
8622main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008623{
Martin v. Löwis11437992002-04-12 09:54:03 +00008624
8625 FILE *f = fopen ("conftest.val", "w");
8626 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627 return 1;
8628 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630 long int i = longval ();
8631 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8632 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 fprintf (f, "%ld\n", i);
8634 }
8635 else
8636 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637 unsigned long int i = ulongval ();
8638 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8639 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 fprintf (f, "%lu\n", i);
8641 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
8644 ;
8645 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008646}
Martin v. Löwis11437992002-04-12 09:54:03 +00008647_ACEOF
8648rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649if { (ac_try="$ac_link"
8650case "(($ac_try" in
8651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8652 *) ac_try_echo=$ac_try;;
8653esac
8654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8655 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008656 ac_status=$?
8657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8658 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659 { (case "(($ac_try" in
8660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8661 *) ac_try_echo=$ac_try;;
8662esac
8663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8664 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); }; }; then
8668 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008669else
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 echo "$as_me: program exited with status $ac_status" >&5
8671echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008672sed 's/^/| /' conftest.$ac_ext >&5
8673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675if test "$ac_cv_type_short" = yes; then
8676 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008677See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008679See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 { (exit 77); exit 77; }; }
8681 else
8682 ac_cv_sizeof_short=0
8683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685rm -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 +00008686fi
8687rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8690echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8691
8692
8693
Martin v. Löwis11437992002-04-12 09:54:03 +00008694cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008695#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008697
8698
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699{ echo "$as_me:$LINENO: checking for float" >&5
8700echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008701if test "${ac_cv_type_float+set}" = set; then
8702 echo $ECHO_N "(cached) $ECHO_C" >&6
8703else
8704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008705/* confdefs.h. */
8706_ACEOF
8707cat confdefs.h >>conftest.$ac_ext
8708cat >>conftest.$ac_ext <<_ACEOF
8709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008710$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008712int
8713main ()
8714{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008715if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 return 0;
8719 ;
8720 return 0;
8721}
8722_ACEOF
8723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724if { (ac_try="$ac_compile"
8725case "(($ac_try" in
8726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8727 *) ac_try_echo=$ac_try;;
8728esac
8729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008732 grep -v '^ *+' conftest.er1 >conftest.err
8733 rm -f conftest.er1
8734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008736 (exit $ac_status); } && {
8737 test -z "$ac_c_werror_flag" ||
8738 test ! -s conftest.err
8739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ac_cv_type_float=yes
8741else
8742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008743sed 's/^/| /' conftest.$ac_ext >&5
8744
Martin v. Löwiseba40652007-08-30 20:10:57 +00008745 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008746fi
Brett Cannon19fab762007-06-02 03:02:29 +00008747
Martin v. Löwiseba40652007-08-30 20:10:57 +00008748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8749fi
8750{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8751echo "${ECHO_T}$ac_cv_type_float" >&6; }
8752
8753# The cast to long int works around a bug in the HP C Compiler
8754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8756# This bug is HP SR number 8606223364.
8757{ echo "$as_me:$LINENO: checking size of float" >&5
8758echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008759if test "${ac_cv_sizeof_float+set}" = set; then
8760 echo $ECHO_N "(cached) $ECHO_C" >&6
8761else
Martin v. Löwis11437992002-04-12 09:54:03 +00008762 if test "$cross_compiling" = yes; then
8763 # Depending upon the size, compute the lo and hi bounds.
8764cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008765/* confdefs.h. */
8766_ACEOF
8767cat confdefs.h >>conftest.$ac_ext
8768cat >>conftest.$ac_ext <<_ACEOF
8769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008770$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008772int
8773main ()
8774{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008776test_array [0] = 0
8777
8778 ;
8779 return 0;
8780}
8781_ACEOF
8782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783if { (ac_try="$ac_compile"
8784case "(($ac_try" in
8785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8786 *) ac_try_echo=$ac_try;;
8787esac
8788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008791 grep -v '^ *+' conftest.er1 >conftest.err
8792 rm -f conftest.er1
8793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795 (exit $ac_status); } && {
8796 test -z "$ac_c_werror_flag" ||
8797 test ! -s conftest.err
8798 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 ac_lo=0 ac_mid=0
8800 while :; do
8801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008802/* confdefs.h. */
8803_ACEOF
8804cat confdefs.h >>conftest.$ac_ext
8805cat >>conftest.$ac_ext <<_ACEOF
8806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008809int
8810main ()
8811{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008813test_array [0] = 0
8814
8815 ;
8816 return 0;
8817}
8818_ACEOF
8819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820if { (ac_try="$ac_compile"
8821case "(($ac_try" in
8822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8823 *) ac_try_echo=$ac_try;;
8824esac
8825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008828 grep -v '^ *+' conftest.er1 >conftest.err
8829 rm -f conftest.er1
8830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832 (exit $ac_status); } && {
8833 test -z "$ac_c_werror_flag" ||
8834 test ! -s conftest.err
8835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 ac_hi=$ac_mid; break
8837else
8838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008839sed 's/^/| /' conftest.$ac_ext >&5
8840
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841 ac_lo=`expr $ac_mid + 1`
8842 if test $ac_lo -le $ac_mid; then
8843 ac_lo= ac_hi=
8844 break
8845 fi
8846 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008848
8849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 done
8851else
8852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008853sed 's/^/| /' conftest.$ac_ext >&5
8854
Martin v. Löwiseba40652007-08-30 20:10:57 +00008855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008856/* confdefs.h. */
8857_ACEOF
8858cat confdefs.h >>conftest.$ac_ext
8859cat >>conftest.$ac_ext <<_ACEOF
8860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008861$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008863int
8864main ()
8865{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008867test_array [0] = 0
8868
8869 ;
8870 return 0;
8871}
8872_ACEOF
8873rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874if { (ac_try="$ac_compile"
8875case "(($ac_try" in
8876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8877 *) ac_try_echo=$ac_try;;
8878esac
8879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008882 grep -v '^ *+' conftest.er1 >conftest.err
8883 rm -f conftest.er1
8884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886 (exit $ac_status); } && {
8887 test -z "$ac_c_werror_flag" ||
8888 test ! -s conftest.err
8889 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ac_hi=-1 ac_mid=-1
8891 while :; do
8892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008893/* confdefs.h. */
8894_ACEOF
8895cat confdefs.h >>conftest.$ac_ext
8896cat >>conftest.$ac_ext <<_ACEOF
8897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008900int
8901main ()
8902{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008904test_array [0] = 0
8905
8906 ;
8907 return 0;
8908}
8909_ACEOF
8910rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911if { (ac_try="$ac_compile"
8912case "(($ac_try" in
8913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8914 *) ac_try_echo=$ac_try;;
8915esac
8916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008919 grep -v '^ *+' conftest.er1 >conftest.err
8920 rm -f conftest.er1
8921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923 (exit $ac_status); } && {
8924 test -z "$ac_c_werror_flag" ||
8925 test ! -s conftest.err
8926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 ac_lo=$ac_mid; break
8928else
8929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008930sed 's/^/| /' conftest.$ac_ext >&5
8931
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932 ac_hi=`expr '(' $ac_mid ')' - 1`
8933 if test $ac_mid -le $ac_hi; then
8934 ac_lo= ac_hi=
8935 break
8936 fi
8937 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008939
8940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 done
8942else
8943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008944sed 's/^/| /' conftest.$ac_ext >&5
8945
Martin v. Löwiseba40652007-08-30 20:10:57 +00008946 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948
8949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951
8952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008953# Binary search between lo and hi bounds.
8954while test "x$ac_lo" != "x$ac_hi"; do
8955 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008957/* confdefs.h. */
8958_ACEOF
8959cat confdefs.h >>conftest.$ac_ext
8960cat >>conftest.$ac_ext <<_ACEOF
8961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008962$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
8966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008968test_array [0] = 0
8969
8970 ;
8971 return 0;
8972}
8973_ACEOF
8974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975if { (ac_try="$ac_compile"
8976case "(($ac_try" in
8977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8978 *) ac_try_echo=$ac_try;;
8979esac
8980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008983 grep -v '^ *+' conftest.er1 >conftest.err
8984 rm -f conftest.er1
8985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987 (exit $ac_status); } && {
8988 test -z "$ac_c_werror_flag" ||
8989 test ! -s conftest.err
8990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 ac_hi=$ac_mid
8992else
8993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008994sed 's/^/| /' conftest.$ac_ext >&5
8995
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998
8999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009000done
9001case $ac_lo in
9002?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009003'') if test "$ac_cv_type_float" = yes; then
9004 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009005See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009006echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009007See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008 { (exit 77); exit 77; }; }
9009 else
9010 ac_cv_sizeof_float=0
9011 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009012esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009013else
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* confdefs.h. */
9016_ACEOF
9017cat confdefs.h >>conftest.$ac_ext
9018cat >>conftest.$ac_ext <<_ACEOF
9019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009020$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009021 typedef float ac__type_sizeof_;
9022static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9023static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009024#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009025#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009026int
9027main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009028{
Martin v. Löwis11437992002-04-12 09:54:03 +00009029
9030 FILE *f = fopen ("conftest.val", "w");
9031 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032 return 1;
9033 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035 long int i = longval ();
9036 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9037 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 fprintf (f, "%ld\n", i);
9039 }
9040 else
9041 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009042 unsigned long int i = ulongval ();
9043 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9044 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 fprintf (f, "%lu\n", i);
9046 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009048
9049 ;
9050 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009051}
Martin v. Löwis11437992002-04-12 09:54:03 +00009052_ACEOF
9053rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009054if { (ac_try="$ac_link"
9055case "(($ac_try" in
9056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9057 *) ac_try_echo=$ac_try;;
9058esac
9059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9060 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 ac_status=$?
9062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064 { (case "(($ac_try" in
9065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9066 *) ac_try_echo=$ac_try;;
9067esac
9068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9069 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 ac_status=$?
9071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072 (exit $ac_status); }; }; then
9073 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009074else
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 echo "$as_me: program exited with status $ac_status" >&5
9076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009077sed 's/^/| /' conftest.$ac_ext >&5
9078
Martin v. Löwis11437992002-04-12 09:54:03 +00009079( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080if test "$ac_cv_type_float" = yes; then
9081 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009082See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009084See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 { (exit 77); exit 77; }; }
9086 else
9087 ac_cv_sizeof_float=0
9088 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090rm -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 +00009091fi
9092rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9095echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9096
9097
9098
Martin v. Löwis11437992002-04-12 09:54:03 +00009099cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009100#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009102
9103
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104{ echo "$as_me:$LINENO: checking for double" >&5
9105echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009106if test "${ac_cv_type_double+set}" = set; then
9107 echo $ECHO_N "(cached) $ECHO_C" >&6
9108else
9109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009110/* confdefs.h. */
9111_ACEOF
9112cat confdefs.h >>conftest.$ac_ext
9113cat >>conftest.$ac_ext <<_ACEOF
9114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009115$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009117int
9118main ()
9119{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 return 0;
9124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129if { (ac_try="$ac_compile"
9130case "(($ac_try" in
9131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9132 *) ac_try_echo=$ac_try;;
9133esac
9134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009137 grep -v '^ *+' conftest.er1 >conftest.err
9138 rm -f conftest.er1
9139 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009141 (exit $ac_status); } && {
9142 test -z "$ac_c_werror_flag" ||
9143 test ! -s conftest.err
9144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 ac_cv_type_double=yes
9146else
9147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009148sed 's/^/| /' conftest.$ac_ext >&5
9149
Martin v. Löwiseba40652007-08-30 20:10:57 +00009150 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009151fi
Brett Cannon19fab762007-06-02 03:02:29 +00009152
Martin v. Löwiseba40652007-08-30 20:10:57 +00009153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9154fi
9155{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9156echo "${ECHO_T}$ac_cv_type_double" >&6; }
9157
9158# The cast to long int works around a bug in the HP C Compiler
9159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9161# This bug is HP SR number 8606223364.
9162{ echo "$as_me:$LINENO: checking size of double" >&5
9163echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009164if test "${ac_cv_sizeof_double+set}" = set; then
9165 echo $ECHO_N "(cached) $ECHO_C" >&6
9166else
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 if test "$cross_compiling" = yes; then
9168 # Depending upon the size, compute the lo and hi bounds.
9169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009170/* confdefs.h. */
9171_ACEOF
9172cat confdefs.h >>conftest.$ac_ext
9173cat >>conftest.$ac_ext <<_ACEOF
9174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009175$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009177int
9178main ()
9179{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009181test_array [0] = 0
9182
9183 ;
9184 return 0;
9185}
9186_ACEOF
9187rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188if { (ac_try="$ac_compile"
9189case "(($ac_try" in
9190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9191 *) ac_try_echo=$ac_try;;
9192esac
9193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009196 grep -v '^ *+' conftest.er1 >conftest.err
9197 rm -f conftest.er1
9198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200 (exit $ac_status); } && {
9201 test -z "$ac_c_werror_flag" ||
9202 test ! -s conftest.err
9203 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 ac_lo=0 ac_mid=0
9205 while :; do
9206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009207/* confdefs.h. */
9208_ACEOF
9209cat confdefs.h >>conftest.$ac_ext
9210cat >>conftest.$ac_ext <<_ACEOF
9211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009213 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009214int
9215main ()
9216{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009218test_array [0] = 0
9219
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009225if { (ac_try="$ac_compile"
9226case "(($ac_try" in
9227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9228 *) ac_try_echo=$ac_try;;
9229esac
9230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009233 grep -v '^ *+' conftest.er1 >conftest.err
9234 rm -f conftest.er1
9235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237 (exit $ac_status); } && {
9238 test -z "$ac_c_werror_flag" ||
9239 test ! -s conftest.err
9240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 ac_hi=$ac_mid; break
9242else
9243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009244sed 's/^/| /' conftest.$ac_ext >&5
9245
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246 ac_lo=`expr $ac_mid + 1`
9247 if test $ac_lo -le $ac_mid; then
9248 ac_lo= ac_hi=
9249 break
9250 fi
9251 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009253
9254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 done
9256else
9257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009258sed 's/^/| /' conftest.$ac_ext >&5
9259
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009261/* confdefs.h. */
9262_ACEOF
9263cat confdefs.h >>conftest.$ac_ext
9264cat >>conftest.$ac_ext <<_ACEOF
9265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009266$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009268int
9269main ()
9270{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009272test_array [0] = 0
9273
9274 ;
9275 return 0;
9276}
9277_ACEOF
9278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009279if { (ac_try="$ac_compile"
9280case "(($ac_try" in
9281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9282 *) ac_try_echo=$ac_try;;
9283esac
9284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009287 grep -v '^ *+' conftest.er1 >conftest.err
9288 rm -f conftest.er1
9289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291 (exit $ac_status); } && {
9292 test -z "$ac_c_werror_flag" ||
9293 test ! -s conftest.err
9294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 ac_hi=-1 ac_mid=-1
9296 while :; do
9297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009298/* confdefs.h. */
9299_ACEOF
9300cat confdefs.h >>conftest.$ac_ext
9301cat >>conftest.$ac_ext <<_ACEOF
9302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009303$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009305int
9306main ()
9307{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009309test_array [0] = 0
9310
9311 ;
9312 return 0;
9313}
9314_ACEOF
9315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316if { (ac_try="$ac_compile"
9317case "(($ac_try" in
9318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9319 *) ac_try_echo=$ac_try;;
9320esac
9321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009324 grep -v '^ *+' conftest.er1 >conftest.err
9325 rm -f conftest.er1
9326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 (exit $ac_status); } && {
9329 test -z "$ac_c_werror_flag" ||
9330 test ! -s conftest.err
9331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 ac_lo=$ac_mid; break
9333else
9334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009335sed 's/^/| /' conftest.$ac_ext >&5
9336
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337 ac_hi=`expr '(' $ac_mid ')' - 1`
9338 if test $ac_mid -le $ac_hi; then
9339 ac_lo= ac_hi=
9340 break
9341 fi
9342 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009344
9345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 done
9347else
9348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009349sed 's/^/| /' conftest.$ac_ext >&5
9350
Martin v. Löwiseba40652007-08-30 20:10:57 +00009351 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353
9354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356
9357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009358# Binary search between lo and hi bounds.
9359while test "x$ac_lo" != "x$ac_hi"; do
9360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* confdefs.h. */
9363_ACEOF
9364cat confdefs.h >>conftest.$ac_ext
9365cat >>conftest.$ac_ext <<_ACEOF
9366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009369int
9370main ()
9371{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009373test_array [0] = 0
9374
9375 ;
9376 return 0;
9377}
9378_ACEOF
9379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380if { (ac_try="$ac_compile"
9381case "(($ac_try" in
9382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9383 *) ac_try_echo=$ac_try;;
9384esac
9385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009388 grep -v '^ *+' conftest.er1 >conftest.err
9389 rm -f conftest.er1
9390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009392 (exit $ac_status); } && {
9393 test -z "$ac_c_werror_flag" ||
9394 test ! -s conftest.err
9395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 ac_hi=$ac_mid
9397else
9398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009399sed 's/^/| /' conftest.$ac_ext >&5
9400
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403
9404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009405done
9406case $ac_lo in
9407?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009408'') if test "$ac_cv_type_double" = yes; then
9409 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009410See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009411echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009412See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413 { (exit 77); exit 77; }; }
9414 else
9415 ac_cv_sizeof_double=0
9416 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009417esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009418else
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009420/* confdefs.h. */
9421_ACEOF
9422cat confdefs.h >>conftest.$ac_ext
9423cat >>conftest.$ac_ext <<_ACEOF
9424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426 typedef double ac__type_sizeof_;
9427static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9428static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009429#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009430#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009431int
9432main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009433{
Martin v. Löwis11437992002-04-12 09:54:03 +00009434
9435 FILE *f = fopen ("conftest.val", "w");
9436 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437 return 1;
9438 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440 long int i = longval ();
9441 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9442 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 fprintf (f, "%ld\n", i);
9444 }
9445 else
9446 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447 unsigned long int i = ulongval ();
9448 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9449 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 fprintf (f, "%lu\n", i);
9451 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
9454 ;
9455 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009456}
Martin v. Löwis11437992002-04-12 09:54:03 +00009457_ACEOF
9458rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009459if { (ac_try="$ac_link"
9460case "(($ac_try" in
9461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9462 *) ac_try_echo=$ac_try;;
9463esac
9464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9465 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469 { (case "(($ac_try" in
9470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9471 *) ac_try_echo=$ac_try;;
9472esac
9473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9474 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); }; }; then
9478 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009479else
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 echo "$as_me: program exited with status $ac_status" >&5
9481echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009482sed 's/^/| /' conftest.$ac_ext >&5
9483
Martin v. Löwis11437992002-04-12 09:54:03 +00009484( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485if test "$ac_cv_type_double" = yes; then
9486 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009487See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009489See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 { (exit 77); exit 77; }; }
9491 else
9492 ac_cv_sizeof_double=0
9493 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495rm -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 +00009496fi
9497rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9500echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9501
9502
9503
Martin v. Löwis11437992002-04-12 09:54:03 +00009504cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009505#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009506_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009507
9508
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9510echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009511if test "${ac_cv_type_fpos_t+set}" = set; then
9512 echo $ECHO_N "(cached) $ECHO_C" >&6
9513else
9514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009515/* confdefs.h. */
9516_ACEOF
9517cat confdefs.h >>conftest.$ac_ext
9518cat >>conftest.$ac_ext <<_ACEOF
9519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009520$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009522int
9523main ()
9524{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 return 0;
9529 ;
9530 return 0;
9531}
9532_ACEOF
9533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534if { (ac_try="$ac_compile"
9535case "(($ac_try" in
9536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9537 *) ac_try_echo=$ac_try;;
9538esac
9539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009542 grep -v '^ *+' conftest.er1 >conftest.err
9543 rm -f conftest.er1
9544 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009546 (exit $ac_status); } && {
9547 test -z "$ac_c_werror_flag" ||
9548 test ! -s conftest.err
9549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ac_cv_type_fpos_t=yes
9551else
9552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009553sed 's/^/| /' conftest.$ac_ext >&5
9554
Martin v. Löwiseba40652007-08-30 20:10:57 +00009555 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009556fi
Brett Cannon19fab762007-06-02 03:02:29 +00009557
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9559fi
9560{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9561echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9562
9563# The cast to long int works around a bug in the HP C Compiler
9564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9566# This bug is HP SR number 8606223364.
9567{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9568echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009569if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9570 echo $ECHO_N "(cached) $ECHO_C" >&6
9571else
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 if test "$cross_compiling" = yes; then
9573 # Depending upon the size, compute the lo and hi bounds.
9574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009575/* confdefs.h. */
9576_ACEOF
9577cat confdefs.h >>conftest.$ac_ext
9578cat >>conftest.$ac_ext <<_ACEOF
9579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009580$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009582int
9583main ()
9584{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009586test_array [0] = 0
9587
9588 ;
9589 return 0;
9590}
9591_ACEOF
9592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593if { (ac_try="$ac_compile"
9594case "(($ac_try" in
9595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9596 *) ac_try_echo=$ac_try;;
9597esac
9598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009601 grep -v '^ *+' conftest.er1 >conftest.err
9602 rm -f conftest.er1
9603 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605 (exit $ac_status); } && {
9606 test -z "$ac_c_werror_flag" ||
9607 test ! -s conftest.err
9608 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 ac_lo=0 ac_mid=0
9610 while :; do
9611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009612/* confdefs.h. */
9613_ACEOF
9614cat confdefs.h >>conftest.$ac_ext
9615cat >>conftest.$ac_ext <<_ACEOF
9616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009619int
9620main ()
9621{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009623test_array [0] = 0
9624
9625 ;
9626 return 0;
9627}
9628_ACEOF
9629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630if { (ac_try="$ac_compile"
9631case "(($ac_try" in
9632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9633 *) ac_try_echo=$ac_try;;
9634esac
9635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009638 grep -v '^ *+' conftest.er1 >conftest.err
9639 rm -f conftest.er1
9640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642 (exit $ac_status); } && {
9643 test -z "$ac_c_werror_flag" ||
9644 test ! -s conftest.err
9645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ac_hi=$ac_mid; break
9647else
9648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009649sed 's/^/| /' conftest.$ac_ext >&5
9650
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651 ac_lo=`expr $ac_mid + 1`
9652 if test $ac_lo -le $ac_mid; then
9653 ac_lo= ac_hi=
9654 break
9655 fi
9656 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009658
9659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 done
9661else
9662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009663sed 's/^/| /' conftest.$ac_ext >&5
9664
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* confdefs.h. */
9667_ACEOF
9668cat confdefs.h >>conftest.$ac_ext
9669cat >>conftest.$ac_ext <<_ACEOF
9670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009671$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009673int
9674main ()
9675{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009676static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009677test_array [0] = 0
9678
9679 ;
9680 return 0;
9681}
9682_ACEOF
9683rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009684if { (ac_try="$ac_compile"
9685case "(($ac_try" in
9686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9687 *) ac_try_echo=$ac_try;;
9688esac
9689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009692 grep -v '^ *+' conftest.er1 >conftest.err
9693 rm -f conftest.er1
9694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696 (exit $ac_status); } && {
9697 test -z "$ac_c_werror_flag" ||
9698 test ! -s conftest.err
9699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 ac_hi=-1 ac_mid=-1
9701 while :; do
9702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* confdefs.h. */
9704_ACEOF
9705cat confdefs.h >>conftest.$ac_ext
9706cat >>conftest.$ac_ext <<_ACEOF
9707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009708$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009710int
9711main ()
9712{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009713static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009714test_array [0] = 0
9715
9716 ;
9717 return 0;
9718}
9719_ACEOF
9720rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721if { (ac_try="$ac_compile"
9722case "(($ac_try" in
9723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9724 *) ac_try_echo=$ac_try;;
9725esac
9726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009729 grep -v '^ *+' conftest.er1 >conftest.err
9730 rm -f conftest.er1
9731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 (exit $ac_status); } && {
9734 test -z "$ac_c_werror_flag" ||
9735 test ! -s conftest.err
9736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ac_lo=$ac_mid; break
9738else
9739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009740sed 's/^/| /' conftest.$ac_ext >&5
9741
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742 ac_hi=`expr '(' $ac_mid ')' - 1`
9743 if test $ac_mid -le $ac_hi; then
9744 ac_lo= ac_hi=
9745 break
9746 fi
9747 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009749
9750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 done
9752else
9753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009754sed 's/^/| /' conftest.$ac_ext >&5
9755
Martin v. Löwiseba40652007-08-30 20:10:57 +00009756 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758
9759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761
9762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009763# Binary search between lo and hi bounds.
9764while test "x$ac_lo" != "x$ac_hi"; do
9765 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009767/* confdefs.h. */
9768_ACEOF
9769cat confdefs.h >>conftest.$ac_ext
9770cat >>conftest.$ac_ext <<_ACEOF
9771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009774int
9775main ()
9776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009778test_array [0] = 0
9779
9780 ;
9781 return 0;
9782}
9783_ACEOF
9784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785if { (ac_try="$ac_compile"
9786case "(($ac_try" in
9787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9788 *) ac_try_echo=$ac_try;;
9789esac
9790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009793 grep -v '^ *+' conftest.er1 >conftest.err
9794 rm -f conftest.er1
9795 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009797 (exit $ac_status); } && {
9798 test -z "$ac_c_werror_flag" ||
9799 test ! -s conftest.err
9800 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 ac_hi=$ac_mid
9802else
9803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009804sed 's/^/| /' conftest.$ac_ext >&5
9805
Martin v. Löwiseba40652007-08-30 20:10:57 +00009806 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808
9809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009810done
9811case $ac_lo in
9812?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009813'') if test "$ac_cv_type_fpos_t" = yes; then
9814 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009815See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009816echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009817See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818 { (exit 77); exit 77; }; }
9819 else
9820 ac_cv_sizeof_fpos_t=0
9821 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009822esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009823else
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* confdefs.h. */
9826_ACEOF
9827cat confdefs.h >>conftest.$ac_ext
9828cat >>conftest.$ac_ext <<_ACEOF
9829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009831 typedef fpos_t ac__type_sizeof_;
9832static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9833static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009834#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009836int
9837main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009838{
Martin v. Löwis11437992002-04-12 09:54:03 +00009839
9840 FILE *f = fopen ("conftest.val", "w");
9841 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842 return 1;
9843 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009845 long int i = longval ();
9846 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9847 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 fprintf (f, "%ld\n", i);
9849 }
9850 else
9851 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009852 unsigned long int i = ulongval ();
9853 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9854 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 fprintf (f, "%lu\n", i);
9856 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
9859 ;
9860 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009861}
Martin v. Löwis11437992002-04-12 09:54:03 +00009862_ACEOF
9863rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009864if { (ac_try="$ac_link"
9865case "(($ac_try" in
9866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9867 *) ac_try_echo=$ac_try;;
9868esac
9869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9870 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874 { (case "(($ac_try" in
9875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9876 *) ac_try_echo=$ac_try;;
9877esac
9878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9879 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_status=$?
9881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9882 (exit $ac_status); }; }; then
9883 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009884else
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 echo "$as_me: program exited with status $ac_status" >&5
9886echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009887sed 's/^/| /' conftest.$ac_ext >&5
9888
Martin v. Löwis11437992002-04-12 09:54:03 +00009889( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890if test "$ac_cv_type_fpos_t" = yes; then
9891 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009892See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009894See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 { (exit 77); exit 77; }; }
9896 else
9897 ac_cv_sizeof_fpos_t=0
9898 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900rm -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 +00009901fi
9902rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9905echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9906
9907
9908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009910#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009911_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009912
Michael W. Hudson54241132001-12-07 15:38:26 +00009913
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914{ echo "$as_me:$LINENO: checking for size_t" >&5
9915echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009916if test "${ac_cv_type_size_t+set}" = set; then
9917 echo $ECHO_N "(cached) $ECHO_C" >&6
9918else
9919 cat >conftest.$ac_ext <<_ACEOF
9920/* confdefs.h. */
9921_ACEOF
9922cat confdefs.h >>conftest.$ac_ext
9923cat >>conftest.$ac_ext <<_ACEOF
9924/* end confdefs.h. */
9925$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009927int
9928main ()
9929{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009931 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009933 return 0;
9934 ;
9935 return 0;
9936}
9937_ACEOF
9938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939if { (ac_try="$ac_compile"
9940case "(($ac_try" in
9941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9942 *) ac_try_echo=$ac_try;;
9943esac
9944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009946 ac_status=$?
9947 grep -v '^ *+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009951 (exit $ac_status); } && {
9952 test -z "$ac_c_werror_flag" ||
9953 test ! -s conftest.err
9954 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009955 ac_cv_type_size_t=yes
9956else
9957 echo "$as_me: failed program was:" >&5
9958sed 's/^/| /' conftest.$ac_ext >&5
9959
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009961fi
Brett Cannon19fab762007-06-02 03:02:29 +00009962
Martin v. Löwiseba40652007-08-30 20:10:57 +00009963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9964fi
9965{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9966echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9967
9968# The cast to long int works around a bug in the HP C Compiler
9969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9971# This bug is HP SR number 8606223364.
9972{ echo "$as_me:$LINENO: checking size of size_t" >&5
9973echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009974if test "${ac_cv_sizeof_size_t+set}" = set; then
9975 echo $ECHO_N "(cached) $ECHO_C" >&6
9976else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009977 if test "$cross_compiling" = yes; then
9978 # Depending upon the size, compute the lo and hi bounds.
9979cat >conftest.$ac_ext <<_ACEOF
9980/* confdefs.h. */
9981_ACEOF
9982cat confdefs.h >>conftest.$ac_ext
9983cat >>conftest.$ac_ext <<_ACEOF
9984/* end confdefs.h. */
9985$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009987int
9988main ()
9989{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009990static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009991test_array [0] = 0
9992
9993 ;
9994 return 0;
9995}
9996_ACEOF
9997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998if { (ac_try="$ac_compile"
9999case "(($ac_try" in
10000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10001 *) ac_try_echo=$ac_try;;
10002esac
10003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010005 ac_status=$?
10006 grep -v '^ *+' conftest.er1 >conftest.err
10007 rm -f conftest.er1
10008 cat conftest.err >&5
10009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010 (exit $ac_status); } && {
10011 test -z "$ac_c_werror_flag" ||
10012 test ! -s conftest.err
10013 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010014 ac_lo=0 ac_mid=0
10015 while :; do
10016 cat >conftest.$ac_ext <<_ACEOF
10017/* confdefs.h. */
10018_ACEOF
10019cat confdefs.h >>conftest.$ac_ext
10020cat >>conftest.$ac_ext <<_ACEOF
10021/* end confdefs.h. */
10022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010024int
10025main ()
10026{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010027static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010028test_array [0] = 0
10029
10030 ;
10031 return 0;
10032}
10033_ACEOF
10034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035if { (ac_try="$ac_compile"
10036case "(($ac_try" in
10037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10038 *) ac_try_echo=$ac_try;;
10039esac
10040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010042 ac_status=$?
10043 grep -v '^ *+' conftest.er1 >conftest.err
10044 rm -f conftest.er1
10045 cat conftest.err >&5
10046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047 (exit $ac_status); } && {
10048 test -z "$ac_c_werror_flag" ||
10049 test ! -s conftest.err
10050 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010051 ac_hi=$ac_mid; break
10052else
10053 echo "$as_me: failed program was:" >&5
10054sed 's/^/| /' conftest.$ac_ext >&5
10055
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056 ac_lo=`expr $ac_mid + 1`
10057 if test $ac_lo -le $ac_mid; then
10058 ac_lo= ac_hi=
10059 break
10060 fi
10061 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010063
10064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010065 done
10066else
10067 echo "$as_me: failed program was:" >&5
10068sed 's/^/| /' conftest.$ac_ext >&5
10069
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010071/* confdefs.h. */
10072_ACEOF
10073cat confdefs.h >>conftest.$ac_ext
10074cat >>conftest.$ac_ext <<_ACEOF
10075/* end confdefs.h. */
10076$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010078int
10079main ()
10080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010082test_array [0] = 0
10083
10084 ;
10085 return 0;
10086}
10087_ACEOF
10088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089if { (ac_try="$ac_compile"
10090case "(($ac_try" in
10091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10092 *) ac_try_echo=$ac_try;;
10093esac
10094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010096 ac_status=$?
10097 grep -v '^ *+' conftest.er1 >conftest.err
10098 rm -f conftest.er1
10099 cat conftest.err >&5
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101 (exit $ac_status); } && {
10102 test -z "$ac_c_werror_flag" ||
10103 test ! -s conftest.err
10104 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010105 ac_hi=-1 ac_mid=-1
10106 while :; do
10107 cat >conftest.$ac_ext <<_ACEOF
10108/* confdefs.h. */
10109_ACEOF
10110cat confdefs.h >>conftest.$ac_ext
10111cat >>conftest.$ac_ext <<_ACEOF
10112/* end confdefs.h. */
10113$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010115int
10116main ()
10117{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010118static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010119test_array [0] = 0
10120
10121 ;
10122 return 0;
10123}
10124_ACEOF
10125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126if { (ac_try="$ac_compile"
10127case "(($ac_try" in
10128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10129 *) ac_try_echo=$ac_try;;
10130esac
10131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010133 ac_status=$?
10134 grep -v '^ *+' conftest.er1 >conftest.err
10135 rm -f conftest.er1
10136 cat conftest.err >&5
10137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138 (exit $ac_status); } && {
10139 test -z "$ac_c_werror_flag" ||
10140 test ! -s conftest.err
10141 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010142 ac_lo=$ac_mid; break
10143else
10144 echo "$as_me: failed program was:" >&5
10145sed 's/^/| /' conftest.$ac_ext >&5
10146
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147 ac_hi=`expr '(' $ac_mid ')' - 1`
10148 if test $ac_mid -le $ac_hi; then
10149 ac_lo= ac_hi=
10150 break
10151 fi
10152 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010154
10155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010156 done
10157else
10158 echo "$as_me: failed program was:" >&5
10159sed 's/^/| /' conftest.$ac_ext >&5
10160
Martin v. Löwiseba40652007-08-30 20:10:57 +000010161 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163
10164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010166
10167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010168# Binary search between lo and hi bounds.
10169while test "x$ac_lo" != "x$ac_hi"; do
10170 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10171 cat >conftest.$ac_ext <<_ACEOF
10172/* confdefs.h. */
10173_ACEOF
10174cat confdefs.h >>conftest.$ac_ext
10175cat >>conftest.$ac_ext <<_ACEOF
10176/* end confdefs.h. */
10177$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010178 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010179int
10180main ()
10181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010183test_array [0] = 0
10184
10185 ;
10186 return 0;
10187}
10188_ACEOF
10189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190if { (ac_try="$ac_compile"
10191case "(($ac_try" in
10192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10193 *) ac_try_echo=$ac_try;;
10194esac
10195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010197 ac_status=$?
10198 grep -v '^ *+' conftest.er1 >conftest.err
10199 rm -f conftest.er1
10200 cat conftest.err >&5
10201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010202 (exit $ac_status); } && {
10203 test -z "$ac_c_werror_flag" ||
10204 test ! -s conftest.err
10205 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010206 ac_hi=$ac_mid
10207else
10208 echo "$as_me: failed program was:" >&5
10209sed 's/^/| /' conftest.$ac_ext >&5
10210
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213
10214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010215done
10216case $ac_lo in
10217?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010218'') if test "$ac_cv_type_size_t" = yes; then
10219 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010220See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010221echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010222See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223 { (exit 77); exit 77; }; }
10224 else
10225 ac_cv_sizeof_size_t=0
10226 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010227esac
10228else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010229 cat >conftest.$ac_ext <<_ACEOF
10230/* confdefs.h. */
10231_ACEOF
10232cat confdefs.h >>conftest.$ac_ext
10233cat >>conftest.$ac_ext <<_ACEOF
10234/* end confdefs.h. */
10235$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236 typedef size_t ac__type_sizeof_;
10237static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10238static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010239#include <stdio.h>
10240#include <stdlib.h>
10241int
10242main ()
10243{
10244
10245 FILE *f = fopen ("conftest.val", "w");
10246 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247 return 1;
10248 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010249 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010250 long int i = longval ();
10251 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10252 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010253 fprintf (f, "%ld\n", i);
10254 }
10255 else
10256 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257 unsigned long int i = ulongval ();
10258 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10259 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010260 fprintf (f, "%lu\n", i);
10261 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010263
10264 ;
10265 return 0;
10266}
10267_ACEOF
10268rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010269if { (ac_try="$ac_link"
10270case "(($ac_try" in
10271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10272 *) ac_try_echo=$ac_try;;
10273esac
10274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10275 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010276 ac_status=$?
10277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10278 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010279 { (case "(($ac_try" in
10280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10281 *) ac_try_echo=$ac_try;;
10282esac
10283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10284 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010285 ac_status=$?
10286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10287 (exit $ac_status); }; }; then
10288 ac_cv_sizeof_size_t=`cat conftest.val`
10289else
10290 echo "$as_me: program exited with status $ac_status" >&5
10291echo "$as_me: failed program was:" >&5
10292sed 's/^/| /' conftest.$ac_ext >&5
10293
10294( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295if test "$ac_cv_type_size_t" = yes; then
10296 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010297See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010298echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010299See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 { (exit 77); exit 77; }; }
10301 else
10302 ac_cv_sizeof_size_t=0
10303 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305rm -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 +000010306fi
10307rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010309{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10310echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10311
10312
10313
Martin v. Löwis18e16552006-02-15 17:27:45 +000010314cat >>confdefs.h <<_ACEOF
10315#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10316_ACEOF
10317
10318
Christian Heimes951cc0f2008-01-31 23:08:23 +000010319{ echo "$as_me:$LINENO: checking for pid_t" >&5
10320echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10321if test "${ac_cv_type_pid_t+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
10323else
10324 cat >conftest.$ac_ext <<_ACEOF
10325/* confdefs.h. */
10326_ACEOF
10327cat confdefs.h >>conftest.$ac_ext
10328cat >>conftest.$ac_ext <<_ACEOF
10329/* end confdefs.h. */
10330$ac_includes_default
10331typedef pid_t ac__type_new_;
10332int
10333main ()
10334{
10335if ((ac__type_new_ *) 0)
10336 return 0;
10337if (sizeof (ac__type_new_))
10338 return 0;
10339 ;
10340 return 0;
10341}
10342_ACEOF
10343rm -f conftest.$ac_objext
10344if { (ac_try="$ac_compile"
10345case "(($ac_try" in
10346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10347 *) ac_try_echo=$ac_try;;
10348esac
10349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10350 (eval "$ac_compile") 2>conftest.er1
10351 ac_status=$?
10352 grep -v '^ *+' conftest.er1 >conftest.err
10353 rm -f conftest.er1
10354 cat conftest.err >&5
10355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356 (exit $ac_status); } && {
10357 test -z "$ac_c_werror_flag" ||
10358 test ! -s conftest.err
10359 } && test -s conftest.$ac_objext; then
10360 ac_cv_type_pid_t=yes
10361else
10362 echo "$as_me: failed program was:" >&5
10363sed 's/^/| /' conftest.$ac_ext >&5
10364
10365 ac_cv_type_pid_t=no
10366fi
10367
10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10369fi
10370{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10371echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10372
10373# The cast to long int works around a bug in the HP C Compiler
10374# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10375# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10376# This bug is HP SR number 8606223364.
10377{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10378echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10379if test "${ac_cv_sizeof_pid_t+set}" = set; then
10380 echo $ECHO_N "(cached) $ECHO_C" >&6
10381else
10382 if test "$cross_compiling" = yes; then
10383 # Depending upon the size, compute the lo and hi bounds.
10384cat >conftest.$ac_ext <<_ACEOF
10385/* confdefs.h. */
10386_ACEOF
10387cat confdefs.h >>conftest.$ac_ext
10388cat >>conftest.$ac_ext <<_ACEOF
10389/* end confdefs.h. */
10390$ac_includes_default
10391 typedef pid_t ac__type_sizeof_;
10392int
10393main ()
10394{
10395static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10396test_array [0] = 0
10397
10398 ;
10399 return 0;
10400}
10401_ACEOF
10402rm -f conftest.$ac_objext
10403if { (ac_try="$ac_compile"
10404case "(($ac_try" in
10405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10406 *) ac_try_echo=$ac_try;;
10407esac
10408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10409 (eval "$ac_compile") 2>conftest.er1
10410 ac_status=$?
10411 grep -v '^ *+' conftest.er1 >conftest.err
10412 rm -f conftest.er1
10413 cat conftest.err >&5
10414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10415 (exit $ac_status); } && {
10416 test -z "$ac_c_werror_flag" ||
10417 test ! -s conftest.err
10418 } && test -s conftest.$ac_objext; then
10419 ac_lo=0 ac_mid=0
10420 while :; do
10421 cat >conftest.$ac_ext <<_ACEOF
10422/* confdefs.h. */
10423_ACEOF
10424cat confdefs.h >>conftest.$ac_ext
10425cat >>conftest.$ac_ext <<_ACEOF
10426/* end confdefs.h. */
10427$ac_includes_default
10428 typedef pid_t ac__type_sizeof_;
10429int
10430main ()
10431{
10432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10433test_array [0] = 0
10434
10435 ;
10436 return 0;
10437}
10438_ACEOF
10439rm -f conftest.$ac_objext
10440if { (ac_try="$ac_compile"
10441case "(($ac_try" in
10442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10443 *) ac_try_echo=$ac_try;;
10444esac
10445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10446 (eval "$ac_compile") 2>conftest.er1
10447 ac_status=$?
10448 grep -v '^ *+' conftest.er1 >conftest.err
10449 rm -f conftest.er1
10450 cat conftest.err >&5
10451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10452 (exit $ac_status); } && {
10453 test -z "$ac_c_werror_flag" ||
10454 test ! -s conftest.err
10455 } && test -s conftest.$ac_objext; then
10456 ac_hi=$ac_mid; break
10457else
10458 echo "$as_me: failed program was:" >&5
10459sed 's/^/| /' conftest.$ac_ext >&5
10460
10461 ac_lo=`expr $ac_mid + 1`
10462 if test $ac_lo -le $ac_mid; then
10463 ac_lo= ac_hi=
10464 break
10465 fi
10466 ac_mid=`expr 2 '*' $ac_mid + 1`
10467fi
10468
10469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10470 done
10471else
10472 echo "$as_me: failed program was:" >&5
10473sed 's/^/| /' conftest.$ac_ext >&5
10474
10475 cat >conftest.$ac_ext <<_ACEOF
10476/* confdefs.h. */
10477_ACEOF
10478cat confdefs.h >>conftest.$ac_ext
10479cat >>conftest.$ac_ext <<_ACEOF
10480/* end confdefs.h. */
10481$ac_includes_default
10482 typedef pid_t ac__type_sizeof_;
10483int
10484main ()
10485{
10486static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10487test_array [0] = 0
10488
10489 ;
10490 return 0;
10491}
10492_ACEOF
10493rm -f conftest.$ac_objext
10494if { (ac_try="$ac_compile"
10495case "(($ac_try" in
10496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10497 *) ac_try_echo=$ac_try;;
10498esac
10499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10500 (eval "$ac_compile") 2>conftest.er1
10501 ac_status=$?
10502 grep -v '^ *+' conftest.er1 >conftest.err
10503 rm -f conftest.er1
10504 cat conftest.err >&5
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); } && {
10507 test -z "$ac_c_werror_flag" ||
10508 test ! -s conftest.err
10509 } && test -s conftest.$ac_objext; then
10510 ac_hi=-1 ac_mid=-1
10511 while :; do
10512 cat >conftest.$ac_ext <<_ACEOF
10513/* confdefs.h. */
10514_ACEOF
10515cat confdefs.h >>conftest.$ac_ext
10516cat >>conftest.$ac_ext <<_ACEOF
10517/* end confdefs.h. */
10518$ac_includes_default
10519 typedef pid_t ac__type_sizeof_;
10520int
10521main ()
10522{
10523static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10524test_array [0] = 0
10525
10526 ;
10527 return 0;
10528}
10529_ACEOF
10530rm -f conftest.$ac_objext
10531if { (ac_try="$ac_compile"
10532case "(($ac_try" in
10533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10534 *) ac_try_echo=$ac_try;;
10535esac
10536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10537 (eval "$ac_compile") 2>conftest.er1
10538 ac_status=$?
10539 grep -v '^ *+' conftest.er1 >conftest.err
10540 rm -f conftest.er1
10541 cat conftest.err >&5
10542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10543 (exit $ac_status); } && {
10544 test -z "$ac_c_werror_flag" ||
10545 test ! -s conftest.err
10546 } && test -s conftest.$ac_objext; then
10547 ac_lo=$ac_mid; break
10548else
10549 echo "$as_me: failed program was:" >&5
10550sed 's/^/| /' conftest.$ac_ext >&5
10551
10552 ac_hi=`expr '(' $ac_mid ')' - 1`
10553 if test $ac_mid -le $ac_hi; then
10554 ac_lo= ac_hi=
10555 break
10556 fi
10557 ac_mid=`expr 2 '*' $ac_mid`
10558fi
10559
10560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10561 done
10562else
10563 echo "$as_me: failed program was:" >&5
10564sed 's/^/| /' conftest.$ac_ext >&5
10565
10566 ac_lo= ac_hi=
10567fi
10568
10569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10570fi
10571
10572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10573# Binary search between lo and hi bounds.
10574while test "x$ac_lo" != "x$ac_hi"; do
10575 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10576 cat >conftest.$ac_ext <<_ACEOF
10577/* confdefs.h. */
10578_ACEOF
10579cat confdefs.h >>conftest.$ac_ext
10580cat >>conftest.$ac_ext <<_ACEOF
10581/* end confdefs.h. */
10582$ac_includes_default
10583 typedef pid_t ac__type_sizeof_;
10584int
10585main ()
10586{
10587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10588test_array [0] = 0
10589
10590 ;
10591 return 0;
10592}
10593_ACEOF
10594rm -f conftest.$ac_objext
10595if { (ac_try="$ac_compile"
10596case "(($ac_try" in
10597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10598 *) ac_try_echo=$ac_try;;
10599esac
10600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10601 (eval "$ac_compile") 2>conftest.er1
10602 ac_status=$?
10603 grep -v '^ *+' conftest.er1 >conftest.err
10604 rm -f conftest.er1
10605 cat conftest.err >&5
10606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10607 (exit $ac_status); } && {
10608 test -z "$ac_c_werror_flag" ||
10609 test ! -s conftest.err
10610 } && test -s conftest.$ac_objext; then
10611 ac_hi=$ac_mid
10612else
10613 echo "$as_me: failed program was:" >&5
10614sed 's/^/| /' conftest.$ac_ext >&5
10615
10616 ac_lo=`expr '(' $ac_mid ')' + 1`
10617fi
10618
10619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10620done
10621case $ac_lo in
10622?*) ac_cv_sizeof_pid_t=$ac_lo;;
10623'') if test "$ac_cv_type_pid_t" = yes; then
10624 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10625See \`config.log' for more details." >&5
10626echo "$as_me: error: cannot compute sizeof (pid_t)
10627See \`config.log' for more details." >&2;}
10628 { (exit 77); exit 77; }; }
10629 else
10630 ac_cv_sizeof_pid_t=0
10631 fi ;;
10632esac
10633else
10634 cat >conftest.$ac_ext <<_ACEOF
10635/* confdefs.h. */
10636_ACEOF
10637cat confdefs.h >>conftest.$ac_ext
10638cat >>conftest.$ac_ext <<_ACEOF
10639/* end confdefs.h. */
10640$ac_includes_default
10641 typedef pid_t ac__type_sizeof_;
10642static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10643static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10644#include <stdio.h>
10645#include <stdlib.h>
10646int
10647main ()
10648{
10649
10650 FILE *f = fopen ("conftest.val", "w");
10651 if (! f)
10652 return 1;
10653 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10654 {
10655 long int i = longval ();
10656 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10657 return 1;
10658 fprintf (f, "%ld\n", i);
10659 }
10660 else
10661 {
10662 unsigned long int i = ulongval ();
10663 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10664 return 1;
10665 fprintf (f, "%lu\n", i);
10666 }
10667 return ferror (f) || fclose (f) != 0;
10668
10669 ;
10670 return 0;
10671}
10672_ACEOF
10673rm -f conftest$ac_exeext
10674if { (ac_try="$ac_link"
10675case "(($ac_try" in
10676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10677 *) ac_try_echo=$ac_try;;
10678esac
10679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10680 (eval "$ac_link") 2>&5
10681 ac_status=$?
10682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10684 { (case "(($ac_try" in
10685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10686 *) ac_try_echo=$ac_try;;
10687esac
10688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10689 (eval "$ac_try") 2>&5
10690 ac_status=$?
10691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10692 (exit $ac_status); }; }; then
10693 ac_cv_sizeof_pid_t=`cat conftest.val`
10694else
10695 echo "$as_me: program exited with status $ac_status" >&5
10696echo "$as_me: failed program was:" >&5
10697sed 's/^/| /' conftest.$ac_ext >&5
10698
10699( exit $ac_status )
10700if test "$ac_cv_type_pid_t" = yes; then
10701 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10702See \`config.log' for more details." >&5
10703echo "$as_me: error: cannot compute sizeof (pid_t)
10704See \`config.log' for more details." >&2;}
10705 { (exit 77); exit 77; }; }
10706 else
10707 ac_cv_sizeof_pid_t=0
10708 fi
10709fi
10710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10711fi
10712rm -f conftest.val
10713fi
10714{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10715echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10716
10717
10718
10719cat >>confdefs.h <<_ACEOF
10720#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10721_ACEOF
10722
10723
Michael W. Hudson54241132001-12-07 15:38:26 +000010724
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725{ echo "$as_me:$LINENO: checking for long long support" >&5
10726echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010727have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010729/* confdefs.h. */
10730_ACEOF
10731cat confdefs.h >>conftest.$ac_ext
10732cat >>conftest.$ac_ext <<_ACEOF
10733/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010734
Martin v. Löwis11437992002-04-12 09:54:03 +000010735int
10736main ()
10737{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010738long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ;
10740 return 0;
10741}
10742_ACEOF
10743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744if { (ac_try="$ac_compile"
10745case "(($ac_try" in
10746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10747 *) ac_try_echo=$ac_try;;
10748esac
10749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010752 grep -v '^ *+' conftest.er1 >conftest.err
10753 rm -f conftest.er1
10754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756 (exit $ac_status); } && {
10757 test -z "$ac_c_werror_flag" ||
10758 test ! -s conftest.err
10759 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010760
10761
10762cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010763#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010764_ACEOF
10765
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010766 have_long_long=yes
10767
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010768else
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010770sed 's/^/| /' conftest.$ac_ext >&5
10771
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774
10775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10776{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10777echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010778if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779{ echo "$as_me:$LINENO: checking for long long" >&5
10780echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010781if test "${ac_cv_type_long_long+set}" = set; then
10782 echo $ECHO_N "(cached) $ECHO_C" >&6
10783else
10784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010785/* confdefs.h. */
10786_ACEOF
10787cat confdefs.h >>conftest.$ac_ext
10788cat >>conftest.$ac_ext <<_ACEOF
10789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010790$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010792int
10793main ()
10794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010795if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010797if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 return 0;
10799 ;
10800 return 0;
10801}
10802_ACEOF
10803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010804if { (ac_try="$ac_compile"
10805case "(($ac_try" in
10806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10807 *) ac_try_echo=$ac_try;;
10808esac
10809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010812 grep -v '^ *+' conftest.er1 >conftest.err
10813 rm -f conftest.er1
10814 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010816 (exit $ac_status); } && {
10817 test -z "$ac_c_werror_flag" ||
10818 test ! -s conftest.err
10819 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010820 ac_cv_type_long_long=yes
10821else
10822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010823sed 's/^/| /' conftest.$ac_ext >&5
10824
Martin v. Löwiseba40652007-08-30 20:10:57 +000010825 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010826fi
Brett Cannon19fab762007-06-02 03:02:29 +000010827
Martin v. Löwiseba40652007-08-30 20:10:57 +000010828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10829fi
10830{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10831echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10832
10833# The cast to long int works around a bug in the HP C Compiler
10834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10836# This bug is HP SR number 8606223364.
10837{ echo "$as_me:$LINENO: checking size of long long" >&5
10838echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010839if test "${ac_cv_sizeof_long_long+set}" = set; then
10840 echo $ECHO_N "(cached) $ECHO_C" >&6
10841else
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 if test "$cross_compiling" = yes; then
10843 # Depending upon the size, compute the lo and hi bounds.
10844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010845/* confdefs.h. */
10846_ACEOF
10847cat confdefs.h >>conftest.$ac_ext
10848cat >>conftest.$ac_ext <<_ACEOF
10849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010850$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010851 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010852int
10853main ()
10854{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010856test_array [0] = 0
10857
10858 ;
10859 return 0;
10860}
10861_ACEOF
10862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010863if { (ac_try="$ac_compile"
10864case "(($ac_try" in
10865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10866 *) ac_try_echo=$ac_try;;
10867esac
10868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010871 grep -v '^ *+' conftest.er1 >conftest.err
10872 rm -f conftest.er1
10873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010875 (exit $ac_status); } && {
10876 test -z "$ac_c_werror_flag" ||
10877 test ! -s conftest.err
10878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ac_lo=0 ac_mid=0
10880 while :; do
10881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010882/* confdefs.h. */
10883_ACEOF
10884cat confdefs.h >>conftest.$ac_ext
10885cat >>conftest.$ac_ext <<_ACEOF
10886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010887$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010889int
10890main ()
10891{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010893test_array [0] = 0
10894
10895 ;
10896 return 0;
10897}
10898_ACEOF
10899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900if { (ac_try="$ac_compile"
10901case "(($ac_try" in
10902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10903 *) ac_try_echo=$ac_try;;
10904esac
10905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010908 grep -v '^ *+' conftest.er1 >conftest.err
10909 rm -f conftest.er1
10910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912 (exit $ac_status); } && {
10913 test -z "$ac_c_werror_flag" ||
10914 test ! -s conftest.err
10915 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010916 ac_hi=$ac_mid; break
10917else
10918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010919sed 's/^/| /' conftest.$ac_ext >&5
10920
Martin v. Löwiseba40652007-08-30 20:10:57 +000010921 ac_lo=`expr $ac_mid + 1`
10922 if test $ac_lo -le $ac_mid; then
10923 ac_lo= ac_hi=
10924 break
10925 fi
10926 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010928
10929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 done
10931else
10932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010933sed 's/^/| /' conftest.$ac_ext >&5
10934
Martin v. Löwiseba40652007-08-30 20:10:57 +000010935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* confdefs.h. */
10937_ACEOF
10938cat confdefs.h >>conftest.$ac_ext
10939cat >>conftest.$ac_ext <<_ACEOF
10940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010941$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010942 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010943int
10944main ()
10945{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010947test_array [0] = 0
10948
10949 ;
10950 return 0;
10951}
10952_ACEOF
10953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010954if { (ac_try="$ac_compile"
10955case "(($ac_try" in
10956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10957 *) ac_try_echo=$ac_try;;
10958esac
10959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010962 grep -v '^ *+' conftest.er1 >conftest.err
10963 rm -f conftest.er1
10964 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010966 (exit $ac_status); } && {
10967 test -z "$ac_c_werror_flag" ||
10968 test ! -s conftest.err
10969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ac_hi=-1 ac_mid=-1
10971 while :; do
10972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* confdefs.h. */
10974_ACEOF
10975cat confdefs.h >>conftest.$ac_ext
10976cat >>conftest.$ac_ext <<_ACEOF
10977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010978$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010979 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010980int
10981main ()
10982{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010983static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010984test_array [0] = 0
10985
10986 ;
10987 return 0;
10988}
10989_ACEOF
10990rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991if { (ac_try="$ac_compile"
10992case "(($ac_try" in
10993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10994 *) ac_try_echo=$ac_try;;
10995esac
10996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010999 grep -v '^ *+' conftest.er1 >conftest.err
11000 rm -f conftest.er1
11001 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011003 (exit $ac_status); } && {
11004 test -z "$ac_c_werror_flag" ||
11005 test ! -s conftest.err
11006 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ac_lo=$ac_mid; break
11008else
11009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011010sed 's/^/| /' conftest.$ac_ext >&5
11011
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012 ac_hi=`expr '(' $ac_mid ')' - 1`
11013 if test $ac_mid -le $ac_hi; then
11014 ac_lo= ac_hi=
11015 break
11016 fi
11017 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011019
11020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 done
11022else
11023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011024sed 's/^/| /' conftest.$ac_ext >&5
11025
Martin v. Löwiseba40652007-08-30 20:10:57 +000011026 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028
11029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031
11032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011033# Binary search between lo and hi bounds.
11034while test "x$ac_lo" != "x$ac_hi"; do
11035 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* confdefs.h. */
11038_ACEOF
11039cat confdefs.h >>conftest.$ac_ext
11040cat >>conftest.$ac_ext <<_ACEOF
11041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011042$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011043 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011044int
11045main ()
11046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011047static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011048test_array [0] = 0
11049
11050 ;
11051 return 0;
11052}
11053_ACEOF
11054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055if { (ac_try="$ac_compile"
11056case "(($ac_try" in
11057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11058 *) ac_try_echo=$ac_try;;
11059esac
11060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011063 grep -v '^ *+' conftest.er1 >conftest.err
11064 rm -f conftest.er1
11065 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011067 (exit $ac_status); } && {
11068 test -z "$ac_c_werror_flag" ||
11069 test ! -s conftest.err
11070 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 ac_hi=$ac_mid
11072else
11073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011074sed 's/^/| /' conftest.$ac_ext >&5
11075
Martin v. Löwiseba40652007-08-30 20:10:57 +000011076 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078
11079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011080done
11081case $ac_lo in
11082?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011083'') if test "$ac_cv_type_long_long" = yes; then
11084 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011085See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011086echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011087See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088 { (exit 77); exit 77; }; }
11089 else
11090 ac_cv_sizeof_long_long=0
11091 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011093else
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011095/* confdefs.h. */
11096_ACEOF
11097cat confdefs.h >>conftest.$ac_ext
11098cat >>conftest.$ac_ext <<_ACEOF
11099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011100$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101 typedef long long ac__type_sizeof_;
11102static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11103static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011104#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011105#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011106int
11107main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011108{
Martin v. Löwis11437992002-04-12 09:54:03 +000011109
11110 FILE *f = fopen ("conftest.val", "w");
11111 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011112 return 1;
11113 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011115 long int i = longval ();
11116 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11117 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 fprintf (f, "%ld\n", i);
11119 }
11120 else
11121 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122 unsigned long int i = ulongval ();
11123 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11124 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 fprintf (f, "%lu\n", i);
11126 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011128
11129 ;
11130 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011131}
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
11133rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134if { (ac_try="$ac_link"
11135case "(($ac_try" in
11136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11137 *) ac_try_echo=$ac_try;;
11138esac
11139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11140 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 ac_status=$?
11142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011144 { (case "(($ac_try" in
11145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11146 *) ac_try_echo=$ac_try;;
11147esac
11148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11149 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 ac_status=$?
11151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11152 (exit $ac_status); }; }; then
11153 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154else
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 echo "$as_me: program exited with status $ac_status" >&5
11156echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011157sed 's/^/| /' conftest.$ac_ext >&5
11158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160if test "$ac_cv_type_long_long" = yes; then
11161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011162See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011163echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011164See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011165 { (exit 77); exit 77; }; }
11166 else
11167 ac_cv_sizeof_long_long=0
11168 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011170rm -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 +000011171fi
11172rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011174{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11175echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11176
11177
11178
Martin v. Löwis11437992002-04-12 09:54:03 +000011179cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011180#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011181_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011182
Michael W. Hudson54241132001-12-07 15:38:26 +000011183
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184fi
11185
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011186{ echo "$as_me:$LINENO: checking for long double support" >&5
11187echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11188have_long_double=no
11189cat >conftest.$ac_ext <<_ACEOF
11190/* confdefs.h. */
11191_ACEOF
11192cat confdefs.h >>conftest.$ac_ext
11193cat >>conftest.$ac_ext <<_ACEOF
11194/* end confdefs.h. */
11195
11196int
11197main ()
11198{
11199long double x; x = (long double)0.;
11200 ;
11201 return 0;
11202}
11203_ACEOF
11204rm -f conftest.$ac_objext
11205if { (ac_try="$ac_compile"
11206case "(($ac_try" in
11207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11208 *) ac_try_echo=$ac_try;;
11209esac
11210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11211 (eval "$ac_compile") 2>conftest.er1
11212 ac_status=$?
11213 grep -v '^ *+' conftest.er1 >conftest.err
11214 rm -f conftest.er1
11215 cat conftest.err >&5
11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11217 (exit $ac_status); } && {
11218 test -z "$ac_c_werror_flag" ||
11219 test ! -s conftest.err
11220 } && test -s conftest.$ac_objext; then
11221
11222
11223cat >>confdefs.h <<\_ACEOF
11224#define HAVE_LONG_DOUBLE 1
11225_ACEOF
11226
11227 have_long_double=yes
11228
11229else
11230 echo "$as_me: failed program was:" >&5
11231sed 's/^/| /' conftest.$ac_ext >&5
11232
11233
11234fi
11235
11236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11237{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11238echo "${ECHO_T}$have_long_double" >&6; }
11239if test "$have_long_double" = yes ; then
11240{ echo "$as_me:$LINENO: checking for long double" >&5
11241echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11242if test "${ac_cv_type_long_double+set}" = set; then
11243 echo $ECHO_N "(cached) $ECHO_C" >&6
11244else
11245 cat >conftest.$ac_ext <<_ACEOF
11246/* confdefs.h. */
11247_ACEOF
11248cat confdefs.h >>conftest.$ac_ext
11249cat >>conftest.$ac_ext <<_ACEOF
11250/* end confdefs.h. */
11251$ac_includes_default
11252typedef long double ac__type_new_;
11253int
11254main ()
11255{
11256if ((ac__type_new_ *) 0)
11257 return 0;
11258if (sizeof (ac__type_new_))
11259 return 0;
11260 ;
11261 return 0;
11262}
11263_ACEOF
11264rm -f conftest.$ac_objext
11265if { (ac_try="$ac_compile"
11266case "(($ac_try" in
11267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11268 *) ac_try_echo=$ac_try;;
11269esac
11270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11271 (eval "$ac_compile") 2>conftest.er1
11272 ac_status=$?
11273 grep -v '^ *+' conftest.er1 >conftest.err
11274 rm -f conftest.er1
11275 cat conftest.err >&5
11276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11277 (exit $ac_status); } && {
11278 test -z "$ac_c_werror_flag" ||
11279 test ! -s conftest.err
11280 } && test -s conftest.$ac_objext; then
11281 ac_cv_type_long_double=yes
11282else
11283 echo "$as_me: failed program was:" >&5
11284sed 's/^/| /' conftest.$ac_ext >&5
11285
11286 ac_cv_type_long_double=no
11287fi
11288
11289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11290fi
11291{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11292echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11293
11294# The cast to long int works around a bug in the HP C Compiler
11295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11297# This bug is HP SR number 8606223364.
11298{ echo "$as_me:$LINENO: checking size of long double" >&5
11299echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11300if test "${ac_cv_sizeof_long_double+set}" = set; then
11301 echo $ECHO_N "(cached) $ECHO_C" >&6
11302else
11303 if test "$cross_compiling" = yes; then
11304 # Depending upon the size, compute the lo and hi bounds.
11305cat >conftest.$ac_ext <<_ACEOF
11306/* confdefs.h. */
11307_ACEOF
11308cat confdefs.h >>conftest.$ac_ext
11309cat >>conftest.$ac_ext <<_ACEOF
11310/* end confdefs.h. */
11311$ac_includes_default
11312 typedef long double ac__type_sizeof_;
11313int
11314main ()
11315{
11316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11317test_array [0] = 0
11318
11319 ;
11320 return 0;
11321}
11322_ACEOF
11323rm -f conftest.$ac_objext
11324if { (ac_try="$ac_compile"
11325case "(($ac_try" in
11326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11327 *) ac_try_echo=$ac_try;;
11328esac
11329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11330 (eval "$ac_compile") 2>conftest.er1
11331 ac_status=$?
11332 grep -v '^ *+' conftest.er1 >conftest.err
11333 rm -f conftest.er1
11334 cat conftest.err >&5
11335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11336 (exit $ac_status); } && {
11337 test -z "$ac_c_werror_flag" ||
11338 test ! -s conftest.err
11339 } && test -s conftest.$ac_objext; then
11340 ac_lo=0 ac_mid=0
11341 while :; do
11342 cat >conftest.$ac_ext <<_ACEOF
11343/* confdefs.h. */
11344_ACEOF
11345cat confdefs.h >>conftest.$ac_ext
11346cat >>conftest.$ac_ext <<_ACEOF
11347/* end confdefs.h. */
11348$ac_includes_default
11349 typedef long double ac__type_sizeof_;
11350int
11351main ()
11352{
11353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11354test_array [0] = 0
11355
11356 ;
11357 return 0;
11358}
11359_ACEOF
11360rm -f conftest.$ac_objext
11361if { (ac_try="$ac_compile"
11362case "(($ac_try" in
11363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11364 *) ac_try_echo=$ac_try;;
11365esac
11366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11367 (eval "$ac_compile") 2>conftest.er1
11368 ac_status=$?
11369 grep -v '^ *+' conftest.er1 >conftest.err
11370 rm -f conftest.er1
11371 cat conftest.err >&5
11372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373 (exit $ac_status); } && {
11374 test -z "$ac_c_werror_flag" ||
11375 test ! -s conftest.err
11376 } && test -s conftest.$ac_objext; then
11377 ac_hi=$ac_mid; break
11378else
11379 echo "$as_me: failed program was:" >&5
11380sed 's/^/| /' conftest.$ac_ext >&5
11381
11382 ac_lo=`expr $ac_mid + 1`
11383 if test $ac_lo -le $ac_mid; then
11384 ac_lo= ac_hi=
11385 break
11386 fi
11387 ac_mid=`expr 2 '*' $ac_mid + 1`
11388fi
11389
11390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11391 done
11392else
11393 echo "$as_me: failed program was:" >&5
11394sed 's/^/| /' conftest.$ac_ext >&5
11395
11396 cat >conftest.$ac_ext <<_ACEOF
11397/* confdefs.h. */
11398_ACEOF
11399cat confdefs.h >>conftest.$ac_ext
11400cat >>conftest.$ac_ext <<_ACEOF
11401/* end confdefs.h. */
11402$ac_includes_default
11403 typedef long double ac__type_sizeof_;
11404int
11405main ()
11406{
11407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11408test_array [0] = 0
11409
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext
11415if { (ac_try="$ac_compile"
11416case "(($ac_try" in
11417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11418 *) ac_try_echo=$ac_try;;
11419esac
11420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11421 (eval "$ac_compile") 2>conftest.er1
11422 ac_status=$?
11423 grep -v '^ *+' conftest.er1 >conftest.err
11424 rm -f conftest.er1
11425 cat conftest.err >&5
11426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427 (exit $ac_status); } && {
11428 test -z "$ac_c_werror_flag" ||
11429 test ! -s conftest.err
11430 } && test -s conftest.$ac_objext; then
11431 ac_hi=-1 ac_mid=-1
11432 while :; do
11433 cat >conftest.$ac_ext <<_ACEOF
11434/* confdefs.h. */
11435_ACEOF
11436cat confdefs.h >>conftest.$ac_ext
11437cat >>conftest.$ac_ext <<_ACEOF
11438/* end confdefs.h. */
11439$ac_includes_default
11440 typedef long double ac__type_sizeof_;
11441int
11442main ()
11443{
11444static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11445test_array [0] = 0
11446
11447 ;
11448 return 0;
11449}
11450_ACEOF
11451rm -f conftest.$ac_objext
11452if { (ac_try="$ac_compile"
11453case "(($ac_try" in
11454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11455 *) ac_try_echo=$ac_try;;
11456esac
11457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11458 (eval "$ac_compile") 2>conftest.er1
11459 ac_status=$?
11460 grep -v '^ *+' conftest.er1 >conftest.err
11461 rm -f conftest.er1
11462 cat conftest.err >&5
11463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11464 (exit $ac_status); } && {
11465 test -z "$ac_c_werror_flag" ||
11466 test ! -s conftest.err
11467 } && test -s conftest.$ac_objext; then
11468 ac_lo=$ac_mid; break
11469else
11470 echo "$as_me: failed program was:" >&5
11471sed 's/^/| /' conftest.$ac_ext >&5
11472
11473 ac_hi=`expr '(' $ac_mid ')' - 1`
11474 if test $ac_mid -le $ac_hi; then
11475 ac_lo= ac_hi=
11476 break
11477 fi
11478 ac_mid=`expr 2 '*' $ac_mid`
11479fi
11480
11481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11482 done
11483else
11484 echo "$as_me: failed program was:" >&5
11485sed 's/^/| /' conftest.$ac_ext >&5
11486
11487 ac_lo= ac_hi=
11488fi
11489
11490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11491fi
11492
11493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11494# Binary search between lo and hi bounds.
11495while test "x$ac_lo" != "x$ac_hi"; do
11496 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11497 cat >conftest.$ac_ext <<_ACEOF
11498/* confdefs.h. */
11499_ACEOF
11500cat confdefs.h >>conftest.$ac_ext
11501cat >>conftest.$ac_ext <<_ACEOF
11502/* end confdefs.h. */
11503$ac_includes_default
11504 typedef long double ac__type_sizeof_;
11505int
11506main ()
11507{
11508static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11509test_array [0] = 0
11510
11511 ;
11512 return 0;
11513}
11514_ACEOF
11515rm -f conftest.$ac_objext
11516if { (ac_try="$ac_compile"
11517case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
11521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11522 (eval "$ac_compile") 2>conftest.er1
11523 ac_status=$?
11524 grep -v '^ *+' conftest.er1 >conftest.err
11525 rm -f conftest.er1
11526 cat conftest.err >&5
11527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11528 (exit $ac_status); } && {
11529 test -z "$ac_c_werror_flag" ||
11530 test ! -s conftest.err
11531 } && test -s conftest.$ac_objext; then
11532 ac_hi=$ac_mid
11533else
11534 echo "$as_me: failed program was:" >&5
11535sed 's/^/| /' conftest.$ac_ext >&5
11536
11537 ac_lo=`expr '(' $ac_mid ')' + 1`
11538fi
11539
11540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541done
11542case $ac_lo in
11543?*) ac_cv_sizeof_long_double=$ac_lo;;
11544'') if test "$ac_cv_type_long_double" = yes; then
11545 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11546See \`config.log' for more details." >&5
11547echo "$as_me: error: cannot compute sizeof (long double)
11548See \`config.log' for more details." >&2;}
11549 { (exit 77); exit 77; }; }
11550 else
11551 ac_cv_sizeof_long_double=0
11552 fi ;;
11553esac
11554else
11555 cat >conftest.$ac_ext <<_ACEOF
11556/* confdefs.h. */
11557_ACEOF
11558cat confdefs.h >>conftest.$ac_ext
11559cat >>conftest.$ac_ext <<_ACEOF
11560/* end confdefs.h. */
11561$ac_includes_default
11562 typedef long double ac__type_sizeof_;
11563static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11564static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11565#include <stdio.h>
11566#include <stdlib.h>
11567int
11568main ()
11569{
11570
11571 FILE *f = fopen ("conftest.val", "w");
11572 if (! f)
11573 return 1;
11574 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11575 {
11576 long int i = longval ();
11577 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11578 return 1;
11579 fprintf (f, "%ld\n", i);
11580 }
11581 else
11582 {
11583 unsigned long int i = ulongval ();
11584 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11585 return 1;
11586 fprintf (f, "%lu\n", i);
11587 }
11588 return ferror (f) || fclose (f) != 0;
11589
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594rm -f conftest$ac_exeext
11595if { (ac_try="$ac_link"
11596case "(($ac_try" in
11597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11598 *) ac_try_echo=$ac_try;;
11599esac
11600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11601 (eval "$ac_link") 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11605 { (case "(($ac_try" in
11606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11607 *) ac_try_echo=$ac_try;;
11608esac
11609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11610 (eval "$ac_try") 2>&5
11611 ac_status=$?
11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); }; }; then
11614 ac_cv_sizeof_long_double=`cat conftest.val`
11615else
11616 echo "$as_me: program exited with status $ac_status" >&5
11617echo "$as_me: failed program was:" >&5
11618sed 's/^/| /' conftest.$ac_ext >&5
11619
11620( exit $ac_status )
11621if test "$ac_cv_type_long_double" = yes; then
11622 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11623See \`config.log' for more details." >&5
11624echo "$as_me: error: cannot compute sizeof (long double)
11625See \`config.log' for more details." >&2;}
11626 { (exit 77); exit 77; }; }
11627 else
11628 ac_cv_sizeof_long_double=0
11629 fi
11630fi
11631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11632fi
11633rm -f conftest.val
11634fi
11635{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11636echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11637
11638
11639
11640cat >>confdefs.h <<_ACEOF
11641#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11642_ACEOF
11643
11644
11645fi
11646
Martin v. Löwiseba40652007-08-30 20:10:57 +000011647{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11648echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011649have_c99_bool=no
11650cat >conftest.$ac_ext <<_ACEOF
11651/* confdefs.h. */
11652_ACEOF
11653cat confdefs.h >>conftest.$ac_ext
11654cat >>conftest.$ac_ext <<_ACEOF
11655/* end confdefs.h. */
11656
11657int
11658main ()
11659{
11660_Bool x; x = (_Bool)0;
11661 ;
11662 return 0;
11663}
11664_ACEOF
11665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666if { (ac_try="$ac_compile"
11667case "(($ac_try" in
11668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11669 *) ac_try_echo=$ac_try;;
11670esac
11671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011673 ac_status=$?
11674 grep -v '^ *+' conftest.er1 >conftest.err
11675 rm -f conftest.er1
11676 cat conftest.err >&5
11677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678 (exit $ac_status); } && {
11679 test -z "$ac_c_werror_flag" ||
11680 test ! -s conftest.err
11681 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011682
11683
11684cat >>confdefs.h <<\_ACEOF
11685#define HAVE_C99_BOOL 1
11686_ACEOF
11687
11688 have_c99_bool=yes
11689
11690else
11691 echo "$as_me: failed program was:" >&5
11692sed 's/^/| /' conftest.$ac_ext >&5
11693
Martin v. Löwiseba40652007-08-30 20:10:57 +000011694
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696
11697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11698{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11699echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011700if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701{ echo "$as_me:$LINENO: checking for _Bool" >&5
11702echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011703if test "${ac_cv_type__Bool+set}" = set; then
11704 echo $ECHO_N "(cached) $ECHO_C" >&6
11705else
11706 cat >conftest.$ac_ext <<_ACEOF
11707/* confdefs.h. */
11708_ACEOF
11709cat confdefs.h >>conftest.$ac_ext
11710cat >>conftest.$ac_ext <<_ACEOF
11711/* end confdefs.h. */
11712$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011713typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011714int
11715main ()
11716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011717if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011718 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011720 return 0;
11721 ;
11722 return 0;
11723}
11724_ACEOF
11725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011726if { (ac_try="$ac_compile"
11727case "(($ac_try" in
11728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11729 *) ac_try_echo=$ac_try;;
11730esac
11731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011733 ac_status=$?
11734 grep -v '^ *+' conftest.er1 >conftest.err
11735 rm -f conftest.er1
11736 cat conftest.err >&5
11737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738 (exit $ac_status); } && {
11739 test -z "$ac_c_werror_flag" ||
11740 test ! -s conftest.err
11741 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011742 ac_cv_type__Bool=yes
11743else
11744 echo "$as_me: failed program was:" >&5
11745sed 's/^/| /' conftest.$ac_ext >&5
11746
Martin v. Löwiseba40652007-08-30 20:10:57 +000011747 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011748fi
Brett Cannon19fab762007-06-02 03:02:29 +000011749
Martin v. Löwiseba40652007-08-30 20:10:57 +000011750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11751fi
11752{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11753echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11754
11755# The cast to long int works around a bug in the HP C Compiler
11756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11758# This bug is HP SR number 8606223364.
11759{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11760echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011761if test "${ac_cv_sizeof__Bool+set}" = set; then
11762 echo $ECHO_N "(cached) $ECHO_C" >&6
11763else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011764 if test "$cross_compiling" = yes; then
11765 # Depending upon the size, compute the lo and hi bounds.
11766cat >conftest.$ac_ext <<_ACEOF
11767/* confdefs.h. */
11768_ACEOF
11769cat confdefs.h >>conftest.$ac_ext
11770cat >>conftest.$ac_ext <<_ACEOF
11771/* end confdefs.h. */
11772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011774int
11775main ()
11776{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011778test_array [0] = 0
11779
11780 ;
11781 return 0;
11782}
11783_ACEOF
11784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011785if { (ac_try="$ac_compile"
11786case "(($ac_try" in
11787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11788 *) ac_try_echo=$ac_try;;
11789esac
11790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011792 ac_status=$?
11793 grep -v '^ *+' conftest.er1 >conftest.err
11794 rm -f conftest.er1
11795 cat conftest.err >&5
11796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011797 (exit $ac_status); } && {
11798 test -z "$ac_c_werror_flag" ||
11799 test ! -s conftest.err
11800 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011801 ac_lo=0 ac_mid=0
11802 while :; do
11803 cat >conftest.$ac_ext <<_ACEOF
11804/* confdefs.h. */
11805_ACEOF
11806cat confdefs.h >>conftest.$ac_ext
11807cat >>conftest.$ac_ext <<_ACEOF
11808/* end confdefs.h. */
11809$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011810 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011811int
11812main ()
11813{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011815test_array [0] = 0
11816
11817 ;
11818 return 0;
11819}
11820_ACEOF
11821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822if { (ac_try="$ac_compile"
11823case "(($ac_try" in
11824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11825 *) ac_try_echo=$ac_try;;
11826esac
11827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011829 ac_status=$?
11830 grep -v '^ *+' conftest.er1 >conftest.err
11831 rm -f conftest.er1
11832 cat conftest.err >&5
11833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011834 (exit $ac_status); } && {
11835 test -z "$ac_c_werror_flag" ||
11836 test ! -s conftest.err
11837 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011838 ac_hi=$ac_mid; break
11839else
11840 echo "$as_me: failed program was:" >&5
11841sed 's/^/| /' conftest.$ac_ext >&5
11842
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843 ac_lo=`expr $ac_mid + 1`
11844 if test $ac_lo -le $ac_mid; then
11845 ac_lo= ac_hi=
11846 break
11847 fi
11848 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011850
11851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011852 done
11853else
11854 echo "$as_me: failed program was:" >&5
11855sed 's/^/| /' conftest.$ac_ext >&5
11856
Martin v. Löwiseba40652007-08-30 20:10:57 +000011857 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011858/* confdefs.h. */
11859_ACEOF
11860cat confdefs.h >>conftest.$ac_ext
11861cat >>conftest.$ac_ext <<_ACEOF
11862/* end confdefs.h. */
11863$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011865int
11866main ()
11867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011869test_array [0] = 0
11870
11871 ;
11872 return 0;
11873}
11874_ACEOF
11875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011876if { (ac_try="$ac_compile"
11877case "(($ac_try" in
11878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11879 *) ac_try_echo=$ac_try;;
11880esac
11881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011883 ac_status=$?
11884 grep -v '^ *+' conftest.er1 >conftest.err
11885 rm -f conftest.er1
11886 cat conftest.err >&5
11887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011888 (exit $ac_status); } && {
11889 test -z "$ac_c_werror_flag" ||
11890 test ! -s conftest.err
11891 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011892 ac_hi=-1 ac_mid=-1
11893 while :; do
11894 cat >conftest.$ac_ext <<_ACEOF
11895/* confdefs.h. */
11896_ACEOF
11897cat confdefs.h >>conftest.$ac_ext
11898cat >>conftest.$ac_ext <<_ACEOF
11899/* end confdefs.h. */
11900$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011901 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011902int
11903main ()
11904{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011905static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011906test_array [0] = 0
11907
11908 ;
11909 return 0;
11910}
11911_ACEOF
11912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011913if { (ac_try="$ac_compile"
11914case "(($ac_try" in
11915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11916 *) ac_try_echo=$ac_try;;
11917esac
11918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011920 ac_status=$?
11921 grep -v '^ *+' conftest.er1 >conftest.err
11922 rm -f conftest.er1
11923 cat conftest.err >&5
11924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011925 (exit $ac_status); } && {
11926 test -z "$ac_c_werror_flag" ||
11927 test ! -s conftest.err
11928 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011929 ac_lo=$ac_mid; break
11930else
11931 echo "$as_me: failed program was:" >&5
11932sed 's/^/| /' conftest.$ac_ext >&5
11933
Martin v. Löwiseba40652007-08-30 20:10:57 +000011934 ac_hi=`expr '(' $ac_mid ')' - 1`
11935 if test $ac_mid -le $ac_hi; then
11936 ac_lo= ac_hi=
11937 break
11938 fi
11939 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011941
11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011943 done
11944else
11945 echo "$as_me: failed program was:" >&5
11946sed 's/^/| /' conftest.$ac_ext >&5
11947
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011950
11951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011953
11954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011955# Binary search between lo and hi bounds.
11956while test "x$ac_lo" != "x$ac_hi"; do
11957 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11958 cat >conftest.$ac_ext <<_ACEOF
11959/* confdefs.h. */
11960_ACEOF
11961cat confdefs.h >>conftest.$ac_ext
11962cat >>conftest.$ac_ext <<_ACEOF
11963/* end confdefs.h. */
11964$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011965 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011966int
11967main ()
11968{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011970test_array [0] = 0
11971
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011977if { (ac_try="$ac_compile"
11978case "(($ac_try" in
11979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11980 *) ac_try_echo=$ac_try;;
11981esac
11982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011984 ac_status=$?
11985 grep -v '^ *+' conftest.er1 >conftest.err
11986 rm -f conftest.er1
11987 cat conftest.err >&5
11988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011989 (exit $ac_status); } && {
11990 test -z "$ac_c_werror_flag" ||
11991 test ! -s conftest.err
11992 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011993 ac_hi=$ac_mid
11994else
11995 echo "$as_me: failed program was:" >&5
11996sed 's/^/| /' conftest.$ac_ext >&5
11997
Martin v. Löwiseba40652007-08-30 20:10:57 +000011998 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012000
12001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012002done
12003case $ac_lo in
12004?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012005'') if test "$ac_cv_type__Bool" = yes; then
12006 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012007See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012009See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012010 { (exit 77); exit 77; }; }
12011 else
12012 ac_cv_sizeof__Bool=0
12013 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012014esac
12015else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012016 cat >conftest.$ac_ext <<_ACEOF
12017/* confdefs.h. */
12018_ACEOF
12019cat confdefs.h >>conftest.$ac_ext
12020cat >>conftest.$ac_ext <<_ACEOF
12021/* end confdefs.h. */
12022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023 typedef _Bool ac__type_sizeof_;
12024static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12025static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012026#include <stdio.h>
12027#include <stdlib.h>
12028int
12029main ()
12030{
12031
12032 FILE *f = fopen ("conftest.val", "w");
12033 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012034 return 1;
12035 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012036 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012037 long int i = longval ();
12038 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12039 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012040 fprintf (f, "%ld\n", i);
12041 }
12042 else
12043 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012044 unsigned long int i = ulongval ();
12045 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12046 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012047 fprintf (f, "%lu\n", i);
12048 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012049 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012050
12051 ;
12052 return 0;
12053}
12054_ACEOF
12055rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012056if { (ac_try="$ac_link"
12057case "(($ac_try" in
12058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12059 *) ac_try_echo=$ac_try;;
12060esac
12061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12062 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012063 ac_status=$?
12064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012066 { (case "(($ac_try" in
12067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12068 *) ac_try_echo=$ac_try;;
12069esac
12070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12071 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012072 ac_status=$?
12073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12074 (exit $ac_status); }; }; then
12075 ac_cv_sizeof__Bool=`cat conftest.val`
12076else
12077 echo "$as_me: program exited with status $ac_status" >&5
12078echo "$as_me: failed program was:" >&5
12079sed 's/^/| /' conftest.$ac_ext >&5
12080
12081( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082if test "$ac_cv_type__Bool" = yes; then
12083 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012084See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012085echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012086See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087 { (exit 77); exit 77; }; }
12088 else
12089 ac_cv_sizeof__Bool=0
12090 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012092rm -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 +000012093fi
12094rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012096{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12097echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12098
12099
12100
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012101cat >>confdefs.h <<_ACEOF
12102#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12103_ACEOF
12104
12105
12106fi
12107
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12109echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012110if test "${ac_cv_type_uintptr_t+set}" = set; then
12111 echo $ECHO_N "(cached) $ECHO_C" >&6
12112else
12113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* confdefs.h. */
12115_ACEOF
12116cat confdefs.h >>conftest.$ac_ext
12117cat >>conftest.$ac_ext <<_ACEOF
12118/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012119#ifdef HAVE_STDINT_H
12120 #include <stdint.h>
12121 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012122
Martin v. Löwiseba40652007-08-30 20:10:57 +000012123typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012124int
12125main ()
12126{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012128 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012129if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012130 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 ;
12132 return 0;
12133}
12134_ACEOF
12135rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012136if { (ac_try="$ac_compile"
12137case "(($ac_try" in
12138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12139 *) ac_try_echo=$ac_try;;
12140esac
12141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012144 grep -v '^ *+' conftest.er1 >conftest.err
12145 rm -f conftest.er1
12146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012148 (exit $ac_status); } && {
12149 test -z "$ac_c_werror_flag" ||
12150 test ! -s conftest.err
12151 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012152 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012153else
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012155sed 's/^/| /' conftest.$ac_ext >&5
12156
Martin v. Löwiseba40652007-08-30 20:10:57 +000012157 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012159
12160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012162{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12163echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012164if test $ac_cv_type_uintptr_t = yes; then
12165
12166cat >>confdefs.h <<_ACEOF
12167#define HAVE_UINTPTR_T 1
12168_ACEOF
12169
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12171echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012172if test "${ac_cv_type_uintptr_t+set}" = set; then
12173 echo $ECHO_N "(cached) $ECHO_C" >&6
12174else
12175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012176/* confdefs.h. */
12177_ACEOF
12178cat confdefs.h >>conftest.$ac_ext
12179cat >>conftest.$ac_ext <<_ACEOF
12180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012181$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012182typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012183int
12184main ()
12185{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012186if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012188if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 return 0;
12190 ;
12191 return 0;
12192}
12193_ACEOF
12194rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012195if { (ac_try="$ac_compile"
12196case "(($ac_try" in
12197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12198 *) ac_try_echo=$ac_try;;
12199esac
12200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012203 grep -v '^ *+' conftest.er1 >conftest.err
12204 rm -f conftest.er1
12205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012207 (exit $ac_status); } && {
12208 test -z "$ac_c_werror_flag" ||
12209 test ! -s conftest.err
12210 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 ac_cv_type_uintptr_t=yes
12212else
12213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012214sed 's/^/| /' conftest.$ac_ext >&5
12215
Martin v. Löwiseba40652007-08-30 20:10:57 +000012216 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012217fi
Brett Cannon19fab762007-06-02 03:02:29 +000012218
Martin v. Löwiseba40652007-08-30 20:10:57 +000012219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12220fi
12221{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12222echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12223
12224# The cast to long int works around a bug in the HP C Compiler
12225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12227# This bug is HP SR number 8606223364.
12228{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12229echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012230if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12231 echo $ECHO_N "(cached) $ECHO_C" >&6
12232else
Martin v. Löwis11437992002-04-12 09:54:03 +000012233 if test "$cross_compiling" = yes; then
12234 # Depending upon the size, compute the lo and hi bounds.
12235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012236/* confdefs.h. */
12237_ACEOF
12238cat confdefs.h >>conftest.$ac_ext
12239cat >>conftest.$ac_ext <<_ACEOF
12240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012241$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012243int
12244main ()
12245{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012246static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012247test_array [0] = 0
12248
12249 ;
12250 return 0;
12251}
12252_ACEOF
12253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254if { (ac_try="$ac_compile"
12255case "(($ac_try" in
12256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12257 *) ac_try_echo=$ac_try;;
12258esac
12259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012262 grep -v '^ *+' conftest.er1 >conftest.err
12263 rm -f conftest.er1
12264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012266 (exit $ac_status); } && {
12267 test -z "$ac_c_werror_flag" ||
12268 test ! -s conftest.err
12269 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 ac_lo=0 ac_mid=0
12271 while :; do
12272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012273/* confdefs.h. */
12274_ACEOF
12275cat confdefs.h >>conftest.$ac_ext
12276cat >>conftest.$ac_ext <<_ACEOF
12277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012278$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012279 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012280int
12281main ()
12282{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012284test_array [0] = 0
12285
12286 ;
12287 return 0;
12288}
12289_ACEOF
12290rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291if { (ac_try="$ac_compile"
12292case "(($ac_try" in
12293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12294 *) ac_try_echo=$ac_try;;
12295esac
12296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12297 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012299 grep -v '^ *+' conftest.er1 >conftest.err
12300 rm -f conftest.er1
12301 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303 (exit $ac_status); } && {
12304 test -z "$ac_c_werror_flag" ||
12305 test ! -s conftest.err
12306 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 ac_hi=$ac_mid; break
12308else
12309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012310sed 's/^/| /' conftest.$ac_ext >&5
12311
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312 ac_lo=`expr $ac_mid + 1`
12313 if test $ac_lo -le $ac_mid; then
12314 ac_lo= ac_hi=
12315 break
12316 fi
12317 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012319
12320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 done
12322else
12323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012324sed 's/^/| /' conftest.$ac_ext >&5
12325
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012327/* confdefs.h. */
12328_ACEOF
12329cat confdefs.h >>conftest.$ac_ext
12330cat >>conftest.$ac_ext <<_ACEOF
12331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012332$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012334int
12335main ()
12336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012338test_array [0] = 0
12339
12340 ;
12341 return 0;
12342}
12343_ACEOF
12344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345if { (ac_try="$ac_compile"
12346case "(($ac_try" in
12347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12348 *) ac_try_echo=$ac_try;;
12349esac
12350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012353 grep -v '^ *+' conftest.er1 >conftest.err
12354 rm -f conftest.er1
12355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357 (exit $ac_status); } && {
12358 test -z "$ac_c_werror_flag" ||
12359 test ! -s conftest.err
12360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 ac_hi=-1 ac_mid=-1
12362 while :; do
12363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* confdefs.h. */
12365_ACEOF
12366cat confdefs.h >>conftest.$ac_ext
12367cat >>conftest.$ac_ext <<_ACEOF
12368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012369$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012371int
12372main ()
12373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012375test_array [0] = 0
12376
12377 ;
12378 return 0;
12379}
12380_ACEOF
12381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382if { (ac_try="$ac_compile"
12383case "(($ac_try" in
12384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12385 *) ac_try_echo=$ac_try;;
12386esac
12387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012390 grep -v '^ *+' conftest.er1 >conftest.err
12391 rm -f conftest.er1
12392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012394 (exit $ac_status); } && {
12395 test -z "$ac_c_werror_flag" ||
12396 test ! -s conftest.err
12397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012398 ac_lo=$ac_mid; break
12399else
12400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012401sed 's/^/| /' conftest.$ac_ext >&5
12402
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403 ac_hi=`expr '(' $ac_mid ')' - 1`
12404 if test $ac_mid -le $ac_hi; then
12405 ac_lo= ac_hi=
12406 break
12407 fi
12408 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012410
12411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 done
12413else
12414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012415sed 's/^/| /' conftest.$ac_ext >&5
12416
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419
12420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012422
12423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012424# Binary search between lo and hi bounds.
12425while test "x$ac_lo" != "x$ac_hi"; do
12426 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* confdefs.h. */
12429_ACEOF
12430cat confdefs.h >>conftest.$ac_ext
12431cat >>conftest.$ac_ext <<_ACEOF
12432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012433$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012435int
12436main ()
12437{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012439test_array [0] = 0
12440
12441 ;
12442 return 0;
12443}
12444_ACEOF
12445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446if { (ac_try="$ac_compile"
12447case "(($ac_try" in
12448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12449 *) ac_try_echo=$ac_try;;
12450esac
12451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012454 grep -v '^ *+' conftest.er1 >conftest.err
12455 rm -f conftest.er1
12456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458 (exit $ac_status); } && {
12459 test -z "$ac_c_werror_flag" ||
12460 test ! -s conftest.err
12461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 ac_hi=$ac_mid
12463else
12464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012465sed 's/^/| /' conftest.$ac_ext >&5
12466
Martin v. Löwiseba40652007-08-30 20:10:57 +000012467 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012469
12470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012471done
12472case $ac_lo in
12473?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012474'') if test "$ac_cv_type_uintptr_t" = yes; then
12475 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012476See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012478See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479 { (exit 77); exit 77; }; }
12480 else
12481 ac_cv_sizeof_uintptr_t=0
12482 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012483esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012484else
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012486/* confdefs.h. */
12487_ACEOF
12488cat confdefs.h >>conftest.$ac_ext
12489cat >>conftest.$ac_ext <<_ACEOF
12490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012491$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 typedef uintptr_t ac__type_sizeof_;
12493static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12494static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012495#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012496#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012499{
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
12501 FILE *f = fopen ("conftest.val", "w");
12502 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503 return 1;
12504 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012506 long int i = longval ();
12507 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12508 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 fprintf (f, "%ld\n", i);
12510 }
12511 else
12512 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513 unsigned long int i = ulongval ();
12514 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12515 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 fprintf (f, "%lu\n", i);
12517 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
12520 ;
12521 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012522}
Martin v. Löwis11437992002-04-12 09:54:03 +000012523_ACEOF
12524rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525if { (ac_try="$ac_link"
12526case "(($ac_try" in
12527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12528 *) ac_try_echo=$ac_try;;
12529esac
12530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12531 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 ac_status=$?
12533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535 { (case "(($ac_try" in
12536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12537 *) ac_try_echo=$ac_try;;
12538esac
12539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12540 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 ac_status=$?
12542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543 (exit $ac_status); }; }; then
12544 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012545else
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 echo "$as_me: program exited with status $ac_status" >&5
12547echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012548sed 's/^/| /' conftest.$ac_ext >&5
12549
Martin v. Löwis11437992002-04-12 09:54:03 +000012550( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012551if test "$ac_cv_type_uintptr_t" = yes; then
12552 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012553See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012555See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556 { (exit 77); exit 77; }; }
12557 else
12558 ac_cv_sizeof_uintptr_t=0
12559 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561rm -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 +000012562fi
12563rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12566echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12567
12568
12569
Martin v. Löwis11437992002-04-12 09:54:03 +000012570cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012571#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012572_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012573
Michael W. Hudson54241132001-12-07 15:38:26 +000012574
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012575fi
12576
Martin v. Löwisebe26702006-10-02 14:55:51 +000012577
12578
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012579# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012580{ echo "$as_me:$LINENO: checking size of off_t" >&5
12581echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012582if test "${ac_cv_sizeof_off_t+set}" = set; then
12583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012584else
12585 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012586 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012587else
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* confdefs.h. */
12590_ACEOF
12591cat confdefs.h >>conftest.$ac_ext
12592cat >>conftest.$ac_ext <<_ACEOF
12593/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012594#include <stdio.h>
12595#include <sys/types.h>
12596main()
12597{
12598 FILE *f=fopen("conftestval", "w");
12599 if (!f) exit(1);
12600 fprintf(f, "%d\n", sizeof(off_t));
12601 exit(0);
12602}
Martin v. Löwis11437992002-04-12 09:54:03 +000012603_ACEOF
12604rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012605if { (ac_try="$ac_link"
12606case "(($ac_try" in
12607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12608 *) ac_try_echo=$ac_try;;
12609esac
12610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12611 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 ac_status=$?
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615 { (case "(($ac_try" in
12616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12617 *) ac_try_echo=$ac_try;;
12618esac
12619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12620 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 ac_status=$?
12622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012624 ac_cv_sizeof_off_t=`cat conftestval`
12625else
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 echo "$as_me: program exited with status $ac_status" >&5
12627echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012628sed 's/^/| /' conftest.$ac_ext >&5
12629
Martin v. Löwis11437992002-04-12 09:54:03 +000012630( exit $ac_status )
12631ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012633rm -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 +000012634fi
12635
Martin v. Löwiseba40652007-08-30 20:10:57 +000012636
12637
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012638fi
12639
Martin v. Löwiseba40652007-08-30 20:10:57 +000012640{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12641echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
12643cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012644#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012645_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012646
Michael W. Hudson54241132001-12-07 15:38:26 +000012647
Martin v. Löwiseba40652007-08-30 20:10:57 +000012648{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12649echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012650if test "$have_long_long" = yes -a \
12651 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12652 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012653
Martin v. Löwis11437992002-04-12 09:54:03 +000012654cat >>confdefs.h <<\_ACEOF
12655#define HAVE_LARGEFILE_SUPPORT 1
12656_ACEOF
12657
Martin v. Löwiseba40652007-08-30 20:10:57 +000012658 { echo "$as_me:$LINENO: result: yes" >&5
12659echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012660else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661 { echo "$as_me:$LINENO: result: no" >&5
12662echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012663fi
12664
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012665# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012666{ echo "$as_me:$LINENO: checking size of time_t" >&5
12667echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012668if test "${ac_cv_sizeof_time_t+set}" = set; then
12669 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012670else
12671 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012672 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012673else
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* confdefs.h. */
12676_ACEOF
12677cat confdefs.h >>conftest.$ac_ext
12678cat >>conftest.$ac_ext <<_ACEOF
12679/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012680#include <stdio.h>
12681#include <time.h>
12682main()
12683{
12684 FILE *f=fopen("conftestval", "w");
12685 if (!f) exit(1);
12686 fprintf(f, "%d\n", sizeof(time_t));
12687 exit(0);
12688}
Martin v. Löwis11437992002-04-12 09:54:03 +000012689_ACEOF
12690rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012691if { (ac_try="$ac_link"
12692case "(($ac_try" in
12693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12694 *) ac_try_echo=$ac_try;;
12695esac
12696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12697 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 ac_status=$?
12699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12700 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701 { (case "(($ac_try" in
12702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12703 *) ac_try_echo=$ac_try;;
12704esac
12705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12706 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 ac_status=$?
12708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012710 ac_cv_sizeof_time_t=`cat conftestval`
12711else
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 echo "$as_me: program exited with status $ac_status" >&5
12713echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012714sed 's/^/| /' conftest.$ac_ext >&5
12715
Martin v. Löwis11437992002-04-12 09:54:03 +000012716( exit $ac_status )
12717ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719rm -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 +000012720fi
12721
Martin v. Löwiseba40652007-08-30 20:10:57 +000012722
12723
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012724fi
12725
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12727echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
12729cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012730#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012731_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012732
Michael W. Hudson54241132001-12-07 15:38:26 +000012733
12734
Trent Mick635f6fb2000-08-23 21:33:05 +000012735# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012736ac_save_cc="$CC"
12737if test "$ac_cv_kpthread" = "yes"
12738then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012739elif test "$ac_cv_kthread" = "yes"
12740then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012741elif test "$ac_cv_pthread" = "yes"
12742then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012744{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12745echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012746have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* confdefs.h. */
12749_ACEOF
12750cat confdefs.h >>conftest.$ac_ext
12751cat >>conftest.$ac_ext <<_ACEOF
12752/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012753#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012754int
12755main ()
12756{
Guido van Rossum12580492000-09-24 16:47:19 +000012757pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ;
12759 return 0;
12760}
12761_ACEOF
12762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012763if { (ac_try="$ac_compile"
12764case "(($ac_try" in
12765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12766 *) ac_try_echo=$ac_try;;
12767esac
12768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012771 grep -v '^ *+' conftest.er1 >conftest.err
12772 rm -f conftest.er1
12773 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775 (exit $ac_status); } && {
12776 test -z "$ac_c_werror_flag" ||
12777 test ! -s conftest.err
12778 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012779 have_pthread_t=yes
12780else
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012782sed 's/^/| /' conftest.$ac_ext >&5
12783
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784
Trent Mick635f6fb2000-08-23 21:33:05 +000012785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012786
12787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12788{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12789echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012790if test "$have_pthread_t" = yes ; then
12791 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012792 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12793echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12795 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012796else
12797 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012798 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012799else
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 cat >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. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012806#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012807#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012808 main()
12809 {
12810 FILE *f=fopen("conftestval", "w");
12811 if (!f) exit(1);
12812 fprintf(f, "%d\n", sizeof(pthread_t));
12813 exit(0);
12814 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012815_ACEOF
12816rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817if { (ac_try="$ac_link"
12818case "(($ac_try" in
12819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12820 *) ac_try_echo=$ac_try;;
12821esac
12822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12823 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012827 { (case "(($ac_try" in
12828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12829 *) ac_try_echo=$ac_try;;
12830esac
12831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12832 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_status=$?
12834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012836 ac_cv_sizeof_pthread_t=`cat conftestval`
12837else
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 echo "$as_me: program exited with status $ac_status" >&5
12839echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012840sed 's/^/| /' conftest.$ac_ext >&5
12841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842( exit $ac_status )
12843ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845rm -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 +000012846fi
12847
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848
12849
Trent Mick635f6fb2000-08-23 21:33:05 +000012850fi
12851
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12853echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012854
12855cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012856#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012857_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012858
12859fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012860CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012861
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12863echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12864# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012865if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 enableval=$enable_toolbox_glue;
12867fi
Jack Jansene578a632001-08-15 01:27:14 +000012868
12869
12870if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012871then
Jack Jansene578a632001-08-15 01:27:14 +000012872 case $ac_sys_system/$ac_sys_release in
12873 Darwin/*)
12874 enable_toolbox_glue="yes";;
12875 *)
12876 enable_toolbox_glue="no";;
12877 esac
12878fi
12879case "$enable_toolbox_glue" in
12880yes)
Jack Jansene578a632001-08-15 01:27:14 +000012881 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012882 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
12884cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012885#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012886_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012887
12888 ;;
12889*)
Jack Jansene578a632001-08-15 01:27:14 +000012890 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012891 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012892 ;;
12893esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12895echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012896
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012897
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012898
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012899case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012900 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012901 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12902 ;;
12903 Darwin/*)
12904 OTHER_LIBTOOL_OPT=""
12905 ;;
12906esac
12907
12908
12909case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012910 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012911 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12912 if test "${enable_universalsdk}"; then
12913 :
12914 else
12915 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12916 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012917 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012918 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012919 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012920 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12921 if test ${gcc_version} '<' 4.0
12922 then
12923 LIBTOOL_CRUFT="-lcc_dynamic"
12924 else
12925 LIBTOOL_CRUFT=""
12926 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012927 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012928 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012929 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012930esac
12931
Martin v. Löwiseba40652007-08-30 20:10:57 +000012932{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12933echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012934if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012935then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012936 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012938 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940cat >>confdefs.h <<\_ACEOF
12941#define WITH_NEXT_FRAMEWORK 1
12942_ACEOF
12943
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944 { echo "$as_me:$LINENO: result: yes" >&5
12945echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012946else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947 { echo "$as_me:$LINENO: result: no" >&5
12948echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012949fi
12950
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951{ echo "$as_me:$LINENO: checking for dyld" >&5
12952echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012953case $ac_sys_system/$ac_sys_release in
12954 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012955
Martin v. Löwis11437992002-04-12 09:54:03 +000012956cat >>confdefs.h <<\_ACEOF
12957#define WITH_DYLD 1
12958_ACEOF
12959
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12961echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012962 ;;
12963 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012964 { echo "$as_me:$LINENO: result: no" >&5
12965echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012966 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012967esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012968
Guido van Rossum0a516c91994-09-12 10:58:40 +000012969# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012970
Michael W. Hudson54241132001-12-07 15:38:26 +000012971
12972
12973
12974
Guido van Rossum0a516c91994-09-12 10:58:40 +000012975# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012976# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977{ echo "$as_me:$LINENO: checking SO" >&5
12978echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012979if test -z "$SO"
12980then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012981 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012982 hp*|HP*)
12983 case `uname -m` in
12984 ia64) SO=.so;;
12985 *) SO=.sl;;
12986 esac
12987 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012988 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012989 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012990 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012991else
12992 # this might also be a termcap variable, see #610332
12993 echo
12994 echo '====================================================================='
12995 echo '+ +'
12996 echo '+ WARNING: You have set SO in your environment. +'
12997 echo '+ Do you really mean to change the extension for shared libraries? +'
12998 echo '+ Continuing in 10 seconds to let you to ponder. +'
12999 echo '+ +'
13000 echo '====================================================================='
13001 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013003{ echo "$as_me:$LINENO: result: $SO" >&5
13004echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013005
13006cat >>confdefs.h <<_ACEOF
13007#define SHLIB_EXT "$SO"
13008_ACEOF
13009
Guido van Rossum0a516c91994-09-12 10:58:40 +000013010# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013011# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013012# (Shared libraries in this instance are shared modules to be loaded into
13013# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13015echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013016if test -z "$LDSHARED"
13017then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013019 AIX*)
13020 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013021 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013022 ;;
13023 BeOS*)
13024 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013025 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013026 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013027 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013028 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013030 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013031 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013032 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013033 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013034 hp*|HP*)
13035 if test "$GCC" = "yes"
13036 then LDSHARED='$(CC) -shared'
13037 else LDSHARED='ld -b';
13038 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013039 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013040 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013041 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13042 if test "$enable_framework" ; then
13043 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013044 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13045 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013046 else
13047 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013048 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013049 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013050 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013051 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13052 if test "$enable_framework" ; then
13053 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013054 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13055 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013056 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013057 # No framework, use the Python app as bundle-loader
13058 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013059 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013060 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013061 Darwin/*)
13062 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13063 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013064
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013065 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013066 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013067 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013068 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013069 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013070 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13071 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013072 else
13073 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13074 if test "$enable_framework" ; then
13075 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013076 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13077 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013078 else
13079 # No framework, use the Python app as bundle-loader
13080 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13081 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13082 fi
13083 fi
13084 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013085 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013086 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013087 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013088 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013089 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013090 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013091 else
13092 LDSHARED="ld -Bshareable ${LDFLAGS}"
13093 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013094 OpenBSD*)
13095 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13096 then
13097 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13098 else
13099 case `uname -r` in
13100 [01].* | 2.[0-7] | 2.[0-7].*)
13101 LDSHARED="ld -Bshareable ${LDFLAGS}"
13102 ;;
13103 *)
13104 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13105 ;;
13106 esac
13107 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013108 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013109 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013110 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013111 then LDSHARED='$(CC) -shared'
13112 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013113 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013114 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013115 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013116 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013117 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013118 *) LDSHARED="ld";;
13119 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13122echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013123BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013124# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013125# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013126{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13127echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013128if test -z "$CCSHARED"
13129then
Guido van Rossum07397971997-04-29 21:49:50 +000013130 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013131 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013132 then CCSHARED="-fPIC";
13133 elif test `uname -p` = sparc;
13134 then CCSHARED="-xcode=pic32";
13135 else CCSHARED="-Kpic";
13136 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013137 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013138 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013139 else CCSHARED="+z";
13140 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013141 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013142 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013143 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013144 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013145 if test "$GCC" = "yes"
13146 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013147 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013148 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013149 SCO_SV*)
13150 if test "$GCC" = "yes"
13151 then CCSHARED="-fPIC"
13152 else CCSHARED="-Kpic -belf"
13153 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013154 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013155 IRIX*/6*) case $CC in
13156 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013157 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013158 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013159 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013160 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013162{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13163echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013164# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013165# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013166{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13167echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013168if test -z "$LINKFORSHARED"
13169then
Guido van Rossum07397971997-04-29 21:49:50 +000013170 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013171 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013172 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013173 LINKFORSHARED="-Wl,-E -Wl,+s";;
13174# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013175 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013176 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013177 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013179 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13180 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013181 # not used by the core itself but which needs to be in the core so
13182 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013183 # -prebind is no longer used, because it actually seems to give a
13184 # slowdown in stead of a speedup, maybe due to the large number of
13185 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013186
13187 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013188 if test "$enable_framework"
13189 then
Jack Jansenda49e192005-01-07 13:08:22 +000013190 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013191 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013192 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013193 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013194 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013195 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013196 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013197 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13198 then
13199 LINKFORSHARED="-Wl,--export-dynamic"
13200 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013201 SunOS/5*) case $CC in
13202 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013203 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013204 then
13205 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013206 fi;;
13207 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013208 CYGWIN*)
13209 if test $enable_shared = "no"
13210 then
13211 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13212 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013213 QNX*)
13214 # -Wl,-E causes the symbols to be added to the dynamic
13215 # symbol table so that they can be found when a module
13216 # is loaded. -N 2048K causes the stack size to be set
13217 # to 2048 kilobytes so that the stack doesn't overflow
13218 # when running test_compile.py.
13219 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013220 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013222{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13223echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013224
Michael W. Hudson54241132001-12-07 15:38:26 +000013225
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013226
Martin v. Löwiseba40652007-08-30 20:10:57 +000013227{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13228echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013229if test ! "$LIBRARY" = "$LDLIBRARY"
13230then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013231 case $ac_sys_system in
13232 CYGWIN*)
13233 # Cygwin needs CCSHARED when building extension DLLs
13234 # but not when building the interpreter DLL.
13235 CFLAGSFORSHARED='';;
13236 *)
13237 CFLAGSFORSHARED='$(CCSHARED)'
13238 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013240{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13241echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013242
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013243# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13244# library (with --enable-shared).
13245# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013246# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13247# if it is not required, since it creates a dependency of the shared library
13248# to LIBS. This, in turn, means that applications linking the shared libpython
13249# don't need to link LIBS explicitly. The default should be only changed
13250# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013251
Martin v. Löwiseba40652007-08-30 20:10:57 +000013252{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13253echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013254case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013255 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013256 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013257esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013258{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13259echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013260
13261
Guido van Rossum627b2d71993-12-24 10:39:16 +000013262# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Martin v. Löwiseba40652007-08-30 20:10:57 +000013264{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13265echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013266if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268else
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013270LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013272/* confdefs.h. */
13273_ACEOF
13274cat confdefs.h >>conftest.$ac_ext
13275cat >>conftest.$ac_ext <<_ACEOF
13276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013277
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278/* Override any GCC internal prototype to avoid an error.
13279 Use char because int might match the return type of a GCC
13280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013281#ifdef __cplusplus
13282extern "C"
13283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013284char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013288return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ;
13290 return 0;
13291}
13292_ACEOF
13293rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013294if { (ac_try="$ac_link"
13295case "(($ac_try" in
13296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13297 *) ac_try_echo=$ac_try;;
13298esac
13299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013302 grep -v '^ *+' conftest.er1 >conftest.err
13303 rm -f conftest.er1
13304 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306 (exit $ac_status); } && {
13307 test -z "$ac_c_werror_flag" ||
13308 test ! -s conftest.err
13309 } && test -s conftest$ac_exeext &&
13310 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013312else
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013314sed 's/^/| /' conftest.$ac_ext >&5
13315
Martin v. Löwiseba40652007-08-30 20:10:57 +000013316 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013318
13319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013321LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013323{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13324echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013325if test $ac_cv_lib_dl_dlopen = yes; then
13326 cat >>confdefs.h <<_ACEOF
13327#define HAVE_LIBDL 1
13328_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013330 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332fi
13333 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Martin v. Löwiseba40652007-08-30 20:10:57 +000013335{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13336echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013337if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013339else
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013341LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013343/* confdefs.h. */
13344_ACEOF
13345cat confdefs.h >>conftest.$ac_ext
13346cat >>conftest.$ac_ext <<_ACEOF
13347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Martin v. Löwiseba40652007-08-30 20:10:57 +000013349/* Override any GCC internal prototype to avoid an error.
13350 Use char because int might match the return type of a GCC
13351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013352#ifdef __cplusplus
13353extern "C"
13354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013355char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013356int
13357main ()
13358{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 ;
13361 return 0;
13362}
13363_ACEOF
13364rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365if { (ac_try="$ac_link"
13366case "(($ac_try" in
13367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13368 *) ac_try_echo=$ac_try;;
13369esac
13370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13371 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013373 grep -v '^ *+' conftest.er1 >conftest.err
13374 rm -f conftest.er1
13375 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013377 (exit $ac_status); } && {
13378 test -z "$ac_c_werror_flag" ||
13379 test ! -s conftest.err
13380 } && test -s conftest$ac_exeext &&
13381 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383else
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013385sed 's/^/| /' conftest.$ac_ext >&5
13386
Martin v. Löwiseba40652007-08-30 20:10:57 +000013387 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013389
13390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013392LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13395echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013396if test $ac_cv_lib_dld_shl_load = yes; then
13397 cat >>confdefs.h <<_ACEOF
13398#define HAVE_LIBDLD 1
13399_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013400
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013401 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013402
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403fi
13404 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013405
13406# only check for sem_ini if thread support is requested
13407if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013408 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13409echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013410if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013412else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013413 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* confdefs.h. */
13416_ACEOF
13417cat confdefs.h >>conftest.$ac_ext
13418cat >>conftest.$ac_ext <<_ACEOF
13419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421/* Override any GCC internal prototype to avoid an error.
13422 Use char because int might match the return type of a GCC
13423 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013424#ifdef __cplusplus
13425extern "C"
13426#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013427char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013428int
13429main ()
13430{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 ;
13433 return 0;
13434}
13435_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013436for ac_lib in '' pthread rt posix4; do
13437 if test -z "$ac_lib"; then
13438 ac_res="none required"
13439 else
13440 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013441 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013442 fi
13443 rm -f conftest.$ac_objext conftest$ac_exeext
13444if { (ac_try="$ac_link"
13445case "(($ac_try" in
13446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13447 *) ac_try_echo=$ac_try;;
13448esac
13449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13450 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013451 ac_status=$?
13452 grep -v '^ *+' conftest.er1 >conftest.err
13453 rm -f conftest.er1
13454 cat conftest.err >&5
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013456 (exit $ac_status); } && {
13457 test -z "$ac_c_werror_flag" ||
13458 test ! -s conftest.err
13459 } && test -s conftest$ac_exeext &&
13460 $as_test_x conftest$ac_exeext; then
13461 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013462else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013463 echo "$as_me: failed program was:" >&5
13464sed 's/^/| /' conftest.$ac_ext >&5
13465
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466
Brett Cannon19fab762007-06-02 03:02:29 +000013467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468
13469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13470 conftest$ac_exeext
13471 if test "${ac_cv_search_sem_init+set}" = set; then
13472 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013474done
13475if test "${ac_cv_search_sem_init+set}" = set; then
13476 :
13477else
13478 ac_cv_search_sem_init=no
13479fi
13480rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013481LIBS=$ac_func_search_save_LIBS
13482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013483{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13484echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13485ac_res=$ac_cv_search_sem_init
13486if test "$ac_res" != no; then
13487 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013488
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013489fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013490 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013491 # posix4 on Solaris 2.6
13492 # pthread (first!) on Linux
13493fi
13494
Martin v. Löwis19d17342003-06-14 21:03:05 +000013495# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013496{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13497echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013498if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13499 echo $ECHO_N "(cached) $ECHO_C" >&6
13500else
13501 ac_check_lib_save_LIBS=$LIBS
13502LIBS="-lintl $LIBS"
13503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* confdefs.h. */
13505_ACEOF
13506cat confdefs.h >>conftest.$ac_ext
13507cat >>conftest.$ac_ext <<_ACEOF
13508/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013509
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510/* Override any GCC internal prototype to avoid an error.
13511 Use char because int might match the return type of a GCC
13512 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013513#ifdef __cplusplus
13514extern "C"
13515#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013516char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013517int
13518main ()
13519{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013521 ;
13522 return 0;
13523}
13524_ACEOF
13525rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013526if { (ac_try="$ac_link"
13527case "(($ac_try" in
13528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13529 *) ac_try_echo=$ac_try;;
13530esac
13531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13532 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013534 grep -v '^ *+' conftest.er1 >conftest.err
13535 rm -f conftest.er1
13536 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013538 (exit $ac_status); } && {
13539 test -z "$ac_c_werror_flag" ||
13540 test ! -s conftest.err
13541 } && test -s conftest$ac_exeext &&
13542 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013543 ac_cv_lib_intl_textdomain=yes
13544else
13545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013546sed 's/^/| /' conftest.$ac_ext >&5
13547
Martin v. Löwiseba40652007-08-30 20:10:57 +000013548 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013550
13551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013553LIBS=$ac_check_lib_save_LIBS
13554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013555{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13556echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013557if test $ac_cv_lib_intl_textdomain = yes; then
13558
13559cat >>confdefs.h <<\_ACEOF
13560#define WITH_LIBINTL 1
13561_ACEOF
13562
13563fi
13564
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013565
13566# checks for system dependent C++ extensions support
13567case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013568 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13569echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013571/* confdefs.h. */
13572_ACEOF
13573cat confdefs.h >>conftest.$ac_ext
13574cat >>conftest.$ac_ext <<_ACEOF
13575/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013576#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013577int
13578main ()
13579{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013580loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 ;
13582 return 0;
13583}
13584_ACEOF
13585rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586if { (ac_try="$ac_link"
13587case "(($ac_try" in
13588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13589 *) ac_try_echo=$ac_try;;
13590esac
13591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013594 grep -v '^ *+' conftest.er1 >conftest.err
13595 rm -f conftest.er1
13596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598 (exit $ac_status); } && {
13599 test -z "$ac_c_werror_flag" ||
13600 test ! -s conftest.err
13601 } && test -s conftest$ac_exeext &&
13602 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604cat >>confdefs.h <<\_ACEOF
13605#define AIX_GENUINE_CPLUSPLUS 1
13606_ACEOF
13607
Martin v. Löwiseba40652007-08-30 20:10:57 +000013608 { echo "$as_me:$LINENO: result: yes" >&5
13609echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013610else
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013612sed 's/^/| /' conftest.$ac_ext >&5
13613
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614 { echo "$as_me:$LINENO: result: no" >&5
13615echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013617
13618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013619 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013620 *) ;;
13621esac
13622
Guido van Rossum70c7f481998-03-26 18:44:10 +000013623# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013624# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13626echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013627if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13628 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013629else
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013631LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013633/* confdefs.h. */
13634_ACEOF
13635cat confdefs.h >>conftest.$ac_ext
13636cat >>conftest.$ac_ext <<_ACEOF
13637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013638
Martin v. Löwiseba40652007-08-30 20:10:57 +000013639/* Override any GCC internal prototype to avoid an error.
13640 Use char because int might match the return type of a GCC
13641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013642#ifdef __cplusplus
13643extern "C"
13644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013645char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013646int
13647main ()
13648{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013649return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013650 ;
13651 return 0;
13652}
13653_ACEOF
13654rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013655if { (ac_try="$ac_link"
13656case "(($ac_try" in
13657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13658 *) ac_try_echo=$ac_try;;
13659esac
13660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13661 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013663 grep -v '^ *+' conftest.er1 >conftest.err
13664 rm -f conftest.er1
13665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013667 (exit $ac_status); } && {
13668 test -z "$ac_c_werror_flag" ||
13669 test ! -s conftest.err
13670 } && test -s conftest$ac_exeext &&
13671 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013673else
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013675sed 's/^/| /' conftest.$ac_ext >&5
13676
Martin v. Löwiseba40652007-08-30 20:10:57 +000013677 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013679
13680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013684{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13685echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013686if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013687 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013688fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013689 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13691echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013692if test "${ac_cv_lib_socket_socket+set}" = set; then
13693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694else
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013696LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013698/* confdefs.h. */
13699_ACEOF
13700cat confdefs.h >>conftest.$ac_ext
13701cat >>conftest.$ac_ext <<_ACEOF
13702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
Martin v. Löwiseba40652007-08-30 20:10:57 +000013704/* Override any GCC internal prototype to avoid an error.
13705 Use char because int might match the return type of a GCC
13706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013707#ifdef __cplusplus
13708extern "C"
13709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013710char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013711int
13712main ()
13713{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ;
13716 return 0;
13717}
13718_ACEOF
13719rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013720if { (ac_try="$ac_link"
13721case "(($ac_try" in
13722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13723 *) ac_try_echo=$ac_try;;
13724esac
13725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13726 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013728 grep -v '^ *+' conftest.er1 >conftest.err
13729 rm -f conftest.er1
13730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013732 (exit $ac_status); } && {
13733 test -z "$ac_c_werror_flag" ||
13734 test ! -s conftest.err
13735 } && test -s conftest$ac_exeext &&
13736 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013738else
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013740sed 's/^/| /' conftest.$ac_ext >&5
13741
Martin v. Löwiseba40652007-08-30 20:10:57 +000013742 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013744
13745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013747LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013749{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13750echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013751if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013752 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013753fi
13754 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013755
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013756case "$ac_sys_system" in
13757BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13759echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013760if test "${ac_cv_lib_net_socket+set}" = set; then
13761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013762else
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013764LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013766/* confdefs.h. */
13767_ACEOF
13768cat confdefs.h >>conftest.$ac_ext
13769cat >>conftest.$ac_ext <<_ACEOF
13770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013771
Martin v. Löwiseba40652007-08-30 20:10:57 +000013772/* Override any GCC internal prototype to avoid an error.
13773 Use char because int might match the return type of a GCC
13774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013775#ifdef __cplusplus
13776extern "C"
13777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013778char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013779int
13780main ()
13781{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013782return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
13785}
13786_ACEOF
13787rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788if { (ac_try="$ac_link"
13789case "(($ac_try" in
13790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13791 *) ac_try_echo=$ac_try;;
13792esac
13793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13794 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013796 grep -v '^ *+' conftest.er1 >conftest.err
13797 rm -f conftest.er1
13798 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013800 (exit $ac_status); } && {
13801 test -z "$ac_c_werror_flag" ||
13802 test ! -s conftest.err
13803 } && test -s conftest$ac_exeext &&
13804 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013806else
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013808sed 's/^/| /' conftest.$ac_ext >&5
13809
Martin v. Löwiseba40652007-08-30 20:10:57 +000013810 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812
13813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013815LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13818echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013819if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013820 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013821fi
13822 # BeOS
13823;;
13824esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013825
Martin v. Löwiseba40652007-08-30 20:10:57 +000013826{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13827echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013830if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831 withval=$with_libs;
13832{ echo "$as_me:$LINENO: result: $withval" >&5
13833echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013834LIBS="$withval $LIBS"
13835
13836else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013837 { echo "$as_me:$LINENO: result: no" >&5
13838echo "${ECHO_T}no" >&6; }
13839fi
13840
Guido van Rossum7f43da71994-08-01 12:15:30 +000013841
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013842# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013843{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13844echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013845
Martin v. Löwiseba40652007-08-30 20:10:57 +000013846# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013847if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013848 withval=$with_system_ffi;
13849fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013850
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013851
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13853echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013854
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013855# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013856
13857
Martin v. Löwiseba40652007-08-30 20:10:57 +000013858{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13859echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013862if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863 withval=$with_signal_module;
13864fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013865
13866
13867if test -z "$with_signal_module"
13868then with_signal_module="yes"
13869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13871echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013872
13873if test "${with_signal_module}" = "yes"; then
13874 USE_SIGNAL_MODULE=""
13875 SIGNAL_OBJS=""
13876else
13877 USE_SIGNAL_MODULE="#"
13878 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13879fi
13880
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013881# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013882
Barry Warsawc0d24d82000-06-29 16:12:00 +000013883USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013884
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13886echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
Guido van Rossumec2f0731997-01-22 20:54:01 +000013888
Martin v. Löwiseba40652007-08-30 20:10:57 +000013889# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013890if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 withval=$with_dec_threads;
13892{ echo "$as_me:$LINENO: result: $withval" >&5
13893echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013894LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013895if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013896 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013897fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013898else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899 { echo "$as_me:$LINENO: result: no" >&5
13900echo "${ECHO_T}no" >&6; }
13901fi
13902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903
13904# Templates for things AC_DEFINEd more than once.
13905# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013906
13907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
13909
13910
13911
13912
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13914echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013915
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013917if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918 withval=$with_threads;
13919fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013920
13921
Barry Warsawc0d24d82000-06-29 16:12:00 +000013922# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013925if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926 withval=$with_thread; with_threads=$with_thread
13927fi
13928
Barry Warsawc0d24d82000-06-29 16:12:00 +000013929
13930if test -z "$with_threads"
13931then with_threads="yes"
13932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933{ echo "$as_me:$LINENO: result: $with_threads" >&5
13934echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013935
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013936
Barry Warsawc0d24d82000-06-29 16:12:00 +000013937if test "$with_threads" = "no"
13938then
13939 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013940elif test "$ac_cv_pthread_is_default" = yes
13941then
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013943#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013944_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013945
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013946 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013948#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013949_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013950
13951 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013953elif test "$ac_cv_kpthread" = "yes"
13954then
13955 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013956 if test "$ac_cv_cxx_thread" = "yes"; then
13957 CXX="$CXX -Kpthread"
13958 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013960#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013961_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013962
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013963 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013964 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013965elif test "$ac_cv_kthread" = "yes"
13966then
13967 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013968 if test "$ac_cv_cxx_thread" = "yes"; then
13969 CXX="$CXX -Kthread"
13970 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013971 cat >>confdefs.h <<\_ACEOF
13972#define WITH_THREAD 1
13973_ACEOF
13974
13975 posix_threads=yes
13976 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013977elif test "$ac_cv_pthread" = "yes"
13978then
13979 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013980 if test "$ac_cv_cxx_thread" = "yes"; then
13981 CXX="$CXX -pthread"
13982 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013983 cat >>confdefs.h <<\_ACEOF
13984#define WITH_THREAD 1
13985_ACEOF
13986
13987 posix_threads=yes
13988 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013989else
13990 if test ! -z "$with_threads" -a -d "$with_threads"
13991 then LDFLAGS="$LDFLAGS -L$with_threads"
13992 fi
13993 if test ! -z "$withval" -a -d "$withval"
13994 then LDFLAGS="$LDFLAGS -L$withval"
13995 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013996
13997 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013998 # define _POSIX_THREADS in unistd.h. Some apparently don't
13999 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14001echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* confdefs.h. */
14004_ACEOF
14005cat confdefs.h >>conftest.$ac_ext
14006cat >>conftest.$ac_ext <<_ACEOF
14007/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014008
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014009#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014010#ifdef _POSIX_THREADS
14011yes
14012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014016 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014017 unistd_defines_pthreads=yes
14018else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014019 unistd_defines_pthreads=no
14020fi
14021rm -f conftest*
14022
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14024echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014025
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014027#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014028_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014031 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14032echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014033if test "${ac_cv_header_cthreads_h+set}" = set; then
14034 echo $ECHO_N "(cached) $ECHO_C" >&6
14035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014036{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14037echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014038else
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014040{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14041echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014043/* confdefs.h. */
14044_ACEOF
14045cat confdefs.h >>conftest.$ac_ext
14046cat >>conftest.$ac_ext <<_ACEOF
14047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014048$ac_includes_default
14049#include <cthreads.h>
14050_ACEOF
14051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014052if { (ac_try="$ac_compile"
14053case "(($ac_try" in
14054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14055 *) ac_try_echo=$ac_try;;
14056esac
14057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014060 grep -v '^ *+' conftest.er1 >conftest.err
14061 rm -f conftest.er1
14062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064 (exit $ac_status); } && {
14065 test -z "$ac_c_werror_flag" ||
14066 test ! -s conftest.err
14067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ac_header_compiler=yes
14069else
14070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014071sed 's/^/| /' conftest.$ac_ext >&5
14072
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075
14076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14077{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14078echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014081{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14082echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014084/* confdefs.h. */
14085_ACEOF
14086cat confdefs.h >>conftest.$ac_ext
14087cat >>conftest.$ac_ext <<_ACEOF
14088/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014089#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014090_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091if { (ac_try="$ac_cpp conftest.$ac_ext"
14092case "(($ac_try" in
14093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14094 *) ac_try_echo=$ac_try;;
14095esac
14096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014098 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014099 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 rm -f conftest.er1
14101 cat conftest.err >&5
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103 (exit $ac_status); } >/dev/null && {
14104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14105 test ! -s conftest.err
14106 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 ac_header_preproc=yes
14108else
14109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014110sed 's/^/| /' conftest.$ac_ext >&5
14111
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014114
Martin v. Löwis11437992002-04-12 09:54:03 +000014115rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014116{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14117echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
14119# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14121 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14123echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014124 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14125echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14126 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014127 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014128 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14130echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014131 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14132echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14133 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14134echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14135 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14136echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014137 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14138echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014139 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14140echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014141 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014142## ------------------------------------------------ ##
14143## Report this to http://www.python.org/python-bugs ##
14144## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014145_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014147 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014148esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014149{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14150echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014151if test "${ac_cv_header_cthreads_h+set}" = set; then
14152 echo $ECHO_N "(cached) $ECHO_C" >&6
14153else
14154 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014156{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14157echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
14159fi
14160if test $ac_cv_header_cthreads_h = yes; then
14161 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014162#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014163_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014164
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014166#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014167_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
14170cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014171#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014172_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014173
14174 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014175 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014176else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014177
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014179 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14180echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014181if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14182 echo $ECHO_N "(cached) $ECHO_C" >&6
14183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014184{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14185echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014186else
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14189echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014191/* confdefs.h. */
14192_ACEOF
14193cat confdefs.h >>conftest.$ac_ext
14194cat >>conftest.$ac_ext <<_ACEOF
14195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014196$ac_includes_default
14197#include <mach/cthreads.h>
14198_ACEOF
14199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014200if { (ac_try="$ac_compile"
14201case "(($ac_try" in
14202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14203 *) ac_try_echo=$ac_try;;
14204esac
14205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014208 grep -v '^ *+' conftest.er1 >conftest.err
14209 rm -f conftest.er1
14210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212 (exit $ac_status); } && {
14213 test -z "$ac_c_werror_flag" ||
14214 test ! -s conftest.err
14215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 ac_header_compiler=yes
14217else
14218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014219sed 's/^/| /' conftest.$ac_ext >&5
14220
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223
14224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14225{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14226echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014227
14228# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014229{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14230echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014231cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014232/* confdefs.h. */
14233_ACEOF
14234cat confdefs.h >>conftest.$ac_ext
14235cat >>conftest.$ac_ext <<_ACEOF
14236/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014237#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014238_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239if { (ac_try="$ac_cpp conftest.$ac_ext"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
14244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14245 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014247 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 rm -f conftest.er1
14249 cat conftest.err >&5
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014251 (exit $ac_status); } >/dev/null && {
14252 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 ac_header_preproc=yes
14256else
14257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014258sed 's/^/| /' conftest.$ac_ext >&5
14259
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014262
Martin v. Löwis11437992002-04-12 09:54:03 +000014263rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14265echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
14267# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014268case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14269 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14271echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014272 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14273echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14274 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014275 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014276 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014277 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14278echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014279 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14280echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14281 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14282echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14283 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14284echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014285 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14286echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014287 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14288echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014289 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014290## ------------------------------------------------ ##
14291## Report this to http://www.python.org/python-bugs ##
14292## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014293_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014294 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014295 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014296esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014297{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14298echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014299if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14300 echo $ECHO_N "(cached) $ECHO_C" >&6
14301else
14302 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014304{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14305echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014306
14307fi
14308if test $ac_cv_header_mach_cthreads_h = yes; then
14309 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014310#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014312
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014314#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014315_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
14318cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014319#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014320_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014321
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014322 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014323else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014324
Martin v. Löwiseba40652007-08-30 20:10:57 +000014325 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14326echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014327
Martin v. Löwiseba40652007-08-30 20:10:57 +000014328# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014329if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14331echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014332 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014333#define WITH_THREAD 1
14334_ACEOF
14335
14336
14337cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014338#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014339_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014340
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014341 LIBS="-lpth $LIBS"
14342 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014343else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014344 { echo "$as_me:$LINENO: result: no" >&5
14345echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014346
14347 # Just looking for pthread_create in libpthread is not enough:
14348 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14349 # So we really have to include pthread.h, and then link.
14350 _libs=$LIBS
14351 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14353echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014355/* confdefs.h. */
14356_ACEOF
14357cat confdefs.h >>conftest.$ac_ext
14358cat >>conftest.$ac_ext <<_ACEOF
14359/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014360#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014361
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014362void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014363int
14364main ()
14365{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014366
14367pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 ;
14369 return 0;
14370}
14371_ACEOF
14372rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014373if { (ac_try="$ac_link"
14374case "(($ac_try" in
14375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14376 *) ac_try_echo=$ac_try;;
14377esac
14378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014381 grep -v '^ *+' conftest.er1 >conftest.err
14382 rm -f conftest.er1
14383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385 (exit $ac_status); } && {
14386 test -z "$ac_c_werror_flag" ||
14387 test ! -s conftest.err
14388 } && test -s conftest$ac_exeext &&
14389 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391 { echo "$as_me:$LINENO: result: yes" >&5
14392echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014394#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014395_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014396
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014398 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014399else
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014401sed 's/^/| /' conftest.$ac_ext >&5
14402
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014404 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14406echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014407if test "${ac_cv_func_pthread_detach+set}" = set; then
14408 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014409else
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014411/* confdefs.h. */
14412_ACEOF
14413cat confdefs.h >>conftest.$ac_ext
14414cat >>conftest.$ac_ext <<_ACEOF
14415/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014416/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14417 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14418#define pthread_detach innocuous_pthread_detach
14419
Guido van Rossumad678af1998-10-02 14:42:15 +000014420/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014421 which can conflict with char pthread_detach (); below.
14422 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014423 <limits.h> exists even on freestanding compilers. */
14424
14425#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014426# include <limits.h>
14427#else
14428# include <assert.h>
14429#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014430
14431#undef pthread_detach
14432
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433/* Override any GCC internal prototype to avoid an error.
14434 Use char because int might match the return type of a GCC
14435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014436#ifdef __cplusplus
14437extern "C"
14438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014439char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014440/* The GNU C library defines this for functions which it implements
14441 to always fail with ENOSYS. Some functions are actually named
14442 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014443#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014444choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014445#endif
14446
Skip Montanaro6dead952003-09-25 14:50:04 +000014447int
14448main ()
14449{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014450return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 ;
14452 return 0;
14453}
14454_ACEOF
14455rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456if { (ac_try="$ac_link"
14457case "(($ac_try" in
14458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14459 *) ac_try_echo=$ac_try;;
14460esac
14461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14462 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014464 grep -v '^ *+' conftest.er1 >conftest.err
14465 rm -f conftest.er1
14466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014468 (exit $ac_status); } && {
14469 test -z "$ac_c_werror_flag" ||
14470 test ! -s conftest.err
14471 } && test -s conftest$ac_exeext &&
14472 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014474else
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014476sed 's/^/| /' conftest.$ac_ext >&5
14477
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480
14481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014482 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014484{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14485echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014486if test $ac_cv_func_pthread_detach = yes; then
14487 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014488#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014490
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014491 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014492 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014493else
Guido van Rossumad678af1998-10-02 14:42:15 +000014494
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014495 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14497echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014498if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14499 echo $ECHO_N "(cached) $ECHO_C" >&6
14500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014501{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14502echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014503else
14504 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014505{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14506echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014508/* confdefs.h. */
14509_ACEOF
14510cat confdefs.h >>conftest.$ac_ext
14511cat >>conftest.$ac_ext <<_ACEOF
14512/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014513$ac_includes_default
14514#include <atheos/threads.h>
14515_ACEOF
14516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517if { (ac_try="$ac_compile"
14518case "(($ac_try" in
14519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14520 *) ac_try_echo=$ac_try;;
14521esac
14522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014525 grep -v '^ *+' conftest.er1 >conftest.err
14526 rm -f conftest.er1
14527 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014529 (exit $ac_status); } && {
14530 test -z "$ac_c_werror_flag" ||
14531 test ! -s conftest.err
14532 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014533 ac_header_compiler=yes
14534else
14535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014536sed 's/^/| /' conftest.$ac_ext >&5
14537
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014540
14541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14542{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14543echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014544
14545# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14547echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014549/* confdefs.h. */
14550_ACEOF
14551cat confdefs.h >>conftest.$ac_ext
14552cat >>conftest.$ac_ext <<_ACEOF
14553/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014554#include <atheos/threads.h>
14555_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014556if { (ac_try="$ac_cpp conftest.$ac_ext"
14557case "(($ac_try" in
14558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14559 *) ac_try_echo=$ac_try;;
14560esac
14561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014563 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014564 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014565 rm -f conftest.er1
14566 cat conftest.err >&5
14567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568 (exit $ac_status); } >/dev/null && {
14569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14570 test ! -s conftest.err
14571 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014572 ac_header_preproc=yes
14573else
14574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014575sed 's/^/| /' conftest.$ac_ext >&5
14576
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014577 ac_header_preproc=no
14578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014580rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14582echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014583
14584# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014585case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14586 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014587 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14588echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014589 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14590echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14591 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014592 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014593 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014594 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14595echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014596 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14597echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14598 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14599echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14600 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14601echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014602 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14603echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014604 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14605echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014607## ------------------------------------------------ ##
14608## Report this to http://www.python.org/python-bugs ##
14609## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014610_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014611 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014612 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014613esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14615echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014616if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14617 echo $ECHO_N "(cached) $ECHO_C" >&6
14618else
14619 ac_cv_header_atheos_threads_h=$ac_header_preproc
14620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14622echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014623
14624fi
14625if test $ac_cv_header_atheos_threads_h = yes; then
14626 cat >>confdefs.h <<\_ACEOF
14627#define WITH_THREAD 1
14628_ACEOF
14629
14630
14631cat >>confdefs.h <<\_ACEOF
14632#define ATHEOS_THREADS 1
14633_ACEOF
14634
14635 THREADOBJ="Python/thread.o"
14636else
14637
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014639 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14640echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014641if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14642 echo $ECHO_N "(cached) $ECHO_C" >&6
14643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014644{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14645echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014646else
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14649echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014651/* confdefs.h. */
14652_ACEOF
14653cat confdefs.h >>conftest.$ac_ext
14654cat >>conftest.$ac_ext <<_ACEOF
14655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014656$ac_includes_default
14657#include <kernel/OS.h>
14658_ACEOF
14659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660if { (ac_try="$ac_compile"
14661case "(($ac_try" in
14662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14663 *) ac_try_echo=$ac_try;;
14664esac
14665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014668 grep -v '^ *+' conftest.er1 >conftest.err
14669 rm -f conftest.er1
14670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014672 (exit $ac_status); } && {
14673 test -z "$ac_c_werror_flag" ||
14674 test ! -s conftest.err
14675 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 ac_header_compiler=yes
14677else
14678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014679sed 's/^/| /' conftest.$ac_ext >&5
14680
Martin v. Löwiseba40652007-08-30 20:10:57 +000014681 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014683
14684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14686echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014687
14688# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014689{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14690echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014692/* confdefs.h. */
14693_ACEOF
14694cat confdefs.h >>conftest.$ac_ext
14695cat >>conftest.$ac_ext <<_ACEOF
14696/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014697#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014698_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014699if { (ac_try="$ac_cpp conftest.$ac_ext"
14700case "(($ac_try" in
14701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14702 *) ac_try_echo=$ac_try;;
14703esac
14704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14705 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014707 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 rm -f conftest.er1
14709 cat conftest.err >&5
14710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014711 (exit $ac_status); } >/dev/null && {
14712 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14713 test ! -s conftest.err
14714 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 ac_header_preproc=yes
14716else
14717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014718sed 's/^/| /' conftest.$ac_ext >&5
14719
Martin v. Löwis11437992002-04-12 09:54:03 +000014720 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014722
Martin v. Löwis11437992002-04-12 09:54:03 +000014723rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14725echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014728case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14729 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14731echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014732 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14733echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14734 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014735 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014736 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014737 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14738echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014739 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14740echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14741 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14742echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14743 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14744echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014745 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14746echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014747 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14748echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014749 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014750## ------------------------------------------------ ##
14751## Report this to http://www.python.org/python-bugs ##
14752## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014753_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014754 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014755 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014756esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014757{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14758echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014759if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14760 echo $ECHO_N "(cached) $ECHO_C" >&6
14761else
14762 ac_cv_header_kernel_OS_h=$ac_header_preproc
14763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014764{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14765echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014766
14767fi
14768if test $ac_cv_header_kernel_OS_h = yes; then
14769 cat >>confdefs.h <<\_ACEOF
14770#define WITH_THREAD 1
14771_ACEOF
14772
14773
14774cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014775#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014776_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014777
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014778 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014779else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014780
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14782echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014783if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14784 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014785else
Martin v. Löwis11437992002-04-12 09:54:03 +000014786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014787LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014788cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014789/* confdefs.h. */
14790_ACEOF
14791cat confdefs.h >>conftest.$ac_ext
14792cat >>conftest.$ac_ext <<_ACEOF
14793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
Martin v. Löwiseba40652007-08-30 20:10:57 +000014795/* Override any GCC internal prototype to avoid an error.
14796 Use char because int might match the return type of a GCC
14797 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014798#ifdef __cplusplus
14799extern "C"
14800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014801char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014802int
14803main ()
14804{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014805return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ;
14807 return 0;
14808}
14809_ACEOF
14810rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014811if { (ac_try="$ac_link"
14812case "(($ac_try" in
14813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14814 *) ac_try_echo=$ac_try;;
14815esac
14816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14817 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014819 grep -v '^ *+' conftest.er1 >conftest.err
14820 rm -f conftest.er1
14821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014823 (exit $ac_status); } && {
14824 test -z "$ac_c_werror_flag" ||
14825 test ! -s conftest.err
14826 } && test -s conftest$ac_exeext &&
14827 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014829else
Martin v. Löwis11437992002-04-12 09:54:03 +000014830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014831sed 's/^/| /' conftest.$ac_ext >&5
14832
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014835
14836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014838LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014840{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14841echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014842if test $ac_cv_lib_pthreads_pthread_create = yes; then
14843 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014844#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014845_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014846
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014847 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014848 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014849 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014850else
Greg Steinadf63d62000-07-05 10:38:09 +000014851
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14853echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014854if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014856else
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014858LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014860/* confdefs.h. */
14861_ACEOF
14862cat confdefs.h >>conftest.$ac_ext
14863cat >>conftest.$ac_ext <<_ACEOF
14864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
Martin v. Löwiseba40652007-08-30 20:10:57 +000014866/* Override any GCC internal prototype to avoid an error.
14867 Use char because int might match the return type of a GCC
14868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014869#ifdef __cplusplus
14870extern "C"
14871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014872char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014873int
14874main ()
14875{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 ;
14878 return 0;
14879}
14880_ACEOF
14881rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014882if { (ac_try="$ac_link"
14883case "(($ac_try" in
14884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14885 *) ac_try_echo=$ac_try;;
14886esac
14887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14888 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014890 grep -v '^ *+' conftest.er1 >conftest.err
14891 rm -f conftest.er1
14892 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014894 (exit $ac_status); } && {
14895 test -z "$ac_c_werror_flag" ||
14896 test ! -s conftest.err
14897 } && test -s conftest$ac_exeext &&
14898 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014899 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014900else
Martin v. Löwis11437992002-04-12 09:54:03 +000014901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014902sed 's/^/| /' conftest.$ac_ext >&5
14903
Martin v. Löwiseba40652007-08-30 20:10:57 +000014904 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906
14907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014909LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014911{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14912echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014913if test $ac_cv_lib_c_r_pthread_create = yes; then
14914 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014915#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014916_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014917
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014918 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014919 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014920 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014921else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014922
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14924echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014925if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14926 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014927else
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014929LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014931/* confdefs.h. */
14932_ACEOF
14933cat confdefs.h >>conftest.$ac_ext
14934cat >>conftest.$ac_ext <<_ACEOF
14935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014936
Martin v. Löwiseba40652007-08-30 20:10:57 +000014937/* Override any GCC internal prototype to avoid an error.
14938 Use char because int might match the return type of a GCC
14939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014940#ifdef __cplusplus
14941extern "C"
14942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014943char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014944int
14945main ()
14946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 ;
14949 return 0;
14950}
14951_ACEOF
14952rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953if { (ac_try="$ac_link"
14954case "(($ac_try" in
14955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14956 *) ac_try_echo=$ac_try;;
14957esac
14958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14959 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014961 grep -v '^ *+' conftest.er1 >conftest.err
14962 rm -f conftest.er1
14963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965 (exit $ac_status); } && {
14966 test -z "$ac_c_werror_flag" ||
14967 test ! -s conftest.err
14968 } && test -s conftest$ac_exeext &&
14969 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014971else
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014973sed 's/^/| /' conftest.$ac_ext >&5
14974
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977
14978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014980LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14983echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014984if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14985 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014986#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014988
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014989 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014990 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014991 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014992else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014993
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14995echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014996if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014998else
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015000LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015002/* confdefs.h. */
15003_ACEOF
15004cat confdefs.h >>conftest.$ac_ext
15005cat >>conftest.$ac_ext <<_ACEOF
15006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Martin v. Löwiseba40652007-08-30 20:10:57 +000015008/* Override any GCC internal prototype to avoid an error.
15009 Use char because int might match the return type of a GCC
15010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015011#ifdef __cplusplus
15012extern "C"
15013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015014char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015015int
15016main ()
15017{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015018return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 ;
15020 return 0;
15021}
15022_ACEOF
15023rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015024if { (ac_try="$ac_link"
15025case "(($ac_try" in
15026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15027 *) ac_try_echo=$ac_try;;
15028esac
15029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15030 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015032 grep -v '^ *+' conftest.er1 >conftest.err
15033 rm -f conftest.er1
15034 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036 (exit $ac_status); } && {
15037 test -z "$ac_c_werror_flag" ||
15038 test ! -s conftest.err
15039 } && test -s conftest$ac_exeext &&
15040 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015042else
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015044sed 's/^/| /' conftest.$ac_ext >&5
15045
Martin v. Löwiseba40652007-08-30 20:10:57 +000015046 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048
15049rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015051LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015053{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15054echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015055if test $ac_cv_lib_cma_pthread_create = yes; then
15056 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015057#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015058_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015059
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015060 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015061 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015062 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015063else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015064
Martin v. Löwis130fb172001-07-19 11:00:41 +000015065 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015066fi
15067
Guido van Rossum627b2d71993-12-24 10:39:16 +000015068
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015069fi
15070
Guido van Rossum0be3e491997-05-22 20:33:33 +000015071fi
15072
Guido van Rossum49545951997-12-02 19:28:29 +000015073fi
15074
Guido van Rossumb93a8621998-05-07 13:27:32 +000015075fi
15076
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015077
Michael W. Hudson54241132001-12-07 15:38:26 +000015078fi
15079
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015080
15081fi
15082
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084
15085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087fi
15088
Martin v. Löwis11437992002-04-12 09:54:03 +000015089fi
15090
15091
15092fi
15093
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015094
Michael W. Hudson54241132001-12-07 15:38:26 +000015095
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15097echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015098if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015100else
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015102LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015104/* confdefs.h. */
15105_ACEOF
15106cat confdefs.h >>conftest.$ac_ext
15107cat >>conftest.$ac_ext <<_ACEOF
15108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015109
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110/* Override any GCC internal prototype to avoid an error.
15111 Use char because int might match the return type of a GCC
15112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015113#ifdef __cplusplus
15114extern "C"
15115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015116char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015117int
15118main ()
15119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 ;
15122 return 0;
15123}
15124_ACEOF
15125rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126if { (ac_try="$ac_link"
15127case "(($ac_try" in
15128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15129 *) ac_try_echo=$ac_try;;
15130esac
15131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15132 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015134 grep -v '^ *+' conftest.er1 >conftest.err
15135 rm -f conftest.er1
15136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 (exit $ac_status); } && {
15139 test -z "$ac_c_werror_flag" ||
15140 test ! -s conftest.err
15141 } && test -s conftest$ac_exeext &&
15142 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015144else
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015146sed 's/^/| /' conftest.$ac_ext >&5
15147
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150
15151rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15156echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015157if test $ac_cv_lib_mpc_usconfig = yes; then
15158 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015160_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015161
Martin v. Löwis130fb172001-07-19 11:00:41 +000015162 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015163 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015164 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015165fi
15166
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015167
Neal Norwitza978ab02002-11-02 16:58:05 +000015168 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15170echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015171if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15172 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015173else
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015175LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015177/* confdefs.h. */
15178_ACEOF
15179cat confdefs.h >>conftest.$ac_ext
15180cat >>conftest.$ac_ext <<_ACEOF
15181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015182
Martin v. Löwiseba40652007-08-30 20:10:57 +000015183/* Override any GCC internal prototype to avoid an error.
15184 Use char because int might match the return type of a GCC
15185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015186#ifdef __cplusplus
15187extern "C"
15188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015189char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015190int
15191main ()
15192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 ;
15195 return 0;
15196}
15197_ACEOF
15198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199if { (ac_try="$ac_link"
15200case "(($ac_try" in
15201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15202 *) ac_try_echo=$ac_try;;
15203esac
15204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015207 grep -v '^ *+' conftest.er1 >conftest.err
15208 rm -f conftest.er1
15209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 (exit $ac_status); } && {
15212 test -z "$ac_c_werror_flag" ||
15213 test ! -s conftest.err
15214 } && test -s conftest$ac_exeext &&
15215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217else
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015219sed 's/^/| /' conftest.$ac_ext >&5
15220
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223
15224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015226LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015228{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15229echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015230if test $ac_cv_lib_thread_thr_create = yes; then
15231 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015232#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015234
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015235 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015236 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015237 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015238fi
15239
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015240 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015241
Martin v. Löwis130fb172001-07-19 11:00:41 +000015242 if test "$USE_THREAD_MODULE" != "#"
15243 then
15244 # If the above checks didn't disable threads, (at least) OSF1
15245 # needs this '-threads' argument during linking.
15246 case $ac_sys_system in
15247 OSF1) LDLAST=-threads;;
15248 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015249 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015250fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015251
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015252if test "$posix_threads" = "yes"; then
15253 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015254
15255cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015256#define _POSIX_THREADS 1
15257_ACEOF
15258
15259 fi
15260
15261 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15262 case $ac_sys_system/$ac_sys_release in
15263 SunOS/5.6)
15264cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015265#define HAVE_PTHREAD_DESTRUCTOR 1
15266_ACEOF
15267
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015268 ;;
15269 SunOS/5.8)
15270cat >>confdefs.h <<\_ACEOF
15271#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15272_ACEOF
15273
15274 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015275 AIX/5)
15276cat >>confdefs.h <<\_ACEOF
15277#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15278_ACEOF
15279
15280 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015281 esac
15282
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15284echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015285 if test "${ac_cv_pthread_system_supported+set}" = set; then
15286 echo $ECHO_N "(cached) $ECHO_C" >&6
15287else
15288 if test "$cross_compiling" = yes; then
15289 ac_cv_pthread_system_supported=no
15290else
15291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015292/* confdefs.h. */
15293_ACEOF
15294cat confdefs.h >>conftest.$ac_ext
15295cat >>conftest.$ac_ext <<_ACEOF
15296/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015297#include <pthread.h>
15298 void *foo(void *parm) {
15299 return NULL;
15300 }
15301 main() {
15302 pthread_attr_t attr;
15303 pthread_t id;
15304 if (pthread_attr_init(&attr)) exit(-1);
15305 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15306 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15307 exit(0);
15308 }
15309_ACEOF
15310rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311if { (ac_try="$ac_link"
15312case "(($ac_try" in
15313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15314 *) ac_try_echo=$ac_try;;
15315esac
15316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15317 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015318 ac_status=$?
15319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 { (case "(($ac_try" in
15322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15323 *) ac_try_echo=$ac_try;;
15324esac
15325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15326 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015327 ac_status=$?
15328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15329 (exit $ac_status); }; }; then
15330 ac_cv_pthread_system_supported=yes
15331else
15332 echo "$as_me: program exited with status $ac_status" >&5
15333echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015334sed 's/^/| /' conftest.$ac_ext >&5
15335
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015336( exit $ac_status )
15337ac_cv_pthread_system_supported=no
15338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339rm -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 +000015340fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015341
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342
15343
Guido van Rossum627b2d71993-12-24 10:39:16 +000015344fi
15345
Martin v. Löwiseba40652007-08-30 20:10:57 +000015346 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15347echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015348 if test "$ac_cv_pthread_system_supported" = "yes"; then
15349
15350cat >>confdefs.h <<\_ACEOF
15351#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15352_ACEOF
15353
15354 fi
15355
15356for ac_func in pthread_sigmask
15357do
15358as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15360echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15361if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015362 echo $ECHO_N "(cached) $ECHO_C" >&6
15363else
15364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015365/* confdefs.h. */
15366_ACEOF
15367cat confdefs.h >>conftest.$ac_ext
15368cat >>conftest.$ac_ext <<_ACEOF
15369/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015370/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15371 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15372#define $ac_func innocuous_$ac_func
15373
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015374/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015375 which can conflict with char $ac_func (); below.
15376 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015377 <limits.h> exists even on freestanding compilers. */
15378
15379#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015380# include <limits.h>
15381#else
15382# include <assert.h>
15383#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015384
15385#undef $ac_func
15386
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387/* Override any GCC internal prototype to avoid an error.
15388 Use char because int might match the return type of a GCC
15389 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015390#ifdef __cplusplus
15391extern "C"
15392#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015393char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015394/* The GNU C library defines this for functions which it implements
15395 to always fail with ENOSYS. Some functions are actually named
15396 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015398choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015399#endif
15400
Skip Montanaro6dead952003-09-25 14:50:04 +000015401int
15402main ()
15403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015405 ;
15406 return 0;
15407}
15408_ACEOF
15409rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015410if { (ac_try="$ac_link"
15411case "(($ac_try" in
15412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15413 *) ac_try_echo=$ac_try;;
15414esac
15415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015418 grep -v '^ *+' conftest.er1 >conftest.err
15419 rm -f conftest.er1
15420 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422 (exit $ac_status); } && {
15423 test -z "$ac_c_werror_flag" ||
15424 test ! -s conftest.err
15425 } && test -s conftest$ac_exeext &&
15426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015427 eval "$as_ac_var=yes"
15428else
15429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015430sed 's/^/| /' conftest.$ac_ext >&5
15431
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015434
15435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015438ac_res=`eval echo '${'$as_ac_var'}'`
15439 { echo "$as_me:$LINENO: result: $ac_res" >&5
15440echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015441if test `eval echo '${'$as_ac_var'}'` = yes; then
15442 cat >>confdefs.h <<_ACEOF
15443#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15444_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015445 case $ac_sys_system in
15446 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015447
Jason Tishlerfac083d2003-07-22 15:20:49 +000015448cat >>confdefs.h <<\_ACEOF
15449#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15450_ACEOF
15451
15452 ;;
15453 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015454fi
15455done
15456
15457fi
15458
15459
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015460# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015461
15462
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15464echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15465# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015466if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015467 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015468 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015469 { echo "$as_me:$LINENO: result: no" >&5
15470echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015471 ipv6=no
15472 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473 *) { echo "$as_me:$LINENO: result: yes" >&5
15474echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015476#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015477_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015478
15479 ipv6=yes
15480 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015482else
Martin v. Löwis11437992002-04-12 09:54:03 +000015483
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015484 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 { echo "$as_me:$LINENO: result: no" >&5
15486echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015487 ipv6=no
15488
15489else
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015491/* confdefs.h. */
15492_ACEOF
15493cat confdefs.h >>conftest.$ac_ext
15494cat >>conftest.$ac_ext <<_ACEOF
15495/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015496 /* AF_INET6 available check */
15497#include <sys/types.h>
15498#include <sys/socket.h>
15499main()
15500{
15501 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15502 exit(1);
15503 else
15504 exit(0);
15505}
15506
Martin v. Löwis11437992002-04-12 09:54:03 +000015507_ACEOF
15508rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015509if { (ac_try="$ac_link"
15510case "(($ac_try" in
15511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15512 *) ac_try_echo=$ac_try;;
15513esac
15514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15515 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 ac_status=$?
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519 { (case "(($ac_try" in
15520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15521 *) ac_try_echo=$ac_try;;
15522esac
15523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15524 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015525 ac_status=$?
15526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015528 { echo "$as_me:$LINENO: result: yes" >&5
15529echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015530 ipv6=yes
15531else
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 echo "$as_me: program exited with status $ac_status" >&5
15533echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015534sed 's/^/| /' conftest.$ac_ext >&5
15535
Martin v. Löwis11437992002-04-12 09:54:03 +000015536( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537{ echo "$as_me:$LINENO: result: no" >&5
15538echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015539 ipv6=no
15540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541rm -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 +000015542fi
15543
Martin v. Löwiseba40652007-08-30 20:10:57 +000015544
15545
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015546if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15548echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015550/* confdefs.h. */
15551_ACEOF
15552cat confdefs.h >>conftest.$ac_ext
15553cat >>conftest.$ac_ext <<_ACEOF
15554/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015555#include <sys/types.h>
15556#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015557int
15558main ()
15559{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015560struct sockaddr_in6 x;
15561x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 ;
15563 return 0;
15564}
15565_ACEOF
15566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567if { (ac_try="$ac_compile"
15568case "(($ac_try" in
15569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15570 *) ac_try_echo=$ac_try;;
15571esac
15572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015575 grep -v '^ *+' conftest.er1 >conftest.err
15576 rm -f conftest.er1
15577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579 (exit $ac_status); } && {
15580 test -z "$ac_c_werror_flag" ||
15581 test ! -s conftest.err
15582 } && test -s conftest.$ac_objext; then
15583 { echo "$as_me:$LINENO: result: yes" >&5
15584echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015585 ipv6=yes
15586else
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015588sed 's/^/| /' conftest.$ac_ext >&5
15589
Martin v. Löwiseba40652007-08-30 20:10:57 +000015590 { echo "$as_me:$LINENO: result: no" >&5
15591echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015592 ipv6=no
15593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594
15595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015596fi
15597
15598if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015600#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015602
15603fi
15604
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605fi
15606
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015607
15608ipv6type=unknown
15609ipv6lib=none
15610ipv6trylibc=no
15611
15612if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15614echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015615 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15616 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015617 case $i in
15618 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015620/* confdefs.h. */
15621_ACEOF
15622cat confdefs.h >>conftest.$ac_ext
15623cat >>conftest.$ac_ext <<_ACEOF
15624/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015625
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015626#include <netinet/in.h>
15627#ifdef IPV6_INRIA_VERSION
15628yes
15629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015630_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015632 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015633 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015634fi
15635rm -f conftest*
15636
15637 ;;
15638 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015640/* confdefs.h. */
15641_ACEOF
15642cat confdefs.h >>conftest.$ac_ext
15643cat >>conftest.$ac_ext <<_ACEOF
15644/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015645
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015646#include <netinet/in.h>
15647#ifdef __KAME__
15648yes
15649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015650_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015652 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015653 ipv6type=$i;
15654 ipv6lib=inet6
15655 ipv6libdir=/usr/local/v6/lib
15656 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015657fi
15658rm -f conftest*
15659
15660 ;;
15661 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015663/* confdefs.h. */
15664_ACEOF
15665cat confdefs.h >>conftest.$ac_ext
15666cat >>conftest.$ac_ext <<_ACEOF
15667/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015669#include <features.h>
15670#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15671yes
15672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015673_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015675 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015676 ipv6type=$i;
15677 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015678fi
15679rm -f conftest*
15680
15681 ;;
15682 linux-inet6)
15683 if test -d /usr/inet6; then
15684 ipv6type=$i
15685 ipv6lib=inet6
15686 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015687 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015688 fi
15689 ;;
15690 solaris)
15691 if test -f /etc/netconfig; then
15692 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15693 ipv6type=$i
15694 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015695 fi
15696 fi
15697 ;;
15698 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015700/* confdefs.h. */
15701_ACEOF
15702cat confdefs.h >>conftest.$ac_ext
15703cat >>conftest.$ac_ext <<_ACEOF
15704/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015705
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015706#include <sys/param.h>
15707#ifdef _TOSHIBA_INET6
15708yes
15709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015710_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015712 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015713 ipv6type=$i;
15714 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015715 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015716fi
15717rm -f conftest*
15718
15719 ;;
15720 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015722/* confdefs.h. */
15723_ACEOF
15724cat confdefs.h >>conftest.$ac_ext
15725cat >>conftest.$ac_ext <<_ACEOF
15726/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015728#include </usr/local/v6/include/sys/v6config.h>
15729#ifdef __V6D__
15730yes
15731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015733if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015734 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015735 ipv6type=$i;
15736 ipv6lib=v6;
15737 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015738 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015739fi
15740rm -f conftest*
15741
15742 ;;
15743 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015745/* confdefs.h. */
15746_ACEOF
15747cat confdefs.h >>conftest.$ac_ext
15748cat >>conftest.$ac_ext <<_ACEOF
15749/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015751#include <sys/param.h>
15752#ifdef _ZETA_MINAMI_INET6
15753yes
15754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015755_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015757 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015758 ipv6type=$i;
15759 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015760 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015761fi
15762rm -f conftest*
15763
15764 ;;
15765 esac
15766 if test "$ipv6type" != "unknown"; then
15767 break
15768 fi
15769 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15771echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015772fi
15773
15774if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15775 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15776 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15777 echo "using lib$ipv6lib"
15778 else
15779 if test $ipv6trylibc = "yes"; then
15780 echo "using libc"
15781 else
15782 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15783 echo "You need to fetch lib$ipv6lib.a from appropriate"
15784 echo 'ipv6 kit and compile beforehand.'
15785 exit 1
15786 fi
15787 fi
15788fi
15789
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015790{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15791echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15792cat >conftest.$ac_ext <<_ACEOF
15793/* confdefs.h. */
15794_ACEOF
15795cat confdefs.h >>conftest.$ac_ext
15796cat >>conftest.$ac_ext <<_ACEOF
15797/* end confdefs.h. */
15798#include <Carbon/Carbon.h>
15799int
15800main ()
15801{
15802FSIORefNum fRef = 0
15803 ;
15804 return 0;
15805}
15806_ACEOF
15807rm -f conftest.$ac_objext
15808if { (ac_try="$ac_compile"
15809case "(($ac_try" in
15810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15811 *) ac_try_echo=$ac_try;;
15812esac
15813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15814 (eval "$ac_compile") 2>conftest.er1
15815 ac_status=$?
15816 grep -v '^ *+' conftest.er1 >conftest.err
15817 rm -f conftest.er1
15818 cat conftest.err >&5
15819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); } && {
15821 test -z "$ac_c_werror_flag" ||
15822 test ! -s conftest.err
15823 } && test -s conftest.$ac_objext; then
15824
15825cat >>confdefs.h <<\_ACEOF
15826#define HAVE_OSX105_SDK 1
15827_ACEOF
15828
15829 { echo "$as_me:$LINENO: result: yes" >&5
15830echo "${ECHO_T}yes" >&6; }
15831else
15832 echo "$as_me: failed program was:" >&5
15833sed 's/^/| /' conftest.$ac_ext >&5
15834
15835 { echo "$as_me:$LINENO: result: no" >&5
15836echo "${ECHO_T}no" >&6; }
15837
15838fi
15839
15840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15841
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015842# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015843{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15844echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015845
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015847if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 withval=$with_doc_strings;
15849fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015850
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015851
15852if test -z "$with_doc_strings"
15853then with_doc_strings="yes"
15854fi
15855if test "$with_doc_strings" != "no"
15856then
15857
15858cat >>confdefs.h <<\_ACEOF
15859#define WITH_DOC_STRINGS 1
15860_ACEOF
15861
15862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15864echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015865
Neil Schemenauera35c6882001-02-27 04:45:05 +000015866# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15868echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015869
Martin v. Löwiseba40652007-08-30 20:10:57 +000015870# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015871if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015873if test "$withval" != no
15874then
15875
15876cat >>confdefs.h <<\_ACEOF
15877#define WITH_TSC 1
15878_ACEOF
15879
Martin v. Löwiseba40652007-08-30 20:10:57 +000015880 { echo "$as_me:$LINENO: result: yes" >&5
15881echo "${ECHO_T}yes" >&6; }
15882else { echo "$as_me:$LINENO: result: no" >&5
15883echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015884fi
15885else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015886 { echo "$as_me:$LINENO: result: no" >&5
15887echo "${ECHO_T}no" >&6; }
15888fi
15889
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015890
15891# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15893echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015896if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897 withval=$with_pymalloc;
15898fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015899
Neil Schemenauera35c6882001-02-27 04:45:05 +000015900
Neil Schemenauer16c22972002-03-22 15:34:49 +000015901if test -z "$with_pymalloc"
15902then with_pymalloc="yes"
15903fi
15904if test "$with_pymalloc" != "no"
15905then
Martin v. Löwis11437992002-04-12 09:54:03 +000015906
15907cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015908#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015909_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015910
15911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15913echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015914
Barry Warsawef82cd72000-06-30 16:21:01 +000015915# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15917echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015918
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015920if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015922if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015923then
15924
15925cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015926#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927_ACEOF
15928
Martin v. Löwiseba40652007-08-30 20:10:57 +000015929 { echo "$as_me:$LINENO: result: yes" >&5
15930echo "${ECHO_T}yes" >&6; }
15931else { echo "$as_me:$LINENO: result: no" >&5
15932echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015933fi
15934else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015935 { echo "$as_me:$LINENO: result: no" >&5
15936echo "${ECHO_T}no" >&6; }
15937fi
15938
Barry Warsawef82cd72000-06-30 16:21:01 +000015939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015940# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015941
Guido van Rossum98935bf2001-09-05 19:13:16 +000015942DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015943
Guido van Rossume97ee181999-12-20 21:27:22 +000015944# the dlopen() function means we might want to use dynload_shlib.o. some
15945# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015946
Thomas Wouters3a584202000-08-05 23:28:51 +000015947for ac_func in dlopen
15948do
Martin v. Löwis11437992002-04-12 09:54:03 +000015949as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15951echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15952if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015954else
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015956/* confdefs.h. */
15957_ACEOF
15958cat confdefs.h >>conftest.$ac_ext
15959cat >>conftest.$ac_ext <<_ACEOF
15960/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015961/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15962 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15963#define $ac_func innocuous_$ac_func
15964
Guido van Rossume97ee181999-12-20 21:27:22 +000015965/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015966 which can conflict with char $ac_func (); below.
15967 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015968 <limits.h> exists even on freestanding compilers. */
15969
15970#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015971# include <limits.h>
15972#else
15973# include <assert.h>
15974#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015975
15976#undef $ac_func
15977
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978/* Override any GCC internal prototype to avoid an error.
15979 Use char because int might match the return type of a GCC
15980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015981#ifdef __cplusplus
15982extern "C"
15983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015984char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015985/* The GNU C library defines this for functions which it implements
15986 to always fail with ENOSYS. Some functions are actually named
15987 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015989choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015990#endif
15991
Skip Montanaro6dead952003-09-25 14:50:04 +000015992int
15993main ()
15994{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015995return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 ;
15997 return 0;
15998}
15999_ACEOF
16000rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001if { (ac_try="$ac_link"
16002case "(($ac_try" in
16003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16004 *) ac_try_echo=$ac_try;;
16005esac
16006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16007 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016009 grep -v '^ *+' conftest.er1 >conftest.err
16010 rm -f conftest.er1
16011 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016013 (exit $ac_status); } && {
16014 test -z "$ac_c_werror_flag" ||
16015 test ! -s conftest.err
16016 } && test -s conftest$ac_exeext &&
16017 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016019else
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016021sed 's/^/| /' conftest.$ac_ext >&5
16022
Martin v. Löwiseba40652007-08-30 20:10:57 +000016023 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025
16026rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016027 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029ac_res=`eval echo '${'$as_ac_var'}'`
16030 { echo "$as_me:$LINENO: result: $ac_res" >&5
16031echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016032if test `eval echo '${'$as_ac_var'}'` = yes; then
16033 cat >>confdefs.h <<_ACEOF
16034#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16035_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016036
Guido van Rossume97ee181999-12-20 21:27:22 +000016037fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016038done
Guido van Rossume97ee181999-12-20 21:27:22 +000016039
Michael W. Hudson54241132001-12-07 15:38:26 +000016040
Guido van Rossume97ee181999-12-20 21:27:22 +000016041# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16042# loading of modules.
16043
Martin v. Löwiseba40652007-08-30 20:10:57 +000016044{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16045echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016046if test -z "$DYNLOADFILE"
16047then
16048 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016049 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16050 if test "$ac_cv_func_dlopen" = yes
16051 then DYNLOADFILE="dynload_shlib.o"
16052 else DYNLOADFILE="dynload_aix.o"
16053 fi
16054 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016055 BeOS*) DYNLOADFILE="dynload_beos.o";;
16056 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016057 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16058 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016059 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016060 *)
16061 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16062 # out any dynamic loading
16063 if test "$ac_cv_func_dlopen" = yes
16064 then DYNLOADFILE="dynload_shlib.o"
16065 else DYNLOADFILE="dynload_stub.o"
16066 fi
16067 ;;
16068 esac
16069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16071echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016072if test "$DYNLOADFILE" != "dynload_stub.o"
16073then
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
16075cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016076#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016078
16079fi
16080
Neil Schemenauer4e425612001-06-19 15:44:15 +000016081# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16082
Michael W. Hudson54241132001-12-07 15:38:26 +000016083
Martin v. Löwiseba40652007-08-30 20:10:57 +000016084{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16085echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016086if test -z "$MACHDEP_OBJS"
16087then
Jack Jansene578a632001-08-15 01:27:14 +000016088 MACHDEP_OBJS=$extra_machdep_objs
16089else
16090 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016092{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16093echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016094
Guido van Rossum627b2d71993-12-24 10:39:16 +000016095# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
Martin v. Löwisd6320502004-08-12 13:45:08 +000016167
Martin v. Löwisc3001752005-01-23 09:27:24 +000016168
16169
Neal Norwitz05a45592006-03-20 06:30:08 +000016170
16171
Martin v. Löwis382abef2007-02-19 10:55:19 +000016172
16173
Christian Heimes36281872007-11-30 21:11:28 +000016174
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016175
16176
16177for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16178 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016179 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016180 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016181 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016182 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016183 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016184 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016185 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016186 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016187 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016188 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016189do
Martin v. Löwis11437992002-04-12 09:54:03 +000016190as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016191{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16192echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16193if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016195else
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016197/* confdefs.h. */
16198_ACEOF
16199cat confdefs.h >>conftest.$ac_ext
16200cat >>conftest.$ac_ext <<_ACEOF
16201/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016202/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16203 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16204#define $ac_func innocuous_$ac_func
16205
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016206/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016207 which can conflict with char $ac_func (); below.
16208 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016209 <limits.h> exists even on freestanding compilers. */
16210
16211#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016212# include <limits.h>
16213#else
16214# include <assert.h>
16215#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016216
16217#undef $ac_func
16218
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219/* Override any GCC internal prototype to avoid an error.
16220 Use char because int might match the return type of a GCC
16221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016222#ifdef __cplusplus
16223extern "C"
16224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016225char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016226/* The GNU C library defines this for functions which it implements
16227 to always fail with ENOSYS. Some functions are actually named
16228 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016229#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016230choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016231#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016232
Skip Montanaro6dead952003-09-25 14:50:04 +000016233int
16234main ()
16235{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 ;
16238 return 0;
16239}
16240_ACEOF
16241rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242if { (ac_try="$ac_link"
16243case "(($ac_try" in
16244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16245 *) ac_try_echo=$ac_try;;
16246esac
16247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16248 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016250 grep -v '^ *+' conftest.er1 >conftest.err
16251 rm -f conftest.er1
16252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016254 (exit $ac_status); } && {
16255 test -z "$ac_c_werror_flag" ||
16256 test ! -s conftest.err
16257 } && test -s conftest$ac_exeext &&
16258 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016260else
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016262sed 's/^/| /' conftest.$ac_ext >&5
16263
Martin v. Löwiseba40652007-08-30 20:10:57 +000016264 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266
16267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016268 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016270ac_res=`eval echo '${'$as_ac_var'}'`
16271 { echo "$as_me:$LINENO: result: $ac_res" >&5
16272echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016273if test `eval echo '${'$as_ac_var'}'` = yes; then
16274 cat >>confdefs.h <<_ACEOF
16275#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16276_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016278fi
16279done
16280
Michael W. Hudson54241132001-12-07 15:38:26 +000016281
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016282# For some functions, having a definition is not sufficient, since
16283# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284{ echo "$as_me:$LINENO: checking for chroot" >&5
16285echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016287/* confdefs.h. */
16288_ACEOF
16289cat confdefs.h >>conftest.$ac_ext
16290cat >>conftest.$ac_ext <<_ACEOF
16291/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016292#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016293int
16294main ()
16295{
16296void *x=chroot
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302if { (ac_try="$ac_compile"
16303case "(($ac_try" in
16304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16305 *) ac_try_echo=$ac_try;;
16306esac
16307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 grep -v '^ *+' conftest.er1 >conftest.err
16311 rm -f conftest.er1
16312 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016314 (exit $ac_status); } && {
16315 test -z "$ac_c_werror_flag" ||
16316 test ! -s conftest.err
16317 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016318
16319cat >>confdefs.h <<\_ACEOF
16320#define HAVE_CHROOT 1
16321_ACEOF
16322
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323 { echo "$as_me:$LINENO: result: yes" >&5
16324echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016325else
16326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016327sed 's/^/| /' conftest.$ac_ext >&5
16328
Martin v. Löwiseba40652007-08-30 20:10:57 +000016329 { echo "$as_me:$LINENO: result: no" >&5
16330echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016331
16332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016333
16334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16335{ echo "$as_me:$LINENO: checking for link" >&5
16336echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016343#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016344int
16345main ()
16346{
16347void *x=link
16348 ;
16349 return 0;
16350}
16351_ACEOF
16352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016353if { (ac_try="$ac_compile"
16354case "(($ac_try" in
16355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16356 *) ac_try_echo=$ac_try;;
16357esac
16358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016361 grep -v '^ *+' conftest.er1 >conftest.err
16362 rm -f conftest.er1
16363 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365 (exit $ac_status); } && {
16366 test -z "$ac_c_werror_flag" ||
16367 test ! -s conftest.err
16368 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016369
16370cat >>confdefs.h <<\_ACEOF
16371#define HAVE_LINK 1
16372_ACEOF
16373
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374 { echo "$as_me:$LINENO: result: yes" >&5
16375echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016376else
16377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016378sed 's/^/| /' conftest.$ac_ext >&5
16379
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 { echo "$as_me:$LINENO: result: no" >&5
16381echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016382
16383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384
16385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16386{ echo "$as_me:$LINENO: checking for symlink" >&5
16387echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016388cat >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öwisc8ad7cc2002-11-11 13:23:45 +000016394#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016395int
16396main ()
16397{
16398void *x=symlink
16399 ;
16400 return 0;
16401}
16402_ACEOF
16403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404if { (ac_try="$ac_compile"
16405case "(($ac_try" in
16406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16407 *) ac_try_echo=$ac_try;;
16408esac
16409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016412 grep -v '^ *+' conftest.er1 >conftest.err
16413 rm -f conftest.er1
16414 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016416 (exit $ac_status); } && {
16417 test -z "$ac_c_werror_flag" ||
16418 test ! -s conftest.err
16419 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016420
16421cat >>confdefs.h <<\_ACEOF
16422#define HAVE_SYMLINK 1
16423_ACEOF
16424
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425 { echo "$as_me:$LINENO: result: yes" >&5
16426echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016427else
16428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016429sed 's/^/| /' conftest.$ac_ext >&5
16430
Martin v. Löwiseba40652007-08-30 20:10:57 +000016431 { echo "$as_me:$LINENO: result: no" >&5
16432echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016433
16434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435
16436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16437{ echo "$as_me:$LINENO: checking for fchdir" >&5
16438echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016440/* confdefs.h. */
16441_ACEOF
16442cat confdefs.h >>conftest.$ac_ext
16443cat >>conftest.$ac_ext <<_ACEOF
16444/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016445#include <unistd.h>
16446int
16447main ()
16448{
16449void *x=fchdir
16450 ;
16451 return 0;
16452}
16453_ACEOF
16454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016455if { (ac_try="$ac_compile"
16456case "(($ac_try" in
16457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16458 *) ac_try_echo=$ac_try;;
16459esac
16460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016463 grep -v '^ *+' conftest.er1 >conftest.err
16464 rm -f conftest.er1
16465 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016467 (exit $ac_status); } && {
16468 test -z "$ac_c_werror_flag" ||
16469 test ! -s conftest.err
16470 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016471
16472cat >>confdefs.h <<\_ACEOF
16473#define HAVE_FCHDIR 1
16474_ACEOF
16475
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476 { echo "$as_me:$LINENO: result: yes" >&5
16477echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016478else
16479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016480sed 's/^/| /' conftest.$ac_ext >&5
16481
Martin v. Löwiseba40652007-08-30 20:10:57 +000016482 { echo "$as_me:$LINENO: result: no" >&5
16483echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016484
16485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016486
16487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16488{ echo "$as_me:$LINENO: checking for fsync" >&5
16489echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016491/* confdefs.h. */
16492_ACEOF
16493cat confdefs.h >>conftest.$ac_ext
16494cat >>conftest.$ac_ext <<_ACEOF
16495/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016496#include <unistd.h>
16497int
16498main ()
16499{
16500void *x=fsync
16501 ;
16502 return 0;
16503}
16504_ACEOF
16505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016506if { (ac_try="$ac_compile"
16507case "(($ac_try" in
16508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16509 *) ac_try_echo=$ac_try;;
16510esac
16511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016514 grep -v '^ *+' conftest.er1 >conftest.err
16515 rm -f conftest.er1
16516 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016518 (exit $ac_status); } && {
16519 test -z "$ac_c_werror_flag" ||
16520 test ! -s conftest.err
16521 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016522
16523cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016524#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016525_ACEOF
16526
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527 { echo "$as_me:$LINENO: result: yes" >&5
16528echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016529else
16530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016531sed 's/^/| /' conftest.$ac_ext >&5
16532
Martin v. Löwiseba40652007-08-30 20:10:57 +000016533 { echo "$as_me:$LINENO: result: no" >&5
16534echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016535
16536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537
16538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16539{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16540echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016542/* confdefs.h. */
16543_ACEOF
16544cat confdefs.h >>conftest.$ac_ext
16545cat >>conftest.$ac_ext <<_ACEOF
16546/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016547#include <unistd.h>
16548int
16549main ()
16550{
16551void *x=fdatasync
16552 ;
16553 return 0;
16554}
16555_ACEOF
16556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016557if { (ac_try="$ac_compile"
16558case "(($ac_try" in
16559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16560 *) ac_try_echo=$ac_try;;
16561esac
16562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016565 grep -v '^ *+' conftest.er1 >conftest.err
16566 rm -f conftest.er1
16567 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016569 (exit $ac_status); } && {
16570 test -z "$ac_c_werror_flag" ||
16571 test ! -s conftest.err
16572 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016573
16574cat >>confdefs.h <<\_ACEOF
16575#define HAVE_FDATASYNC 1
16576_ACEOF
16577
Martin v. Löwiseba40652007-08-30 20:10:57 +000016578 { echo "$as_me:$LINENO: result: yes" >&5
16579echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016580else
16581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016582sed 's/^/| /' conftest.$ac_ext >&5
16583
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584 { echo "$as_me:$LINENO: result: no" >&5
16585echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016586
16587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016588
16589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016590{ echo "$as_me:$LINENO: checking for epoll" >&5
16591echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16592cat >conftest.$ac_ext <<_ACEOF
16593/* confdefs.h. */
16594_ACEOF
16595cat confdefs.h >>conftest.$ac_ext
16596cat >>conftest.$ac_ext <<_ACEOF
16597/* end confdefs.h. */
16598#include <sys/epoll.h>
16599int
16600main ()
16601{
16602void *x=epoll_create
16603 ;
16604 return 0;
16605}
16606_ACEOF
16607rm -f conftest.$ac_objext
16608if { (ac_try="$ac_compile"
16609case "(($ac_try" in
16610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16611 *) ac_try_echo=$ac_try;;
16612esac
16613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16614 (eval "$ac_compile") 2>conftest.er1
16615 ac_status=$?
16616 grep -v '^ *+' conftest.er1 >conftest.err
16617 rm -f conftest.er1
16618 cat conftest.err >&5
16619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16620 (exit $ac_status); } && {
16621 test -z "$ac_c_werror_flag" ||
16622 test ! -s conftest.err
16623 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016624
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016625cat >>confdefs.h <<\_ACEOF
16626#define HAVE_EPOLL 1
16627_ACEOF
16628
16629 { echo "$as_me:$LINENO: result: yes" >&5
16630echo "${ECHO_T}yes" >&6; }
16631else
16632 echo "$as_me: failed program was:" >&5
16633sed 's/^/| /' conftest.$ac_ext >&5
16634
16635 { echo "$as_me:$LINENO: result: no" >&5
16636echo "${ECHO_T}no" >&6; }
16637
16638fi
16639
16640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16641{ echo "$as_me:$LINENO: checking for kqueue" >&5
16642echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16643cat >conftest.$ac_ext <<_ACEOF
16644/* confdefs.h. */
16645_ACEOF
16646cat confdefs.h >>conftest.$ac_ext
16647cat >>conftest.$ac_ext <<_ACEOF
16648/* end confdefs.h. */
16649
16650#include <sys/types.h>
16651#include <sys/event.h>
16652
16653int
16654main ()
16655{
16656int x=kqueue()
16657 ;
16658 return 0;
16659}
16660_ACEOF
16661rm -f conftest.$ac_objext
16662if { (ac_try="$ac_compile"
16663case "(($ac_try" in
16664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16665 *) ac_try_echo=$ac_try;;
16666esac
16667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16668 (eval "$ac_compile") 2>conftest.er1
16669 ac_status=$?
16670 grep -v '^ *+' conftest.er1 >conftest.err
16671 rm -f conftest.er1
16672 cat conftest.err >&5
16673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16674 (exit $ac_status); } && {
16675 test -z "$ac_c_werror_flag" ||
16676 test ! -s conftest.err
16677 } && test -s conftest.$ac_objext; then
16678
16679cat >>confdefs.h <<\_ACEOF
16680#define HAVE_KQUEUE 1
16681_ACEOF
16682
16683 { echo "$as_me:$LINENO: result: yes" >&5
16684echo "${ECHO_T}yes" >&6; }
16685else
16686 echo "$as_me: failed program was:" >&5
16687sed 's/^/| /' conftest.$ac_ext >&5
16688
16689 { echo "$as_me:$LINENO: result: no" >&5
16690echo "${ECHO_T}no" >&6; }
16691
16692fi
16693
16694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016695# On some systems (eg. FreeBSD 5), we would find a definition of the
16696# functions ctermid_r, setgroups in the library, but no prototype
16697# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16698# address to avoid compiler warnings and potential miscompilations
16699# because of the missing prototypes.
16700
Martin v. Löwiseba40652007-08-30 20:10:57 +000016701{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16702echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016703cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016704/* confdefs.h. */
16705_ACEOF
16706cat confdefs.h >>conftest.$ac_ext
16707cat >>conftest.$ac_ext <<_ACEOF
16708/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016709
16710#include "confdefs.h"
16711#include <stdio.h>
16712
Martin v. Löwisd5843682002-11-21 20:41:28 +000016713int
16714main ()
16715{
16716void* p = ctermid_r
16717 ;
16718 return 0;
16719}
16720_ACEOF
16721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722if { (ac_try="$ac_compile"
16723case "(($ac_try" in
16724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16725 *) ac_try_echo=$ac_try;;
16726esac
16727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016730 grep -v '^ *+' conftest.er1 >conftest.err
16731 rm -f conftest.er1
16732 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734 (exit $ac_status); } && {
16735 test -z "$ac_c_werror_flag" ||
16736 test ! -s conftest.err
16737 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016738
16739cat >>confdefs.h <<\_ACEOF
16740#define HAVE_CTERMID_R 1
16741_ACEOF
16742
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743 { echo "$as_me:$LINENO: result: yes" >&5
16744echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016745else
16746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016747sed 's/^/| /' conftest.$ac_ext >&5
16748
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749 { echo "$as_me:$LINENO: result: no" >&5
16750echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016751
16752fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016753
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16755
16756{ echo "$as_me:$LINENO: checking for flock" >&5
16757echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016759/* confdefs.h. */
16760_ACEOF
16761cat confdefs.h >>conftest.$ac_ext
16762cat >>conftest.$ac_ext <<_ACEOF
16763/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016764
16765#include "confdefs.h"
16766#include <sys/file.h>
16767
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016768int
16769main ()
16770{
16771void* p = flock
16772 ;
16773 return 0;
16774}
16775_ACEOF
16776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016777if { (ac_try="$ac_compile"
16778case "(($ac_try" in
16779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16780 *) ac_try_echo=$ac_try;;
16781esac
16782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016785 grep -v '^ *+' conftest.er1 >conftest.err
16786 rm -f conftest.er1
16787 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016789 (exit $ac_status); } && {
16790 test -z "$ac_c_werror_flag" ||
16791 test ! -s conftest.err
16792 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016793
16794cat >>confdefs.h <<\_ACEOF
16795#define HAVE_FLOCK 1
16796_ACEOF
16797
Martin v. Löwiseba40652007-08-30 20:10:57 +000016798 { echo "$as_me:$LINENO: result: yes" >&5
16799echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016800else
16801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016802sed 's/^/| /' conftest.$ac_ext >&5
16803
Martin v. Löwiseba40652007-08-30 20:10:57 +000016804 { echo "$as_me:$LINENO: result: no" >&5
16805echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016806
16807fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016808
Martin v. Löwiseba40652007-08-30 20:10:57 +000016809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16810
16811{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16812echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016814/* confdefs.h. */
16815_ACEOF
16816cat confdefs.h >>conftest.$ac_ext
16817cat >>conftest.$ac_ext <<_ACEOF
16818/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016819
16820#include "confdefs.h"
16821#include <unistd.h>
16822
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016823int
16824main ()
16825{
16826void* p = getpagesize
16827 ;
16828 return 0;
16829}
16830_ACEOF
16831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832if { (ac_try="$ac_compile"
16833case "(($ac_try" in
16834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16835 *) ac_try_echo=$ac_try;;
16836esac
16837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016840 grep -v '^ *+' conftest.er1 >conftest.err
16841 rm -f conftest.er1
16842 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016844 (exit $ac_status); } && {
16845 test -z "$ac_c_werror_flag" ||
16846 test ! -s conftest.err
16847 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016848
16849cat >>confdefs.h <<\_ACEOF
16850#define HAVE_GETPAGESIZE 1
16851_ACEOF
16852
Martin v. Löwiseba40652007-08-30 20:10:57 +000016853 { echo "$as_me:$LINENO: result: yes" >&5
16854echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016855else
16856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016857sed 's/^/| /' conftest.$ac_ext >&5
16858
Martin v. Löwiseba40652007-08-30 20:10:57 +000016859 { echo "$as_me:$LINENO: result: no" >&5
16860echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016861
16862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863
16864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016865
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016866for ac_prog in true
16867do
16868 # Extract the first word of "$ac_prog", so it can be a program name with args.
16869set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016870{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16871echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016872if test "${ac_cv_prog_TRUE+set}" = set; then
16873 echo $ECHO_N "(cached) $ECHO_C" >&6
16874else
16875 if test -n "$TRUE"; then
16876 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16877else
16878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16879for as_dir in $PATH
16880do
16881 IFS=$as_save_IFS
16882 test -z "$as_dir" && as_dir=.
16883 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016884 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 +000016885 ac_cv_prog_TRUE="$ac_prog"
16886 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16887 break 2
16888 fi
16889done
16890done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016891IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016892
16893fi
16894fi
16895TRUE=$ac_cv_prog_TRUE
16896if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897 { echo "$as_me:$LINENO: result: $TRUE" >&5
16898echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016899else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016900 { echo "$as_me:$LINENO: result: no" >&5
16901echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016902fi
16903
Martin v. Löwiseba40652007-08-30 20:10:57 +000016904
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016905 test -n "$TRUE" && break
16906done
16907test -n "$TRUE" || TRUE="/bin/true"
16908
16909
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16911echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016912if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16913 echo $ECHO_N "(cached) $ECHO_C" >&6
16914else
16915 ac_check_lib_save_LIBS=$LIBS
16916LIBS="-lc $LIBS"
16917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016918/* confdefs.h. */
16919_ACEOF
16920cat confdefs.h >>conftest.$ac_ext
16921cat >>conftest.$ac_ext <<_ACEOF
16922/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016923
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924/* Override any GCC internal prototype to avoid an error.
16925 Use char because int might match the return type of a GCC
16926 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016927#ifdef __cplusplus
16928extern "C"
16929#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016930char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016931int
16932main ()
16933{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016934return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016935 ;
16936 return 0;
16937}
16938_ACEOF
16939rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016940if { (ac_try="$ac_link"
16941case "(($ac_try" in
16942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16943 *) ac_try_echo=$ac_try;;
16944esac
16945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16946 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016948 grep -v '^ *+' conftest.er1 >conftest.err
16949 rm -f conftest.er1
16950 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016952 (exit $ac_status); } && {
16953 test -z "$ac_c_werror_flag" ||
16954 test ! -s conftest.err
16955 } && test -s conftest$ac_exeext &&
16956 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016957 ac_cv_lib_c_inet_aton=yes
16958else
16959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016960sed 's/^/| /' conftest.$ac_ext >&5
16961
Martin v. Löwiseba40652007-08-30 20:10:57 +000016962 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964
16965rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016967LIBS=$ac_check_lib_save_LIBS
16968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016969{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16970echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016971if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016972 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016973else
16974
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16976echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016977if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16978 echo $ECHO_N "(cached) $ECHO_C" >&6
16979else
16980 ac_check_lib_save_LIBS=$LIBS
16981LIBS="-lresolv $LIBS"
16982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016983/* confdefs.h. */
16984_ACEOF
16985cat confdefs.h >>conftest.$ac_ext
16986cat >>conftest.$ac_ext <<_ACEOF
16987/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016988
Martin v. Löwiseba40652007-08-30 20:10:57 +000016989/* Override any GCC internal prototype to avoid an error.
16990 Use char because int might match the return type of a GCC
16991 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016992#ifdef __cplusplus
16993extern "C"
16994#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016995char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016996int
16997main ()
16998{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016999return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017000 ;
17001 return 0;
17002}
17003_ACEOF
17004rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017005if { (ac_try="$ac_link"
17006case "(($ac_try" in
17007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17008 *) ac_try_echo=$ac_try;;
17009esac
17010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17011 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017013 grep -v '^ *+' conftest.er1 >conftest.err
17014 rm -f conftest.er1
17015 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017017 (exit $ac_status); } && {
17018 test -z "$ac_c_werror_flag" ||
17019 test ! -s conftest.err
17020 } && test -s conftest$ac_exeext &&
17021 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017022 ac_cv_lib_resolv_inet_aton=yes
17023else
17024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017025sed 's/^/| /' conftest.$ac_ext >&5
17026
Martin v. Löwiseba40652007-08-30 20:10:57 +000017027 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017029
17030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017032LIBS=$ac_check_lib_save_LIBS
17033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017034{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17035echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017036if test $ac_cv_lib_resolv_inet_aton = yes; then
17037 cat >>confdefs.h <<_ACEOF
17038#define HAVE_LIBRESOLV 1
17039_ACEOF
17040
17041 LIBS="-lresolv $LIBS"
17042
17043fi
17044
17045
17046fi
17047
17048
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017049# On Tru64, chflags seems to be present, but calling it will
17050# exit Python
17051{ echo "$as_me:$LINENO: checking for chflags" >&5
17052echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17053if test "$cross_compiling" = yes; then
17054 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17055See \`config.log' for more details." >&5
17056echo "$as_me: error: cannot run test program while cross compiling
17057See \`config.log' for more details." >&2;}
17058 { (exit 1); exit 1; }; }
17059else
17060 cat >conftest.$ac_ext <<_ACEOF
17061/* confdefs.h. */
17062_ACEOF
17063cat confdefs.h >>conftest.$ac_ext
17064cat >>conftest.$ac_ext <<_ACEOF
17065/* end confdefs.h. */
17066
17067#include <sys/stat.h>
17068#include <unistd.h>
17069int main(int argc, char*argv[])
17070{
17071 if(chflags(argv[0], 0) != 0)
17072 return 1;
17073 return 0;
17074}
17075
17076_ACEOF
17077rm -f conftest$ac_exeext
17078if { (ac_try="$ac_link"
17079case "(($ac_try" in
17080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17081 *) ac_try_echo=$ac_try;;
17082esac
17083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17084 (eval "$ac_link") 2>&5
17085 ac_status=$?
17086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17088 { (case "(($ac_try" in
17089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17090 *) ac_try_echo=$ac_try;;
17091esac
17092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17093 (eval "$ac_try") 2>&5
17094 ac_status=$?
17095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17096 (exit $ac_status); }; }; then
17097
17098cat >>confdefs.h <<\_ACEOF
17099#define HAVE_CHFLAGS 1
17100_ACEOF
17101
17102 { echo "$as_me:$LINENO: result: yes" >&5
17103echo "${ECHO_T}yes" >&6; }
17104else
17105 echo "$as_me: program exited with status $ac_status" >&5
17106echo "$as_me: failed program was:" >&5
17107sed 's/^/| /' conftest.$ac_ext >&5
17108
17109( exit $ac_status )
17110{ echo "$as_me:$LINENO: result: no" >&5
17111echo "${ECHO_T}no" >&6; }
17112
17113fi
17114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17115fi
17116
17117
17118
17119{ echo "$as_me:$LINENO: checking for lchflags" >&5
17120echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17121if test "$cross_compiling" = yes; then
17122 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17123See \`config.log' for more details." >&5
17124echo "$as_me: error: cannot run test program while cross compiling
17125See \`config.log' for more details." >&2;}
17126 { (exit 1); exit 1; }; }
17127else
17128 cat >conftest.$ac_ext <<_ACEOF
17129/* confdefs.h. */
17130_ACEOF
17131cat confdefs.h >>conftest.$ac_ext
17132cat >>conftest.$ac_ext <<_ACEOF
17133/* end confdefs.h. */
17134
17135#include <sys/stat.h>
17136#include <unistd.h>
17137int main(int argc, char*argv[])
17138{
17139 if(lchflags(argv[0], 0) != 0)
17140 return 1;
17141 return 0;
17142}
17143
17144_ACEOF
17145rm -f conftest$ac_exeext
17146if { (ac_try="$ac_link"
17147case "(($ac_try" in
17148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17149 *) ac_try_echo=$ac_try;;
17150esac
17151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17152 (eval "$ac_link") 2>&5
17153 ac_status=$?
17154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17156 { (case "(($ac_try" in
17157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17158 *) ac_try_echo=$ac_try;;
17159esac
17160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17161 (eval "$ac_try") 2>&5
17162 ac_status=$?
17163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17164 (exit $ac_status); }; }; then
17165
17166cat >>confdefs.h <<\_ACEOF
17167#define HAVE_LCHFLAGS 1
17168_ACEOF
17169
17170 { echo "$as_me:$LINENO: result: yes" >&5
17171echo "${ECHO_T}yes" >&6; }
17172else
17173 echo "$as_me: program exited with status $ac_status" >&5
17174echo "$as_me: failed program was:" >&5
17175sed 's/^/| /' conftest.$ac_ext >&5
17176
17177( exit $ac_status )
17178{ echo "$as_me:$LINENO: result: no" >&5
17179echo "${ECHO_T}no" >&6; }
17180
17181fi
17182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17183fi
17184
17185
17186
Ronald Oussorenf8752642006-07-06 10:13:35 +000017187case $ac_sys_system/$ac_sys_release in
17188Darwin/*)
17189 _CUR_CFLAGS="${CFLAGS}"
17190 _CUR_LDFLAGS="${LDFLAGS}"
17191 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17192 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17193 ;;
17194esac
17195
Martin v. Löwiseba40652007-08-30 20:10:57 +000017196{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17197echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017198if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17199 echo $ECHO_N "(cached) $ECHO_C" >&6
17200else
17201 ac_check_lib_save_LIBS=$LIBS
17202LIBS="-lz $LIBS"
17203cat >conftest.$ac_ext <<_ACEOF
17204/* confdefs.h. */
17205_ACEOF
17206cat confdefs.h >>conftest.$ac_ext
17207cat >>conftest.$ac_ext <<_ACEOF
17208/* end confdefs.h. */
17209
Martin v. Löwiseba40652007-08-30 20:10:57 +000017210/* Override any GCC internal prototype to avoid an error.
17211 Use char because int might match the return type of a GCC
17212 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017213#ifdef __cplusplus
17214extern "C"
17215#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017216char inflateCopy ();
17217int
17218main ()
17219{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017220return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017221 ;
17222 return 0;
17223}
17224_ACEOF
17225rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017226if { (ac_try="$ac_link"
17227case "(($ac_try" in
17228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17229 *) ac_try_echo=$ac_try;;
17230esac
17231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17232 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017233 ac_status=$?
17234 grep -v '^ *+' conftest.er1 >conftest.err
17235 rm -f conftest.er1
17236 cat conftest.err >&5
17237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017238 (exit $ac_status); } && {
17239 test -z "$ac_c_werror_flag" ||
17240 test ! -s conftest.err
17241 } && test -s conftest$ac_exeext &&
17242 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017243 ac_cv_lib_z_inflateCopy=yes
17244else
17245 echo "$as_me: failed program was:" >&5
17246sed 's/^/| /' conftest.$ac_ext >&5
17247
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017250
17251rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017252 conftest$ac_exeext conftest.$ac_ext
17253LIBS=$ac_check_lib_save_LIBS
17254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17256echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017257if test $ac_cv_lib_z_inflateCopy = yes; then
17258
17259cat >>confdefs.h <<\_ACEOF
17260#define HAVE_ZLIB_COPY 1
17261_ACEOF
17262
17263fi
17264
17265
Ronald Oussorenf8752642006-07-06 10:13:35 +000017266case $ac_sys_system/$ac_sys_release in
17267Darwin/*)
17268 CFLAGS="${_CUR_CFLAGS}"
17269 LDFLAGS="${_CUR_LDFLAGS}"
17270 ;;
17271esac
17272
Martin v. Löwiseba40652007-08-30 20:10:57 +000017273{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17274echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017276/* confdefs.h. */
17277_ACEOF
17278cat confdefs.h >>conftest.$ac_ext
17279cat >>conftest.$ac_ext <<_ACEOF
17280/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017281
17282#include "confdefs.h"
17283#include <netdb.h>
17284
Martin v. Löwise9416172003-05-03 10:12:45 +000017285int
17286main ()
17287{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017288void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017289 ;
17290 return 0;
17291}
17292_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017293rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017294if { (ac_try="$ac_link"
17295case "(($ac_try" in
17296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17297 *) ac_try_echo=$ac_try;;
17298esac
17299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017302 grep -v '^ *+' conftest.er1 >conftest.err
17303 rm -f conftest.er1
17304 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017306 (exit $ac_status); } && {
17307 test -z "$ac_c_werror_flag" ||
17308 test ! -s conftest.err
17309 } && test -s conftest$ac_exeext &&
17310 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017311
17312cat >>confdefs.h <<\_ACEOF
17313#define HAVE_HSTRERROR 1
17314_ACEOF
17315
Martin v. Löwiseba40652007-08-30 20:10:57 +000017316 { echo "$as_me:$LINENO: result: yes" >&5
17317echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017318else
17319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017320sed 's/^/| /' conftest.$ac_ext >&5
17321
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322 { echo "$as_me:$LINENO: result: no" >&5
17323echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017324
17325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017326
17327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017329
Martin v. Löwiseba40652007-08-30 20:10:57 +000017330{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17331echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017333/* confdefs.h. */
17334_ACEOF
17335cat confdefs.h >>conftest.$ac_ext
17336cat >>conftest.$ac_ext <<_ACEOF
17337/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017338
17339#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017340#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017341#include <sys/socket.h>
17342#include <netinet/in.h>
17343#include <arpa/inet.h>
17344
Martin v. Löwise9416172003-05-03 10:12:45 +000017345int
17346main ()
17347{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017348void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017349 ;
17350 return 0;
17351}
17352_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017353rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017354if { (ac_try="$ac_link"
17355case "(($ac_try" in
17356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17357 *) ac_try_echo=$ac_try;;
17358esac
17359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17360 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362 grep -v '^ *+' conftest.er1 >conftest.err
17363 rm -f conftest.er1
17364 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017366 (exit $ac_status); } && {
17367 test -z "$ac_c_werror_flag" ||
17368 test ! -s conftest.err
17369 } && test -s conftest$ac_exeext &&
17370 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017371
17372cat >>confdefs.h <<\_ACEOF
17373#define HAVE_INET_ATON 1
17374_ACEOF
17375
Martin v. Löwiseba40652007-08-30 20:10:57 +000017376 { echo "$as_me:$LINENO: result: yes" >&5
17377echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017378else
17379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017380sed 's/^/| /' conftest.$ac_ext >&5
17381
Martin v. Löwiseba40652007-08-30 20:10:57 +000017382 { echo "$as_me:$LINENO: result: no" >&5
17383echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017384
17385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017386
17387rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017388 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017389
Martin v. Löwiseba40652007-08-30 20:10:57 +000017390{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17391echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017393/* confdefs.h. */
17394_ACEOF
17395cat confdefs.h >>conftest.$ac_ext
17396cat >>conftest.$ac_ext <<_ACEOF
17397/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017398
17399#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017400#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017401#include <sys/socket.h>
17402#include <netinet/in.h>
17403#include <arpa/inet.h>
17404
Martin v. Löwise9416172003-05-03 10:12:45 +000017405int
17406main ()
17407{
17408void* p = inet_pton
17409 ;
17410 return 0;
17411}
17412_ACEOF
17413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017414if { (ac_try="$ac_compile"
17415case "(($ac_try" in
17416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17417 *) ac_try_echo=$ac_try;;
17418esac
17419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017422 grep -v '^ *+' conftest.er1 >conftest.err
17423 rm -f conftest.er1
17424 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017426 (exit $ac_status); } && {
17427 test -z "$ac_c_werror_flag" ||
17428 test ! -s conftest.err
17429 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017430
17431cat >>confdefs.h <<\_ACEOF
17432#define HAVE_INET_PTON 1
17433_ACEOF
17434
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435 { echo "$as_me:$LINENO: result: yes" >&5
17436echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017437else
17438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017439sed 's/^/| /' conftest.$ac_ext >&5
17440
Martin v. Löwiseba40652007-08-30 20:10:57 +000017441 { echo "$as_me:$LINENO: result: no" >&5
17442echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017443
17444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445
17446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017447
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017448# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017449{ echo "$as_me:$LINENO: checking for setgroups" >&5
17450echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017452/* confdefs.h. */
17453_ACEOF
17454cat confdefs.h >>conftest.$ac_ext
17455cat >>conftest.$ac_ext <<_ACEOF
17456/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017457
17458#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017459#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017460#ifdef HAVE_GRP_H
17461#include <grp.h>
17462#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017463
Martin v. Löwisd5843682002-11-21 20:41:28 +000017464int
17465main ()
17466{
17467void* p = setgroups
17468 ;
17469 return 0;
17470}
17471_ACEOF
17472rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017473if { (ac_try="$ac_compile"
17474case "(($ac_try" in
17475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17476 *) ac_try_echo=$ac_try;;
17477esac
17478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017481 grep -v '^ *+' conftest.er1 >conftest.err
17482 rm -f conftest.er1
17483 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017485 (exit $ac_status); } && {
17486 test -z "$ac_c_werror_flag" ||
17487 test ! -s conftest.err
17488 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017489
17490cat >>confdefs.h <<\_ACEOF
17491#define HAVE_SETGROUPS 1
17492_ACEOF
17493
Martin v. Löwiseba40652007-08-30 20:10:57 +000017494 { echo "$as_me:$LINENO: result: yes" >&5
17495echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017496else
17497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017498sed 's/^/| /' conftest.$ac_ext >&5
17499
Martin v. Löwiseba40652007-08-30 20:10:57 +000017500 { echo "$as_me:$LINENO: result: no" >&5
17501echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017502
17503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017504
17505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017506
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017507# check for openpty and forkpty
17508
Martin v. Löwis11437992002-04-12 09:54:03 +000017509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017510for ac_func in openpty
17511do
Martin v. Löwis11437992002-04-12 09:54:03 +000017512as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17514echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17515if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017517else
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017519/* confdefs.h. */
17520_ACEOF
17521cat confdefs.h >>conftest.$ac_ext
17522cat >>conftest.$ac_ext <<_ACEOF
17523/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017524/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17525 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17526#define $ac_func innocuous_$ac_func
17527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017528/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017529 which can conflict with char $ac_func (); below.
17530 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017531 <limits.h> exists even on freestanding compilers. */
17532
17533#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017534# include <limits.h>
17535#else
17536# include <assert.h>
17537#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017538
17539#undef $ac_func
17540
Martin v. Löwiseba40652007-08-30 20:10:57 +000017541/* Override any GCC internal prototype to avoid an error.
17542 Use char because int might match the return type of a GCC
17543 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017544#ifdef __cplusplus
17545extern "C"
17546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017547char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017548/* The GNU C library defines this for functions which it implements
17549 to always fail with ENOSYS. Some functions are actually named
17550 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017551#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017552choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017553#endif
17554
Skip Montanaro6dead952003-09-25 14:50:04 +000017555int
17556main ()
17557{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017558return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 ;
17560 return 0;
17561}
17562_ACEOF
17563rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017564if { (ac_try="$ac_link"
17565case "(($ac_try" in
17566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17567 *) ac_try_echo=$ac_try;;
17568esac
17569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17570 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017572 grep -v '^ *+' conftest.er1 >conftest.err
17573 rm -f conftest.er1
17574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576 (exit $ac_status); } && {
17577 test -z "$ac_c_werror_flag" ||
17578 test ! -s conftest.err
17579 } && test -s conftest$ac_exeext &&
17580 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017582else
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017584sed 's/^/| /' conftest.$ac_ext >&5
17585
Martin v. Löwiseba40652007-08-30 20:10:57 +000017586 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588
17589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017590 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592ac_res=`eval echo '${'$as_ac_var'}'`
17593 { echo "$as_me:$LINENO: result: $ac_res" >&5
17594echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017595if test `eval echo '${'$as_ac_var'}'` = yes; then
17596 cat >>confdefs.h <<_ACEOF
17597#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17598_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017599
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017600else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17602echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017603if test "${ac_cv_lib_util_openpty+set}" = set; then
17604 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017605else
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017607LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017609/* confdefs.h. */
17610_ACEOF
17611cat confdefs.h >>conftest.$ac_ext
17612cat >>conftest.$ac_ext <<_ACEOF
17613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
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 openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017622int
17623main ()
17624{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017625return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017626 ;
17627 return 0;
17628}
17629_ACEOF
17630rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017631if { (ac_try="$ac_link"
17632case "(($ac_try" in
17633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17634 *) ac_try_echo=$ac_try;;
17635esac
17636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17637 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017639 grep -v '^ *+' conftest.er1 >conftest.err
17640 rm -f conftest.er1
17641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017643 (exit $ac_status); } && {
17644 test -z "$ac_c_werror_flag" ||
17645 test ! -s conftest.err
17646 } && test -s conftest$ac_exeext &&
17647 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017649else
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017651sed 's/^/| /' conftest.$ac_ext >&5
17652
Martin v. Löwiseba40652007-08-30 20:10:57 +000017653 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017655
17656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017657 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017658LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17661echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017662if test $ac_cv_lib_util_openpty = yes; then
17663 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017664#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017665_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017666 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017667else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017668 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17669echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017670if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17671 echo $ECHO_N "(cached) $ECHO_C" >&6
17672else
17673 ac_check_lib_save_LIBS=$LIBS
17674LIBS="-lbsd $LIBS"
17675cat >conftest.$ac_ext <<_ACEOF
17676/* confdefs.h. */
17677_ACEOF
17678cat confdefs.h >>conftest.$ac_ext
17679cat >>conftest.$ac_ext <<_ACEOF
17680/* end confdefs.h. */
17681
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682/* Override any GCC internal prototype to avoid an error.
17683 Use char because int might match the return type of a GCC
17684 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017685#ifdef __cplusplus
17686extern "C"
17687#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017688char openpty ();
17689int
17690main ()
17691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017692return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017693 ;
17694 return 0;
17695}
17696_ACEOF
17697rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017698if { (ac_try="$ac_link"
17699case "(($ac_try" in
17700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17701 *) ac_try_echo=$ac_try;;
17702esac
17703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17704 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017705 ac_status=$?
17706 grep -v '^ *+' conftest.er1 >conftest.err
17707 rm -f conftest.er1
17708 cat conftest.err >&5
17709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017710 (exit $ac_status); } && {
17711 test -z "$ac_c_werror_flag" ||
17712 test ! -s conftest.err
17713 } && test -s conftest$ac_exeext &&
17714 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017715 ac_cv_lib_bsd_openpty=yes
17716else
17717 echo "$as_me: failed program was:" >&5
17718sed 's/^/| /' conftest.$ac_ext >&5
17719
Martin v. Löwiseba40652007-08-30 20:10:57 +000017720 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017722
17723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017724 conftest$ac_exeext conftest.$ac_ext
17725LIBS=$ac_check_lib_save_LIBS
17726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17728echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017729if test $ac_cv_lib_bsd_openpty = yes; then
17730 cat >>confdefs.h <<\_ACEOF
17731#define HAVE_OPENPTY 1
17732_ACEOF
17733 LIBS="$LIBS -lbsd"
17734fi
17735
17736
17737fi
17738
Fred Drake8cef4cf2000-06-28 16:40:38 +000017739
17740fi
17741done
17742
Martin v. Löwis11437992002-04-12 09:54:03 +000017743
Fred Drake8cef4cf2000-06-28 16:40:38 +000017744for ac_func in forkpty
17745do
Martin v. Löwis11437992002-04-12 09:54:03 +000017746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017747{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17749if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017751else
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017753/* confdefs.h. */
17754_ACEOF
17755cat confdefs.h >>conftest.$ac_ext
17756cat >>conftest.$ac_ext <<_ACEOF
17757/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017758/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17760#define $ac_func innocuous_$ac_func
17761
Fred Drake8cef4cf2000-06-28 16:40:38 +000017762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017763 which can conflict with char $ac_func (); below.
17764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017765 <limits.h> exists even on freestanding compilers. */
17766
17767#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017768# include <limits.h>
17769#else
17770# include <assert.h>
17771#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017772
17773#undef $ac_func
17774
Martin v. Löwiseba40652007-08-30 20:10:57 +000017775/* Override any GCC internal prototype to avoid an error.
17776 Use char because int might match the return type of a GCC
17777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017778#ifdef __cplusplus
17779extern "C"
17780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017781char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017782/* The GNU C library defines this for functions which it implements
17783 to always fail with ENOSYS. Some functions are actually named
17784 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017785#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017786choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017787#endif
17788
Skip Montanaro6dead952003-09-25 14:50:04 +000017789int
17790main ()
17791{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017792return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017793 ;
17794 return 0;
17795}
17796_ACEOF
17797rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017798if { (ac_try="$ac_link"
17799case "(($ac_try" in
17800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17801 *) ac_try_echo=$ac_try;;
17802esac
17803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17804 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017806 grep -v '^ *+' conftest.er1 >conftest.err
17807 rm -f conftest.er1
17808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017810 (exit $ac_status); } && {
17811 test -z "$ac_c_werror_flag" ||
17812 test ! -s conftest.err
17813 } && test -s conftest$ac_exeext &&
17814 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017816else
Martin v. Löwis11437992002-04-12 09:54:03 +000017817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017818sed 's/^/| /' conftest.$ac_ext >&5
17819
Martin v. Löwiseba40652007-08-30 20:10:57 +000017820 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822
17823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017826ac_res=`eval echo '${'$as_ac_var'}'`
17827 { echo "$as_me:$LINENO: result: $ac_res" >&5
17828echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017829if test `eval echo '${'$as_ac_var'}'` = yes; then
17830 cat >>confdefs.h <<_ACEOF
17831#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17832_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017833
Fred Drake8cef4cf2000-06-28 16:40:38 +000017834else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017835 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17836echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017837if test "${ac_cv_lib_util_forkpty+set}" = set; then
17838 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017839else
Martin v. Löwis11437992002-04-12 09:54:03 +000017840 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017841LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017842cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017843/* confdefs.h. */
17844_ACEOF
17845cat confdefs.h >>conftest.$ac_ext
17846cat >>conftest.$ac_ext <<_ACEOF
17847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017848
Martin v. Löwiseba40652007-08-30 20:10:57 +000017849/* Override any GCC internal prototype to avoid an error.
17850 Use char because int might match the return type of a GCC
17851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017852#ifdef __cplusplus
17853extern "C"
17854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017855char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017856int
17857main ()
17858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017859return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017860 ;
17861 return 0;
17862}
17863_ACEOF
17864rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017865if { (ac_try="$ac_link"
17866case "(($ac_try" in
17867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17868 *) ac_try_echo=$ac_try;;
17869esac
17870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17871 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017873 grep -v '^ *+' conftest.er1 >conftest.err
17874 rm -f conftest.er1
17875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017877 (exit $ac_status); } && {
17878 test -z "$ac_c_werror_flag" ||
17879 test ! -s conftest.err
17880 } && test -s conftest$ac_exeext &&
17881 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017883else
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017885sed 's/^/| /' conftest.$ac_ext >&5
17886
Martin v. Löwiseba40652007-08-30 20:10:57 +000017887 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889
17890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017892LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017894{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17895echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017896if test $ac_cv_lib_util_forkpty = yes; then
17897 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017898#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017899_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017900 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017901else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17903echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017904if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17905 echo $ECHO_N "(cached) $ECHO_C" >&6
17906else
17907 ac_check_lib_save_LIBS=$LIBS
17908LIBS="-lbsd $LIBS"
17909cat >conftest.$ac_ext <<_ACEOF
17910/* confdefs.h. */
17911_ACEOF
17912cat confdefs.h >>conftest.$ac_ext
17913cat >>conftest.$ac_ext <<_ACEOF
17914/* end confdefs.h. */
17915
Martin v. Löwiseba40652007-08-30 20:10:57 +000017916/* Override any GCC internal prototype to avoid an error.
17917 Use char because int might match the return type of a GCC
17918 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017919#ifdef __cplusplus
17920extern "C"
17921#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017922char forkpty ();
17923int
17924main ()
17925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017926return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017927 ;
17928 return 0;
17929}
17930_ACEOF
17931rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017932if { (ac_try="$ac_link"
17933case "(($ac_try" in
17934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17935 *) ac_try_echo=$ac_try;;
17936esac
17937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17938 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017939 ac_status=$?
17940 grep -v '^ *+' conftest.er1 >conftest.err
17941 rm -f conftest.er1
17942 cat conftest.err >&5
17943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017944 (exit $ac_status); } && {
17945 test -z "$ac_c_werror_flag" ||
17946 test ! -s conftest.err
17947 } && test -s conftest$ac_exeext &&
17948 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017949 ac_cv_lib_bsd_forkpty=yes
17950else
17951 echo "$as_me: failed program was:" >&5
17952sed 's/^/| /' conftest.$ac_ext >&5
17953
Martin v. Löwiseba40652007-08-30 20:10:57 +000017954 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017956
17957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017958 conftest$ac_exeext conftest.$ac_ext
17959LIBS=$ac_check_lib_save_LIBS
17960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017961{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17962echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017963if test $ac_cv_lib_bsd_forkpty = yes; then
17964 cat >>confdefs.h <<\_ACEOF
17965#define HAVE_FORKPTY 1
17966_ACEOF
17967 LIBS="$LIBS -lbsd"
17968fi
17969
17970
17971fi
17972
Fred Drake8cef4cf2000-06-28 16:40:38 +000017973
17974fi
17975done
17976
Jack Jansendd19cf82001-12-06 22:36:17 +000017977
Brett Cannonaa5778d2008-03-18 04:09:00 +000017978# Stuff for expat.
17979
17980for ac_func in memmove
17981do
17982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17983{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17985if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17986 echo $ECHO_N "(cached) $ECHO_C" >&6
17987else
17988 cat >conftest.$ac_ext <<_ACEOF
17989/* confdefs.h. */
17990_ACEOF
17991cat confdefs.h >>conftest.$ac_ext
17992cat >>conftest.$ac_ext <<_ACEOF
17993/* end confdefs.h. */
17994/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17995 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17996#define $ac_func innocuous_$ac_func
17997
17998/* System header to define __stub macros and hopefully few prototypes,
17999 which can conflict with char $ac_func (); below.
18000 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18001 <limits.h> exists even on freestanding compilers. */
18002
18003#ifdef __STDC__
18004# include <limits.h>
18005#else
18006# include <assert.h>
18007#endif
18008
18009#undef $ac_func
18010
18011/* Override any GCC internal prototype to avoid an error.
18012 Use char because int might match the return type of a GCC
18013 builtin and then its argument prototype would still apply. */
18014#ifdef __cplusplus
18015extern "C"
18016#endif
18017char $ac_func ();
18018/* The GNU C library defines this for functions which it implements
18019 to always fail with ENOSYS. Some functions are actually named
18020 something starting with __ and the normal name is an alias. */
18021#if defined __stub_$ac_func || defined __stub___$ac_func
18022choke me
18023#endif
18024
18025int
18026main ()
18027{
18028return $ac_func ();
18029 ;
18030 return 0;
18031}
18032_ACEOF
18033rm -f conftest.$ac_objext conftest$ac_exeext
18034if { (ac_try="$ac_link"
18035case "(($ac_try" in
18036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18037 *) ac_try_echo=$ac_try;;
18038esac
18039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18040 (eval "$ac_link") 2>conftest.er1
18041 ac_status=$?
18042 grep -v '^ *+' conftest.er1 >conftest.err
18043 rm -f conftest.er1
18044 cat conftest.err >&5
18045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18046 (exit $ac_status); } && {
18047 test -z "$ac_c_werror_flag" ||
18048 test ! -s conftest.err
18049 } && test -s conftest$ac_exeext &&
18050 $as_test_x conftest$ac_exeext; then
18051 eval "$as_ac_var=yes"
18052else
18053 echo "$as_me: failed program was:" >&5
18054sed 's/^/| /' conftest.$ac_ext >&5
18055
18056 eval "$as_ac_var=no"
18057fi
18058
18059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18060 conftest$ac_exeext conftest.$ac_ext
18061fi
18062ac_res=`eval echo '${'$as_ac_var'}'`
18063 { echo "$as_me:$LINENO: result: $ac_res" >&5
18064echo "${ECHO_T}$ac_res" >&6; }
18065if test `eval echo '${'$as_ac_var'}'` = yes; then
18066 cat >>confdefs.h <<_ACEOF
18067#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18068_ACEOF
18069
18070fi
18071done
18072
18073
Michael W. Hudson54241132001-12-07 15:38:26 +000018074# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018075
18076
18077
18078
18079
18080
Fred Drake8cef4cf2000-06-28 16:40:38 +000018081for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18082do
Martin v. Löwis11437992002-04-12 09:54:03 +000018083as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018084{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18085echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18086if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018088else
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018090/* confdefs.h. */
18091_ACEOF
18092cat confdefs.h >>conftest.$ac_ext
18093cat >>conftest.$ac_ext <<_ACEOF
18094/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018095/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18096 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18097#define $ac_func innocuous_$ac_func
18098
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018099/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018100 which can conflict with char $ac_func (); below.
18101 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018102 <limits.h> exists even on freestanding compilers. */
18103
18104#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018105# include <limits.h>
18106#else
18107# include <assert.h>
18108#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018109
18110#undef $ac_func
18111
Martin v. Löwiseba40652007-08-30 20:10:57 +000018112/* Override any GCC internal prototype to avoid an error.
18113 Use char because int might match the return type of a GCC
18114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018115#ifdef __cplusplus
18116extern "C"
18117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018118char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018119/* The GNU C library defines this for functions which it implements
18120 to always fail with ENOSYS. Some functions are actually named
18121 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018122#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018123choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018124#endif
18125
Skip Montanaro6dead952003-09-25 14:50:04 +000018126int
18127main ()
18128{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018129return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018130 ;
18131 return 0;
18132}
18133_ACEOF
18134rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018135if { (ac_try="$ac_link"
18136case "(($ac_try" in
18137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18138 *) ac_try_echo=$ac_try;;
18139esac
18140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18141 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018143 grep -v '^ *+' conftest.er1 >conftest.err
18144 rm -f conftest.er1
18145 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018147 (exit $ac_status); } && {
18148 test -z "$ac_c_werror_flag" ||
18149 test ! -s conftest.err
18150 } && test -s conftest$ac_exeext &&
18151 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018153else
Martin v. Löwis11437992002-04-12 09:54:03 +000018154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018155sed 's/^/| /' conftest.$ac_ext >&5
18156
Martin v. Löwiseba40652007-08-30 20:10:57 +000018157 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018159
18160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018161 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018163ac_res=`eval echo '${'$as_ac_var'}'`
18164 { echo "$as_me:$LINENO: result: $ac_res" >&5
18165echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018166if test `eval echo '${'$as_ac_var'}'` = yes; then
18167 cat >>confdefs.h <<_ACEOF
18168#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18169_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018170
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018171fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018172done
18173
Michael W. Hudson54241132001-12-07 15:38:26 +000018174
Martin v. Löwis11437992002-04-12 09:54:03 +000018175
18176
18177
Brett Cannonaa5778d2008-03-18 04:09:00 +000018178for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018179do
Martin v. Löwis11437992002-04-12 09:54:03 +000018180as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018181{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18182echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18183if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018185else
Martin v. Löwis11437992002-04-12 09:54:03 +000018186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018187/* confdefs.h. */
18188_ACEOF
18189cat confdefs.h >>conftest.$ac_ext
18190cat >>conftest.$ac_ext <<_ACEOF
18191/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018192/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18194#define $ac_func innocuous_$ac_func
18195
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018196/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018197 which can conflict with char $ac_func (); below.
18198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018199 <limits.h> exists even on freestanding compilers. */
18200
18201#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018202# include <limits.h>
18203#else
18204# include <assert.h>
18205#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018206
18207#undef $ac_func
18208
Martin v. Löwiseba40652007-08-30 20:10:57 +000018209/* Override any GCC internal prototype to avoid an error.
18210 Use char because int might match the return type of a GCC
18211 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018212#ifdef __cplusplus
18213extern "C"
18214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018215char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018216/* The GNU C library defines this for functions which it implements
18217 to always fail with ENOSYS. Some functions are actually named
18218 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018219#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018220choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018221#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018222
Skip Montanaro6dead952003-09-25 14:50:04 +000018223int
18224main ()
18225{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018226return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018227 ;
18228 return 0;
18229}
18230_ACEOF
18231rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018232if { (ac_try="$ac_link"
18233case "(($ac_try" in
18234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18235 *) ac_try_echo=$ac_try;;
18236esac
18237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18238 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018240 grep -v '^ *+' conftest.er1 >conftest.err
18241 rm -f conftest.er1
18242 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018244 (exit $ac_status); } && {
18245 test -z "$ac_c_werror_flag" ||
18246 test ! -s conftest.err
18247 } && test -s conftest$ac_exeext &&
18248 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018250else
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018252sed 's/^/| /' conftest.$ac_ext >&5
18253
Martin v. Löwiseba40652007-08-30 20:10:57 +000018254 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018256
18257rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260ac_res=`eval echo '${'$as_ac_var'}'`
18261 { echo "$as_me:$LINENO: result: $ac_res" >&5
18262echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018263if test `eval echo '${'$as_ac_var'}'` = yes; then
18264 cat >>confdefs.h <<_ACEOF
18265#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18266_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018267
Martin v. Löwis1142de32002-03-29 16:28:31 +000018268else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018269 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018270 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018271 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18272 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018273esac
18274
Martin v. Löwis1142de32002-03-29 16:28:31 +000018275fi
18276done
18277
18278
Martin v. Löwis11437992002-04-12 09:54:03 +000018279
Martin v. Löwis1142de32002-03-29 16:28:31 +000018280for ac_func in getpgrp
18281do
Martin v. Löwis11437992002-04-12 09:54:03 +000018282as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018283{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18284echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18285if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018287else
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018289/* confdefs.h. */
18290_ACEOF
18291cat confdefs.h >>conftest.$ac_ext
18292cat >>conftest.$ac_ext <<_ACEOF
18293/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018294/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18295 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18296#define $ac_func innocuous_$ac_func
18297
Martin v. Löwis1142de32002-03-29 16:28:31 +000018298/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018299 which can conflict with char $ac_func (); below.
18300 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018301 <limits.h> exists even on freestanding compilers. */
18302
18303#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018304# include <limits.h>
18305#else
18306# include <assert.h>
18307#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018308
18309#undef $ac_func
18310
Martin v. Löwiseba40652007-08-30 20:10:57 +000018311/* Override any GCC internal prototype to avoid an error.
18312 Use char because int might match the return type of a GCC
18313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018314#ifdef __cplusplus
18315extern "C"
18316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018317char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018318/* The GNU C library defines this for functions which it implements
18319 to always fail with ENOSYS. Some functions are actually named
18320 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018322choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018323#endif
18324
Skip Montanaro6dead952003-09-25 14:50:04 +000018325int
18326main ()
18327{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018328return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018329 ;
18330 return 0;
18331}
18332_ACEOF
18333rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018334if { (ac_try="$ac_link"
18335case "(($ac_try" in
18336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18337 *) ac_try_echo=$ac_try;;
18338esac
18339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18340 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018342 grep -v '^ *+' conftest.er1 >conftest.err
18343 rm -f conftest.er1
18344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018346 (exit $ac_status); } && {
18347 test -z "$ac_c_werror_flag" ||
18348 test ! -s conftest.err
18349 } && test -s conftest$ac_exeext &&
18350 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018351 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018352else
Martin v. Löwis11437992002-04-12 09:54:03 +000018353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018354sed 's/^/| /' conftest.$ac_ext >&5
18355
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018358
18359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018360 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018362ac_res=`eval echo '${'$as_ac_var'}'`
18363 { echo "$as_me:$LINENO: result: $ac_res" >&5
18364echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018365if test `eval echo '${'$as_ac_var'}'` = yes; then
18366 cat >>confdefs.h <<_ACEOF
18367#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18368_ACEOF
18369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018370/* confdefs.h. */
18371_ACEOF
18372cat confdefs.h >>conftest.$ac_ext
18373cat >>conftest.$ac_ext <<_ACEOF
18374/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018375#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018376int
18377main ()
18378{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018379getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 ;
18381 return 0;
18382}
18383_ACEOF
18384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018385if { (ac_try="$ac_compile"
18386case "(($ac_try" in
18387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18388 *) ac_try_echo=$ac_try;;
18389esac
18390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018393 grep -v '^ *+' conftest.er1 >conftest.err
18394 rm -f conftest.er1
18395 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397 (exit $ac_status); } && {
18398 test -z "$ac_c_werror_flag" ||
18399 test ! -s conftest.err
18400 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018401
18402cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018403#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018404_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018405
Martin v. Löwis11437992002-04-12 09:54:03 +000018406
Guido van Rossumf78abae1997-01-21 22:02:36 +000018407else
Martin v. Löwis11437992002-04-12 09:54:03 +000018408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018409sed 's/^/| /' conftest.$ac_ext >&5
18410
Martin v. Löwiseba40652007-08-30 20:10:57 +000018411
Guido van Rossum627b2d71993-12-24 10:39:16 +000018412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018413
18414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018415
Guido van Rossum627b2d71993-12-24 10:39:16 +000018416fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018417done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018418
Jack Jansen150753c2003-03-29 22:07:47 +000018419
18420for ac_func in setpgrp
18421do
18422as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18424echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18425if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018427else
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018434/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18436#define $ac_func innocuous_$ac_func
18437
Jack Jansen150753c2003-03-29 22:07:47 +000018438/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018439 which can conflict with char $ac_func (); below.
18440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018441 <limits.h> exists even on freestanding compilers. */
18442
18443#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018444# include <limits.h>
18445#else
18446# include <assert.h>
18447#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018448
18449#undef $ac_func
18450
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451/* Override any GCC internal prototype to avoid an error.
18452 Use char because int might match the return type of a GCC
18453 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018454#ifdef __cplusplus
18455extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018456#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018457char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018458/* The GNU C library defines this for functions which it implements
18459 to always fail with ENOSYS. Some functions are actually named
18460 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018462choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018463#endif
18464
Skip Montanaro6dead952003-09-25 14:50:04 +000018465int
18466main ()
18467{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018468return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 ;
18470 return 0;
18471}
18472_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018473rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018474if { (ac_try="$ac_link"
18475case "(($ac_try" in
18476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18477 *) ac_try_echo=$ac_try;;
18478esac
18479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18480 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018482 grep -v '^ *+' conftest.er1 >conftest.err
18483 rm -f conftest.er1
18484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018486 (exit $ac_status); } && {
18487 test -z "$ac_c_werror_flag" ||
18488 test ! -s conftest.err
18489 } && test -s conftest$ac_exeext &&
18490 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018491 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018492else
Jack Jansen150753c2003-03-29 22:07:47 +000018493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018494sed 's/^/| /' conftest.$ac_ext >&5
18495
Martin v. Löwiseba40652007-08-30 20:10:57 +000018496 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018498
18499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018500 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018502ac_res=`eval echo '${'$as_ac_var'}'`
18503 { echo "$as_me:$LINENO: result: $ac_res" >&5
18504echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018505if test `eval echo '${'$as_ac_var'}'` = yes; then
18506 cat >>confdefs.h <<_ACEOF
18507#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18508_ACEOF
18509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018510/* confdefs.h. */
18511_ACEOF
18512cat confdefs.h >>conftest.$ac_ext
18513cat >>conftest.$ac_ext <<_ACEOF
18514/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018515#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018516int
18517main ()
18518{
18519setpgrp(0,0);
18520 ;
18521 return 0;
18522}
18523_ACEOF
18524rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018525if { (ac_try="$ac_compile"
18526case "(($ac_try" in
18527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18528 *) ac_try_echo=$ac_try;;
18529esac
18530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18531 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018533 grep -v '^ *+' conftest.er1 >conftest.err
18534 rm -f conftest.er1
18535 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018537 (exit $ac_status); } && {
18538 test -z "$ac_c_werror_flag" ||
18539 test ! -s conftest.err
18540 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018541
18542cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018543#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018544_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018545
Jack Jansen150753c2003-03-29 22:07:47 +000018546
18547else
18548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018549sed 's/^/| /' conftest.$ac_ext >&5
18550
Martin v. Löwiseba40652007-08-30 20:10:57 +000018551
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553
18554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018555
18556fi
18557done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018558
Martin v. Löwis11437992002-04-12 09:54:03 +000018559
Thomas Wouters3a584202000-08-05 23:28:51 +000018560for ac_func in gettimeofday
18561do
Martin v. Löwis11437992002-04-12 09:54:03 +000018562as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018563{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18564echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18565if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018566 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018567else
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018569/* confdefs.h. */
18570_ACEOF
18571cat confdefs.h >>conftest.$ac_ext
18572cat >>conftest.$ac_ext <<_ACEOF
18573/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018574/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18575 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18576#define $ac_func innocuous_$ac_func
18577
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018578/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018579 which can conflict with char $ac_func (); below.
18580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018581 <limits.h> exists even on freestanding compilers. */
18582
18583#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018584# include <limits.h>
18585#else
18586# include <assert.h>
18587#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018588
18589#undef $ac_func
18590
Martin v. Löwiseba40652007-08-30 20:10:57 +000018591/* Override any GCC internal prototype to avoid an error.
18592 Use char because int might match the return type of a GCC
18593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018594#ifdef __cplusplus
18595extern "C"
18596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018597char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018598/* The GNU C library defines this for functions which it implements
18599 to always fail with ENOSYS. Some functions are actually named
18600 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018602choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018603#endif
18604
Skip Montanaro6dead952003-09-25 14:50:04 +000018605int
18606main ()
18607{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018608return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 ;
18610 return 0;
18611}
18612_ACEOF
18613rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018614if { (ac_try="$ac_link"
18615case "(($ac_try" in
18616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18617 *) ac_try_echo=$ac_try;;
18618esac
18619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18620 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018622 grep -v '^ *+' conftest.er1 >conftest.err
18623 rm -f conftest.er1
18624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626 (exit $ac_status); } && {
18627 test -z "$ac_c_werror_flag" ||
18628 test ! -s conftest.err
18629 } && test -s conftest$ac_exeext &&
18630 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018631 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018632else
Martin v. Löwis11437992002-04-12 09:54:03 +000018633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018634sed 's/^/| /' conftest.$ac_ext >&5
18635
Martin v. Löwiseba40652007-08-30 20:10:57 +000018636 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018638
18639rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018640 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018642ac_res=`eval echo '${'$as_ac_var'}'`
18643 { echo "$as_me:$LINENO: result: $ac_res" >&5
18644echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018645if test `eval echo '${'$as_ac_var'}'` = yes; then
18646 cat >>confdefs.h <<_ACEOF
18647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18648_ACEOF
18649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018650/* confdefs.h. */
18651_ACEOF
18652cat confdefs.h >>conftest.$ac_ext
18653cat >>conftest.$ac_ext <<_ACEOF
18654/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018655#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018656int
18657main ()
18658{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018659gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018660 ;
18661 return 0;
18662}
18663_ACEOF
18664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665if { (ac_try="$ac_compile"
18666case "(($ac_try" in
18667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18668 *) ac_try_echo=$ac_try;;
18669esac
18670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018673 grep -v '^ *+' conftest.er1 >conftest.err
18674 rm -f conftest.er1
18675 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018677 (exit $ac_status); } && {
18678 test -z "$ac_c_werror_flag" ||
18679 test ! -s conftest.err
18680 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018681 :
18682else
Martin v. Löwis11437992002-04-12 09:54:03 +000018683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018684sed 's/^/| /' conftest.$ac_ext >&5
18685
Martin v. Löwis11437992002-04-12 09:54:03 +000018686
18687cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018688#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018689_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018690
Martin v. Löwis11437992002-04-12 09:54:03 +000018691
Guido van Rossum627b2d71993-12-24 10:39:16 +000018692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018693
18694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018695
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018696fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018697done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018698
Michael W. Hudson54241132001-12-07 15:38:26 +000018699
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700{ echo "$as_me:$LINENO: checking for major" >&5
18701echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018703/* confdefs.h. */
18704_ACEOF
18705cat confdefs.h >>conftest.$ac_ext
18706cat >>conftest.$ac_ext <<_ACEOF
18707/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018708
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018709#if defined(MAJOR_IN_MKDEV)
18710#include <sys/mkdev.h>
18711#elif defined(MAJOR_IN_SYSMACROS)
18712#include <sys/sysmacros.h>
18713#else
18714#include <sys/types.h>
18715#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018716
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018717int
18718main ()
18719{
18720
18721 makedev(major(0),minor(0));
18722
18723 ;
18724 return 0;
18725}
18726_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018727rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018728if { (ac_try="$ac_link"
18729case "(($ac_try" in
18730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18731 *) ac_try_echo=$ac_try;;
18732esac
18733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018736 grep -v '^ *+' conftest.er1 >conftest.err
18737 rm -f conftest.er1
18738 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018740 (exit $ac_status); } && {
18741 test -z "$ac_c_werror_flag" ||
18742 test ! -s conftest.err
18743 } && test -s conftest$ac_exeext &&
18744 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018745
18746
18747cat >>confdefs.h <<\_ACEOF
18748#define HAVE_DEVICE_MACROS 1
18749_ACEOF
18750
Martin v. Löwiseba40652007-08-30 20:10:57 +000018751 { echo "$as_me:$LINENO: result: yes" >&5
18752echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018753
18754else
18755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018756sed 's/^/| /' conftest.$ac_ext >&5
18757
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018758
Martin v. Löwiseba40652007-08-30 20:10:57 +000018759 { echo "$as_me:$LINENO: result: no" >&5
18760echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018761
18762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018763
18764rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018765 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018766
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018767# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018768# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018769{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18770echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018772/* confdefs.h. */
18773_ACEOF
18774cat confdefs.h >>conftest.$ac_ext
18775cat >>conftest.$ac_ext <<_ACEOF
18776/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018777
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018778#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018779#include <sys/socket.h>
18780#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018781#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018782
Martin v. Löwis11437992002-04-12 09:54:03 +000018783int
18784main ()
18785{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018786
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018787getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018788
Martin v. Löwis11437992002-04-12 09:54:03 +000018789 ;
18790 return 0;
18791}
18792_ACEOF
18793rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018794if { (ac_try="$ac_link"
18795case "(($ac_try" in
18796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18797 *) ac_try_echo=$ac_try;;
18798esac
18799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18800 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018802 grep -v '^ *+' conftest.er1 >conftest.err
18803 rm -f conftest.er1
18804 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018806 (exit $ac_status); } && {
18807 test -z "$ac_c_werror_flag" ||
18808 test ! -s conftest.err
18809 } && test -s conftest$ac_exeext &&
18810 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018811
Martin v. Löwiseba40652007-08-30 20:10:57 +000018812{ echo "$as_me:$LINENO: result: yes" >&5
18813echo "${ECHO_T}yes" >&6; }
18814{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18815echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018816if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018817 { echo "$as_me:$LINENO: result: buggy" >&5
18818echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018819buggygetaddrinfo=yes
18820else
Martin v. Löwis11437992002-04-12 09:54:03 +000018821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018822/* confdefs.h. */
18823_ACEOF
18824cat confdefs.h >>conftest.$ac_ext
18825cat >>conftest.$ac_ext <<_ACEOF
18826/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018827
18828#include <sys/types.h>
18829#include <netdb.h>
18830#include <string.h>
18831#include <sys/socket.h>
18832#include <netinet/in.h>
18833
18834main()
18835{
18836 int passive, gaierr, inet4 = 0, inet6 = 0;
18837 struct addrinfo hints, *ai, *aitop;
18838 char straddr[INET6_ADDRSTRLEN], strport[16];
18839
18840 for (passive = 0; passive <= 1; passive++) {
18841 memset(&hints, 0, sizeof(hints));
18842 hints.ai_family = AF_UNSPEC;
18843 hints.ai_flags = passive ? AI_PASSIVE : 0;
18844 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018845 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018846 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18847 (void)gai_strerror(gaierr);
18848 goto bad;
18849 }
18850 for (ai = aitop; ai; ai = ai->ai_next) {
18851 if (ai->ai_addr == NULL ||
18852 ai->ai_addrlen == 0 ||
18853 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18854 straddr, sizeof(straddr), strport, sizeof(strport),
18855 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18856 goto bad;
18857 }
18858 switch (ai->ai_family) {
18859 case AF_INET:
18860 if (strcmp(strport, "54321") != 0) {
18861 goto bad;
18862 }
18863 if (passive) {
18864 if (strcmp(straddr, "0.0.0.0") != 0) {
18865 goto bad;
18866 }
18867 } else {
18868 if (strcmp(straddr, "127.0.0.1") != 0) {
18869 goto bad;
18870 }
18871 }
18872 inet4++;
18873 break;
18874 case AF_INET6:
18875 if (strcmp(strport, "54321") != 0) {
18876 goto bad;
18877 }
18878 if (passive) {
18879 if (strcmp(straddr, "::") != 0) {
18880 goto bad;
18881 }
18882 } else {
18883 if (strcmp(straddr, "::1") != 0) {
18884 goto bad;
18885 }
18886 }
18887 inet6++;
18888 break;
18889 case AF_UNSPEC:
18890 goto bad;
18891 break;
18892 default:
18893 /* another family support? */
18894 break;
18895 }
18896 }
18897 }
18898
18899 if (!(inet4 == 0 || inet4 == 2))
18900 goto bad;
18901 if (!(inet6 == 0 || inet6 == 2))
18902 goto bad;
18903
18904 if (aitop)
18905 freeaddrinfo(aitop);
18906 exit(0);
18907
18908 bad:
18909 if (aitop)
18910 freeaddrinfo(aitop);
18911 exit(1);
18912}
18913
Martin v. Löwis11437992002-04-12 09:54:03 +000018914_ACEOF
18915rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018916if { (ac_try="$ac_link"
18917case "(($ac_try" in
18918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18919 *) ac_try_echo=$ac_try;;
18920esac
18921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18922 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018923 ac_status=$?
18924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926 { (case "(($ac_try" in
18927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18928 *) ac_try_echo=$ac_try;;
18929esac
18930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18931 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 ac_status=$?
18933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18934 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018935 { echo "$as_me:$LINENO: result: good" >&5
18936echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018937buggygetaddrinfo=no
18938else
Martin v. Löwis11437992002-04-12 09:54:03 +000018939 echo "$as_me: program exited with status $ac_status" >&5
18940echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018941sed 's/^/| /' conftest.$ac_ext >&5
18942
Martin v. Löwis11437992002-04-12 09:54:03 +000018943( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944{ echo "$as_me:$LINENO: result: buggy" >&5
18945echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018946buggygetaddrinfo=yes
18947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948rm -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 +000018949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018950
18951
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018952else
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018954sed 's/^/| /' conftest.$ac_ext >&5
18955
Martin v. Löwis11437992002-04-12 09:54:03 +000018956
Martin v. Löwiseba40652007-08-30 20:10:57 +000018957{ echo "$as_me:$LINENO: result: no" >&5
18958echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018959buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018960
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962
18963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018965
18966if test "$buggygetaddrinfo" = "yes"; then
18967 if test "$ipv6" = "yes"; then
18968 echo 'Fatal: You must get working getaddrinfo() function.'
18969 echo ' or you can specify "--disable-ipv6"'.
18970 exit 1
18971 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018972else
Martin v. Löwis11437992002-04-12 09:54:03 +000018973
18974cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018975#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018976_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018977
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018979
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018980for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018981do
Martin v. Löwis11437992002-04-12 09:54:03 +000018982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018983{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18985if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018987else
Martin v. Löwis11437992002-04-12 09:54:03 +000018988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018989/* confdefs.h. */
18990_ACEOF
18991cat confdefs.h >>conftest.$ac_ext
18992cat >>conftest.$ac_ext <<_ACEOF
18993/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018994/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18995 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18996#define $ac_func innocuous_$ac_func
18997
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018998/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018999 which can conflict with char $ac_func (); below.
19000 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019001 <limits.h> exists even on freestanding compilers. */
19002
19003#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019004# include <limits.h>
19005#else
19006# include <assert.h>
19007#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019008
19009#undef $ac_func
19010
Martin v. Löwiseba40652007-08-30 20:10:57 +000019011/* Override any GCC internal prototype to avoid an error.
19012 Use char because int might match the return type of a GCC
19013 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019014#ifdef __cplusplus
19015extern "C"
19016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019017char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019018/* The GNU C library defines this for functions which it implements
19019 to always fail with ENOSYS. Some functions are actually named
19020 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019021#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019022choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019023#endif
19024
Skip Montanaro6dead952003-09-25 14:50:04 +000019025int
19026main ()
19027{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019028return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019029 ;
19030 return 0;
19031}
19032_ACEOF
19033rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019034if { (ac_try="$ac_link"
19035case "(($ac_try" in
19036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19037 *) ac_try_echo=$ac_try;;
19038esac
19039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019042 grep -v '^ *+' conftest.er1 >conftest.err
19043 rm -f conftest.er1
19044 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019046 (exit $ac_status); } && {
19047 test -z "$ac_c_werror_flag" ||
19048 test ! -s conftest.err
19049 } && test -s conftest$ac_exeext &&
19050 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019052else
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019054sed 's/^/| /' conftest.$ac_ext >&5
19055
Martin v. Löwiseba40652007-08-30 20:10:57 +000019056 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058
19059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019060 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019062ac_res=`eval echo '${'$as_ac_var'}'`
19063 { echo "$as_me:$LINENO: result: $ac_res" >&5
19064echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019065if test `eval echo '${'$as_ac_var'}'` = yes; then
19066 cat >>confdefs.h <<_ACEOF
19067#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19068_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019069
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019070fi
19071done
19072
Michael W. Hudson54241132001-12-07 15:38:26 +000019073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019074# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019075{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19076echo $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 +000019077if test "${ac_cv_header_time+set}" = set; then
19078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019079else
Martin v. Löwis11437992002-04-12 09:54:03 +000019080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019081/* confdefs.h. */
19082_ACEOF
19083cat confdefs.h >>conftest.$ac_ext
19084cat >>conftest.$ac_ext <<_ACEOF
19085/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019086#include <sys/types.h>
19087#include <sys/time.h>
19088#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019089
Martin v. Löwis11437992002-04-12 09:54:03 +000019090int
19091main ()
19092{
19093if ((struct tm *) 0)
19094return 0;
19095 ;
19096 return 0;
19097}
19098_ACEOF
19099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100if { (ac_try="$ac_compile"
19101case "(($ac_try" in
19102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19103 *) ac_try_echo=$ac_try;;
19104esac
19105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019108 grep -v '^ *+' conftest.er1 >conftest.err
19109 rm -f conftest.er1
19110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112 (exit $ac_status); } && {
19113 test -z "$ac_c_werror_flag" ||
19114 test ! -s conftest.err
19115 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019116 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019117else
Martin v. Löwis11437992002-04-12 09:54:03 +000019118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019119sed 's/^/| /' conftest.$ac_ext >&5
19120
Martin v. Löwiseba40652007-08-30 20:10:57 +000019121 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123
19124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019126{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19127echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019128if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019129
19130cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019131#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019132_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019133
19134fi
19135
Martin v. Löwiseba40652007-08-30 20:10:57 +000019136{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19137echo $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 +000019138if test "${ac_cv_struct_tm+set}" = set; then
19139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019140else
Martin v. Löwis11437992002-04-12 09:54:03 +000019141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019142/* confdefs.h. */
19143_ACEOF
19144cat confdefs.h >>conftest.$ac_ext
19145cat >>conftest.$ac_ext <<_ACEOF
19146/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019147#include <sys/types.h>
19148#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019149
Martin v. Löwis11437992002-04-12 09:54:03 +000019150int
19151main ()
19152{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019153struct tm tm;
19154 int *p = &tm.tm_sec;
19155 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019156 ;
19157 return 0;
19158}
19159_ACEOF
19160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019161if { (ac_try="$ac_compile"
19162case "(($ac_try" in
19163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19164 *) ac_try_echo=$ac_try;;
19165esac
19166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019169 grep -v '^ *+' conftest.er1 >conftest.err
19170 rm -f conftest.er1
19171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173 (exit $ac_status); } && {
19174 test -z "$ac_c_werror_flag" ||
19175 test ! -s conftest.err
19176 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019177 ac_cv_struct_tm=time.h
19178else
Martin v. Löwis11437992002-04-12 09:54:03 +000019179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019180sed 's/^/| /' conftest.$ac_ext >&5
19181
Martin v. Löwiseba40652007-08-30 20:10:57 +000019182 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019184
19185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019187{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19188echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019189if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019190
19191cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019192#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019193_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019194
19195fi
19196
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19198echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019199if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019201else
Martin v. Löwis11437992002-04-12 09:54:03 +000019202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019203/* confdefs.h. */
19204_ACEOF
19205cat confdefs.h >>conftest.$ac_ext
19206cat >>conftest.$ac_ext <<_ACEOF
19207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019208#include <sys/types.h>
19209#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019210
19211
Martin v. Löwis11437992002-04-12 09:54:03 +000019212int
19213main ()
19214{
19215static struct tm ac_aggr;
19216if (ac_aggr.tm_zone)
19217return 0;
19218 ;
19219 return 0;
19220}
19221_ACEOF
19222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019223if { (ac_try="$ac_compile"
19224case "(($ac_try" in
19225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19226 *) ac_try_echo=$ac_try;;
19227esac
19228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019231 grep -v '^ *+' conftest.er1 >conftest.err
19232 rm -f conftest.er1
19233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019235 (exit $ac_status); } && {
19236 test -z "$ac_c_werror_flag" ||
19237 test ! -s conftest.err
19238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019239 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019240else
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019242sed 's/^/| /' conftest.$ac_ext >&5
19243
Martin v. Löwiseba40652007-08-30 20:10:57 +000019244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019245/* confdefs.h. */
19246_ACEOF
19247cat confdefs.h >>conftest.$ac_ext
19248cat >>conftest.$ac_ext <<_ACEOF
19249/* end confdefs.h. */
19250#include <sys/types.h>
19251#include <$ac_cv_struct_tm>
19252
19253
19254int
19255main ()
19256{
19257static struct tm ac_aggr;
19258if (sizeof ac_aggr.tm_zone)
19259return 0;
19260 ;
19261 return 0;
19262}
19263_ACEOF
19264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019265if { (ac_try="$ac_compile"
19266case "(($ac_try" in
19267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19268 *) ac_try_echo=$ac_try;;
19269esac
19270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19271 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019273 grep -v '^ *+' conftest.er1 >conftest.err
19274 rm -f conftest.er1
19275 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019277 (exit $ac_status); } && {
19278 test -z "$ac_c_werror_flag" ||
19279 test ! -s conftest.err
19280 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019281 ac_cv_member_struct_tm_tm_zone=yes
19282else
19283 echo "$as_me: failed program was:" >&5
19284sed 's/^/| /' conftest.$ac_ext >&5
19285
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288
19289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019291
19292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19295echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019296if test $ac_cv_member_struct_tm_tm_zone = yes; then
19297
19298cat >>confdefs.h <<_ACEOF
19299#define HAVE_STRUCT_TM_TM_ZONE 1
19300_ACEOF
19301
19302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019303fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019304
Martin v. Löwis11437992002-04-12 09:54:03 +000019305if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19306
19307cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019308#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019309_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019310
19311else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19313echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19314if test "${ac_cv_have_decl_tzname+set}" = set; then
19315 echo $ECHO_N "(cached) $ECHO_C" >&6
19316else
19317 cat >conftest.$ac_ext <<_ACEOF
19318/* confdefs.h. */
19319_ACEOF
19320cat confdefs.h >>conftest.$ac_ext
19321cat >>conftest.$ac_ext <<_ACEOF
19322/* end confdefs.h. */
19323#include <time.h>
19324
19325int
19326main ()
19327{
19328#ifndef tzname
19329 (void) tzname;
19330#endif
19331
19332 ;
19333 return 0;
19334}
19335_ACEOF
19336rm -f conftest.$ac_objext
19337if { (ac_try="$ac_compile"
19338case "(($ac_try" in
19339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19340 *) ac_try_echo=$ac_try;;
19341esac
19342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19343 (eval "$ac_compile") 2>conftest.er1
19344 ac_status=$?
19345 grep -v '^ *+' conftest.er1 >conftest.err
19346 rm -f conftest.er1
19347 cat conftest.err >&5
19348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19349 (exit $ac_status); } && {
19350 test -z "$ac_c_werror_flag" ||
19351 test ! -s conftest.err
19352 } && test -s conftest.$ac_objext; then
19353 ac_cv_have_decl_tzname=yes
19354else
19355 echo "$as_me: failed program was:" >&5
19356sed 's/^/| /' conftest.$ac_ext >&5
19357
19358 ac_cv_have_decl_tzname=no
19359fi
19360
19361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19362fi
19363{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19364echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19365if test $ac_cv_have_decl_tzname = yes; then
19366
19367cat >>confdefs.h <<_ACEOF
19368#define HAVE_DECL_TZNAME 1
19369_ACEOF
19370
19371
19372else
19373 cat >>confdefs.h <<_ACEOF
19374#define HAVE_DECL_TZNAME 0
19375_ACEOF
19376
19377
19378fi
19379
19380
19381 { echo "$as_me:$LINENO: checking for tzname" >&5
19382echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019383if test "${ac_cv_var_tzname+set}" = set; then
19384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019385else
Martin v. Löwis11437992002-04-12 09:54:03 +000019386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019387/* confdefs.h. */
19388_ACEOF
19389cat confdefs.h >>conftest.$ac_ext
19390cat >>conftest.$ac_ext <<_ACEOF
19391/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019392#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019393#if !HAVE_DECL_TZNAME
19394extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019396
Martin v. Löwis11437992002-04-12 09:54:03 +000019397int
19398main ()
19399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019400return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 ;
19402 return 0;
19403}
19404_ACEOF
19405rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406if { (ac_try="$ac_link"
19407case "(($ac_try" in
19408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19409 *) ac_try_echo=$ac_try;;
19410esac
19411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019414 grep -v '^ *+' conftest.er1 >conftest.err
19415 rm -f conftest.er1
19416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418 (exit $ac_status); } && {
19419 test -z "$ac_c_werror_flag" ||
19420 test ! -s conftest.err
19421 } && test -s conftest$ac_exeext &&
19422 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019423 ac_cv_var_tzname=yes
19424else
Martin v. Löwis11437992002-04-12 09:54:03 +000019425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019426sed 's/^/| /' conftest.$ac_ext >&5
19427
Martin v. Löwiseba40652007-08-30 20:10:57 +000019428 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019430
19431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019432 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019434{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19435echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019436 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019437
19438cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019439#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019442 fi
19443fi
19444
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19446echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019447if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19448 echo $ECHO_N "(cached) $ECHO_C" >&6
19449else
19450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019451/* confdefs.h. */
19452_ACEOF
19453cat confdefs.h >>conftest.$ac_ext
19454cat >>conftest.$ac_ext <<_ACEOF
19455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019456$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019457int
19458main ()
19459{
19460static struct stat ac_aggr;
19461if (ac_aggr.st_rdev)
19462return 0;
19463 ;
19464 return 0;
19465}
19466_ACEOF
19467rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468if { (ac_try="$ac_compile"
19469case "(($ac_try" in
19470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19471 *) ac_try_echo=$ac_try;;
19472esac
19473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019476 grep -v '^ *+' conftest.er1 >conftest.err
19477 rm -f conftest.er1
19478 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019480 (exit $ac_status); } && {
19481 test -z "$ac_c_werror_flag" ||
19482 test ! -s conftest.err
19483 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019484 ac_cv_member_struct_stat_st_rdev=yes
19485else
19486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019487sed 's/^/| /' conftest.$ac_ext >&5
19488
Martin v. Löwiseba40652007-08-30 20:10:57 +000019489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019490/* confdefs.h. */
19491_ACEOF
19492cat confdefs.h >>conftest.$ac_ext
19493cat >>conftest.$ac_ext <<_ACEOF
19494/* end confdefs.h. */
19495$ac_includes_default
19496int
19497main ()
19498{
19499static struct stat ac_aggr;
19500if (sizeof ac_aggr.st_rdev)
19501return 0;
19502 ;
19503 return 0;
19504}
19505_ACEOF
19506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019507if { (ac_try="$ac_compile"
19508case "(($ac_try" in
19509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19510 *) ac_try_echo=$ac_try;;
19511esac
19512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19513 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019515 grep -v '^ *+' conftest.er1 >conftest.err
19516 rm -f conftest.er1
19517 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019519 (exit $ac_status); } && {
19520 test -z "$ac_c_werror_flag" ||
19521 test ! -s conftest.err
19522 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019523 ac_cv_member_struct_stat_st_rdev=yes
19524else
19525 echo "$as_me: failed program was:" >&5
19526sed 's/^/| /' conftest.$ac_ext >&5
19527
Martin v. Löwiseba40652007-08-30 20:10:57 +000019528 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019530
19531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019533
19534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019536{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19537echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019538if test $ac_cv_member_struct_stat_st_rdev = yes; then
19539
19540cat >>confdefs.h <<_ACEOF
19541#define HAVE_STRUCT_STAT_ST_RDEV 1
19542_ACEOF
19543
19544
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019545fi
19546
Martin v. Löwiseba40652007-08-30 20:10:57 +000019547{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19548echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019549if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019551else
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019553/* confdefs.h. */
19554_ACEOF
19555cat confdefs.h >>conftest.$ac_ext
19556cat >>conftest.$ac_ext <<_ACEOF
19557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019558$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019559int
19560main ()
19561{
19562static struct stat ac_aggr;
19563if (ac_aggr.st_blksize)
19564return 0;
19565 ;
19566 return 0;
19567}
19568_ACEOF
19569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019570if { (ac_try="$ac_compile"
19571case "(($ac_try" in
19572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19573 *) ac_try_echo=$ac_try;;
19574esac
19575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019578 grep -v '^ *+' conftest.er1 >conftest.err
19579 rm -f conftest.er1
19580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019582 (exit $ac_status); } && {
19583 test -z "$ac_c_werror_flag" ||
19584 test ! -s conftest.err
19585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019587else
Martin v. Löwis11437992002-04-12 09:54:03 +000019588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019589sed 's/^/| /' conftest.$ac_ext >&5
19590
Martin v. Löwiseba40652007-08-30 20:10:57 +000019591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019592/* confdefs.h. */
19593_ACEOF
19594cat confdefs.h >>conftest.$ac_ext
19595cat >>conftest.$ac_ext <<_ACEOF
19596/* end confdefs.h. */
19597$ac_includes_default
19598int
19599main ()
19600{
19601static struct stat ac_aggr;
19602if (sizeof ac_aggr.st_blksize)
19603return 0;
19604 ;
19605 return 0;
19606}
19607_ACEOF
19608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019609if { (ac_try="$ac_compile"
19610case "(($ac_try" in
19611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19612 *) ac_try_echo=$ac_try;;
19613esac
19614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19615 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019617 grep -v '^ *+' conftest.er1 >conftest.err
19618 rm -f conftest.er1
19619 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019621 (exit $ac_status); } && {
19622 test -z "$ac_c_werror_flag" ||
19623 test ! -s conftest.err
19624 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019625 ac_cv_member_struct_stat_st_blksize=yes
19626else
19627 echo "$as_me: failed program was:" >&5
19628sed 's/^/| /' conftest.$ac_ext >&5
19629
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019632
19633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635
19636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19639echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019640if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019641
Martin v. Löwis11437992002-04-12 09:54:03 +000019642cat >>confdefs.h <<_ACEOF
19643#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19644_ACEOF
19645
19646
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019647fi
19648
Martin v. Löwiseba40652007-08-30 20:10:57 +000019649{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19650echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019651if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19652 echo $ECHO_N "(cached) $ECHO_C" >&6
19653else
19654 cat >conftest.$ac_ext <<_ACEOF
19655/* confdefs.h. */
19656_ACEOF
19657cat confdefs.h >>conftest.$ac_ext
19658cat >>conftest.$ac_ext <<_ACEOF
19659/* end confdefs.h. */
19660$ac_includes_default
19661int
19662main ()
19663{
19664static struct stat ac_aggr;
19665if (ac_aggr.st_flags)
19666return 0;
19667 ;
19668 return 0;
19669}
19670_ACEOF
19671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019672if { (ac_try="$ac_compile"
19673case "(($ac_try" in
19674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19675 *) ac_try_echo=$ac_try;;
19676esac
19677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19678 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019679 ac_status=$?
19680 grep -v '^ *+' conftest.er1 >conftest.err
19681 rm -f conftest.er1
19682 cat conftest.err >&5
19683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019684 (exit $ac_status); } && {
19685 test -z "$ac_c_werror_flag" ||
19686 test ! -s conftest.err
19687 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019688 ac_cv_member_struct_stat_st_flags=yes
19689else
19690 echo "$as_me: failed program was:" >&5
19691sed 's/^/| /' conftest.$ac_ext >&5
19692
Martin v. Löwiseba40652007-08-30 20:10:57 +000019693 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019694/* confdefs.h. */
19695_ACEOF
19696cat confdefs.h >>conftest.$ac_ext
19697cat >>conftest.$ac_ext <<_ACEOF
19698/* end confdefs.h. */
19699$ac_includes_default
19700int
19701main ()
19702{
19703static struct stat ac_aggr;
19704if (sizeof ac_aggr.st_flags)
19705return 0;
19706 ;
19707 return 0;
19708}
19709_ACEOF
19710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019711if { (ac_try="$ac_compile"
19712case "(($ac_try" in
19713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19714 *) ac_try_echo=$ac_try;;
19715esac
19716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19717 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019718 ac_status=$?
19719 grep -v '^ *+' conftest.er1 >conftest.err
19720 rm -f conftest.er1
19721 cat conftest.err >&5
19722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019723 (exit $ac_status); } && {
19724 test -z "$ac_c_werror_flag" ||
19725 test ! -s conftest.err
19726 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019727 ac_cv_member_struct_stat_st_flags=yes
19728else
19729 echo "$as_me: failed program was:" >&5
19730sed 's/^/| /' conftest.$ac_ext >&5
19731
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734
19735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019737
19738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019740{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19741echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019742if test $ac_cv_member_struct_stat_st_flags = yes; then
19743
19744cat >>confdefs.h <<_ACEOF
19745#define HAVE_STRUCT_STAT_ST_FLAGS 1
19746_ACEOF
19747
19748
19749fi
19750
Martin v. Löwiseba40652007-08-30 20:10:57 +000019751{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19752echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019753if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19754 echo $ECHO_N "(cached) $ECHO_C" >&6
19755else
19756 cat >conftest.$ac_ext <<_ACEOF
19757/* confdefs.h. */
19758_ACEOF
19759cat confdefs.h >>conftest.$ac_ext
19760cat >>conftest.$ac_ext <<_ACEOF
19761/* end confdefs.h. */
19762$ac_includes_default
19763int
19764main ()
19765{
19766static struct stat ac_aggr;
19767if (ac_aggr.st_gen)
19768return 0;
19769 ;
19770 return 0;
19771}
19772_ACEOF
19773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019774if { (ac_try="$ac_compile"
19775case "(($ac_try" in
19776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19777 *) ac_try_echo=$ac_try;;
19778esac
19779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019781 ac_status=$?
19782 grep -v '^ *+' conftest.er1 >conftest.err
19783 rm -f conftest.er1
19784 cat conftest.err >&5
19785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019786 (exit $ac_status); } && {
19787 test -z "$ac_c_werror_flag" ||
19788 test ! -s conftest.err
19789 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019790 ac_cv_member_struct_stat_st_gen=yes
19791else
19792 echo "$as_me: failed program was:" >&5
19793sed 's/^/| /' conftest.$ac_ext >&5
19794
Martin v. Löwiseba40652007-08-30 20:10:57 +000019795 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019796/* confdefs.h. */
19797_ACEOF
19798cat confdefs.h >>conftest.$ac_ext
19799cat >>conftest.$ac_ext <<_ACEOF
19800/* end confdefs.h. */
19801$ac_includes_default
19802int
19803main ()
19804{
19805static struct stat ac_aggr;
19806if (sizeof ac_aggr.st_gen)
19807return 0;
19808 ;
19809 return 0;
19810}
19811_ACEOF
19812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019813if { (ac_try="$ac_compile"
19814case "(($ac_try" in
19815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19816 *) ac_try_echo=$ac_try;;
19817esac
19818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019820 ac_status=$?
19821 grep -v '^ *+' conftest.er1 >conftest.err
19822 rm -f conftest.er1
19823 cat conftest.err >&5
19824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825 (exit $ac_status); } && {
19826 test -z "$ac_c_werror_flag" ||
19827 test ! -s conftest.err
19828 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019829 ac_cv_member_struct_stat_st_gen=yes
19830else
19831 echo "$as_me: failed program was:" >&5
19832sed 's/^/| /' conftest.$ac_ext >&5
19833
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019836
19837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019839
19840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019842{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19843echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019844if test $ac_cv_member_struct_stat_st_gen = yes; then
19845
19846cat >>confdefs.h <<_ACEOF
19847#define HAVE_STRUCT_STAT_ST_GEN 1
19848_ACEOF
19849
19850
19851fi
19852
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19854echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019855if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19856 echo $ECHO_N "(cached) $ECHO_C" >&6
19857else
19858 cat >conftest.$ac_ext <<_ACEOF
19859/* confdefs.h. */
19860_ACEOF
19861cat confdefs.h >>conftest.$ac_ext
19862cat >>conftest.$ac_ext <<_ACEOF
19863/* end confdefs.h. */
19864$ac_includes_default
19865int
19866main ()
19867{
19868static struct stat ac_aggr;
19869if (ac_aggr.st_birthtime)
19870return 0;
19871 ;
19872 return 0;
19873}
19874_ACEOF
19875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019876if { (ac_try="$ac_compile"
19877case "(($ac_try" in
19878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19879 *) ac_try_echo=$ac_try;;
19880esac
19881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019883 ac_status=$?
19884 grep -v '^ *+' conftest.er1 >conftest.err
19885 rm -f conftest.er1
19886 cat conftest.err >&5
19887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019888 (exit $ac_status); } && {
19889 test -z "$ac_c_werror_flag" ||
19890 test ! -s conftest.err
19891 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019892 ac_cv_member_struct_stat_st_birthtime=yes
19893else
19894 echo "$as_me: failed program was:" >&5
19895sed 's/^/| /' conftest.$ac_ext >&5
19896
Martin v. Löwiseba40652007-08-30 20:10:57 +000019897 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019898/* confdefs.h. */
19899_ACEOF
19900cat confdefs.h >>conftest.$ac_ext
19901cat >>conftest.$ac_ext <<_ACEOF
19902/* end confdefs.h. */
19903$ac_includes_default
19904int
19905main ()
19906{
19907static struct stat ac_aggr;
19908if (sizeof ac_aggr.st_birthtime)
19909return 0;
19910 ;
19911 return 0;
19912}
19913_ACEOF
19914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915if { (ac_try="$ac_compile"
19916case "(($ac_try" in
19917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19918 *) ac_try_echo=$ac_try;;
19919esac
19920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019922 ac_status=$?
19923 grep -v '^ *+' conftest.er1 >conftest.err
19924 rm -f conftest.er1
19925 cat conftest.err >&5
19926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927 (exit $ac_status); } && {
19928 test -z "$ac_c_werror_flag" ||
19929 test ! -s conftest.err
19930 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019931 ac_cv_member_struct_stat_st_birthtime=yes
19932else
19933 echo "$as_me: failed program was:" >&5
19934sed 's/^/| /' conftest.$ac_ext >&5
19935
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938
19939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019941
19942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19945echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019946if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19947
19948cat >>confdefs.h <<_ACEOF
19949#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19950_ACEOF
19951
19952
19953fi
19954
Martin v. Löwiseba40652007-08-30 20:10:57 +000019955{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19956echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019957if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19958 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019959else
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019961/* confdefs.h. */
19962_ACEOF
19963cat confdefs.h >>conftest.$ac_ext
19964cat >>conftest.$ac_ext <<_ACEOF
19965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019966$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019967int
19968main ()
19969{
19970static struct stat ac_aggr;
19971if (ac_aggr.st_blocks)
19972return 0;
19973 ;
19974 return 0;
19975}
19976_ACEOF
19977rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019978if { (ac_try="$ac_compile"
19979case "(($ac_try" in
19980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19981 *) ac_try_echo=$ac_try;;
19982esac
19983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019986 grep -v '^ *+' conftest.er1 >conftest.err
19987 rm -f conftest.er1
19988 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019990 (exit $ac_status); } && {
19991 test -z "$ac_c_werror_flag" ||
19992 test ! -s conftest.err
19993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019995else
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019997sed 's/^/| /' conftest.$ac_ext >&5
19998
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020000/* confdefs.h. */
20001_ACEOF
20002cat confdefs.h >>conftest.$ac_ext
20003cat >>conftest.$ac_ext <<_ACEOF
20004/* end confdefs.h. */
20005$ac_includes_default
20006int
20007main ()
20008{
20009static struct stat ac_aggr;
20010if (sizeof ac_aggr.st_blocks)
20011return 0;
20012 ;
20013 return 0;
20014}
20015_ACEOF
20016rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017if { (ac_try="$ac_compile"
20018case "(($ac_try" in
20019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20020 *) ac_try_echo=$ac_try;;
20021esac
20022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20023 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020025 grep -v '^ *+' conftest.er1 >conftest.err
20026 rm -f conftest.er1
20027 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029 (exit $ac_status); } && {
20030 test -z "$ac_c_werror_flag" ||
20031 test ! -s conftest.err
20032 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020033 ac_cv_member_struct_stat_st_blocks=yes
20034else
20035 echo "$as_me: failed program was:" >&5
20036sed 's/^/| /' conftest.$ac_ext >&5
20037
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040
20041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020043
20044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20047echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020048if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020049
Martin v. Löwis11437992002-04-12 09:54:03 +000020050cat >>confdefs.h <<_ACEOF
20051#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20052_ACEOF
20053
20054
20055cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020056#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020057_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020058
20059else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020060 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020061 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020062 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20063 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064esac
20065
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020066fi
20067
Michael W. Hudson54241132001-12-07 15:38:26 +000020068
Martin v. Löwis11437992002-04-12 09:54:03 +000020069
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20071echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020072if test "${ac_cv_header_time_altzone+set}" = set; then
20073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020074else
Martin v. Löwis11437992002-04-12 09:54:03 +000020075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020076/* confdefs.h. */
20077_ACEOF
20078cat confdefs.h >>conftest.$ac_ext
20079cat >>conftest.$ac_ext <<_ACEOF
20080/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020081#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020082int
20083main ()
20084{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020085return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020086 ;
20087 return 0;
20088}
20089_ACEOF
20090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091if { (ac_try="$ac_compile"
20092case "(($ac_try" in
20093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20094 *) ac_try_echo=$ac_try;;
20095esac
20096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020099 grep -v '^ *+' conftest.er1 >conftest.err
20100 rm -f conftest.er1
20101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103 (exit $ac_status); } && {
20104 test -z "$ac_c_werror_flag" ||
20105 test ! -s conftest.err
20106 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020107 ac_cv_header_time_altzone=yes
20108else
Martin v. Löwis11437992002-04-12 09:54:03 +000020109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020110sed 's/^/| /' conftest.$ac_ext >&5
20111
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020113fi
20114
Martin v. Löwiseba40652007-08-30 20:10:57 +000020115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20116fi
20117
20118{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20119echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020120if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020121
20122cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020123#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020124_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020125
20126fi
20127
Guido van Rossumda88dad1995-01-26 00:46:29 +000020128was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020129{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20130echo $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 +000020131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020132/* confdefs.h. */
20133_ACEOF
20134cat confdefs.h >>conftest.$ac_ext
20135cat >>conftest.$ac_ext <<_ACEOF
20136/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020137
20138#include <sys/types.h>
20139#include <sys/select.h>
20140#include <sys/time.h>
20141
Martin v. Löwis11437992002-04-12 09:54:03 +000020142int
20143main ()
20144{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020145;
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 ;
20147 return 0;
20148}
20149_ACEOF
20150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151if { (ac_try="$ac_compile"
20152case "(($ac_try" in
20153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20154 *) ac_try_echo=$ac_try;;
20155esac
20156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020159 grep -v '^ *+' conftest.er1 >conftest.err
20160 rm -f conftest.er1
20161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020163 (exit $ac_status); } && {
20164 test -z "$ac_c_werror_flag" ||
20165 test ! -s conftest.err
20166 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020167
20168
20169cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020170#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020171_ACEOF
20172
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020173 was_it_defined=yes
20174
Guido van Rossumf78abae1997-01-21 22:02:36 +000020175else
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020177sed 's/^/| /' conftest.$ac_ext >&5
20178
Brett Cannon19fab762007-06-02 03:02:29 +000020179
Martin v. Löwiseba40652007-08-30 20:10:57 +000020180fi
20181
20182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20183{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20184echo "${ECHO_T}$was_it_defined" >&6; }
20185
20186{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20187echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020188if test "${ac_cv_struct_addrinfo+set}" = set; then
20189 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020190else
Martin v. Löwis11437992002-04-12 09:54:03 +000020191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020192/* confdefs.h. */
20193_ACEOF
20194cat confdefs.h >>conftest.$ac_ext
20195cat >>conftest.$ac_ext <<_ACEOF
20196/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020197
20198# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020199int
20200main ()
20201{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020202struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 ;
20204 return 0;
20205}
20206_ACEOF
20207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208if { (ac_try="$ac_compile"
20209case "(($ac_try" in
20210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20211 *) ac_try_echo=$ac_try;;
20212esac
20213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020216 grep -v '^ *+' conftest.er1 >conftest.err
20217 rm -f conftest.er1
20218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020220 (exit $ac_status); } && {
20221 test -z "$ac_c_werror_flag" ||
20222 test ! -s conftest.err
20223 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020224 ac_cv_struct_addrinfo=yes
20225else
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020227sed 's/^/| /' conftest.$ac_ext >&5
20228
Martin v. Löwiseba40652007-08-30 20:10:57 +000020229 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020230fi
20231
Martin v. Löwiseba40652007-08-30 20:10:57 +000020232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20233fi
20234
20235{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20236echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020237if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020238
20239cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020240#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020241_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020242
20243fi
20244
Martin v. Löwiseba40652007-08-30 20:10:57 +000020245{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20246echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020247if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20248 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020249else
Martin v. Löwis11437992002-04-12 09:54:03 +000020250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020256
20257# include <sys/types.h>
20258# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020259int
20260main ()
20261{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020262struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020263 ;
20264 return 0;
20265}
20266_ACEOF
20267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020268if { (ac_try="$ac_compile"
20269case "(($ac_try" in
20270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20271 *) ac_try_echo=$ac_try;;
20272esac
20273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020276 grep -v '^ *+' conftest.er1 >conftest.err
20277 rm -f conftest.er1
20278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020280 (exit $ac_status); } && {
20281 test -z "$ac_c_werror_flag" ||
20282 test ! -s conftest.err
20283 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020284 ac_cv_struct_sockaddr_storage=yes
20285else
Martin v. Löwis11437992002-04-12 09:54:03 +000020286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020287sed 's/^/| /' conftest.$ac_ext >&5
20288
Martin v. Löwiseba40652007-08-30 20:10:57 +000020289 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020290fi
20291
Martin v. Löwiseba40652007-08-30 20:10:57 +000020292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20293fi
20294
20295{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20296echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020297if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020298
20299cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020300#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020301_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020302
20303fi
20304
Guido van Rossum627b2d71993-12-24 10:39:16 +000020305# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020306
Michael W. Hudson54241132001-12-07 15:38:26 +000020307
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20309echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020310if test "${ac_cv_c_char_unsigned+set}" = set; then
20311 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020312else
Martin v. Löwis11437992002-04-12 09:54:03 +000020313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020314/* confdefs.h. */
20315_ACEOF
20316cat confdefs.h >>conftest.$ac_ext
20317cat >>conftest.$ac_ext <<_ACEOF
20318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020319$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020320int
20321main ()
20322{
20323static int test_array [1 - 2 * !(((char) -1) < 0)];
20324test_array [0] = 0
20325
20326 ;
20327 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020328}
Martin v. Löwis11437992002-04-12 09:54:03 +000020329_ACEOF
20330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331if { (ac_try="$ac_compile"
20332case "(($ac_try" in
20333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20334 *) ac_try_echo=$ac_try;;
20335esac
20336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020339 grep -v '^ *+' conftest.er1 >conftest.err
20340 rm -f conftest.er1
20341 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020343 (exit $ac_status); } && {
20344 test -z "$ac_c_werror_flag" ||
20345 test ! -s conftest.err
20346 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020347 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020348else
20349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020350sed 's/^/| /' conftest.$ac_ext >&5
20351
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020354
20355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020357{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20358echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020359if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020360 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020361#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020362_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020363
20364fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020365
Martin v. Löwiseba40652007-08-30 20:10:57 +000020366{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20367echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020368if test "${ac_cv_c_const+set}" = set; then
20369 echo $ECHO_N "(cached) $ECHO_C" >&6
20370else
20371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020372/* confdefs.h. */
20373_ACEOF
20374cat confdefs.h >>conftest.$ac_ext
20375cat >>conftest.$ac_ext <<_ACEOF
20376/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020377
Martin v. Löwis11437992002-04-12 09:54:03 +000020378int
20379main ()
20380{
20381/* FIXME: Include the comments suggested by Paul. */
20382#ifndef __cplusplus
20383 /* Ultrix mips cc rejects this. */
20384 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020385 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387 char const *const *pcpcc;
20388 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020389 /* NEC SVR4.0.2 mips cc rejects this. */
20390 struct point {int x, y;};
20391 static struct point const zero = {0,0};
20392 /* AIX XL C 1.02.0.0 rejects this.
20393 It does not let you subtract one const X* pointer from another in
20394 an arm of an if-expression whose if-part is not a constant
20395 expression */
20396 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020397 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020398 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020399 ++pcpcc;
20400 ppc = (char**) pcpcc;
20401 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020402 { /* SCO 3.2v4 cc rejects this. */
20403 char *t;
20404 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020405
Martin v. Löwis11437992002-04-12 09:54:03 +000020406 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020407 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 }
20409 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20410 int x[] = {25, 17};
20411 const int *foo = &x[0];
20412 ++foo;
20413 }
20414 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20415 typedef const int *iptr;
20416 iptr p = 0;
20417 ++p;
20418 }
20419 { /* AIX XL C 1.02.0.0 rejects this saying
20420 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20421 struct s { int j; const int *ap[3]; };
20422 struct s *b; b->j = 5;
20423 }
20424 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20425 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020427 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020429#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020430
Martin v. Löwis11437992002-04-12 09:54:03 +000020431 ;
20432 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020433}
Martin v. Löwis11437992002-04-12 09:54:03 +000020434_ACEOF
20435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020436if { (ac_try="$ac_compile"
20437case "(($ac_try" in
20438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20439 *) ac_try_echo=$ac_try;;
20440esac
20441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020444 grep -v '^ *+' conftest.er1 >conftest.err
20445 rm -f conftest.er1
20446 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020448 (exit $ac_status); } && {
20449 test -z "$ac_c_werror_flag" ||
20450 test ! -s conftest.err
20451 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020452 ac_cv_c_const=yes
20453else
Martin v. Löwis11437992002-04-12 09:54:03 +000020454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020455sed 's/^/| /' conftest.$ac_ext >&5
20456
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459
20460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020462{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20463echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020464if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020465
20466cat >>confdefs.h <<\_ACEOF
20467#define const
20468_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020469
20470fi
20471
Michael W. Hudson54241132001-12-07 15:38:26 +000020472
Guido van Rossumda88dad1995-01-26 00:46:29 +000020473works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020474{ echo "$as_me:$LINENO: checking for working volatile" >&5
20475echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020477/* confdefs.h. */
20478_ACEOF
20479cat confdefs.h >>conftest.$ac_ext
20480cat >>conftest.$ac_ext <<_ACEOF
20481/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020482
Martin v. Löwis11437992002-04-12 09:54:03 +000020483int
20484main ()
20485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020486volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020487 ;
20488 return 0;
20489}
20490_ACEOF
20491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492if { (ac_try="$ac_compile"
20493case "(($ac_try" in
20494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20495 *) ac_try_echo=$ac_try;;
20496esac
20497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020500 grep -v '^ *+' conftest.er1 >conftest.err
20501 rm -f conftest.er1
20502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504 (exit $ac_status); } && {
20505 test -z "$ac_c_werror_flag" ||
20506 test ! -s conftest.err
20507 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020508 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020509else
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020511sed 's/^/| /' conftest.$ac_ext >&5
20512
Martin v. Löwis11437992002-04-12 09:54:03 +000020513
20514cat >>confdefs.h <<\_ACEOF
20515#define volatile
20516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020517
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020518
Guido van Rossum627b2d71993-12-24 10:39:16 +000020519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020520
20521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20522{ echo "$as_me:$LINENO: result: $works" >&5
20523echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020524
Guido van Rossumda88dad1995-01-26 00:46:29 +000020525works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020526{ echo "$as_me:$LINENO: checking for working signed char" >&5
20527echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020529/* confdefs.h. */
20530_ACEOF
20531cat confdefs.h >>conftest.$ac_ext
20532cat >>conftest.$ac_ext <<_ACEOF
20533/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020534
Martin v. Löwis11437992002-04-12 09:54:03 +000020535int
20536main ()
20537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020538signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 ;
20540 return 0;
20541}
20542_ACEOF
20543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544if { (ac_try="$ac_compile"
20545case "(($ac_try" in
20546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20547 *) ac_try_echo=$ac_try;;
20548esac
20549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020552 grep -v '^ *+' conftest.er1 >conftest.err
20553 rm -f conftest.er1
20554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020556 (exit $ac_status); } && {
20557 test -z "$ac_c_werror_flag" ||
20558 test ! -s conftest.err
20559 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020560 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020561else
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020563sed 's/^/| /' conftest.$ac_ext >&5
20564
Martin v. Löwis11437992002-04-12 09:54:03 +000020565
20566cat >>confdefs.h <<\_ACEOF
20567#define signed
20568_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020569
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020570
Guido van Rossum7f43da71994-08-01 12:15:30 +000020571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020572
20573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20574{ echo "$as_me:$LINENO: result: $works" >&5
20575echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020576
Guido van Rossumda88dad1995-01-26 00:46:29 +000020577have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020578{ echo "$as_me:$LINENO: checking for prototypes" >&5
20579echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020580cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020581/* confdefs.h. */
20582_ACEOF
20583cat confdefs.h >>conftest.$ac_ext
20584cat >>conftest.$ac_ext <<_ACEOF
20585/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020586int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020587int
20588main ()
20589{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020590return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020591 ;
20592 return 0;
20593}
20594_ACEOF
20595rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020596if { (ac_try="$ac_compile"
20597case "(($ac_try" in
20598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20599 *) ac_try_echo=$ac_try;;
20600esac
20601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020604 grep -v '^ *+' conftest.er1 >conftest.err
20605 rm -f conftest.er1
20606 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608 (exit $ac_status); } && {
20609 test -z "$ac_c_werror_flag" ||
20610 test ! -s conftest.err
20611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020612
20613
20614cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020615#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020616_ACEOF
20617
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020618 have_prototypes=yes
20619
Guido van Rossumf78abae1997-01-21 22:02:36 +000020620else
Martin v. Löwis11437992002-04-12 09:54:03 +000020621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020622sed 's/^/| /' conftest.$ac_ext >&5
20623
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624
Guido van Rossum7f43da71994-08-01 12:15:30 +000020625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626
20627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20628{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20629echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020630
Guido van Rossumda88dad1995-01-26 00:46:29 +000020631works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020632{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20633echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020635/* confdefs.h. */
20636_ACEOF
20637cat confdefs.h >>conftest.$ac_ext
20638cat >>conftest.$ac_ext <<_ACEOF
20639/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020640
20641#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020642int foo(int x, ...) {
20643 va_list va;
20644 va_start(va, x);
20645 va_arg(va, int);
20646 va_arg(va, char *);
20647 va_arg(va, double);
20648 return 0;
20649}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020650
Martin v. Löwis11437992002-04-12 09:54:03 +000020651int
20652main ()
20653{
Guido van Rossum90eea071996-08-30 20:58:57 +000020654return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 ;
20656 return 0;
20657}
20658_ACEOF
20659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020660if { (ac_try="$ac_compile"
20661case "(($ac_try" in
20662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20663 *) ac_try_echo=$ac_try;;
20664esac
20665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020668 grep -v '^ *+' conftest.er1 >conftest.err
20669 rm -f conftest.er1
20670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020672 (exit $ac_status); } && {
20673 test -z "$ac_c_werror_flag" ||
20674 test ! -s conftest.err
20675 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020676
20677
20678cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020679#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020680_ACEOF
20681
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020682 works=yes
20683
Guido van Rossumf78abae1997-01-21 22:02:36 +000020684else
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020686sed 's/^/| /' conftest.$ac_ext >&5
20687
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688
Guido van Rossum627b2d71993-12-24 10:39:16 +000020689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020690
20691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20692{ echo "$as_me:$LINENO: result: $works" >&5
20693echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020694
Martin v. Löwisd6320502004-08-12 13:45:08 +000020695# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020696{ echo "$as_me:$LINENO: checking for socketpair" >&5
20697echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020698cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
20704
20705#include <sys/types.h>
20706#include <sys/socket.h>
20707
20708int
20709main ()
20710{
20711void *x=socketpair
20712 ;
20713 return 0;
20714}
20715_ACEOF
20716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717if { (ac_try="$ac_compile"
20718case "(($ac_try" in
20719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20720 *) ac_try_echo=$ac_try;;
20721esac
20722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020725 grep -v '^ *+' conftest.er1 >conftest.err
20726 rm -f conftest.er1
20727 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020729 (exit $ac_status); } && {
20730 test -z "$ac_c_werror_flag" ||
20731 test ! -s conftest.err
20732 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020733
20734cat >>confdefs.h <<\_ACEOF
20735#define HAVE_SOCKETPAIR 1
20736_ACEOF
20737
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738 { echo "$as_me:$LINENO: result: yes" >&5
20739echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020740else
20741 echo "$as_me: failed program was:" >&5
20742sed 's/^/| /' conftest.$ac_ext >&5
20743
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744 { echo "$as_me:$LINENO: result: no" >&5
20745echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020746
20747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748
20749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020750
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020751# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020752{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20753echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020755/* confdefs.h. */
20756_ACEOF
20757cat confdefs.h >>conftest.$ac_ext
20758cat >>conftest.$ac_ext <<_ACEOF
20759/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020760#include <sys/types.h>
20761#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020762int
20763main ()
20764{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020765struct sockaddr x;
20766x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020767 ;
20768 return 0;
20769}
20770_ACEOF
20771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020772if { (ac_try="$ac_compile"
20773case "(($ac_try" in
20774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20775 *) ac_try_echo=$ac_try;;
20776esac
20777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020780 grep -v '^ *+' conftest.er1 >conftest.err
20781 rm -f conftest.er1
20782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020784 (exit $ac_status); } && {
20785 test -z "$ac_c_werror_flag" ||
20786 test ! -s conftest.err
20787 } && test -s conftest.$ac_objext; then
20788 { echo "$as_me:$LINENO: result: yes" >&5
20789echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020790
20791cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020792#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020793_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020794
20795else
Martin v. Löwis11437992002-04-12 09:54:03 +000020796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020797sed 's/^/| /' conftest.$ac_ext >&5
20798
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799 { echo "$as_me:$LINENO: result: no" >&5
20800echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020802
20803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020804
Guido van Rossumda88dad1995-01-26 00:46:29 +000020805va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020806{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20807echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020809/* confdefs.h. */
20810_ACEOF
20811cat confdefs.h >>conftest.$ac_ext
20812cat >>conftest.$ac_ext <<_ACEOF
20813/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020814
20815#ifdef HAVE_STDARG_PROTOTYPES
20816#include <stdarg.h>
20817#else
20818#include <varargs.h>
20819#endif
20820
Martin v. Löwis11437992002-04-12 09:54:03 +000020821int
20822main ()
20823{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020824va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 ;
20826 return 0;
20827}
20828_ACEOF
20829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020830if { (ac_try="$ac_compile"
20831case "(($ac_try" in
20832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20833 *) ac_try_echo=$ac_try;;
20834esac
20835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020838 grep -v '^ *+' conftest.er1 >conftest.err
20839 rm -f conftest.er1
20840 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020842 (exit $ac_status); } && {
20843 test -z "$ac_c_werror_flag" ||
20844 test ! -s conftest.err
20845 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020846 :
20847else
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020849sed 's/^/| /' conftest.$ac_ext >&5
20850
Martin v. Löwis11437992002-04-12 09:54:03 +000020851
20852
20853cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020854#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020855_ACEOF
20856
Guido van Rossumda88dad1995-01-26 00:46:29 +000020857 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020858
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20862{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20863echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020864
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020865# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020866
20867
20868
Martin v. Löwiseba40652007-08-30 20:10:57 +000020869{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20870echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020871if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020873else
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020875/* confdefs.h. */
20876_ACEOF
20877cat confdefs.h >>conftest.$ac_ext
20878cat >>conftest.$ac_ext <<_ACEOF
20879/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020880/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20881 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20882#define gethostbyname_r innocuous_gethostbyname_r
20883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020884/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020885 which can conflict with char gethostbyname_r (); below.
20886 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020887 <limits.h> exists even on freestanding compilers. */
20888
20889#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020890# include <limits.h>
20891#else
20892# include <assert.h>
20893#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020894
20895#undef gethostbyname_r
20896
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897/* Override any GCC internal prototype to avoid an error.
20898 Use char because int might match the return type of a GCC
20899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020900#ifdef __cplusplus
20901extern "C"
20902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020903char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020904/* The GNU C library defines this for functions which it implements
20905 to always fail with ENOSYS. Some functions are actually named
20906 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020907#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020908choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020909#endif
20910
Skip Montanaro6dead952003-09-25 14:50:04 +000020911int
20912main ()
20913{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020914return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 ;
20916 return 0;
20917}
20918_ACEOF
20919rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020920if { (ac_try="$ac_link"
20921case "(($ac_try" in
20922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20923 *) ac_try_echo=$ac_try;;
20924esac
20925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20926 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020928 grep -v '^ *+' conftest.er1 >conftest.err
20929 rm -f conftest.er1
20930 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932 (exit $ac_status); } && {
20933 test -z "$ac_c_werror_flag" ||
20934 test ! -s conftest.err
20935 } && test -s conftest$ac_exeext &&
20936 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020937 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020938else
Martin v. Löwis11437992002-04-12 09:54:03 +000020939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020940sed 's/^/| /' conftest.$ac_ext >&5
20941
Martin v. Löwiseba40652007-08-30 20:10:57 +000020942 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944
20945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020946 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020948{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20949echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020950if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020951
Martin v. Löwis11437992002-04-12 09:54:03 +000020952 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020953#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020954_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020955
Martin v. Löwiseba40652007-08-30 20:10:57 +000020956 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20957echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020958 OLD_CFLAGS=$CFLAGS
20959 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020961/* confdefs.h. */
20962_ACEOF
20963cat confdefs.h >>conftest.$ac_ext
20964cat >>conftest.$ac_ext <<_ACEOF
20965/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020966
20967# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020968
Martin v. Löwis11437992002-04-12 09:54:03 +000020969int
20970main ()
20971{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020972
20973 char *name;
20974 struct hostent *he, *res;
20975 char buffer[2048];
20976 int buflen = 2048;
20977 int h_errnop;
20978
20979 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020980
20981 ;
20982 return 0;
20983}
20984_ACEOF
20985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020986if { (ac_try="$ac_compile"
20987case "(($ac_try" in
20988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20989 *) ac_try_echo=$ac_try;;
20990esac
20991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020994 grep -v '^ *+' conftest.er1 >conftest.err
20995 rm -f conftest.er1
20996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020998 (exit $ac_status); } && {
20999 test -z "$ac_c_werror_flag" ||
21000 test ! -s conftest.err
21001 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021002
21003 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021004#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021005_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021006
Martin v. Löwis11437992002-04-12 09:54:03 +000021007
21008cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021009#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021010_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021011
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012 { echo "$as_me:$LINENO: result: yes" >&5
21013echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021015else
Martin v. Löwis11437992002-04-12 09:54:03 +000021016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021017sed 's/^/| /' conftest.$ac_ext >&5
21018
Martin v. Löwis11437992002-04-12 09:54:03 +000021019
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020 { echo "$as_me:$LINENO: result: no" >&5
21021echo "${ECHO_T}no" >&6; }
21022 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21023echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021025/* confdefs.h. */
21026_ACEOF
21027cat confdefs.h >>conftest.$ac_ext
21028cat >>conftest.$ac_ext <<_ACEOF
21029/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021030
21031# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021032
Martin v. Löwis11437992002-04-12 09:54:03 +000021033int
21034main ()
21035{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021036
21037 char *name;
21038 struct hostent *he;
21039 char buffer[2048];
21040 int buflen = 2048;
21041 int h_errnop;
21042
21043 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021044
21045 ;
21046 return 0;
21047}
21048_ACEOF
21049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021050if { (ac_try="$ac_compile"
21051case "(($ac_try" in
21052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21053 *) ac_try_echo=$ac_try;;
21054esac
21055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021058 grep -v '^ *+' conftest.er1 >conftest.err
21059 rm -f conftest.er1
21060 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021062 (exit $ac_status); } && {
21063 test -z "$ac_c_werror_flag" ||
21064 test ! -s conftest.err
21065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021066
21067 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021068#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021069_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021070
Martin v. Löwis11437992002-04-12 09:54:03 +000021071
21072cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021073#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021074_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021075
Martin v. Löwiseba40652007-08-30 20:10:57 +000021076 { echo "$as_me:$LINENO: result: yes" >&5
21077echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021078
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021079else
Martin v. Löwis11437992002-04-12 09:54:03 +000021080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021081sed 's/^/| /' conftest.$ac_ext >&5
21082
Martin v. Löwis11437992002-04-12 09:54:03 +000021083
Martin v. Löwiseba40652007-08-30 20:10:57 +000021084 { echo "$as_me:$LINENO: result: no" >&5
21085echo "${ECHO_T}no" >&6; }
21086 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21087echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021089/* confdefs.h. */
21090_ACEOF
21091cat confdefs.h >>conftest.$ac_ext
21092cat >>conftest.$ac_ext <<_ACEOF
21093/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021094
21095# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021096
Martin v. Löwis11437992002-04-12 09:54:03 +000021097int
21098main ()
21099{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021100
21101 char *name;
21102 struct hostent *he;
21103 struct hostent_data data;
21104
21105 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021106
21107 ;
21108 return 0;
21109}
21110_ACEOF
21111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021112if { (ac_try="$ac_compile"
21113case "(($ac_try" in
21114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21115 *) ac_try_echo=$ac_try;;
21116esac
21117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021120 grep -v '^ *+' conftest.er1 >conftest.err
21121 rm -f conftest.er1
21122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124 (exit $ac_status); } && {
21125 test -z "$ac_c_werror_flag" ||
21126 test ! -s conftest.err
21127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021128
21129 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021130#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021131_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021132
Martin v. Löwis11437992002-04-12 09:54:03 +000021133
21134cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021135#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021136_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021137
Martin v. Löwiseba40652007-08-30 20:10:57 +000021138 { echo "$as_me:$LINENO: result: yes" >&5
21139echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021140
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021141else
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021143sed 's/^/| /' conftest.$ac_ext >&5
21144
Martin v. Löwis11437992002-04-12 09:54:03 +000021145
Martin v. Löwiseba40652007-08-30 20:10:57 +000021146 { echo "$as_me:$LINENO: result: no" >&5
21147echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021150
21151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021152
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021154
21155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021156
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021158
21159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021160 CFLAGS=$OLD_CFLAGS
21161
21162else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021163
Martin v. Löwis11437992002-04-12 09:54:03 +000021164
21165for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021166do
Martin v. Löwis11437992002-04-12 09:54:03 +000021167as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021168{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21169echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21170if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021172else
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021174/* confdefs.h. */
21175_ACEOF
21176cat confdefs.h >>conftest.$ac_ext
21177cat >>conftest.$ac_ext <<_ACEOF
21178/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021179/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21181#define $ac_func innocuous_$ac_func
21182
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021183/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021184 which can conflict with char $ac_func (); below.
21185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021186 <limits.h> exists even on freestanding compilers. */
21187
21188#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021189# include <limits.h>
21190#else
21191# include <assert.h>
21192#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021193
21194#undef $ac_func
21195
Martin v. Löwiseba40652007-08-30 20:10:57 +000021196/* Override any GCC internal prototype to avoid an error.
21197 Use char because int might match the return type of a GCC
21198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021199#ifdef __cplusplus
21200extern "C"
21201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021202char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021203/* The GNU C library defines this for functions which it implements
21204 to always fail with ENOSYS. Some functions are actually named
21205 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021206#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021207choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021208#endif
21209
Skip Montanaro6dead952003-09-25 14:50:04 +000021210int
21211main ()
21212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021213return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021214 ;
21215 return 0;
21216}
21217_ACEOF
21218rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021219if { (ac_try="$ac_link"
21220case "(($ac_try" in
21221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21222 *) ac_try_echo=$ac_try;;
21223esac
21224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21225 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021227 grep -v '^ *+' conftest.er1 >conftest.err
21228 rm -f conftest.er1
21229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021231 (exit $ac_status); } && {
21232 test -z "$ac_c_werror_flag" ||
21233 test ! -s conftest.err
21234 } && test -s conftest$ac_exeext &&
21235 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021236 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021237else
Martin v. Löwis11437992002-04-12 09:54:03 +000021238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021239sed 's/^/| /' conftest.$ac_ext >&5
21240
Martin v. Löwiseba40652007-08-30 20:10:57 +000021241 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243
21244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021245 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021247ac_res=`eval echo '${'$as_ac_var'}'`
21248 { echo "$as_me:$LINENO: result: $ac_res" >&5
21249echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021250if test `eval echo '${'$as_ac_var'}'` = yes; then
21251 cat >>confdefs.h <<_ACEOF
21252#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21253_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021254
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021255fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021256done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021257
Michael W. Hudson54241132001-12-07 15:38:26 +000021258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021259fi
21260
Michael W. Hudson54241132001-12-07 15:38:26 +000021261
21262
21263
21264
21265
21266
Guido van Rossum627b2d71993-12-24 10:39:16 +000021267# checks for system services
21268# (none yet)
21269
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021270# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021271{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21272echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021273if test "${ac_cv_func___fpu_control+set}" = set; then
21274 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021275else
Martin v. Löwis11437992002-04-12 09:54:03 +000021276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021277/* confdefs.h. */
21278_ACEOF
21279cat confdefs.h >>conftest.$ac_ext
21280cat >>conftest.$ac_ext <<_ACEOF
21281/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021282/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21283 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21284#define __fpu_control innocuous___fpu_control
21285
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021286/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021287 which can conflict with char __fpu_control (); below.
21288 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021289 <limits.h> exists even on freestanding compilers. */
21290
21291#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021292# include <limits.h>
21293#else
21294# include <assert.h>
21295#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021296
21297#undef __fpu_control
21298
Martin v. Löwiseba40652007-08-30 20:10:57 +000021299/* Override any GCC internal prototype to avoid an error.
21300 Use char because int might match the return type of a GCC
21301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021302#ifdef __cplusplus
21303extern "C"
21304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021305char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021306/* The GNU C library defines this for functions which it implements
21307 to always fail with ENOSYS. Some functions are actually named
21308 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021310choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021311#endif
21312
Skip Montanaro6dead952003-09-25 14:50:04 +000021313int
21314main ()
21315{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 ;
21318 return 0;
21319}
21320_ACEOF
21321rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021322if { (ac_try="$ac_link"
21323case "(($ac_try" in
21324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21325 *) ac_try_echo=$ac_try;;
21326esac
21327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21328 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021330 grep -v '^ *+' conftest.er1 >conftest.err
21331 rm -f conftest.er1
21332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021334 (exit $ac_status); } && {
21335 test -z "$ac_c_werror_flag" ||
21336 test ! -s conftest.err
21337 } && test -s conftest$ac_exeext &&
21338 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021339 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021340else
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021342sed 's/^/| /' conftest.$ac_ext >&5
21343
Martin v. Löwiseba40652007-08-30 20:10:57 +000021344 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346
21347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021348 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021350{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21351echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021352if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021353 :
21354else
Martin v. Löwis11437992002-04-12 09:54:03 +000021355
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21357echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021358if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021360else
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021362LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021363cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021364/* confdefs.h. */
21365_ACEOF
21366cat confdefs.h >>conftest.$ac_ext
21367cat >>conftest.$ac_ext <<_ACEOF
21368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021369
Martin v. Löwiseba40652007-08-30 20:10:57 +000021370/* Override any GCC internal prototype to avoid an error.
21371 Use char because int might match the return type of a GCC
21372 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021373#ifdef __cplusplus
21374extern "C"
21375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021376char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021377int
21378main ()
21379{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021381 ;
21382 return 0;
21383}
21384_ACEOF
21385rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021386if { (ac_try="$ac_link"
21387case "(($ac_try" in
21388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21389 *) ac_try_echo=$ac_try;;
21390esac
21391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21392 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021394 grep -v '^ *+' conftest.er1 >conftest.err
21395 rm -f conftest.er1
21396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021398 (exit $ac_status); } && {
21399 test -z "$ac_c_werror_flag" ||
21400 test ! -s conftest.err
21401 } && test -s conftest$ac_exeext &&
21402 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021403 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021404else
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021406sed 's/^/| /' conftest.$ac_ext >&5
21407
Martin v. Löwiseba40652007-08-30 20:10:57 +000021408 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021410
21411rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021413LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021415{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21416echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021417if test $ac_cv_lib_ieee___fpu_control = yes; then
21418 cat >>confdefs.h <<_ACEOF
21419#define HAVE_LIBIEEE 1
21420_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021421
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021422 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021423
Guido van Rossum627b2d71993-12-24 10:39:16 +000021424fi
21425
Michael W. Hudson54241132001-12-07 15:38:26 +000021426
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021427fi
21428
Michael W. Hudson54241132001-12-07 15:38:26 +000021429
Guido van Rossum7f253911997-05-09 02:42:48 +000021430# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021431{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21432echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021433
Martin v. Löwiseba40652007-08-30 20:10:57 +000021434# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021435if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021437if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021438then
21439
21440cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021441#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021442_ACEOF
21443
Martin v. Löwiseba40652007-08-30 20:10:57 +000021444 { echo "$as_me:$LINENO: result: yes" >&5
21445echo "${ECHO_T}yes" >&6; }
21446else { echo "$as_me:$LINENO: result: no" >&5
21447echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021448fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021449else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021450 { echo "$as_me:$LINENO: result: no" >&5
21451echo "${ECHO_T}no" >&6; }
21452fi
21453
Guido van Rossum7f253911997-05-09 02:42:48 +000021454
Guido van Rossum7f43da71994-08-01 12:15:30 +000021455# check for --with-libm=...
21456
Guido van Rossum563e7081996-09-10 18:20:48 +000021457case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021458Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021459BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021460*) LIBM=-lm
21461esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21463echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021464
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021466if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021468if test "$withval" = no
21469then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21471echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021472elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021473then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021474 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21475echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021476else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21477echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21478 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021479fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021480else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21482echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21483fi
21484
Guido van Rossum7f43da71994-08-01 12:15:30 +000021485
21486# check for --with-libc=...
21487
Martin v. Löwiseba40652007-08-30 20:10:57 +000021488{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21489echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021490
Martin v. Löwiseba40652007-08-30 20:10:57 +000021491# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021492if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021493 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021494if test "$withval" = no
21495then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21497echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021498elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021499then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021500 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21501echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021502else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21503echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21504 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021505fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021506else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21508echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21509fi
21510
Guido van Rossum7f43da71994-08-01 12:15:30 +000021511
Christian Heimes0a8143f2007-12-18 23:22:54 +000021512# ************************************
21513# * Check for mathematical functions *
21514# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021515
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021516LIBS_SAVE=$LIBS
21517LIBS="$LIBS $LIBM"
21518
Mark Dickinson265d7382008-04-21 22:32:24 +000021519# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21520# -0. on some architectures.
21521{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21522echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21523if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21524 echo $ECHO_N "(cached) $ECHO_C" >&6
21525else
21526
21527if test "$cross_compiling" = yes; then
21528 ac_cv_tanh_preserves_zero_sign=no
21529else
21530 cat >conftest.$ac_ext <<_ACEOF
21531/* confdefs.h. */
21532_ACEOF
21533cat confdefs.h >>conftest.$ac_ext
21534cat >>conftest.$ac_ext <<_ACEOF
21535/* end confdefs.h. */
21536
21537#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021538#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021539int main() {
21540 /* return 0 if either negative zeros don't exist
21541 on this platform or if negative zeros exist
21542 and tanh(-0.) == -0. */
21543 if (atan2(0., -1.) == atan2(-0., -1.) ||
21544 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21545 else exit(1);
21546}
21547
21548_ACEOF
21549rm -f conftest$ac_exeext
21550if { (ac_try="$ac_link"
21551case "(($ac_try" in
21552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21553 *) ac_try_echo=$ac_try;;
21554esac
21555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21556 (eval "$ac_link") 2>&5
21557 ac_status=$?
21558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21560 { (case "(($ac_try" in
21561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21562 *) ac_try_echo=$ac_try;;
21563esac
21564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21565 (eval "$ac_try") 2>&5
21566 ac_status=$?
21567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21568 (exit $ac_status); }; }; then
21569 ac_cv_tanh_preserves_zero_sign=yes
21570else
21571 echo "$as_me: program exited with status $ac_status" >&5
21572echo "$as_me: failed program was:" >&5
21573sed 's/^/| /' conftest.$ac_ext >&5
21574
21575( exit $ac_status )
21576ac_cv_tanh_preserves_zero_sign=no
21577fi
21578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21579fi
21580
21581
21582fi
21583
21584{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21585echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21586if test "$ac_cv_tanh_preserves_zero_sign" = yes
21587then
21588
21589cat >>confdefs.h <<\_ACEOF
21590#define TANH_PRESERVES_ZERO_SIGN 1
21591_ACEOF
21592
21593fi
21594
Martin v. Löwis11437992002-04-12 09:54:03 +000021595
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021596for ac_func in hypot
21597do
Martin v. Löwis11437992002-04-12 09:54:03 +000021598as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021599{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21600echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21601if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021602 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021603else
Martin v. Löwis11437992002-04-12 09:54:03 +000021604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021605/* confdefs.h. */
21606_ACEOF
21607cat confdefs.h >>conftest.$ac_ext
21608cat >>conftest.$ac_ext <<_ACEOF
21609/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021610/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21611 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21612#define $ac_func innocuous_$ac_func
21613
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021614/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021615 which can conflict with char $ac_func (); below.
21616 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021617 <limits.h> exists even on freestanding compilers. */
21618
21619#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021620# include <limits.h>
21621#else
21622# include <assert.h>
21623#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021624
21625#undef $ac_func
21626
Martin v. Löwiseba40652007-08-30 20:10:57 +000021627/* Override any GCC internal prototype to avoid an error.
21628 Use char because int might match the return type of a GCC
21629 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021630#ifdef __cplusplus
21631extern "C"
21632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021633char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021634/* The GNU C library defines this for functions which it implements
21635 to always fail with ENOSYS. Some functions are actually named
21636 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021638choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021639#endif
21640
Skip Montanaro6dead952003-09-25 14:50:04 +000021641int
21642main ()
21643{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 ;
21646 return 0;
21647}
21648_ACEOF
21649rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021650if { (ac_try="$ac_link"
21651case "(($ac_try" in
21652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21653 *) ac_try_echo=$ac_try;;
21654esac
21655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21656 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021658 grep -v '^ *+' conftest.er1 >conftest.err
21659 rm -f conftest.er1
21660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021662 (exit $ac_status); } && {
21663 test -z "$ac_c_werror_flag" ||
21664 test ! -s conftest.err
21665 } && test -s conftest$ac_exeext &&
21666 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021667 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021668else
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021670sed 's/^/| /' conftest.$ac_ext >&5
21671
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674
21675rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021676 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021678ac_res=`eval echo '${'$as_ac_var'}'`
21679 { echo "$as_me:$LINENO: result: $ac_res" >&5
21680echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021681if test `eval echo '${'$as_ac_var'}'` = yes; then
21682 cat >>confdefs.h <<_ACEOF
21683#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21684_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021685
Michael W. Hudson54241132001-12-07 15:38:26 +000021686else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021688 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021689 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21690 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021691esac
21692
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021693fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021694done
21695
Michael W. Hudson54241132001-12-07 15:38:26 +000021696
Christian Heimes0a8143f2007-12-18 23:22:54 +000021697
21698
21699
21700
21701
Christian Heimes48723512008-01-20 14:28:28 +000021702
21703
21704
21705
21706
21707for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021708do
21709as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21710{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21711echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21712if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21713 echo $ECHO_N "(cached) $ECHO_C" >&6
21714else
21715 cat >conftest.$ac_ext <<_ACEOF
21716/* confdefs.h. */
21717_ACEOF
21718cat confdefs.h >>conftest.$ac_ext
21719cat >>conftest.$ac_ext <<_ACEOF
21720/* end confdefs.h. */
21721/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21722 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21723#define $ac_func innocuous_$ac_func
21724
21725/* System header to define __stub macros and hopefully few prototypes,
21726 which can conflict with char $ac_func (); below.
21727 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21728 <limits.h> exists even on freestanding compilers. */
21729
21730#ifdef __STDC__
21731# include <limits.h>
21732#else
21733# include <assert.h>
21734#endif
21735
21736#undef $ac_func
21737
21738/* Override any GCC internal prototype to avoid an error.
21739 Use char because int might match the return type of a GCC
21740 builtin and then its argument prototype would still apply. */
21741#ifdef __cplusplus
21742extern "C"
21743#endif
21744char $ac_func ();
21745/* The GNU C library defines this for functions which it implements
21746 to always fail with ENOSYS. Some functions are actually named
21747 something starting with __ and the normal name is an alias. */
21748#if defined __stub_$ac_func || defined __stub___$ac_func
21749choke me
21750#endif
21751
21752int
21753main ()
21754{
21755return $ac_func ();
21756 ;
21757 return 0;
21758}
21759_ACEOF
21760rm -f conftest.$ac_objext conftest$ac_exeext
21761if { (ac_try="$ac_link"
21762case "(($ac_try" in
21763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21764 *) ac_try_echo=$ac_try;;
21765esac
21766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21767 (eval "$ac_link") 2>conftest.er1
21768 ac_status=$?
21769 grep -v '^ *+' conftest.er1 >conftest.err
21770 rm -f conftest.er1
21771 cat conftest.err >&5
21772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21773 (exit $ac_status); } && {
21774 test -z "$ac_c_werror_flag" ||
21775 test ! -s conftest.err
21776 } && test -s conftest$ac_exeext &&
21777 $as_test_x conftest$ac_exeext; then
21778 eval "$as_ac_var=yes"
21779else
21780 echo "$as_me: failed program was:" >&5
21781sed 's/^/| /' conftest.$ac_ext >&5
21782
21783 eval "$as_ac_var=no"
21784fi
21785
21786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21787 conftest$ac_exeext conftest.$ac_ext
21788fi
21789ac_res=`eval echo '${'$as_ac_var'}'`
21790 { echo "$as_me:$LINENO: result: $ac_res" >&5
21791echo "${ECHO_T}$ac_res" >&6; }
21792if test `eval echo '${'$as_ac_var'}'` = yes; then
21793 cat >>confdefs.h <<_ACEOF
21794#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21795_ACEOF
21796
21797fi
21798done
21799
21800
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021801LIBS=$LIBS_SAVE
21802
Guido van Rossumef2255b2000-03-10 22:30:29 +000021803# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021804if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021805 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21806echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021807if test "${ac_cv_header_wchar_h+set}" = set; then
21808 echo $ECHO_N "(cached) $ECHO_C" >&6
21809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021810{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21811echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021812else
Martin v. Löwis11437992002-04-12 09:54:03 +000021813 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21815echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021817/* confdefs.h. */
21818_ACEOF
21819cat confdefs.h >>conftest.$ac_ext
21820cat >>conftest.$ac_ext <<_ACEOF
21821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021822$ac_includes_default
21823#include <wchar.h>
21824_ACEOF
21825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021826if { (ac_try="$ac_compile"
21827case "(($ac_try" in
21828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21829 *) ac_try_echo=$ac_try;;
21830esac
21831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021834 grep -v '^ *+' conftest.er1 >conftest.err
21835 rm -f conftest.er1
21836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021838 (exit $ac_status); } && {
21839 test -z "$ac_c_werror_flag" ||
21840 test ! -s conftest.err
21841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021842 ac_header_compiler=yes
21843else
21844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021845sed 's/^/| /' conftest.$ac_ext >&5
21846
Martin v. Löwiseba40652007-08-30 20:10:57 +000021847 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021849
21850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21851{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21852echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021853
21854# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021855{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21856echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021858/* confdefs.h. */
21859_ACEOF
21860cat confdefs.h >>conftest.$ac_ext
21861cat >>conftest.$ac_ext <<_ACEOF
21862/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021863#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021864_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021865if { (ac_try="$ac_cpp conftest.$ac_ext"
21866case "(($ac_try" in
21867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868 *) ac_try_echo=$ac_try;;
21869esac
21870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21871 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021872 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021873 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 rm -f conftest.er1
21875 cat conftest.err >&5
21876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 (exit $ac_status); } >/dev/null && {
21878 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21879 test ! -s conftest.err
21880 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021881 ac_header_preproc=yes
21882else
21883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021884sed 's/^/| /' conftest.$ac_ext >&5
21885
Martin v. Löwis11437992002-04-12 09:54:03 +000021886 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888
Martin v. Löwis11437992002-04-12 09:54:03 +000021889rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21891echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021892
21893# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021894case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21895 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021896 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21897echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021898 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21899echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21900 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021901 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021902 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021903 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21904echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021905 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21906echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21907 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21908echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21909 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21910echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021911 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21912echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021913 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21914echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021916## ------------------------------------------------ ##
21917## Report this to http://www.python.org/python-bugs ##
21918## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021919_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021920 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021921 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021922esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021923{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21924echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021925if test "${ac_cv_header_wchar_h+set}" = set; then
21926 echo $ECHO_N "(cached) $ECHO_C" >&6
21927else
21928 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21931echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021932
21933fi
21934if test $ac_cv_header_wchar_h = yes; then
21935
21936
21937cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021938#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021939_ACEOF
21940
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021941 wchar_h="yes"
21942
Guido van Rossumef2255b2000-03-10 22:30:29 +000021943else
Martin v. Löwis11437992002-04-12 09:54:03 +000021944 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021945
21946fi
21947
Michael W. Hudson54241132001-12-07 15:38:26 +000021948
Martin v. Löwis11437992002-04-12 09:54:03 +000021949
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021950# determine wchar_t size
21951if test "$wchar_h" = yes
21952then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021953 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21954echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021955if test "${ac_cv_type_wchar_t+set}" = set; then
21956 echo $ECHO_N "(cached) $ECHO_C" >&6
21957else
21958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021959/* confdefs.h. */
21960_ACEOF
21961cat confdefs.h >>conftest.$ac_ext
21962cat >>conftest.$ac_ext <<_ACEOF
21963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021964#include <wchar.h>
21965
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021967int
21968main ()
21969{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021970if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021971 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021973 return 0;
21974 ;
21975 return 0;
21976}
21977_ACEOF
21978rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979if { (ac_try="$ac_compile"
21980case "(($ac_try" in
21981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21982 *) ac_try_echo=$ac_try;;
21983esac
21984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021987 grep -v '^ *+' conftest.er1 >conftest.err
21988 rm -f conftest.er1
21989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021991 (exit $ac_status); } && {
21992 test -z "$ac_c_werror_flag" ||
21993 test ! -s conftest.err
21994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021995 ac_cv_type_wchar_t=yes
21996else
21997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021998sed 's/^/| /' conftest.$ac_ext >&5
21999
Martin v. Löwiseba40652007-08-30 20:10:57 +000022000 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022001fi
Brett Cannon19fab762007-06-02 03:02:29 +000022002
Martin v. Löwiseba40652007-08-30 20:10:57 +000022003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22004fi
22005{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22006echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22007
22008# The cast to long int works around a bug in the HP C Compiler
22009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22011# This bug is HP SR number 8606223364.
22012{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22013echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022014if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22015 echo $ECHO_N "(cached) $ECHO_C" >&6
22016else
Martin v. Löwis11437992002-04-12 09:54:03 +000022017 if test "$cross_compiling" = yes; then
22018 # Depending upon the size, compute the lo and hi bounds.
22019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022020/* confdefs.h. */
22021_ACEOF
22022cat confdefs.h >>conftest.$ac_ext
22023cat >>conftest.$ac_ext <<_ACEOF
22024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022025#include <wchar.h>
22026
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022028int
22029main ()
22030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022031static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022032test_array [0] = 0
22033
22034 ;
22035 return 0;
22036}
22037_ACEOF
22038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022039if { (ac_try="$ac_compile"
22040case "(($ac_try" in
22041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22042 *) ac_try_echo=$ac_try;;
22043esac
22044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022047 grep -v '^ *+' conftest.er1 >conftest.err
22048 rm -f conftest.er1
22049 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051 (exit $ac_status); } && {
22052 test -z "$ac_c_werror_flag" ||
22053 test ! -s conftest.err
22054 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022055 ac_lo=0 ac_mid=0
22056 while :; do
22057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022058/* confdefs.h. */
22059_ACEOF
22060cat confdefs.h >>conftest.$ac_ext
22061cat >>conftest.$ac_ext <<_ACEOF
22062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022063#include <wchar.h>
22064
Martin v. Löwiseba40652007-08-30 20:10:57 +000022065 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022066int
22067main ()
22068{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022070test_array [0] = 0
22071
22072 ;
22073 return 0;
22074}
22075_ACEOF
22076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022077if { (ac_try="$ac_compile"
22078case "(($ac_try" in
22079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22080 *) ac_try_echo=$ac_try;;
22081esac
22082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022085 grep -v '^ *+' conftest.er1 >conftest.err
22086 rm -f conftest.er1
22087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022089 (exit $ac_status); } && {
22090 test -z "$ac_c_werror_flag" ||
22091 test ! -s conftest.err
22092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022093 ac_hi=$ac_mid; break
22094else
22095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022096sed 's/^/| /' conftest.$ac_ext >&5
22097
Martin v. Löwiseba40652007-08-30 20:10:57 +000022098 ac_lo=`expr $ac_mid + 1`
22099 if test $ac_lo -le $ac_mid; then
22100 ac_lo= ac_hi=
22101 break
22102 fi
22103 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022105
22106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 done
22108else
22109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022110sed 's/^/| /' conftest.$ac_ext >&5
22111
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022113/* confdefs.h. */
22114_ACEOF
22115cat confdefs.h >>conftest.$ac_ext
22116cat >>conftest.$ac_ext <<_ACEOF
22117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022118#include <wchar.h>
22119
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022121int
22122main ()
22123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022125test_array [0] = 0
22126
22127 ;
22128 return 0;
22129}
22130_ACEOF
22131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022132if { (ac_try="$ac_compile"
22133case "(($ac_try" in
22134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22135 *) ac_try_echo=$ac_try;;
22136esac
22137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022140 grep -v '^ *+' conftest.er1 >conftest.err
22141 rm -f conftest.er1
22142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022144 (exit $ac_status); } && {
22145 test -z "$ac_c_werror_flag" ||
22146 test ! -s conftest.err
22147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022148 ac_hi=-1 ac_mid=-1
22149 while :; do
22150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022151/* confdefs.h. */
22152_ACEOF
22153cat confdefs.h >>conftest.$ac_ext
22154cat >>conftest.$ac_ext <<_ACEOF
22155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022156#include <wchar.h>
22157
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022159int
22160main ()
22161{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022163test_array [0] = 0
22164
22165 ;
22166 return 0;
22167}
22168_ACEOF
22169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022178 grep -v '^ *+' conftest.er1 >conftest.err
22179 rm -f conftest.er1
22180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022182 (exit $ac_status); } && {
22183 test -z "$ac_c_werror_flag" ||
22184 test ! -s conftest.err
22185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022186 ac_lo=$ac_mid; break
22187else
22188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022189sed 's/^/| /' conftest.$ac_ext >&5
22190
Martin v. Löwiseba40652007-08-30 20:10:57 +000022191 ac_hi=`expr '(' $ac_mid ')' - 1`
22192 if test $ac_mid -le $ac_hi; then
22193 ac_lo= ac_hi=
22194 break
22195 fi
22196 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022198
22199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022200 done
22201else
22202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022203sed 's/^/| /' conftest.$ac_ext >&5
22204
Martin v. Löwiseba40652007-08-30 20:10:57 +000022205 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022207
22208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210
22211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022212# Binary search between lo and hi bounds.
22213while test "x$ac_lo" != "x$ac_hi"; do
22214 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022216/* confdefs.h. */
22217_ACEOF
22218cat confdefs.h >>conftest.$ac_ext
22219cat >>conftest.$ac_ext <<_ACEOF
22220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022221#include <wchar.h>
22222
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022224int
22225main ()
22226{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022228test_array [0] = 0
22229
22230 ;
22231 return 0;
22232}
22233_ACEOF
22234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022235if { (ac_try="$ac_compile"
22236case "(($ac_try" in
22237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22238 *) ac_try_echo=$ac_try;;
22239esac
22240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022243 grep -v '^ *+' conftest.er1 >conftest.err
22244 rm -f conftest.er1
22245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022247 (exit $ac_status); } && {
22248 test -z "$ac_c_werror_flag" ||
22249 test ! -s conftest.err
22250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022251 ac_hi=$ac_mid
22252else
22253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022254sed 's/^/| /' conftest.$ac_ext >&5
22255
Martin v. Löwiseba40652007-08-30 20:10:57 +000022256 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022258
22259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022260done
22261case $ac_lo in
22262?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022263'') if test "$ac_cv_type_wchar_t" = yes; then
22264 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022265See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022266echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022267See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022268 { (exit 77); exit 77; }; }
22269 else
22270 ac_cv_sizeof_wchar_t=0
22271 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022272esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022273else
Martin v. Löwis11437992002-04-12 09:54:03 +000022274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022275/* confdefs.h. */
22276_ACEOF
22277cat confdefs.h >>conftest.$ac_ext
22278cat >>conftest.$ac_ext <<_ACEOF
22279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022280#include <wchar.h>
22281
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282 typedef wchar_t ac__type_sizeof_;
22283static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22284static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022285#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022286#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022287int
22288main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022289{
Martin v. Löwis11437992002-04-12 09:54:03 +000022290
22291 FILE *f = fopen ("conftest.val", "w");
22292 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022293 return 1;
22294 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022295 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022296 long int i = longval ();
22297 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22298 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022299 fprintf (f, "%ld\n", i);
22300 }
22301 else
22302 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022303 unsigned long int i = ulongval ();
22304 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22305 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022306 fprintf (f, "%lu\n", i);
22307 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022308 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022309
22310 ;
22311 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022312}
Martin v. Löwis11437992002-04-12 09:54:03 +000022313_ACEOF
22314rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315if { (ac_try="$ac_link"
22316case "(($ac_try" in
22317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22318 *) ac_try_echo=$ac_try;;
22319esac
22320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22321 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 ac_status=$?
22323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325 { (case "(($ac_try" in
22326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22327 *) ac_try_echo=$ac_try;;
22328esac
22329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22330 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 ac_status=$?
22332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22333 (exit $ac_status); }; }; then
22334 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022335else
Martin v. Löwis11437992002-04-12 09:54:03 +000022336 echo "$as_me: program exited with status $ac_status" >&5
22337echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022338sed 's/^/| /' conftest.$ac_ext >&5
22339
Martin v. Löwis11437992002-04-12 09:54:03 +000022340( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022341if test "$ac_cv_type_wchar_t" = yes; then
22342 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022343See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022344echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022345See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 { (exit 77); exit 77; }; }
22347 else
22348 ac_cv_sizeof_wchar_t=0
22349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022351rm -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 +000022352fi
22353rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022355{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22356echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22357
22358
22359
Martin v. Löwis11437992002-04-12 09:54:03 +000022360cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022361#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022362_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022363
Michael W. Hudson54241132001-12-07 15:38:26 +000022364
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022365fi
22366
Martin v. Löwiseba40652007-08-30 20:10:57 +000022367{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22368echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022369have_ucs4_tcl=no
22370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022371/* confdefs.h. */
22372_ACEOF
22373cat confdefs.h >>conftest.$ac_ext
22374cat >>conftest.$ac_ext <<_ACEOF
22375/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022376
22377#include <tcl.h>
22378#if TCL_UTF_MAX != 6
22379# error "NOT UCS4_TCL"
22380#endif
22381int
22382main ()
22383{
22384
22385 ;
22386 return 0;
22387}
22388_ACEOF
22389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022390if { (ac_try="$ac_compile"
22391case "(($ac_try" in
22392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22393 *) ac_try_echo=$ac_try;;
22394esac
22395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022398 grep -v '^ *+' conftest.er1 >conftest.err
22399 rm -f conftest.er1
22400 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022402 (exit $ac_status); } && {
22403 test -z "$ac_c_werror_flag" ||
22404 test ! -s conftest.err
22405 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022406
22407
22408cat >>confdefs.h <<\_ACEOF
22409#define HAVE_UCS4_TCL 1
22410_ACEOF
22411
22412 have_ucs4_tcl=yes
22413
22414else
22415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022416sed 's/^/| /' conftest.$ac_ext >&5
22417
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022420
22421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22422{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22423echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022424
Skip Montanaro6dead952003-09-25 14:50:04 +000022425# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022426if test "$wchar_h" = yes
22427then
22428 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022429 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22430echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022431 if test "${ac_cv_wchar_t_signed+set}" = set; then
22432 echo $ECHO_N "(cached) $ECHO_C" >&6
22433else
22434
22435 if test "$cross_compiling" = yes; then
22436 ac_cv_wchar_t_signed=yes
22437else
22438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022439/* confdefs.h. */
22440_ACEOF
22441cat confdefs.h >>conftest.$ac_ext
22442cat >>conftest.$ac_ext <<_ACEOF
22443/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022444
22445 #include <wchar.h>
22446 int main()
22447 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022448 /* Success: exit code 0 */
22449 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022450 }
22451
22452_ACEOF
22453rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454if { (ac_try="$ac_link"
22455case "(($ac_try" in
22456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22457 *) ac_try_echo=$ac_try;;
22458esac
22459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22460 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022461 ac_status=$?
22462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464 { (case "(($ac_try" in
22465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22466 *) ac_try_echo=$ac_try;;
22467esac
22468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22469 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022470 ac_status=$?
22471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22472 (exit $ac_status); }; }; then
22473 ac_cv_wchar_t_signed=yes
22474else
22475 echo "$as_me: program exited with status $ac_status" >&5
22476echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022477sed 's/^/| /' conftest.$ac_ext >&5
22478
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022479( exit $ac_status )
22480ac_cv_wchar_t_signed=no
22481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022482rm -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 +000022483fi
22484
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022486fi
22487
Martin v. Löwiseba40652007-08-30 20:10:57 +000022488 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22489echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22490fi
22491
22492{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22493echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22494# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022495if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022496 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022497else
22498 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499fi
22500
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022501
22502if test $enable_unicode = yes
22503then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022504 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022505 case "$have_ucs4_tcl" in
22506 yes) enable_unicode="ucs4"
22507 ;;
22508 *) enable_unicode="ucs2"
22509 ;;
22510 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022511fi
22512
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022513
22514
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022515case "$enable_unicode" in
22516ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022517 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022518#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022519_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022520
22521 ;;
22522ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022523 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022524#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022525_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022526
22527 ;;
22528esac
22529
Michael W. Hudson54241132001-12-07 15:38:26 +000022530
Martin v. Löwis11437992002-04-12 09:54:03 +000022531
22532
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022533
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022534if test "$enable_unicode" = "no"
22535then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022536 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537 { echo "$as_me:$LINENO: result: not used" >&5
22538echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022539else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022540 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022541
22542cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022543#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022544_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022545
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022546
22547 # wchar_t is only usable if it maps to an unsigned type
22548 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022549 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022550 then
22551 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022552
Martin v. Löwis11437992002-04-12 09:54:03 +000022553cat >>confdefs.h <<\_ACEOF
22554#define HAVE_USABLE_WCHAR_T 1
22555_ACEOF
22556
22557 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022558#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022559_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022560
22561 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22562 then
22563 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022564 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022565#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022566_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022567
22568 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22569 then
22570 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022571 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022572#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022573_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022574
22575 else
22576 PY_UNICODE_TYPE="no type found"
22577 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022578 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22579echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022580fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022581
22582# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022583{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22584echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022585if test "${ac_cv_c_bigendian+set}" = set; then
22586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022587else
Martin v. Löwis11437992002-04-12 09:54:03 +000022588 # See if sys/param.h defines the BYTE_ORDER macro.
22589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022590/* confdefs.h. */
22591_ACEOF
22592cat confdefs.h >>conftest.$ac_ext
22593cat >>conftest.$ac_ext <<_ACEOF
22594/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022595#include <sys/types.h>
22596#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022597
Martin v. Löwis11437992002-04-12 09:54:03 +000022598int
22599main ()
22600{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022601#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22602 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022603 bogus endian macros
22604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022605
22606 ;
22607 return 0;
22608}
22609_ACEOF
22610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022611if { (ac_try="$ac_compile"
22612case "(($ac_try" in
22613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22614 *) ac_try_echo=$ac_try;;
22615esac
22616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022619 grep -v '^ *+' conftest.er1 >conftest.err
22620 rm -f conftest.er1
22621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022623 (exit $ac_status); } && {
22624 test -z "$ac_c_werror_flag" ||
22625 test ! -s conftest.err
22626 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022627 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022629/* confdefs.h. */
22630_ACEOF
22631cat confdefs.h >>conftest.$ac_ext
22632cat >>conftest.$ac_ext <<_ACEOF
22633/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022634#include <sys/types.h>
22635#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022636
Martin v. Löwis11437992002-04-12 09:54:03 +000022637int
22638main ()
22639{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022640#if BYTE_ORDER != BIG_ENDIAN
22641 not big endian
22642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022643
22644 ;
22645 return 0;
22646}
22647_ACEOF
22648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022649if { (ac_try="$ac_compile"
22650case "(($ac_try" in
22651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22652 *) ac_try_echo=$ac_try;;
22653esac
22654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022657 grep -v '^ *+' conftest.er1 >conftest.err
22658 rm -f conftest.er1
22659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022661 (exit $ac_status); } && {
22662 test -z "$ac_c_werror_flag" ||
22663 test ! -s conftest.err
22664 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022665 ac_cv_c_bigendian=yes
22666else
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022668sed 's/^/| /' conftest.$ac_ext >&5
22669
Martin v. Löwiseba40652007-08-30 20:10:57 +000022670 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022672
22673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022674else
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022676sed 's/^/| /' conftest.$ac_ext >&5
22677
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022679if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022680 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 ac_cv_c_bigendian=unknown
22682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022683/* confdefs.h. */
22684_ACEOF
22685cat confdefs.h >>conftest.$ac_ext
22686cat >>conftest.$ac_ext <<_ACEOF
22687/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22689short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022690void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22692short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022693void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022694int
22695main ()
22696{
22697 _ascii (); _ebcdic ();
22698 ;
22699 return 0;
22700}
22701_ACEOF
22702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022703if { (ac_try="$ac_compile"
22704case "(($ac_try" in
22705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22706 *) ac_try_echo=$ac_try;;
22707esac
22708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022711 grep -v '^ *+' conftest.er1 >conftest.err
22712 rm -f conftest.er1
22713 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022715 (exit $ac_status); } && {
22716 test -z "$ac_c_werror_flag" ||
22717 test ! -s conftest.err
22718 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022719 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 ac_cv_c_bigendian=yes
22721fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022722if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022723 if test "$ac_cv_c_bigendian" = unknown; then
22724 ac_cv_c_bigendian=no
22725 else
22726 # finding both strings is unlikely to happen, but who knows?
22727 ac_cv_c_bigendian=unknown
22728 fi
22729fi
22730else
22731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022732sed 's/^/| /' conftest.$ac_ext >&5
22733
Martin v. Löwiseba40652007-08-30 20:10:57 +000022734
Martin v. Löwis11437992002-04-12 09:54:03 +000022735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736
22737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022738else
22739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022740/* confdefs.h. */
22741_ACEOF
22742cat confdefs.h >>conftest.$ac_ext
22743cat >>conftest.$ac_ext <<_ACEOF
22744/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022745$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022746int
22747main ()
22748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022749
Guido van Rossumef2255b2000-03-10 22:30:29 +000022750 /* Are we little or big endian? From Harbison&Steele. */
22751 union
22752 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022753 long int l;
22754 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022755 } u;
22756 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022757 return u.c[sizeof (long int) - 1] == 1;
22758
22759 ;
22760 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022761}
Martin v. Löwis11437992002-04-12 09:54:03 +000022762_ACEOF
22763rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022764if { (ac_try="$ac_link"
22765case "(($ac_try" in
22766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22767 *) ac_try_echo=$ac_try;;
22768esac
22769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22770 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022771 ac_status=$?
22772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022774 { (case "(($ac_try" in
22775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22776 *) ac_try_echo=$ac_try;;
22777esac
22778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 ac_status=$?
22781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22782 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022783 ac_cv_c_bigendian=no
22784else
Martin v. Löwis11437992002-04-12 09:54:03 +000022785 echo "$as_me: program exited with status $ac_status" >&5
22786echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022787sed 's/^/| /' conftest.$ac_ext >&5
22788
Martin v. Löwis11437992002-04-12 09:54:03 +000022789( exit $ac_status )
22790ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022792rm -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 +000022793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022794
22795
Martin v. Löwis11437992002-04-12 09:54:03 +000022796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022797
22798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22801echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022802case $ac_cv_c_bigendian in
22803 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022804
Martin v. Löwis11437992002-04-12 09:54:03 +000022805cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022806#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022807_ACEOF
22808 ;;
22809 no)
22810 ;;
22811 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022812 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022813presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022814echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022815presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22816 { (exit 1); exit 1; }; } ;;
22817esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022818
Michael W. Hudson54241132001-12-07 15:38:26 +000022819
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022820# Check whether right shifting a negative integer extends the sign bit
22821# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022822{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22823echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022824if test "${ac_cv_rshift_extends_sign+set}" = set; then
22825 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022826else
Martin v. Löwis11437992002-04-12 09:54:03 +000022827
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022828if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022829 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022830else
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022832/* confdefs.h. */
22833_ACEOF
22834cat confdefs.h >>conftest.$ac_ext
22835cat >>conftest.$ac_ext <<_ACEOF
22836/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022837
22838int main()
22839{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022840 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022841}
22842
Martin v. Löwis11437992002-04-12 09:54:03 +000022843_ACEOF
22844rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845if { (ac_try="$ac_link"
22846case "(($ac_try" in
22847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22848 *) ac_try_echo=$ac_try;;
22849esac
22850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22851 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022852 ac_status=$?
22853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22854 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022855 { (case "(($ac_try" in
22856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22857 *) ac_try_echo=$ac_try;;
22858esac
22859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22860 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022861 ac_status=$?
22862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22863 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022864 ac_cv_rshift_extends_sign=yes
22865else
Martin v. Löwis11437992002-04-12 09:54:03 +000022866 echo "$as_me: program exited with status $ac_status" >&5
22867echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022868sed 's/^/| /' conftest.$ac_ext >&5
22869
Martin v. Löwis11437992002-04-12 09:54:03 +000022870( exit $ac_status )
22871ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022873rm -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 +000022874fi
22875
Martin v. Löwiseba40652007-08-30 20:10:57 +000022876
22877fi
22878
22879{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22880echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022881if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022882then
Martin v. Löwis11437992002-04-12 09:54:03 +000022883
22884cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022885#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022886_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022887
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022888fi
22889
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022890# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022891{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22892echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022893if test "${ac_cv_have_getc_unlocked+set}" = set; then
22894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022895else
Martin v. Löwis11437992002-04-12 09:54:03 +000022896
22897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022898/* confdefs.h. */
22899_ACEOF
22900cat confdefs.h >>conftest.$ac_ext
22901cat >>conftest.$ac_ext <<_ACEOF
22902/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022903#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022904int
22905main ()
22906{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022907
22908 FILE *f = fopen("/dev/null", "r");
22909 flockfile(f);
22910 getc_unlocked(f);
22911 funlockfile(f);
22912
Martin v. Löwis11437992002-04-12 09:54:03 +000022913 ;
22914 return 0;
22915}
22916_ACEOF
22917rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022918if { (ac_try="$ac_link"
22919case "(($ac_try" in
22920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22921 *) ac_try_echo=$ac_try;;
22922esac
22923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22924 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022926 grep -v '^ *+' conftest.er1 >conftest.err
22927 rm -f conftest.er1
22928 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930 (exit $ac_status); } && {
22931 test -z "$ac_c_werror_flag" ||
22932 test ! -s conftest.err
22933 } && test -s conftest$ac_exeext &&
22934 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022935 ac_cv_have_getc_unlocked=yes
22936else
Martin v. Löwis11437992002-04-12 09:54:03 +000022937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022938sed 's/^/| /' conftest.$ac_ext >&5
22939
Martin v. Löwiseba40652007-08-30 20:10:57 +000022940 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942
22943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022944 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022945fi
22946
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22948echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022949if test "$ac_cv_have_getc_unlocked" = yes
22950then
Martin v. Löwis11437992002-04-12 09:54:03 +000022951
22952cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022953#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022954_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022955
22956fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022957
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022958# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022959# save the value of LIBS so we don't actually link Python with readline
22960LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022961
Gregory P. Smithcc023f12008-09-07 05:15:58 +000022962# On some systems we need to link readline to a termcap compatible
22963# library. NOTE: Keep the precedence of listed libraries synchronised
22964# with setup.py.
22965py_cv_lib_readline=no
22966{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
22967echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
22968for py_libtermcap in "" ncursesw ncurses curses termcap; do
22969 if test -z "$py_libtermcap"; then
22970 READLINE_LIBS="-lreadline"
22971 else
22972 READLINE_LIBS="-lreadline -l$py_libtermcap"
22973 fi
22974 LIBS="$READLINE_LIBS $LIBS_no_readline"
22975 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022976/* confdefs.h. */
22977_ACEOF
22978cat confdefs.h >>conftest.$ac_ext
22979cat >>conftest.$ac_ext <<_ACEOF
22980/* end confdefs.h. */
22981
Martin v. Löwiseba40652007-08-30 20:10:57 +000022982/* Override any GCC internal prototype to avoid an error.
22983 Use char because int might match the return type of a GCC
22984 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022985#ifdef __cplusplus
22986extern "C"
22987#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022988char readline ();
22989int
22990main ()
22991{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022992return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022993 ;
22994 return 0;
22995}
22996_ACEOF
22997rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022998if { (ac_try="$ac_link"
22999case "(($ac_try" in
23000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23001 *) ac_try_echo=$ac_try;;
23002esac
23003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23004 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023005 ac_status=$?
23006 grep -v '^ *+' conftest.er1 >conftest.err
23007 rm -f conftest.er1
23008 cat conftest.err >&5
23009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010 (exit $ac_status); } && {
23011 test -z "$ac_c_werror_flag" ||
23012 test ! -s conftest.err
23013 } && test -s conftest$ac_exeext &&
23014 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023015 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023016else
23017 echo "$as_me: failed program was:" >&5
23018sed 's/^/| /' conftest.$ac_ext >&5
23019
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023020
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023022
23023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023024 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023025 if test $py_cv_lib_readline = yes; then
23026 break
23027 fi
23028done
23029# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23030#AC_SUBST([READLINE_LIBS])
23031if test $py_cv_lib_readline = !yes; then
23032 { echo "$as_me:$LINENO: result: none" >&5
23033echo "${ECHO_T}none" >&6; }
23034else
23035 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23036echo "${ECHO_T}$READLINE_LIBS" >&6; }
23037
23038cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023039#define HAVE_LIBREADLINE 1
23040_ACEOF
23041
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023042fi
23043
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023044# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023045{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23046echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023047if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23048 echo $ECHO_N "(cached) $ECHO_C" >&6
23049else
23050 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023051LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023052cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023053/* confdefs.h. */
23054_ACEOF
23055cat confdefs.h >>conftest.$ac_ext
23056cat >>conftest.$ac_ext <<_ACEOF
23057/* end confdefs.h. */
23058
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059/* Override any GCC internal prototype to avoid an error.
23060 Use char because int might match the return type of a GCC
23061 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023062#ifdef __cplusplus
23063extern "C"
23064#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023065char rl_callback_handler_install ();
23066int
23067main ()
23068{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023070 ;
23071 return 0;
23072}
23073_ACEOF
23074rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023075if { (ac_try="$ac_link"
23076case "(($ac_try" in
23077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23078 *) ac_try_echo=$ac_try;;
23079esac
23080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23081 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023083 grep -v '^ *+' conftest.er1 >conftest.err
23084 rm -f conftest.er1
23085 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023087 (exit $ac_status); } && {
23088 test -z "$ac_c_werror_flag" ||
23089 test ! -s conftest.err
23090 } && test -s conftest$ac_exeext &&
23091 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023092 ac_cv_lib_readline_rl_callback_handler_install=yes
23093else
23094 echo "$as_me: failed program was:" >&5
23095sed 's/^/| /' conftest.$ac_ext >&5
23096
Martin v. Löwiseba40652007-08-30 20:10:57 +000023097 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023099
23100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023101 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023102LIBS=$ac_check_lib_save_LIBS
23103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023104{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23105echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023106if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23107
23108cat >>confdefs.h <<\_ACEOF
23109#define HAVE_RL_CALLBACK 1
23110_ACEOF
23111
23112fi
23113
23114
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023115# check for readline 2.2
23116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023117/* confdefs.h. */
23118_ACEOF
23119cat confdefs.h >>conftest.$ac_ext
23120cat >>conftest.$ac_ext <<_ACEOF
23121/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023122#include <readline/readline.h>
23123_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124if { (ac_try="$ac_cpp conftest.$ac_ext"
23125case "(($ac_try" in
23126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23127 *) ac_try_echo=$ac_try;;
23128esac
23129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23130 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023131 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023132 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023133 rm -f conftest.er1
23134 cat conftest.err >&5
23135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023136 (exit $ac_status); } >/dev/null && {
23137 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23138 test ! -s conftest.err
23139 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023140 have_readline=yes
23141else
23142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023143sed 's/^/| /' conftest.$ac_ext >&5
23144
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023145 have_readline=no
23146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023147
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023148rm -f conftest.err conftest.$ac_ext
23149if test $have_readline = yes
23150then
23151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023152/* confdefs.h. */
23153_ACEOF
23154cat confdefs.h >>conftest.$ac_ext
23155cat >>conftest.$ac_ext <<_ACEOF
23156/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023157#include <readline/readline.h>
23158
23159_ACEOF
23160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023161 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023162
23163cat >>confdefs.h <<\_ACEOF
23164#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23165_ACEOF
23166
23167fi
23168rm -f conftest*
23169
23170fi
23171
Martin v. Löwis0daad592001-09-30 21:09:59 +000023172# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023173{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23174echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023175if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023177else
Martin v. Löwis11437992002-04-12 09:54:03 +000023178 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023179LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023186
Martin v. Löwiseba40652007-08-30 20:10:57 +000023187/* Override any GCC internal prototype to avoid an error.
23188 Use char because int might match the return type of a GCC
23189 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023190#ifdef __cplusplus
23191extern "C"
23192#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023193char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023194int
23195main ()
23196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023197return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023198 ;
23199 return 0;
23200}
23201_ACEOF
23202rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023203if { (ac_try="$ac_link"
23204case "(($ac_try" in
23205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23206 *) ac_try_echo=$ac_try;;
23207esac
23208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023211 grep -v '^ *+' conftest.er1 >conftest.err
23212 rm -f conftest.er1
23213 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023215 (exit $ac_status); } && {
23216 test -z "$ac_c_werror_flag" ||
23217 test ! -s conftest.err
23218 } && test -s conftest$ac_exeext &&
23219 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023220 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023221else
Martin v. Löwis11437992002-04-12 09:54:03 +000023222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023223sed 's/^/| /' conftest.$ac_ext >&5
23224
Martin v. Löwiseba40652007-08-30 20:10:57 +000023225 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227
23228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023230LIBS=$ac_check_lib_save_LIBS
23231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023232{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23233echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023234if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023235
Martin v. Löwis11437992002-04-12 09:54:03 +000023236cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023237#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023238_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023239
Martin v. Löwis0daad592001-09-30 21:09:59 +000023240fi
23241
Michael W. Hudson54241132001-12-07 15:38:26 +000023242
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023243# also in 4.0
23244{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23245echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23246if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23247 echo $ECHO_N "(cached) $ECHO_C" >&6
23248else
23249 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023250LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023251cat >conftest.$ac_ext <<_ACEOF
23252/* confdefs.h. */
23253_ACEOF
23254cat confdefs.h >>conftest.$ac_ext
23255cat >>conftest.$ac_ext <<_ACEOF
23256/* end confdefs.h. */
23257
23258/* Override any GCC internal prototype to avoid an error.
23259 Use char because int might match the return type of a GCC
23260 builtin and then its argument prototype would still apply. */
23261#ifdef __cplusplus
23262extern "C"
23263#endif
23264char rl_completion_display_matches_hook ();
23265int
23266main ()
23267{
23268return rl_completion_display_matches_hook ();
23269 ;
23270 return 0;
23271}
23272_ACEOF
23273rm -f conftest.$ac_objext conftest$ac_exeext
23274if { (ac_try="$ac_link"
23275case "(($ac_try" in
23276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23277 *) ac_try_echo=$ac_try;;
23278esac
23279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23280 (eval "$ac_link") 2>conftest.er1
23281 ac_status=$?
23282 grep -v '^ *+' conftest.er1 >conftest.err
23283 rm -f conftest.er1
23284 cat conftest.err >&5
23285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23286 (exit $ac_status); } && {
23287 test -z "$ac_c_werror_flag" ||
23288 test ! -s conftest.err
23289 } && test -s conftest$ac_exeext &&
23290 $as_test_x conftest$ac_exeext; then
23291 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23292else
23293 echo "$as_me: failed program was:" >&5
23294sed 's/^/| /' conftest.$ac_ext >&5
23295
23296 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23297fi
23298
23299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23300 conftest$ac_exeext conftest.$ac_ext
23301LIBS=$ac_check_lib_save_LIBS
23302fi
23303{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23304echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23305if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23306
23307cat >>confdefs.h <<\_ACEOF
23308#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23309_ACEOF
23310
23311fi
23312
23313
Martin v. Löwis0daad592001-09-30 21:09:59 +000023314# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023315{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23316echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023317if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23318 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023319else
Martin v. Löwis11437992002-04-12 09:54:03 +000023320 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023321LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023323/* confdefs.h. */
23324_ACEOF
23325cat confdefs.h >>conftest.$ac_ext
23326cat >>conftest.$ac_ext <<_ACEOF
23327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023328
Martin v. Löwiseba40652007-08-30 20:10:57 +000023329/* Override any GCC internal prototype to avoid an error.
23330 Use char because int might match the return type of a GCC
23331 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023332#ifdef __cplusplus
23333extern "C"
23334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023335char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023336int
23337main ()
23338{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023339return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023340 ;
23341 return 0;
23342}
23343_ACEOF
23344rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023345if { (ac_try="$ac_link"
23346case "(($ac_try" in
23347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23348 *) ac_try_echo=$ac_try;;
23349esac
23350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23351 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023353 grep -v '^ *+' conftest.er1 >conftest.err
23354 rm -f conftest.er1
23355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023357 (exit $ac_status); } && {
23358 test -z "$ac_c_werror_flag" ||
23359 test ! -s conftest.err
23360 } && test -s conftest$ac_exeext &&
23361 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023362 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023363else
Martin v. Löwis11437992002-04-12 09:54:03 +000023364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023365sed 's/^/| /' conftest.$ac_ext >&5
23366
Martin v. Löwiseba40652007-08-30 20:10:57 +000023367 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023369
23370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023372LIBS=$ac_check_lib_save_LIBS
23373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023374{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23375echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023376if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023377
Martin v. Löwis11437992002-04-12 09:54:03 +000023378cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023379#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023380_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023381
Guido van Rossum353ae582001-07-10 16:45:32 +000023382fi
23383
Jack Jansendd19cf82001-12-06 22:36:17 +000023384
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023385# also in readline 4.2
23386cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023387/* confdefs.h. */
23388_ACEOF
23389cat confdefs.h >>conftest.$ac_ext
23390cat >>conftest.$ac_ext <<_ACEOF
23391/* end confdefs.h. */
23392#include <readline/readline.h>
23393_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023394if { (ac_try="$ac_cpp conftest.$ac_ext"
23395case "(($ac_try" in
23396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23397 *) ac_try_echo=$ac_try;;
23398esac
23399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23400 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023401 ac_status=$?
23402 grep -v '^ *+' conftest.er1 >conftest.err
23403 rm -f conftest.er1
23404 cat conftest.err >&5
23405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406 (exit $ac_status); } >/dev/null && {
23407 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23408 test ! -s conftest.err
23409 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023410 have_readline=yes
23411else
23412 echo "$as_me: failed program was:" >&5
23413sed 's/^/| /' conftest.$ac_ext >&5
23414
23415 have_readline=no
23416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023417
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023418rm -f conftest.err conftest.$ac_ext
23419if test $have_readline = yes
23420then
23421 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023422/* confdefs.h. */
23423_ACEOF
23424cat confdefs.h >>conftest.$ac_ext
23425cat >>conftest.$ac_ext <<_ACEOF
23426/* end confdefs.h. */
23427#include <readline/readline.h>
23428
23429_ACEOF
23430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23431 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23432
23433cat >>confdefs.h <<\_ACEOF
23434#define HAVE_RL_CATCH_SIGNAL 1
23435_ACEOF
23436
23437fi
23438rm -f conftest*
23439
23440fi
23441
Martin v. Löwis82bca632006-02-10 20:49:30 +000023442# End of readline checks: restore LIBS
23443LIBS=$LIBS_no_readline
23444
Martin v. Löwiseba40652007-08-30 20:10:57 +000023445{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23446echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023447if test "${ac_cv_broken_nice+set}" = set; then
23448 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023449else
Martin v. Löwis11437992002-04-12 09:54:03 +000023450
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023451if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023452 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023453else
Martin v. Löwis11437992002-04-12 09:54:03 +000023454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023455/* confdefs.h. */
23456_ACEOF
23457cat confdefs.h >>conftest.$ac_ext
23458cat >>conftest.$ac_ext <<_ACEOF
23459/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023460
23461int main()
23462{
23463 int val1 = nice(1);
23464 if (val1 != -1 && val1 == nice(2))
23465 exit(0);
23466 exit(1);
23467}
23468
Martin v. Löwis11437992002-04-12 09:54:03 +000023469_ACEOF
23470rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023471if { (ac_try="$ac_link"
23472case "(($ac_try" in
23473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23474 *) ac_try_echo=$ac_try;;
23475esac
23476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23477 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023478 ac_status=$?
23479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023481 { (case "(($ac_try" in
23482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23483 *) ac_try_echo=$ac_try;;
23484esac
23485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23486 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023487 ac_status=$?
23488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23489 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023490 ac_cv_broken_nice=yes
23491else
Martin v. Löwis11437992002-04-12 09:54:03 +000023492 echo "$as_me: program exited with status $ac_status" >&5
23493echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023494sed 's/^/| /' conftest.$ac_ext >&5
23495
Martin v. Löwis11437992002-04-12 09:54:03 +000023496( exit $ac_status )
23497ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023499rm -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 +000023500fi
23501
Martin v. Löwiseba40652007-08-30 20:10:57 +000023502
23503fi
23504
23505{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23506echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023507if test "$ac_cv_broken_nice" = yes
23508then
Martin v. Löwis11437992002-04-12 09:54:03 +000023509
23510cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023511#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023512_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023513
23514fi
23515
Martin v. Löwiseba40652007-08-30 20:10:57 +000023516{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23517echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023518if test "$cross_compiling" = yes; then
23519 ac_cv_broken_poll=no
23520else
23521 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023522/* confdefs.h. */
23523_ACEOF
23524cat confdefs.h >>conftest.$ac_ext
23525cat >>conftest.$ac_ext <<_ACEOF
23526/* end confdefs.h. */
23527
23528#include <poll.h>
23529
23530int main (void)
23531 {
23532 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23533
23534 close (42);
23535
23536 int poll_test = poll (&poll_struct, 1, 0);
23537
23538 if (poll_test < 0)
23539 {
23540 exit(0);
23541 }
23542 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23543 {
23544 exit(0);
23545 }
23546 else
23547 {
23548 exit(1);
23549 }
23550 }
23551
23552_ACEOF
23553rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023554if { (ac_try="$ac_link"
23555case "(($ac_try" in
23556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23557 *) ac_try_echo=$ac_try;;
23558esac
23559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23560 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023561 ac_status=$?
23562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023564 { (case "(($ac_try" in
23565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23566 *) ac_try_echo=$ac_try;;
23567esac
23568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23569 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023570 ac_status=$?
23571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23572 (exit $ac_status); }; }; then
23573 ac_cv_broken_poll=yes
23574else
23575 echo "$as_me: program exited with status $ac_status" >&5
23576echo "$as_me: failed program was:" >&5
23577sed 's/^/| /' conftest.$ac_ext >&5
23578
23579( exit $ac_status )
23580ac_cv_broken_poll=no
23581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023582rm -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 +000023583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023584
23585
23586{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23587echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023588if test "$ac_cv_broken_poll" = yes
23589then
23590
23591cat >>confdefs.h <<\_ACEOF
23592#define HAVE_BROKEN_POLL 1
23593_ACEOF
23594
23595fi
23596
Brett Cannon43802422005-02-10 20:48:03 +000023597# 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 +000023598# (which is not required by ISO C or UNIX spec) and/or if we support
23599# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023600{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23601echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023602if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23603 echo $ECHO_N "(cached) $ECHO_C" >&6
23604else
23605 cat >conftest.$ac_ext <<_ACEOF
23606/* confdefs.h. */
23607_ACEOF
23608cat confdefs.h >>conftest.$ac_ext
23609cat >>conftest.$ac_ext <<_ACEOF
23610/* end confdefs.h. */
23611#include <sys/types.h>
23612#include <$ac_cv_struct_tm>
23613
23614
23615int
23616main ()
23617{
23618static struct tm ac_aggr;
23619if (ac_aggr.tm_zone)
23620return 0;
23621 ;
23622 return 0;
23623}
23624_ACEOF
23625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023626if { (ac_try="$ac_compile"
23627case "(($ac_try" in
23628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23629 *) ac_try_echo=$ac_try;;
23630esac
23631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23632 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023633 ac_status=$?
23634 grep -v '^ *+' conftest.er1 >conftest.err
23635 rm -f conftest.er1
23636 cat conftest.err >&5
23637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023638 (exit $ac_status); } && {
23639 test -z "$ac_c_werror_flag" ||
23640 test ! -s conftest.err
23641 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023642 ac_cv_member_struct_tm_tm_zone=yes
23643else
23644 echo "$as_me: failed program was:" >&5
23645sed 's/^/| /' conftest.$ac_ext >&5
23646
Martin v. Löwiseba40652007-08-30 20:10:57 +000023647 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023648/* confdefs.h. */
23649_ACEOF
23650cat confdefs.h >>conftest.$ac_ext
23651cat >>conftest.$ac_ext <<_ACEOF
23652/* end confdefs.h. */
23653#include <sys/types.h>
23654#include <$ac_cv_struct_tm>
23655
23656
23657int
23658main ()
23659{
23660static struct tm ac_aggr;
23661if (sizeof ac_aggr.tm_zone)
23662return 0;
23663 ;
23664 return 0;
23665}
23666_ACEOF
23667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668if { (ac_try="$ac_compile"
23669case "(($ac_try" in
23670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23671 *) ac_try_echo=$ac_try;;
23672esac
23673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23674 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023675 ac_status=$?
23676 grep -v '^ *+' conftest.er1 >conftest.err
23677 rm -f conftest.er1
23678 cat conftest.err >&5
23679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023680 (exit $ac_status); } && {
23681 test -z "$ac_c_werror_flag" ||
23682 test ! -s conftest.err
23683 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023684 ac_cv_member_struct_tm_tm_zone=yes
23685else
23686 echo "$as_me: failed program was:" >&5
23687sed 's/^/| /' conftest.$ac_ext >&5
23688
Martin v. Löwiseba40652007-08-30 20:10:57 +000023689 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691
23692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023694
23695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023697{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23698echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023699if test $ac_cv_member_struct_tm_tm_zone = yes; then
23700
23701cat >>confdefs.h <<_ACEOF
23702#define HAVE_STRUCT_TM_TM_ZONE 1
23703_ACEOF
23704
23705
23706fi
23707
23708if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23709
23710cat >>confdefs.h <<\_ACEOF
23711#define HAVE_TM_ZONE 1
23712_ACEOF
23713
23714else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023715 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23716echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23717if test "${ac_cv_have_decl_tzname+set}" = set; then
23718 echo $ECHO_N "(cached) $ECHO_C" >&6
23719else
23720 cat >conftest.$ac_ext <<_ACEOF
23721/* confdefs.h. */
23722_ACEOF
23723cat confdefs.h >>conftest.$ac_ext
23724cat >>conftest.$ac_ext <<_ACEOF
23725/* end confdefs.h. */
23726#include <time.h>
23727
23728int
23729main ()
23730{
23731#ifndef tzname
23732 (void) tzname;
23733#endif
23734
23735 ;
23736 return 0;
23737}
23738_ACEOF
23739rm -f conftest.$ac_objext
23740if { (ac_try="$ac_compile"
23741case "(($ac_try" in
23742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23743 *) ac_try_echo=$ac_try;;
23744esac
23745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23746 (eval "$ac_compile") 2>conftest.er1
23747 ac_status=$?
23748 grep -v '^ *+' conftest.er1 >conftest.err
23749 rm -f conftest.er1
23750 cat conftest.err >&5
23751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23752 (exit $ac_status); } && {
23753 test -z "$ac_c_werror_flag" ||
23754 test ! -s conftest.err
23755 } && test -s conftest.$ac_objext; then
23756 ac_cv_have_decl_tzname=yes
23757else
23758 echo "$as_me: failed program was:" >&5
23759sed 's/^/| /' conftest.$ac_ext >&5
23760
23761 ac_cv_have_decl_tzname=no
23762fi
23763
23764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23765fi
23766{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23767echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23768if test $ac_cv_have_decl_tzname = yes; then
23769
23770cat >>confdefs.h <<_ACEOF
23771#define HAVE_DECL_TZNAME 1
23772_ACEOF
23773
23774
23775else
23776 cat >>confdefs.h <<_ACEOF
23777#define HAVE_DECL_TZNAME 0
23778_ACEOF
23779
23780
23781fi
23782
23783
23784 { echo "$as_me:$LINENO: checking for tzname" >&5
23785echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023786if test "${ac_cv_var_tzname+set}" = set; then
23787 echo $ECHO_N "(cached) $ECHO_C" >&6
23788else
23789 cat >conftest.$ac_ext <<_ACEOF
23790/* confdefs.h. */
23791_ACEOF
23792cat confdefs.h >>conftest.$ac_ext
23793cat >>conftest.$ac_ext <<_ACEOF
23794/* end confdefs.h. */
23795#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796#if !HAVE_DECL_TZNAME
23797extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023798#endif
23799
23800int
23801main ()
23802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023803return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023804 ;
23805 return 0;
23806}
23807_ACEOF
23808rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023809if { (ac_try="$ac_link"
23810case "(($ac_try" in
23811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23812 *) ac_try_echo=$ac_try;;
23813esac
23814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23815 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023816 ac_status=$?
23817 grep -v '^ *+' conftest.er1 >conftest.err
23818 rm -f conftest.er1
23819 cat conftest.err >&5
23820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023821 (exit $ac_status); } && {
23822 test -z "$ac_c_werror_flag" ||
23823 test ! -s conftest.err
23824 } && test -s conftest$ac_exeext &&
23825 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023826 ac_cv_var_tzname=yes
23827else
23828 echo "$as_me: failed program was:" >&5
23829sed 's/^/| /' conftest.$ac_ext >&5
23830
Martin v. Löwiseba40652007-08-30 20:10:57 +000023831 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023833
23834rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023835 conftest$ac_exeext conftest.$ac_ext
23836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023837{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23838echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023839 if test $ac_cv_var_tzname = yes; then
23840
23841cat >>confdefs.h <<\_ACEOF
23842#define HAVE_TZNAME 1
23843_ACEOF
23844
23845 fi
23846fi
23847
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023848
Martin v. Löwis1d459062005-03-14 21:23:33 +000023849# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023850{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23851echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023852if test "${ac_cv_working_tzset+set}" = set; then
23853 echo $ECHO_N "(cached) $ECHO_C" >&6
23854else
23855
23856if test "$cross_compiling" = yes; then
23857 ac_cv_working_tzset=no
23858else
23859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023860/* confdefs.h. */
23861_ACEOF
23862cat confdefs.h >>conftest.$ac_ext
23863cat >>conftest.$ac_ext <<_ACEOF
23864/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023865
23866#include <stdlib.h>
23867#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023868#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023869
23870#if HAVE_TZNAME
23871extern char *tzname[];
23872#endif
23873
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023874int main()
23875{
Brett Cannon18367812003-09-19 00:59:16 +000023876 /* Note that we need to ensure that not only does tzset(3)
23877 do 'something' with localtime, but it works as documented
23878 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023879 This includes making sure that tzname is set properly if
23880 tm->tm_zone does not exist since it is the alternative way
23881 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023882
23883 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023884 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023885 */
23886
Martin v. Löwis1d459062005-03-14 21:23:33 +000023887 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023888 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23889
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023890 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023891 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023892 if (localtime(&groundhogday)->tm_hour != 0)
23893 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023894#if HAVE_TZNAME
23895 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23896 if (strcmp(tzname[0], "UTC") ||
23897 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23898 exit(1);
23899#endif
Brett Cannon18367812003-09-19 00:59:16 +000023900
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023901 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023902 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023903 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023904 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023905#if HAVE_TZNAME
23906 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23907 exit(1);
23908#endif
Brett Cannon18367812003-09-19 00:59:16 +000023909
23910 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23911 tzset();
23912 if (localtime(&groundhogday)->tm_hour != 11)
23913 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023914#if HAVE_TZNAME
23915 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23916 exit(1);
23917#endif
23918
23919#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023920 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23921 exit(1);
23922 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23923 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023924#endif
Brett Cannon18367812003-09-19 00:59:16 +000023925
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023926 exit(0);
23927}
23928
23929_ACEOF
23930rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023931if { (ac_try="$ac_link"
23932case "(($ac_try" in
23933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23934 *) ac_try_echo=$ac_try;;
23935esac
23936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23937 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023938 ac_status=$?
23939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941 { (case "(($ac_try" in
23942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23943 *) ac_try_echo=$ac_try;;
23944esac
23945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23946 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023947 ac_status=$?
23948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23949 (exit $ac_status); }; }; then
23950 ac_cv_working_tzset=yes
23951else
23952 echo "$as_me: program exited with status $ac_status" >&5
23953echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023954sed 's/^/| /' conftest.$ac_ext >&5
23955
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023956( exit $ac_status )
23957ac_cv_working_tzset=no
23958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023959rm -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 +000023960fi
23961
Martin v. Löwiseba40652007-08-30 20:10:57 +000023962
23963fi
23964
23965{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23966echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023967if test "$ac_cv_working_tzset" = yes
23968then
23969
23970cat >>confdefs.h <<\_ACEOF
23971#define HAVE_WORKING_TZSET 1
23972_ACEOF
23973
23974fi
23975
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023976# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023977{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23978echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023979if test "${ac_cv_stat_tv_nsec+set}" = set; then
23980 echo $ECHO_N "(cached) $ECHO_C" >&6
23981else
23982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023983/* confdefs.h. */
23984_ACEOF
23985cat confdefs.h >>conftest.$ac_ext
23986cat >>conftest.$ac_ext <<_ACEOF
23987/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023988#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023989int
23990main ()
23991{
23992
23993struct stat st;
23994st.st_mtim.tv_nsec = 1;
23995
23996 ;
23997 return 0;
23998}
23999_ACEOF
24000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024001if { (ac_try="$ac_compile"
24002case "(($ac_try" in
24003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24004 *) ac_try_echo=$ac_try;;
24005esac
24006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024009 grep -v '^ *+' conftest.er1 >conftest.err
24010 rm -f conftest.er1
24011 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024013 (exit $ac_status); } && {
24014 test -z "$ac_c_werror_flag" ||
24015 test ! -s conftest.err
24016 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024017 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024018else
24019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024020sed 's/^/| /' conftest.$ac_ext >&5
24021
Martin v. Löwiseba40652007-08-30 20:10:57 +000024022 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024023fi
24024
Martin v. Löwiseba40652007-08-30 20:10:57 +000024025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24026fi
24027
24028{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24029echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024030if test "$ac_cv_stat_tv_nsec" = yes
24031then
24032
24033cat >>confdefs.h <<\_ACEOF
24034#define HAVE_STAT_TV_NSEC 1
24035_ACEOF
24036
24037fi
24038
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024039# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024040{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24041echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024042if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24043 echo $ECHO_N "(cached) $ECHO_C" >&6
24044else
24045 cat >conftest.$ac_ext <<_ACEOF
24046/* confdefs.h. */
24047_ACEOF
24048cat confdefs.h >>conftest.$ac_ext
24049cat >>conftest.$ac_ext <<_ACEOF
24050/* end confdefs.h. */
24051#include <sys/stat.h>
24052int
24053main ()
24054{
24055
24056struct stat st;
24057st.st_mtimespec.tv_nsec = 1;
24058
24059 ;
24060 return 0;
24061}
24062_ACEOF
24063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024064if { (ac_try="$ac_compile"
24065case "(($ac_try" in
24066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24067 *) ac_try_echo=$ac_try;;
24068esac
24069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024071 ac_status=$?
24072 grep -v '^ *+' conftest.er1 >conftest.err
24073 rm -f conftest.er1
24074 cat conftest.err >&5
24075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024076 (exit $ac_status); } && {
24077 test -z "$ac_c_werror_flag" ||
24078 test ! -s conftest.err
24079 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024080 ac_cv_stat_tv_nsec2=yes
24081else
24082 echo "$as_me: failed program was:" >&5
24083sed 's/^/| /' conftest.$ac_ext >&5
24084
Martin v. Löwiseba40652007-08-30 20:10:57 +000024085 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024086fi
24087
Martin v. Löwiseba40652007-08-30 20:10:57 +000024088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24089fi
24090
24091{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24092echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024093if test "$ac_cv_stat_tv_nsec2" = yes
24094then
24095
24096cat >>confdefs.h <<\_ACEOF
24097#define HAVE_STAT_TV_NSEC2 1
24098_ACEOF
24099
24100fi
24101
Jack Jansen666b1e72001-10-31 12:11:48 +000024102# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024103{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24104echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024105if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24106 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024107else
Martin v. Löwis11437992002-04-12 09:54:03 +000024108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024109/* confdefs.h. */
24110_ACEOF
24111cat confdefs.h >>conftest.$ac_ext
24112cat >>conftest.$ac_ext <<_ACEOF
24113/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024114#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024115int
24116main ()
24117{
Jack Jansen666b1e72001-10-31 12:11:48 +000024118
24119 int rtn;
24120 rtn = mvwdelch(0,0,0);
24121
Martin v. Löwis11437992002-04-12 09:54:03 +000024122 ;
24123 return 0;
24124}
24125_ACEOF
24126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024127if { (ac_try="$ac_compile"
24128case "(($ac_try" in
24129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24130 *) ac_try_echo=$ac_try;;
24131esac
24132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024135 grep -v '^ *+' conftest.er1 >conftest.err
24136 rm -f conftest.er1
24137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024139 (exit $ac_status); } && {
24140 test -z "$ac_c_werror_flag" ||
24141 test ! -s conftest.err
24142 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024143 ac_cv_mvwdelch_is_expression=yes
24144else
Martin v. Löwis11437992002-04-12 09:54:03 +000024145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024146sed 's/^/| /' conftest.$ac_ext >&5
24147
Martin v. Löwiseba40652007-08-30 20:10:57 +000024148 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024149fi
24150
Martin v. Löwiseba40652007-08-30 20:10:57 +000024151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24152fi
24153
24154{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24155echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024156
24157if test "$ac_cv_mvwdelch_is_expression" = yes
24158then
Martin v. Löwis11437992002-04-12 09:54:03 +000024159
24160cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024161#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024162_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024163
24164fi
24165
Martin v. Löwiseba40652007-08-30 20:10:57 +000024166{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24167echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024168if test "${ac_cv_window_has_flags+set}" = set; then
24169 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024170else
Martin v. Löwis11437992002-04-12 09:54:03 +000024171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024172/* confdefs.h. */
24173_ACEOF
24174cat confdefs.h >>conftest.$ac_ext
24175cat >>conftest.$ac_ext <<_ACEOF
24176/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024177#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024178int
24179main ()
24180{
Jack Jansen666b1e72001-10-31 12:11:48 +000024181
24182 WINDOW *w;
24183 w->_flags = 0;
24184
Martin v. Löwis11437992002-04-12 09:54:03 +000024185 ;
24186 return 0;
24187}
24188_ACEOF
24189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024190if { (ac_try="$ac_compile"
24191case "(($ac_try" in
24192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24193 *) ac_try_echo=$ac_try;;
24194esac
24195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024198 grep -v '^ *+' conftest.er1 >conftest.err
24199 rm -f conftest.er1
24200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024202 (exit $ac_status); } && {
24203 test -z "$ac_c_werror_flag" ||
24204 test ! -s conftest.err
24205 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024206 ac_cv_window_has_flags=yes
24207else
Martin v. Löwis11437992002-04-12 09:54:03 +000024208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024209sed 's/^/| /' conftest.$ac_ext >&5
24210
Martin v. Löwiseba40652007-08-30 20:10:57 +000024211 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024212fi
24213
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24215fi
24216
24217{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24218echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024219
Jack Jansen666b1e72001-10-31 12:11:48 +000024220
24221if test "$ac_cv_window_has_flags" = yes
24222then
Martin v. Löwis11437992002-04-12 09:54:03 +000024223
24224cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024225#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024226_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024227
24228fi
24229
Martin v. Löwiseba40652007-08-30 20:10:57 +000024230{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24231echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024232cat >conftest.$ac_ext <<_ACEOF
24233/* confdefs.h. */
24234_ACEOF
24235cat confdefs.h >>conftest.$ac_ext
24236cat >>conftest.$ac_ext <<_ACEOF
24237/* end confdefs.h. */
24238#include <curses.h>
24239int
24240main ()
24241{
24242void *x=is_term_resized
24243 ;
24244 return 0;
24245}
24246_ACEOF
24247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024248if { (ac_try="$ac_compile"
24249case "(($ac_try" in
24250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24251 *) ac_try_echo=$ac_try;;
24252esac
24253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24254 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024255 ac_status=$?
24256 grep -v '^ *+' conftest.er1 >conftest.err
24257 rm -f conftest.er1
24258 cat conftest.err >&5
24259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024260 (exit $ac_status); } && {
24261 test -z "$ac_c_werror_flag" ||
24262 test ! -s conftest.err
24263 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024264
24265cat >>confdefs.h <<\_ACEOF
24266#define HAVE_CURSES_IS_TERM_RESIZED 1
24267_ACEOF
24268
Martin v. Löwiseba40652007-08-30 20:10:57 +000024269 { echo "$as_me:$LINENO: result: yes" >&5
24270echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024271else
24272 echo "$as_me: failed program was:" >&5
24273sed 's/^/| /' conftest.$ac_ext >&5
24274
Martin v. Löwiseba40652007-08-30 20:10:57 +000024275 { echo "$as_me:$LINENO: result: no" >&5
24276echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024277
24278fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024279
Martin v. Löwiseba40652007-08-30 20:10:57 +000024280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24281
24282{ echo "$as_me:$LINENO: checking for resize_term" >&5
24283echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024284cat >conftest.$ac_ext <<_ACEOF
24285/* confdefs.h. */
24286_ACEOF
24287cat confdefs.h >>conftest.$ac_ext
24288cat >>conftest.$ac_ext <<_ACEOF
24289/* end confdefs.h. */
24290#include <curses.h>
24291int
24292main ()
24293{
24294void *x=resize_term
24295 ;
24296 return 0;
24297}
24298_ACEOF
24299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024300if { (ac_try="$ac_compile"
24301case "(($ac_try" in
24302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24303 *) ac_try_echo=$ac_try;;
24304esac
24305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24306 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024307 ac_status=$?
24308 grep -v '^ *+' conftest.er1 >conftest.err
24309 rm -f conftest.er1
24310 cat conftest.err >&5
24311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024312 (exit $ac_status); } && {
24313 test -z "$ac_c_werror_flag" ||
24314 test ! -s conftest.err
24315 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024316
24317cat >>confdefs.h <<\_ACEOF
24318#define HAVE_CURSES_RESIZE_TERM 1
24319_ACEOF
24320
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321 { echo "$as_me:$LINENO: result: yes" >&5
24322echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024323else
24324 echo "$as_me: failed program was:" >&5
24325sed 's/^/| /' conftest.$ac_ext >&5
24326
Martin v. Löwiseba40652007-08-30 20:10:57 +000024327 { echo "$as_me:$LINENO: result: no" >&5
24328echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024329
24330fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024331
Martin v. Löwiseba40652007-08-30 20:10:57 +000024332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24333
24334{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24335echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024336cat >conftest.$ac_ext <<_ACEOF
24337/* confdefs.h. */
24338_ACEOF
24339cat confdefs.h >>conftest.$ac_ext
24340cat >>conftest.$ac_ext <<_ACEOF
24341/* end confdefs.h. */
24342#include <curses.h>
24343int
24344main ()
24345{
24346void *x=resizeterm
24347 ;
24348 return 0;
24349}
24350_ACEOF
24351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024352if { (ac_try="$ac_compile"
24353case "(($ac_try" in
24354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24355 *) ac_try_echo=$ac_try;;
24356esac
24357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24358 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024359 ac_status=$?
24360 grep -v '^ *+' conftest.er1 >conftest.err
24361 rm -f conftest.er1
24362 cat conftest.err >&5
24363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024364 (exit $ac_status); } && {
24365 test -z "$ac_c_werror_flag" ||
24366 test ! -s conftest.err
24367 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024368
24369cat >>confdefs.h <<\_ACEOF
24370#define HAVE_CURSES_RESIZETERM 1
24371_ACEOF
24372
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373 { echo "$as_me:$LINENO: result: yes" >&5
24374echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024375else
24376 echo "$as_me: failed program was:" >&5
24377sed 's/^/| /' conftest.$ac_ext >&5
24378
Martin v. Löwiseba40652007-08-30 20:10:57 +000024379 { echo "$as_me:$LINENO: result: no" >&5
24380echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024381
24382fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024383
Martin v. Löwiseba40652007-08-30 20:10:57 +000024384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24385
24386{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24387echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024388
24389if test -r /dev/ptmx
24390then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024391 { echo "$as_me:$LINENO: result: yes" >&5
24392echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024393
24394cat >>confdefs.h <<\_ACEOF
24395#define HAVE_DEV_PTMX 1
24396_ACEOF
24397
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024398else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024399 { echo "$as_me:$LINENO: result: no" >&5
24400echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024401fi
24402
Martin v. Löwiseba40652007-08-30 20:10:57 +000024403{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24404echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024405
24406if test -r /dev/ptc
24407then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024408 { echo "$as_me:$LINENO: result: yes" >&5
24409echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024410
24411cat >>confdefs.h <<\_ACEOF
24412#define HAVE_DEV_PTC 1
24413_ACEOF
24414
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024415else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024416 { echo "$as_me:$LINENO: result: no" >&5
24417echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024418fi
24419
Martin v. Löwiseba40652007-08-30 20:10:57 +000024420{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24421echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024422if test "$cross_compiling" = yes; then
24423 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24424See \`config.log' for more details." >&5
24425echo "$as_me: error: cannot run test program while cross compiling
24426See \`config.log' for more details." >&2;}
24427 { (exit 1); exit 1; }; }
24428else
24429 cat >conftest.$ac_ext <<_ACEOF
24430/* confdefs.h. */
24431_ACEOF
24432cat confdefs.h >>conftest.$ac_ext
24433cat >>conftest.$ac_ext <<_ACEOF
24434/* end confdefs.h. */
24435#include <stdio.h>
24436#include <stddef.h>
24437#include <string.h>
24438
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024439#ifdef HAVE_SYS_TYPES_H
24440#include <sys/types.h>
24441#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024442
24443#ifdef HAVE_SSIZE_T
24444typedef ssize_t Py_ssize_t;
24445#elif SIZEOF_VOID_P == SIZEOF_LONG
24446typedef long Py_ssize_t;
24447#else
24448typedef int Py_ssize_t;
24449#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024450
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024451int main()
24452{
24453 char buffer[256];
24454
Brett Cannon09d12362006-05-11 05:11:33 +000024455 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24456 return 1;
24457
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024458 if (strcmp(buffer, "123"))
24459 return 1;
24460
24461 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24462 return 1;
24463
24464 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024465 return 1;
24466
24467 return 0;
24468}
24469_ACEOF
24470rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471if { (ac_try="$ac_link"
24472case "(($ac_try" in
24473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24474 *) ac_try_echo=$ac_try;;
24475esac
24476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24477 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024478 ac_status=$?
24479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024481 { (case "(($ac_try" in
24482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24483 *) ac_try_echo=$ac_try;;
24484esac
24485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24486 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024487 ac_status=$?
24488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24489 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024490 { echo "$as_me:$LINENO: result: yes" >&5
24491echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024492
24493cat >>confdefs.h <<\_ACEOF
24494#define PY_FORMAT_SIZE_T "z"
24495_ACEOF
24496
24497else
24498 echo "$as_me: program exited with status $ac_status" >&5
24499echo "$as_me: failed program was:" >&5
24500sed 's/^/| /' conftest.$ac_ext >&5
24501
24502( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024503{ echo "$as_me:$LINENO: result: no" >&5
24504echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024506rm -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 +000024507fi
24508
Martin v. Löwiseba40652007-08-30 20:10:57 +000024509
24510
24511{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24512echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024513if test "${ac_cv_type_socklen_t+set}" = set; then
24514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024515else
Martin v. Löwis11437992002-04-12 09:54:03 +000024516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024517/* confdefs.h. */
24518_ACEOF
24519cat confdefs.h >>conftest.$ac_ext
24520cat >>conftest.$ac_ext <<_ACEOF
24521/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024522
24523#ifdef HAVE_SYS_TYPES_H
24524#include <sys/types.h>
24525#endif
24526#ifdef HAVE_SYS_SOCKET_H
24527#include <sys/socket.h>
24528#endif
24529
24530
Martin v. Löwiseba40652007-08-30 20:10:57 +000024531typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024532int
24533main ()
24534{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024535if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024536 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024537if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024538 return 0;
24539 ;
24540 return 0;
24541}
24542_ACEOF
24543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024544if { (ac_try="$ac_compile"
24545case "(($ac_try" in
24546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24547 *) ac_try_echo=$ac_try;;
24548esac
24549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024552 grep -v '^ *+' conftest.er1 >conftest.err
24553 rm -f conftest.er1
24554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024556 (exit $ac_status); } && {
24557 test -z "$ac_c_werror_flag" ||
24558 test ! -s conftest.err
24559 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024560 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024561else
Martin v. Löwis11437992002-04-12 09:54:03 +000024562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024563sed 's/^/| /' conftest.$ac_ext >&5
24564
Martin v. Löwiseba40652007-08-30 20:10:57 +000024565 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024567
24568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024570{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24571echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024572if test $ac_cv_type_socklen_t = yes; then
24573 :
24574else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024575
Martin v. Löwis01c04012002-11-11 14:58:44 +000024576cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024577#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024578_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024579
24580fi
24581
Michael W. Hudson54241132001-12-07 15:38:26 +000024582
Michael W. Hudson54241132001-12-07 15:38:26 +000024583
24584
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024585for h in `(cd $srcdir;echo Python/thread_*.h)`
24586do
24587 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24588done
24589
Michael W. Hudson54241132001-12-07 15:38:26 +000024590
Neal Norwitzd24499d2005-12-18 21:36:39 +000024591SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024592{ echo "$as_me:$LINENO: checking for build directories" >&5
24593echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024594for dir in $SRCDIRS; do
24595 if test ! -d $dir; then
24596 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024597 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024598done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599{ echo "$as_me:$LINENO: result: done" >&5
24600echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024601
Guido van Rossum627b2d71993-12-24 10:39:16 +000024602# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024603ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024604
Martin v. Löwis11437992002-04-12 09:54:03 +000024605cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024606# This file is a shell script that caches the results of configure
24607# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024608# scripts and configure runs, see configure's option --config-cache.
24609# It is not useful on other systems. If it contains results you don't
24610# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024611#
Martin v. Löwis11437992002-04-12 09:54:03 +000024612# config.status only pays attention to the cache file if you give it
24613# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024614#
Skip Montanaro6dead952003-09-25 14:50:04 +000024615# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024616# loading this file, other *unset* `ac_cv_foo' will be assigned the
24617# following values.
24618
24619_ACEOF
24620
Guido van Rossumf78abae1997-01-21 22:02:36 +000024621# The following way of writing the cache mishandles newlines in values,
24622# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024623# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024624# Ultrix sh set writes to stderr and can't be redirected directly,
24625# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024626(
24627 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24628 eval ac_val=\$$ac_var
24629 case $ac_val in #(
24630 *${as_nl}*)
24631 case $ac_var in #(
24632 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24633echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24634 esac
24635 case $ac_var in #(
24636 _ | IFS | as_nl) ;; #(
24637 *) $as_unset $ac_var ;;
24638 esac ;;
24639 esac
24640 done
24641
Martin v. Löwis11437992002-04-12 09:54:03 +000024642 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024643 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24644 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024645 # `set' does not quote correctly, so add quotes (double-quote
24646 # substitution turns \\\\ into \\, and sed turns \\ into \).
24647 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024648 "s/'/'\\\\''/g;
24649 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024650 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024651 *)
24652 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024653 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024654 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024655 esac |
24656 sort
24657) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024658 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024659 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024660 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024661 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024662 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24663 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024664 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24665 :end' >>confcache
24666if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24667 if test -w "$cache_file"; then
24668 test "x$cache_file" != "x/dev/null" &&
24669 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24670echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024672 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024673 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24674echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024675 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024676fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024677rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024678
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024679test "x$prefix" = xNONE && prefix=$ac_default_prefix
24680# Let make expand exec_prefix.
24681test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024683DEFS=-DHAVE_CONFIG_H
24684
Skip Montanaro6dead952003-09-25 14:50:04 +000024685ac_libobjs=
24686ac_ltlibobjs=
24687for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24688 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024689 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24690 ac_i=`echo "$ac_i" | sed "$ac_script"`
24691 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24692 # will be set to the directory where LIBOBJS objects are built.
24693 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24694 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024695done
24696LIBOBJS=$ac_libobjs
24697
24698LTLIBOBJS=$ac_ltlibobjs
24699
24700
Martin v. Löwis11437992002-04-12 09:54:03 +000024701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024702: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024703ac_clean_files_save=$ac_clean_files
24704ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24705{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24706echo "$as_me: creating $CONFIG_STATUS" >&6;}
24707cat >$CONFIG_STATUS <<_ACEOF
24708#! $SHELL
24709# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024710# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024711# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024712# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024713
Martin v. Löwis11437992002-04-12 09:54:03 +000024714debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024715ac_cs_recheck=false
24716ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024717SHELL=\${CONFIG_SHELL-$SHELL}
24718_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024719
Martin v. Löwis11437992002-04-12 09:54:03 +000024720cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024721## --------------------- ##
24722## M4sh Initialization. ##
24723## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024724
Martin v. Löwiseba40652007-08-30 20:10:57 +000024725# Be more Bourne compatible
24726DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024727if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24728 emulate sh
24729 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024730 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24731 # is contrary to our usage. Disable this feature.
24732 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024733 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024734else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024735 case `(set -o) 2>/dev/null` in
24736 *posix*) set -o posix ;;
24737esac
24738
Martin v. Löwis11437992002-04-12 09:54:03 +000024739fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024740
Skip Montanaro6dead952003-09-25 14:50:04 +000024741
Martin v. Löwis11437992002-04-12 09:54:03 +000024742
24743
Martin v. Löwiseba40652007-08-30 20:10:57 +000024744# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024745# Avoid depending upon Character Ranges.
24746as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24747as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24748as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24749as_cr_digits='0123456789'
24750as_cr_alnum=$as_cr_Letters$as_cr_digits
24751
24752# The user is always right.
24753if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024754 echo "#! /bin/sh" >conf$$.sh
24755 echo "exit 0" >>conf$$.sh
24756 chmod +x conf$$.sh
24757 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024758 PATH_SEPARATOR=';'
24759 else
24760 PATH_SEPARATOR=:
24761 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024762 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024763fi
24764
Martin v. Löwiseba40652007-08-30 20:10:57 +000024765# Support unset when possible.
24766if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24767 as_unset=unset
24768else
24769 as_unset=false
24770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024771
Martin v. Löwiseba40652007-08-30 20:10:57 +000024772
24773# IFS
24774# We need space, tab and new line, in precisely that order. Quoting is
24775# there to prevent editors from complaining about space-tab.
24776# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24777# splitting by setting IFS to empty value.)
24778as_nl='
24779'
24780IFS=" "" $as_nl"
24781
24782# Find who we are. Look in the path if we contain no directory separator.
24783case $0 in
24784 *[\\/]* ) as_myself=$0 ;;
24785 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024786for as_dir in $PATH
24787do
24788 IFS=$as_save_IFS
24789 test -z "$as_dir" && as_dir=.
24790 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24791done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024792IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024793
Martin v. Löwiseba40652007-08-30 20:10:57 +000024794 ;;
24795esac
24796# We did not find ourselves, most probably we were run as `sh COMMAND'
24797# in which case we are not to be found in the path.
24798if test "x$as_myself" = x; then
24799 as_myself=$0
24800fi
24801if test ! -f "$as_myself"; then
24802 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24803 { (exit 1); exit 1; }
24804fi
24805
24806# Work around bugs in pre-3.0 UWIN ksh.
24807for as_var in ENV MAIL MAILPATH
24808do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24809done
24810PS1='$ '
24811PS2='> '
24812PS4='+ '
24813
24814# NLS nuisances.
24815for as_var in \
24816 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24817 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24818 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024819do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024820 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24821 eval $as_var=C; export $as_var
24822 else
24823 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24824 fi
24825done
24826
24827# Required to use basename.
24828if expr a : '\(a\)' >/dev/null 2>&1 &&
24829 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24830 as_expr=expr
24831else
24832 as_expr=false
24833fi
24834
24835if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24836 as_basename=basename
24837else
24838 as_basename=false
24839fi
24840
24841
24842# Name of the executable.
24843as_me=`$as_basename -- "$0" ||
24844$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24845 X"$0" : 'X\(//\)$' \| \
24846 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24847echo X/"$0" |
24848 sed '/^.*\/\([^/][^/]*\)\/*$/{
24849 s//\1/
24850 q
24851 }
24852 /^X\/\(\/\/\)$/{
24853 s//\1/
24854 q
24855 }
24856 /^X\/\(\/\).*/{
24857 s//\1/
24858 q
24859 }
24860 s/.*/./; q'`
24861
24862# CDPATH.
24863$as_unset CDPATH
24864
24865
24866
Martin v. Löwis11437992002-04-12 09:54:03 +000024867 as_lineno_1=$LINENO
24868 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024869 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024870 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024871
Martin v. Löwis11437992002-04-12 09:54:03 +000024872 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24873 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024874 # line-number line after each line using $LINENO; the second 'sed'
24875 # does the real work. The second script uses 'N' to pair each
24876 # line-number line with the line containing $LINENO, and appends
24877 # trailing '-' during substitution so that $LINENO is not a special
24878 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024879 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024880 # scripts with optimization help from Paolo Bonzini. Blame Lee
24881 # E. McMahon (1931-1989) for sed's syntax. :-)
24882 sed -n '
24883 p
24884 /[$]LINENO/=
24885 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024886 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024887 s/[$]LINENO.*/&-/
24888 t lineno
24889 b
24890 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024891 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024892 :loop
24893 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024894 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024895 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024896 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024897 chmod +x "$as_me.lineno" ||
24898 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024899 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024900
Martin v. Löwis11437992002-04-12 09:54:03 +000024901 # Don't try to exec as it changes $[0], causing all sort of problems
24902 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903 # original and so on. Autoconf is especially sensitive to this).
24904 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024905 # Exit status is that of the last command.
24906 exit
24907}
24908
24909
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24911 as_dirname=dirname
24912else
24913 as_dirname=false
24914fi
24915
24916ECHO_C= ECHO_N= ECHO_T=
24917case `echo -n x` in
24918-n*)
24919 case `echo 'x\c'` in
24920 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24921 *) ECHO_C='\c';;
24922 esac;;
24923*)
24924 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024925esac
24926
Martin v. Löwiseba40652007-08-30 20:10:57 +000024927if expr a : '\(a\)' >/dev/null 2>&1 &&
24928 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 as_expr=expr
24930else
24931 as_expr=false
24932fi
24933
24934rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935if test -d conf$$.dir; then
24936 rm -f conf$$.dir/conf$$.file
24937else
24938 rm -f conf$$.dir
24939 mkdir conf$$.dir
24940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024941echo >conf$$.file
24942if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024943 as_ln_s='ln -s'
24944 # ... but there are two gotchas:
24945 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24946 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24947 # In both cases, we have to default to `cp -p'.
24948 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024949 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024950elif ln conf$$.file conf$$ 2>/dev/null; then
24951 as_ln_s=ln
24952else
24953 as_ln_s='cp -p'
24954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024955rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24956rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024957
Skip Montanaro6dead952003-09-25 14:50:04 +000024958if mkdir -p . 2>/dev/null; then
24959 as_mkdir_p=:
24960else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024961 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024962 as_mkdir_p=false
24963fi
24964
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965if test -x / >/dev/null 2>&1; then
24966 as_test_x='test -x'
24967else
24968 if ls -dL / >/dev/null 2>&1; then
24969 as_ls_L_option=L
24970 else
24971 as_ls_L_option=
24972 fi
24973 as_test_x='
24974 eval sh -c '\''
24975 if test -d "$1"; then
24976 test -d "$1/.";
24977 else
24978 case $1 in
24979 -*)set "./$1";;
24980 esac;
24981 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24982 ???[sx]*):;;*)false;;esac;fi
24983 '\'' sh
24984 '
24985fi
24986as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024987
24988# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024989as_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 +000024990
24991# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024992as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024993
24994
Martin v. Löwis11437992002-04-12 09:54:03 +000024995exec 6>&1
24996
Martin v. Löwiseba40652007-08-30 20:10:57 +000024997# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024998# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024999# values after options handling.
25000ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025001This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025002generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025003
25004 CONFIG_FILES = $CONFIG_FILES
25005 CONFIG_HEADERS = $CONFIG_HEADERS
25006 CONFIG_LINKS = $CONFIG_LINKS
25007 CONFIG_COMMANDS = $CONFIG_COMMANDS
25008 $ $0 $@
25009
Martin v. Löwiseba40652007-08-30 20:10:57 +000025010on `(hostname || uname -n) 2>/dev/null | sed 1q`
25011"
25012
Martin v. Löwis11437992002-04-12 09:54:03 +000025013_ACEOF
25014
Martin v. Löwiseba40652007-08-30 20:10:57 +000025015cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025016# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025017config_files="$ac_config_files"
25018config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025019
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025021
25022cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025023ac_cs_usage="\
25024\`$as_me' instantiates files from templates according to the
25025current configuration.
25026
25027Usage: $0 [OPTIONS] [FILE]...
25028
25029 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025031 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025032 -d, --debug don't remove temporary files
25033 --recheck update $as_me by reconfiguring in the same conditions
25034 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025035 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025036 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025037 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025038
25039Configuration files:
25040$config_files
25041
25042Configuration headers:
25043$config_headers
25044
25045Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025046
Martin v. Löwiseba40652007-08-30 20:10:57 +000025047_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025048cat >>$CONFIG_STATUS <<_ACEOF
25049ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025050python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051configured by $0, generated by GNU Autoconf 2.61,
25052 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025053
Martin v. Löwiseba40652007-08-30 20:10:57 +000025054Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025055This config.status script is free software; the Free Software Foundation
25056gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025057
25058ac_pwd='$ac_pwd'
25059srcdir='$srcdir'
25060INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025061_ACEOF
25062
25063cat >>$CONFIG_STATUS <<\_ACEOF
25064# If no file are specified by the user, then we need to provide default
25065# value. By we need to know if files were specified by the user.
25066ac_need_defaults=:
25067while test $# != 0
25068do
25069 case $1 in
25070 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025071 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25072 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025073 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025074 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025076 ac_option=$1
25077 ac_optarg=$2
25078 ac_shift=shift
25079 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025080 esac
25081
Skip Montanaro6dead952003-09-25 14:50:04 +000025082 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025083 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025084 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25085 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025086 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25087 echo "$ac_cs_version"; exit ;;
25088 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025089 debug=: ;;
25090 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025091 $ac_shift
25092 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025093 ac_need_defaults=false;;
25094 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025095 $ac_shift
25096 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025097 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025098 --he | --h)
25099 # Conflict between --help and --header
25100 { echo "$as_me: error: ambiguous option: $1
25101Try \`$0 --help' for more information." >&2
25102 { (exit 1); exit 1; }; };;
25103 --help | --hel | -h )
25104 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025105 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25106 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25107 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025108
25109 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025110 -*) { echo "$as_me: error: unrecognized option: $1
25111Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 { (exit 1); exit 1; }; } ;;
25113
Martin v. Löwiseba40652007-08-30 20:10:57 +000025114 *) ac_config_targets="$ac_config_targets $1"
25115 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025116
25117 esac
25118 shift
25119done
25120
Skip Montanaro6dead952003-09-25 14:50:04 +000025121ac_configure_extra_args=
25122
25123if $ac_cs_silent; then
25124 exec 6>/dev/null
25125 ac_configure_extra_args="$ac_configure_extra_args --silent"
25126fi
25127
25128_ACEOF
25129cat >>$CONFIG_STATUS <<_ACEOF
25130if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025131 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25132 CONFIG_SHELL=$SHELL
25133 export CONFIG_SHELL
25134 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025135fi
25136
Martin v. Löwis11437992002-04-12 09:54:03 +000025137_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138cat >>$CONFIG_STATUS <<\_ACEOF
25139exec 5>>config.log
25140{
25141 echo
25142 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25143## Running $as_me. ##
25144_ASBOX
25145 echo "$ac_log"
25146} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025147
Martin v. Löwiseba40652007-08-30 20:10:57 +000025148_ACEOF
25149cat >>$CONFIG_STATUS <<_ACEOF
25150_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025151
25152cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153
25154# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025155for ac_config_target in $ac_config_targets
25156do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025157 case $ac_config_target in
25158 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25159 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25160 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25161 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025162 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25163 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025164 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25165 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25166
Martin v. Löwis11437992002-04-12 09:54:03 +000025167 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25168echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25169 { (exit 1); exit 1; }; };;
25170 esac
25171done
25172
Martin v. Löwiseba40652007-08-30 20:10:57 +000025173
Martin v. Löwis11437992002-04-12 09:54:03 +000025174# If the user did not use the arguments to specify the items to instantiate,
25175# then the envvar interface is used. Set only those that are not.
25176# We use the long form for the default assignment because of an extremely
25177# bizarre bug on SunOS 4.1.3.
25178if $ac_need_defaults; then
25179 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25180 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25181fi
25182
Skip Montanaro6dead952003-09-25 14:50:04 +000025183# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025184# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025185# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025186# Hook for its removal unless debugging.
25187# Note that there is a small window in which the directory will not be cleaned:
25188# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025189$debug ||
25190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191 tmp=
25192 trap 'exit_status=$?
25193 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25194' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025195 trap '{ (exit 1); exit 1; }' 1 2 13 15
25196}
Martin v. Löwis11437992002-04-12 09:54:03 +000025197# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025198
Martin v. Löwis11437992002-04-12 09:54:03 +000025199{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025200 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025201 test -n "$tmp" && test -d "$tmp"
25202} ||
25203{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204 tmp=./conf$$-$RANDOM
25205 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025206} ||
25207{
Skip Montanaro6dead952003-09-25 14:50:04 +000025208 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025209 { (exit 1); exit 1; }
25210}
25211
Martin v. Löwis11437992002-04-12 09:54:03 +000025212#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025214#
25215
25216# No need to generate the scripts if there are no CONFIG_FILES.
25217# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025218if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025219
25220_ACEOF
25221
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222
25223
25224ac_delim='%!_!# '
25225for ac_last_try in false false false false false :; do
25226 cat >conf$$subs.sed <<_ACEOF
25227SHELL!$SHELL$ac_delim
25228PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25229PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25230PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25231PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25232PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25233PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25234exec_prefix!$exec_prefix$ac_delim
25235prefix!$prefix$ac_delim
25236program_transform_name!$program_transform_name$ac_delim
25237bindir!$bindir$ac_delim
25238sbindir!$sbindir$ac_delim
25239libexecdir!$libexecdir$ac_delim
25240datarootdir!$datarootdir$ac_delim
25241datadir!$datadir$ac_delim
25242sysconfdir!$sysconfdir$ac_delim
25243sharedstatedir!$sharedstatedir$ac_delim
25244localstatedir!$localstatedir$ac_delim
25245includedir!$includedir$ac_delim
25246oldincludedir!$oldincludedir$ac_delim
25247docdir!$docdir$ac_delim
25248infodir!$infodir$ac_delim
25249htmldir!$htmldir$ac_delim
25250dvidir!$dvidir$ac_delim
25251pdfdir!$pdfdir$ac_delim
25252psdir!$psdir$ac_delim
25253libdir!$libdir$ac_delim
25254localedir!$localedir$ac_delim
25255mandir!$mandir$ac_delim
25256DEFS!$DEFS$ac_delim
25257ECHO_C!$ECHO_C$ac_delim
25258ECHO_N!$ECHO_N$ac_delim
25259ECHO_T!$ECHO_T$ac_delim
25260LIBS!$LIBS$ac_delim
25261build_alias!$build_alias$ac_delim
25262host_alias!$host_alias$ac_delim
25263target_alias!$target_alias$ac_delim
25264VERSION!$VERSION$ac_delim
25265SOVERSION!$SOVERSION$ac_delim
25266CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25267UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025268ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025270PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25272PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25273PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25274FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25275FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25276FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25277FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25278FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25279MACHDEP!$MACHDEP$ac_delim
25280SGI_ABI!$SGI_ABI$ac_delim
25281EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25282EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25283CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25284EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25285CC!$CC$ac_delim
25286CFLAGS!$CFLAGS$ac_delim
25287LDFLAGS!$LDFLAGS$ac_delim
25288CPPFLAGS!$CPPFLAGS$ac_delim
25289ac_ct_CC!$ac_ct_CC$ac_delim
25290EXEEXT!$EXEEXT$ac_delim
25291OBJEXT!$OBJEXT$ac_delim
25292CXX!$CXX$ac_delim
25293MAINCC!$MAINCC$ac_delim
25294CPP!$CPP$ac_delim
25295GREP!$GREP$ac_delim
25296EGREP!$EGREP$ac_delim
25297BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25298LIBRARY!$LIBRARY$ac_delim
25299LDLIBRARY!$LDLIBRARY$ac_delim
25300DLLLIBRARY!$DLLLIBRARY$ac_delim
25301BLDLIBRARY!$BLDLIBRARY$ac_delim
25302LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25303INSTSONAME!$INSTSONAME$ac_delim
25304RUNSHARED!$RUNSHARED$ac_delim
25305LINKCC!$LINKCC$ac_delim
25306RANLIB!$RANLIB$ac_delim
25307AR!$AR$ac_delim
25308SVNVERSION!$SVNVERSION$ac_delim
25309INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25310INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25311INSTALL_DATA!$INSTALL_DATA$ac_delim
25312LN!$LN$ac_delim
25313OPT!$OPT$ac_delim
25314BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025315UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25317LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25318SO!$SO$ac_delim
25319LDSHARED!$LDSHARED$ac_delim
25320BLDSHARED!$BLDSHARED$ac_delim
25321CCSHARED!$CCSHARED$ac_delim
25322LINKFORSHARED!$LINKFORSHARED$ac_delim
25323CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025324_ACEOF
25325
25326 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25327 break
25328 elif $ac_last_try; then
25329 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25330echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25331 { (exit 1); exit 1; }; }
25332 else
25333 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025335done
25336
25337ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25338if test -n "$ac_eof"; then
25339 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25340 ac_eof=`expr $ac_eof + 1`
25341fi
25342
25343cat >>$CONFIG_STATUS <<_ACEOF
25344cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25345/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25346_ACEOF
25347sed '
25348s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25349s/^/s,@/; s/!/@,|#_!!_#|/
25350:n
25351t n
25352s/'"$ac_delim"'$/,g/; t
25353s/$/\\/; p
25354N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25355' >>$CONFIG_STATUS <conf$$subs.sed
25356rm -f conf$$subs.sed
25357cat >>$CONFIG_STATUS <<_ACEOF
25358CEOF$ac_eof
25359_ACEOF
25360
25361
25362ac_delim='%!_!# '
25363for ac_last_try in false false false false false :; do
25364 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025365SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025366USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025367SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025368USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25369LDLAST!$LDLAST$ac_delim
25370THREADOBJ!$THREADOBJ$ac_delim
25371DLINCLDIR!$DLINCLDIR$ac_delim
25372DYNLOADFILE!$DYNLOADFILE$ac_delim
25373MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25374TRUE!$TRUE$ac_delim
25375LIBOBJS!$LIBOBJS$ac_delim
25376HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25377HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25378HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25379HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25380HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25381LIBM!$LIBM$ac_delim
25382LIBC!$LIBC$ac_delim
25383UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25384THREADHEADERS!$THREADHEADERS$ac_delim
25385SRCDIRS!$SRCDIRS$ac_delim
25386LTLIBOBJS!$LTLIBOBJS$ac_delim
25387_ACEOF
25388
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025389 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025390 break
25391 elif $ac_last_try; then
25392 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25393echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25394 { (exit 1); exit 1; }; }
25395 else
25396 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25397 fi
25398done
25399
25400ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25401if test -n "$ac_eof"; then
25402 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25403 ac_eof=`expr $ac_eof + 1`
25404fi
25405
25406cat >>$CONFIG_STATUS <<_ACEOF
25407cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25408/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25409_ACEOF
25410sed '
25411s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25412s/^/s,@/; s/!/@,|#_!!_#|/
25413:n
25414t n
25415s/'"$ac_delim"'$/,g/; t
25416s/$/\\/; p
25417N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25418' >>$CONFIG_STATUS <conf$$subs.sed
25419rm -f conf$$subs.sed
25420cat >>$CONFIG_STATUS <<_ACEOF
25421:end
25422s/|#_!!_#|//g
25423CEOF$ac_eof
25424_ACEOF
25425
25426
25427# VPATH may cause trouble with some makes, so we remove $(srcdir),
25428# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25429# trailing colons and then remove the whole line if VPATH becomes empty
25430# (actually we leave an empty line to preserve line numbers).
25431if test "x$srcdir" = x.; then
25432 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25433s/:*\$(srcdir):*/:/
25434s/:*\${srcdir}:*/:/
25435s/:*@srcdir@:*/:/
25436s/^\([^=]*=[ ]*\):*/\1/
25437s/:*$//
25438s/^[^=]*=[ ]*$//
25439}'
25440fi
25441
25442cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025443fi # test -n "$CONFIG_FILES"
25444
Martin v. Löwiseba40652007-08-30 20:10:57 +000025445
25446for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25447do
25448 case $ac_tag in
25449 :[FHLC]) ac_mode=$ac_tag; continue;;
25450 esac
25451 case $ac_mode$ac_tag in
25452 :[FHL]*:*);;
25453 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25454echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25455 { (exit 1); exit 1; }; };;
25456 :[FH]-) ac_tag=-:-;;
25457 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25458 esac
25459 ac_save_IFS=$IFS
25460 IFS=:
25461 set x $ac_tag
25462 IFS=$ac_save_IFS
25463 shift
25464 ac_file=$1
25465 shift
25466
25467 case $ac_mode in
25468 :L) ac_source=$1;;
25469 :[FH])
25470 ac_file_inputs=
25471 for ac_f
25472 do
25473 case $ac_f in
25474 -) ac_f="$tmp/stdin";;
25475 *) # Look for the file first in the build tree, then in the source tree
25476 # (if the path is not absolute). The absolute path cannot be DOS-style,
25477 # because $ac_f cannot contain `:'.
25478 test -f "$ac_f" ||
25479 case $ac_f in
25480 [\\/$]*) false;;
25481 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25482 esac ||
25483 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25484echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25485 { (exit 1); exit 1; }; };;
25486 esac
25487 ac_file_inputs="$ac_file_inputs $ac_f"
25488 done
25489
25490 # Let's still pretend it is `configure' which instantiates (i.e., don't
25491 # use $as_me), people would be surprised to read:
25492 # /* config.h. Generated by config.status. */
25493 configure_input="Generated from "`IFS=:
25494 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25495 if test x"$ac_file" != x-; then
25496 configure_input="$ac_file. $configure_input"
25497 { echo "$as_me:$LINENO: creating $ac_file" >&5
25498echo "$as_me: creating $ac_file" >&6;}
25499 fi
25500
25501 case $ac_tag in
25502 *:-:* | *:-) cat >"$tmp/stdin";;
25503 esac
25504 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025505 esac
25506
Martin v. Löwiseba40652007-08-30 20:10:57 +000025507 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025508$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025509 X"$ac_file" : 'X\(//\)[^/]' \| \
25510 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025512echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025513 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25514 s//\1/
25515 q
25516 }
25517 /^X\(\/\/\)[^/].*/{
25518 s//\1/
25519 q
25520 }
25521 /^X\(\/\/\)$/{
25522 s//\1/
25523 q
25524 }
25525 /^X\(\/\).*/{
25526 s//\1/
25527 q
25528 }
25529 s/.*/./; q'`
25530 { as_dir="$ac_dir"
25531 case $as_dir in #(
25532 -*) as_dir=./$as_dir;;
25533 esac
25534 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025535 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025536 while :; do
25537 case $as_dir in #(
25538 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25539 *) as_qdir=$as_dir;;
25540 esac
25541 as_dirs="'$as_qdir' $as_dirs"
25542 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025543$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025544 X"$as_dir" : 'X\(//\)[^/]' \| \
25545 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025546 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025547echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025548 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25549 s//\1/
25550 q
25551 }
25552 /^X\(\/\/\)[^/].*/{
25553 s//\1/
25554 q
25555 }
25556 /^X\(\/\/\)$/{
25557 s//\1/
25558 q
25559 }
25560 /^X\(\/\).*/{
25561 s//\1/
25562 q
25563 }
25564 s/.*/./; q'`
25565 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025566 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025567 test -z "$as_dirs" || eval "mkdir $as_dirs"
25568 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25569echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025570 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025571 ac_builddir=.
25572
Martin v. Löwiseba40652007-08-30 20:10:57 +000025573case "$ac_dir" in
25574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25575*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025576 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025577 # A ".." for each directory in $ac_dir_suffix.
25578 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25579 case $ac_top_builddir_sub in
25580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25582 esac ;;
25583esac
25584ac_abs_top_builddir=$ac_pwd
25585ac_abs_builddir=$ac_pwd$ac_dir_suffix
25586# for backward compatibility:
25587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025588
25589case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025591 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025592 ac_top_srcdir=$ac_top_builddir_sub
25593 ac_abs_top_srcdir=$ac_pwd ;;
25594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025595 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025596 ac_top_srcdir=$srcdir
25597 ac_abs_top_srcdir=$srcdir ;;
25598 *) # Relative name.
25599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25600 ac_top_srcdir=$ac_top_build_prefix$srcdir
25601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025602esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025604
Martin v. Löwis11437992002-04-12 09:54:03 +000025605
Martin v. Löwiseba40652007-08-30 20:10:57 +000025606 case $ac_mode in
25607 :F)
25608 #
25609 # CONFIG_FILE
25610 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025611
25612 case $INSTALL in
25613 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025614 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025615 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025616_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025617
25618cat >>$CONFIG_STATUS <<\_ACEOF
25619# If the template does not know about datarootdir, expand it.
25620# FIXME: This hack should be removed a few years after 2.60.
25621ac_datarootdir_hack=; ac_datarootdir_seen=
25622
25623case `sed -n '/datarootdir/ {
25624 p
25625 q
25626}
25627/@datadir@/p
25628/@docdir@/p
25629/@infodir@/p
25630/@localedir@/p
25631/@mandir@/p
25632' $ac_file_inputs` in
25633*datarootdir*) ac_datarootdir_seen=yes;;
25634*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25635 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25636echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25637_ACEOF
25638cat >>$CONFIG_STATUS <<_ACEOF
25639 ac_datarootdir_hack='
25640 s&@datadir@&$datadir&g
25641 s&@docdir@&$docdir&g
25642 s&@infodir@&$infodir&g
25643 s&@localedir@&$localedir&g
25644 s&@mandir@&$mandir&g
25645 s&\\\${datarootdir}&$datarootdir&g' ;;
25646esac
25647_ACEOF
25648
25649# Neutralize VPATH when `$srcdir' = `.'.
25650# Shell code in configure.ac might set extrasub.
25651# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025652cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025653 sed "$ac_vpsub
25654$extrasub
25655_ACEOF
25656cat >>$CONFIG_STATUS <<\_ACEOF
25657:t
25658/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025659s&@configure_input@&$configure_input&;t t
25660s&@top_builddir@&$ac_top_builddir_sub&;t t
25661s&@srcdir@&$ac_srcdir&;t t
25662s&@abs_srcdir@&$ac_abs_srcdir&;t t
25663s&@top_srcdir@&$ac_top_srcdir&;t t
25664s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25665s&@builddir@&$ac_builddir&;t t
25666s&@abs_builddir@&$ac_abs_builddir&;t t
25667s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25668s&@INSTALL@&$ac_INSTALL&;t t
25669$ac_datarootdir_hack
25670" $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 +000025671
Martin v. Löwiseba40652007-08-30 20:10:57 +000025672test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25673 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25674 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25675 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25676which seems to be undefined. Please make sure it is defined." >&5
25677echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25678which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025679
Martin v. Löwiseba40652007-08-30 20:10:57 +000025680 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025681 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025682 -) cat "$tmp/out"; rm -f "$tmp/out";;
25683 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025684 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025685 ;;
25686 :H)
25687 #
25688 # CONFIG_HEADER
25689 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025690_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025691
Martin v. Löwiseba40652007-08-30 20:10:57 +000025692# Transform confdefs.h into a sed script `conftest.defines', that
25693# substitutes the proper values into config.h.in to produce config.h.
25694rm -f conftest.defines conftest.tail
25695# First, append a space to every undef/define line, to ease matching.
25696echo 's/$/ /' >conftest.defines
25697# Then, protect against being on the right side of a sed subst, or in
25698# an unquoted here document, in config.status. If some macros were
25699# called several times there might be several #defines for the same
25700# symbol, which is useless. But do not sort them, since the last
25701# AC_DEFINE must be honored.
25702ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25703# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25704# NAME is the cpp macro being defined, VALUE is the value it is being given.
25705# PARAMS is the parameter list in the macro definition--in most cases, it's
25706# just an empty string.
25707ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25708ac_dB='\\)[ (].*,\\1define\\2'
25709ac_dC=' '
25710ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025711
Martin v. Löwiseba40652007-08-30 20:10:57 +000025712uniq confdefs.h |
25713 sed -n '
25714 t rset
25715 :rset
25716 s/^[ ]*#[ ]*define[ ][ ]*//
25717 t ok
25718 d
25719 :ok
25720 s/[\\&,]/\\&/g
25721 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25722 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25723 ' >>conftest.defines
25724
25725# Remove the space that was appended to ease matching.
25726# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025727# example, in the case of _POSIX_SOURCE, which is predefined and required
25728# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729# (The regexp can be short, since the line contains either #define or #undef.)
25730echo 's/ $//
25731s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025732
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733# Break up conftest.defines:
25734ac_max_sed_lines=50
25735
25736# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25737# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25738# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25739# et cetera.
25740ac_in='$ac_file_inputs'
25741ac_out='"$tmp/out1"'
25742ac_nxt='"$tmp/out2"'
25743
25744while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025745do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025746 # Write a here document:
25747 cat >>$CONFIG_STATUS <<_ACEOF
25748 # First, check the format of the line:
25749 cat >"\$tmp/defines.sed" <<\\CEOF
25750/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25751/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25752b
25753:def
25754_ACEOF
25755 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025756 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025757 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25758 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25759 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25760 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025761 rm -f conftest.defines
25762 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025763done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025764rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025765
Martin v. Löwiseba40652007-08-30 20:10:57 +000025766echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025767cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025768 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025769 echo "/* $configure_input */" >"$tmp/config.h"
25770 cat "$ac_result" >>"$tmp/config.h"
25771 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025772 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25773echo "$as_me: $ac_file is unchanged" >&6;}
25774 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025775 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025776 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025777 fi
25778 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025779 echo "/* $configure_input */"
25780 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025781 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782 rm -f "$tmp/out12"
25783 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025784
Martin v. Löwiseba40652007-08-30 20:10:57 +000025785
25786 esac
25787
25788done # for ac_tag
25789
Guido van Rossum627b2d71993-12-24 10:39:16 +000025790
Martin v. Löwis11437992002-04-12 09:54:03 +000025791{ (exit 0); exit 0; }
25792_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025793chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025794ac_clean_files=$ac_clean_files_save
25795
25796
25797# configure is writing to config.log, and then calls config.status.
25798# config.status does its own redirection, appending to config.log.
25799# Unfortunately, on DOS this fails, as config.log is still kept open
25800# by configure, so config.status won't be able to write to it; its
25801# output is simply discarded. So we exec the FD to /dev/null,
25802# effectively closing config.log, so it can be properly (re)opened and
25803# appended to by config.status. When coming back to configure, we
25804# need to make the FD available again.
25805if test "$no_create" != yes; then
25806 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025807 ac_config_status_args=
25808 test "$silent" = yes &&
25809 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025810 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025811 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025812 exec 5>>config.log
25813 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25814 # would make configure fail if this is the last instruction.
25815 $ac_cs_success || { (exit 1); exit 1; }
25816fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025817
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025818
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025819echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025820if test ! -f Modules/Setup
25821then
25822 cp $srcdir/Modules/Setup.dist Modules/Setup
25823fi
25824
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025825echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025826if test ! -f Modules/Setup.local
25827then
25828 echo "# Edit this file for local setup changes" >Modules/Setup.local
25829fi
25830
25831echo "creating Makefile"
25832$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25833 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025834 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025835
25836case $ac_sys_system in
25837BeOS)
25838 { echo "$as_me:$LINENO: WARNING:
25839
25840 Support for BeOS is deprecated as of Python 2.6.
25841 See PEP 11 for the gory details.
25842 " >&5
25843echo "$as_me: WARNING:
25844
25845 Support for BeOS is deprecated as of Python 2.6.
25846 See PEP 11 for the gory details.
25847 " >&2;}
25848 ;;
25849*) ;;
25850esac
25851
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025852mv config.c Modules