blob: 69f15ac8c352cf7674582fafe8bb9e9aeea117b7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson2eb65452009-05-23 19:35:33 +00002# From configure.in Revision: 72275 .
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"
Ronald Oussoren75d83852009-03-30 17:56:14 +00001973 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001974 else
Ronald Oussoren75d83852009-03-30 17:56:14 +00001975 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001976 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1977 fi
1978
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001979 if test "x${prefix}" = "xNONE" ; then
1980 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1981 else
1982 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1983 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001984 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001986 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001988 ac_config_files="$ac_config_files Mac/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/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001991
Martin v. Löwiseba40652007-08-30 20:10:57 +00001992 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001993
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001994 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1995
1996 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1997
Jack Jansene578a632001-08-15 01:27:14 +00001998 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001999
Guido van Rossum563e7081996-09-10 18:20:48 +00002000else
Martin v. Löwis11437992002-04-12 09:54:03 +00002001
Jack Jansene578a632001-08-15 01:27:14 +00002002 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002004 PYTHONFRAMEWORKPREFIX=
2005 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002006 FRAMEWORKINSTALLFIRST=
2007 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002008 FRAMEWORKALTINSTALLFIRST=
2009 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002010 if test "x${prefix}" = "xNONE" ; then
2011 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2012 else
2013 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2014 fi
Jack Jansene578a632001-08-15 01:27:14 +00002015 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002016
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002017 if test "$UNIVERSAL_ARCHS" = "all"
2018 then
2019 FRAMEWORKINSTALLLAST=update4wayuniversal
2020 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2021 fi
2022
Martin v. Löwiseba40652007-08-30 20:10:57 +00002023fi
2024
Michael W. Hudson54241132001-12-07 15:38:26 +00002025
2026
2027
2028
Jack Jansene578a632001-08-15 01:27:14 +00002029
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002030
2031
Ronald Oussoren5b787322006-06-06 19:50:24 +00002032
2033
2034
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002037## AC_HELP_STRING(--with-dyld,
2038## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002039##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002040# Set name for machine-dependent library files
2041
Martin v. Löwiseba40652007-08-30 20:10:57 +00002042{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2043echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044if test -z "$MACHDEP"
2045then
Guido van Rossum563e7081996-09-10 18:20:48 +00002046 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002047 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2048 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_md_system=`echo $ac_sys_system |
2054 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2055 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002056 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002057 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002058
Guido van Rossum07397971997-04-29 21:49:50 +00002059 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002060 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002061 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002062 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002063 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065 esac
2066fi
Guido van Rossum91922671997-10-09 20:24:13 +00002067
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002068# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2069# disable features if it is defined, without any means to access these
2070# features as extensions. For these systems, we skip the definition of
2071# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2072# some feature, make sure there is no alternative way to access this
2073# feature. Also, when using wildcards, make sure you have verified the
2074# need for not defining _XOPEN_SOURCE on all systems matching the
2075# wildcard, and that the wildcard does not include future systems
2076# (which may remove their limitations).
2077case $ac_sys_system/$ac_sys_release in
2078 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2079 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002080 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002081 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002082 define_xopen_source=no
2083 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2084 # also defined. This can be overridden by defining _BSD_SOURCE
2085 # As this has a different meaning on Linux, only define it on OpenBSD
2086
2087cat >>confdefs.h <<\_ACEOF
2088#define _BSD_SOURCE 1
2089_ACEOF
2090
2091 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002092 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2093 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2094 # Marc Recht
Benjamin Petersonf9c08882008-11-16 17:57:10 +00002095 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002096 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002097 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2098 # of union __?sigval. Reported by Stuart Bishop.
2099 SunOS/5.6)
2100 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002101 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2102 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002103 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002104 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002105 define_xopen_source=no;;
2106 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002107 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002109 define_xopen_source=no;;
Martin v. Löwis7f08c1f2008-11-04 20:43:31 +00002110 # On FreeBSD 4, the math functions C89 does not cover are never defined
2111 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2112 FreeBSD/4.*)
2113 define_xopen_source=no;;
2114 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2115 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2116 # identifies itself as Darwin/7.*
2117 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2118 # disables platform specific features beyond repair.
2119 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2120 # has no effect, don't bother defining them
2121 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002122 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002123 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2124 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2125 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002126 AIX/4)
2127 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002128 AIX/5)
2129 if test `uname -r` -eq 1; then
2130 define_xopen_source=no
2131 fi
2132 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002133 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2134 # defining NI_NUMERICHOST.
2135 QNX/6.3.2)
2136 define_xopen_source=no
2137 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002138
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002139esac
2140
2141if test $define_xopen_source = yes
2142then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002143 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2144 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002145 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2146 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002147 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002148 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002149
2150cat >>confdefs.h <<\_ACEOF
2151#define _XOPEN_SOURCE 500
2152_ACEOF
2153
2154 ;;
2155 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002159_ACEOF
2160
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161 ;;
2162 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2165 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2166 # several APIs are not declared. Since this is also needed in some
2167 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002168 # except for Solaris 10, where it must not be defined,
2169 # as it implies XPG4.2
2170 case $ac_sys_system/$ac_sys_release in
2171 SunOS/5.10)
2172 ;;
2173 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002174
2175cat >>confdefs.h <<\_ACEOF
2176#define _XOPEN_SOURCE_EXTENDED 1
2177_ACEOF
2178
Martin v. Löwis7dece662005-11-26 11:38:24 +00002179 ;;
2180 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002182
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002183cat >>confdefs.h <<\_ACEOF
2184#define _POSIX_C_SOURCE 200112L
2185_ACEOF
2186
2187
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002188fi
2189
Guido van Rossum91922671997-10-09 20:24:13 +00002190#
2191# SGI compilers allow the specification of the both the ABI and the
2192# ISA on the command line. Depending on the values of these switches,
2193# different and often incompatable code will be generated.
2194#
2195# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2196# thus supply support for various ABI/ISA combinations. The MACHDEP
2197# variable is also adjusted.
2198#
2199
2200if test ! -z "$SGI_ABI"
2201then
2202 CC="cc $SGI_ABI"
2203 LDFLAGS="$SGI_ABI $LDFLAGS"
2204 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002206{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2207echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002208
Jack Jansen83f898c2002-12-30 22:23:40 +00002209# And add extra plat-mac for darwin
2210
Jack Jansen7b59b422003-03-17 15:44:10 +00002211
Martin v. Löwiseba40652007-08-30 20:10:57 +00002212{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2213echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002214if test -z "$EXTRAPLATDIR"
2215then
2216 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002217 darwin)
2218 EXTRAPLATDIR="\$(PLATMACDIRS)"
2219 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2220 ;;
2221 *)
2222 EXTRAPLATDIR=""
2223 EXTRAMACHDEPPATH=""
2224 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002225 esac
2226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002227{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2228echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002229
Jack Jansen6b08a402004-06-03 12:41:45 +00002230# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2231# it may influence the way we can build extensions, so distutils
2232# needs to check it
2233
Ronald Oussoren988117f2006-04-29 11:31:35 +00002234
Jack Jansen6b08a402004-06-03 12:41:45 +00002235CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002236EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002237
Mark Dickinson65134662008-04-25 16:11:04 +00002238{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2239echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2240ac_sys_machine=`uname -m`
2241{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2242echo "${ECHO_T}$ac_sys_machine" >&6; }
2243
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002245
2246# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2247# for debug/optimization stuff. BASECFLAGS is for flags that are required
2248# just to get things to compile and link. Users are free to override OPT
2249# when running configure or make. The build should not break if they do.
2250# BASECFLAGS should generally not be messed with, however.
2251
2252# XXX shouldn't some/most/all of this code be merged with the stuff later
2253# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002254{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2255echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002256
Martin v. Löwiseba40652007-08-30 20:10:57 +00002257# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002258if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002260 case $withval in
Ronald Oussoren75d83852009-03-30 17:56:14 +00002261 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002262 without_gcc=yes;;
2263 yes) CC=gcc
2264 without_gcc=no;;
2265 *) CC=$withval
2266 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002268else
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002270 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002271 AIX*) CC=cc_r
2272 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002273 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002274 case $BE_HOST_CPU in
2275 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002276 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002277 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002278 BASECFLAGS="$BASECFLAGS -export pragma"
2279 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002281 ;;
2282 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002283 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002285 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 ;;
2287 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002288 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2289echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2290 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002291 ;;
2292 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002293 AR="\$(srcdir)/Modules/ar_beos"
2294 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002295 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002296 Monterey*)
2297 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002298 without_gcc=;;
2299 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002300 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002301fi
2302
2303{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2304echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002305
Guido van Rossum8b131c51995-03-09 14:10:13 +00002306# If the user switches compilers, we can't believe the cache
2307if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2308then
Martin v. Löwis11437992002-04-12 09:54:03 +00002309 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2310(it is also a good idea to do 'make clean' before compiling)" >&5
2311echo "$as_me: error: cached CC is different -- throw away $cache_file
2312(it is also a good idea to do 'make clean' before compiling)" >&2;}
2313 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002314fi
2315
Martin v. Löwis11437992002-04-12 09:54:03 +00002316ac_ext=c
2317ac_cpp='$CPP $CPPFLAGS'
2318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2320ac_compiler_gnu=$ac_cv_c_compiler_gnu
2321if test -n "$ac_tool_prefix"; then
2322 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2323set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002326if test "${ac_cv_prog_CC+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002328else
2329 if test -n "$CC"; then
2330 ac_cv_prog_CC="$CC" # Let the user override the test.
2331else
Martin v. Löwis11437992002-04-12 09:54:03 +00002332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333for as_dir in $PATH
2334do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002338 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 +00002339 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2341 break 2
2342 fi
2343done
2344done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
Jack Jansendd19cf82001-12-06 22:36:17 +00002347fi
2348fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002349CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002350if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002351 { echo "$as_me:$LINENO: result: $CC" >&5
2352echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002353else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354 { echo "$as_me:$LINENO: result: no" >&5
2355echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356fi
2357
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358
Martin v. Löwis11437992002-04-12 09:54:03 +00002359fi
2360if test -z "$ac_cv_prog_CC"; then
2361 ac_ct_CC=$CC
2362 # Extract the first word of "gcc", so it can be a program name with args.
2363set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002364{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2365echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002366if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2367 echo $ECHO_N "(cached) $ECHO_C" >&6
2368else
2369 if test -n "$ac_ct_CC"; then
2370 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2371else
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
2377 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002378 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 +00002379 ac_cv_prog_ac_ct_CC="gcc"
2380 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2381 break 2
2382 fi
2383done
2384done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002386
2387fi
2388fi
2389ac_ct_CC=$ac_cv_prog_ac_ct_CC
2390if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2392echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002393else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 { echo "$as_me:$LINENO: result: no" >&5
2395echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002396fi
2397
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398 if test "x$ac_ct_CC" = x; then
2399 CC=""
2400 else
2401 case $cross_compiling:$ac_tool_warned in
2402yes:)
2403{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2404whose name does not start with the host triplet. If you think this
2405configuration is useful to you, please write to autoconf@gnu.org." >&5
2406echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2407whose name does not start with the host triplet. If you think this
2408configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2409ac_tool_warned=yes ;;
2410esac
2411 CC=$ac_ct_CC
2412 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002413else
2414 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002415fi
2416
Jack Jansendd19cf82001-12-06 22:36:17 +00002417if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002418 if test -n "$ac_tool_prefix"; then
2419 # 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 +00002420set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
2424 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 ac_cv_prog_CC="${ac_tool_prefix}cc"
2437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2438 break 2
2439 fi
2440done
2441done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444fi
2445fi
2446CC=$ac_cv_prog_CC
2447if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 { echo "$as_me:$LINENO: result: $CC" >&5
2449echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002450else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451 { echo "$as_me:$LINENO: result: no" >&5
2452echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002453fi
2454
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002457fi
2458if test -z "$CC"; then
2459 # Extract the first word of "cc", so it can be a program name with args.
2460set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2462echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463if test "${ac_cv_prog_CC+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2465else
2466 if test -n "$CC"; then
2467 ac_cv_prog_CC="$CC" # Let the user override the test.
2468else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473 IFS=$as_save_IFS
2474 test -z "$as_dir" && as_dir=.
2475 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476 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 +00002477 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2478 ac_prog_rejected=yes
2479 continue
2480 fi
2481 ac_cv_prog_CC="cc"
2482 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2483 break 2
2484 fi
2485done
2486done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002489if test $ac_prog_rejected = yes; then
2490 # We found a bogon in the path, so make sure we never use it.
2491 set dummy $ac_cv_prog_CC
2492 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494 # We chose a different compiler from the bogus one.
2495 # However, it has the same basename, so the bogon will be chosen
2496 # first if we set CC to just the basename; use the full file name.
2497 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002499 fi
2500fi
2501fi
2502fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002503CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $CC" >&5
2506echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002510fi
2511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513fi
2514if test -z "$CC"; then
2515 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 do
2518 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2519set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002520{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2521echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002522if test "${ac_cv_prog_CC+set}" = set; then
2523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002524else
2525 if test -n "$CC"; then
2526 ac_cv_prog_CC="$CC" # Let the user override the test.
2527else
Martin v. Löwis11437992002-04-12 09:54:03 +00002528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2529for as_dir in $PATH
2530do
2531 IFS=$as_save_IFS
2532 test -z "$as_dir" && as_dir=.
2533 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 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 +00002535 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2536 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2537 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
2543fi
2544fi
2545CC=$ac_cv_prog_CC
2546if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 { echo "$as_me:$LINENO: result: $CC" >&5
2548echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002549else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 { echo "$as_me:$LINENO: result: no" >&5
2551echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002552fi
2553
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 test -n "$CC" && break
2556 done
2557fi
2558if test -z "$CC"; then
2559 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002561do
2562 # Extract the first word of "$ac_prog", so it can be a program name with args.
2563set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2565echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002566if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2567 echo $ECHO_N "(cached) $ECHO_C" >&6
2568else
2569 if test -n "$ac_ct_CC"; then
2570 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2571else
2572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2573for as_dir in $PATH
2574do
2575 IFS=$as_save_IFS
2576 test -z "$as_dir" && as_dir=.
2577 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002578 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 +00002579 ac_cv_prog_ac_ct_CC="$ac_prog"
2580 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2581 break 2
2582 fi
2583done
2584done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587fi
2588fi
2589ac_ct_CC=$ac_cv_prog_ac_ct_CC
2590if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2592echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002593else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 { echo "$as_me:$LINENO: result: no" >&5
2595echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002596fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002597
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 test -n "$ac_ct_CC" && break
2600done
Michael W. Hudson54241132001-12-07 15:38:26 +00002601
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 if test "x$ac_ct_CC" = x; then
2603 CC=""
2604 else
2605 case $cross_compiling:$ac_tool_warned in
2606yes:)
2607{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2608whose name does not start with the host triplet. If you think this
2609configuration is useful to you, please write to autoconf@gnu.org." >&5
2610echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2611whose name does not start with the host triplet. If you think this
2612configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2613ac_tool_warned=yes ;;
2614esac
2615 CC=$ac_ct_CC
2616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002617fi
2618
2619fi
2620
2621
Skip Montanaro6dead952003-09-25 14:50:04 +00002622test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2623See \`config.log' for more details." >&5
2624echo "$as_me: error: no acceptable C compiler found in \$PATH
2625See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 { (exit 1); exit 1; }; }
2627
2628# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002630ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631{ (ac_try="$ac_compiler --version >&5"
2632case "(($ac_try" in
2633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2634 *) ac_try_echo=$ac_try;;
2635esac
2636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2637 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_status=$?
2639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2640 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641{ (ac_try="$ac_compiler -v >&5"
2642case "(($ac_try" in
2643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2644 *) ac_try_echo=$ac_try;;
2645esac
2646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2647 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_status=$?
2649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2650 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002651{ (ac_try="$ac_compiler -V >&5"
2652case "(($ac_try" in
2653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2654 *) ac_try_echo=$ac_try;;
2655esac
2656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2657 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); }
2661
2662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002663/* confdefs.h. */
2664_ACEOF
2665cat confdefs.h >>conftest.$ac_ext
2666cat >>conftest.$ac_ext <<_ACEOF
2667/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669int
2670main ()
2671{
2672
2673 ;
2674 return 0;
2675}
2676_ACEOF
2677ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002678ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002679# Try to create an executable without -o first, disregard a.out.
2680# It will help us diagnose broken compilers, and finding out an intuition
2681# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2683echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002685#
2686# List of possible output files, starting from the most likely.
2687# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2688# only as a last resort. b.out is created by i960 compilers.
2689ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2690#
2691# The IRIX 6 linker writes into existing files which may not be
2692# executable, retaining their permissions. Remove them first so a
2693# subsequent execution test works.
2694ac_rmfiles=
2695for ac_file in $ac_files
2696do
2697 case $ac_file in
2698 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2699 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2700 esac
2701done
2702rm -f $ac_rmfiles
2703
2704if { (ac_try="$ac_link_default"
2705case "(($ac_try" in
2706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707 *) ac_try_echo=$ac_try;;
2708esac
2709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2710 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 ac_status=$?
2712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2713 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002714 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2715# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2716# in a Makefile. We should not override ac_cv_exeext if it was cached,
2717# so that the user can short-circuit this test for compilers unknown to
2718# Autoconf.
2719for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002720do
2721 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002724 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002725 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002726 # We found the default executable, but exeext='' is most
2727 # certainly right.
2728 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002729 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2731 then :; else
2732 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2733 fi
2734 # We set ac_cv_exeext here because the later test for it is not
2735 # safe: cross compilers may not add the suffix if given an `-o'
2736 # argument, so we may need to know it at that point already.
2737 # Even if this section looks crufty: it has the advantage of
2738 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002740 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002741 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 esac
2743done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002744test "$ac_cv_exeext" = no && ac_cv_exeext=
2745
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002746else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747 ac_file=''
2748fi
2749
2750{ echo "$as_me:$LINENO: result: $ac_file" >&5
2751echo "${ECHO_T}$ac_file" >&6; }
2752if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002754sed 's/^/| /' conftest.$ac_ext >&5
2755
2756{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2757See \`config.log' for more details." >&5
2758echo "$as_me: error: C compiler cannot create executables
2759See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002761fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002762
Martin v. Löwis11437992002-04-12 09:54:03 +00002763ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002764
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002766# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2768echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002769# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2770# If not cross compiling, check that we can run a simple program.
2771if test "$cross_compiling" != yes; then
2772 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002773 { (case "(($ac_try" in
2774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2775 *) ac_try_echo=$ac_try;;
2776esac
2777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2778 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 ac_status=$?
2780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2781 (exit $ac_status); }; }; then
2782 cross_compiling=no
2783 else
2784 if test "$cross_compiling" = maybe; then
2785 cross_compiling=yes
2786 else
2787 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002788If you meant to cross compile, use \`--host'.
2789See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002791If you meant to cross compile, use \`--host'.
2792See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 { (exit 1); exit 1; }; }
2794 fi
2795 fi
2796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797{ echo "$as_me:$LINENO: result: yes" >&5
2798echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
Skip Montanaro6dead952003-09-25 14:50:04 +00002800rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002801ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002803# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2805echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2806{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2807echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2810echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2811if { (ac_try="$ac_link"
2812case "(($ac_try" in
2813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2814 *) ac_try_echo=$ac_try;;
2815esac
2816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2817 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002818 ac_status=$?
2819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820 (exit $ac_status); }; then
2821 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2822# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2823# work properly (i.e., refer to `conftest.exe'), while it won't with
2824# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002825for ac_file in conftest.exe conftest conftest.*; do
2826 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002828 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002830 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 * ) break;;
2832 esac
2833done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834else
Skip Montanaro6dead952003-09-25 14:50:04 +00002835 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2836See \`config.log' for more details." >&5
2837echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2838See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002840fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002841
Martin v. Löwis11437992002-04-12 09:54:03 +00002842rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2844echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002845
2846rm -f conftest.$ac_ext
2847EXEEXT=$ac_cv_exeext
2848ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002849{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2850echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851if test "${ac_cv_objext+set}" = set; then
2852 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002853else
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002855/* confdefs.h. */
2856_ACEOF
2857cat confdefs.h >>conftest.$ac_ext
2858cat >>conftest.$ac_ext <<_ACEOF
2859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002860
Martin v. Löwis11437992002-04-12 09:54:03 +00002861int
2862main ()
2863{
2864
2865 ;
2866 return 0;
2867}
2868_ACEOF
2869rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002870if { (ac_try="$ac_compile"
2871case "(($ac_try" in
2872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2873 *) ac_try_echo=$ac_try;;
2874esac
2875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2876 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 ac_status=$?
2878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2879 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002880 for ac_file in conftest.o conftest.obj conftest.*; do
2881 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2885 break;;
2886 esac
2887done
2888else
2889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002890sed 's/^/| /' conftest.$ac_ext >&5
2891
2892{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2893See \`config.log' for more details." >&5
2894echo "$as_me: error: cannot compute suffix of object files: cannot compile
2895See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002896 { (exit 1); exit 1; }; }
2897fi
2898
2899rm -f conftest.$ac_cv_objext conftest.$ac_ext
2900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2902echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002903OBJEXT=$ac_cv_objext
2904ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002905{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2906echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907if test "${ac_cv_c_compiler_gnu+set}" = set; then
2908 echo $ECHO_N "(cached) $ECHO_C" >&6
2909else
2910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002911/* confdefs.h. */
2912_ACEOF
2913cat confdefs.h >>conftest.$ac_ext
2914cat >>conftest.$ac_ext <<_ACEOF
2915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917int
2918main ()
2919{
2920#ifndef __GNUC__
2921 choke me
2922#endif
2923
2924 ;
2925 return 0;
2926}
2927_ACEOF
2928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002929if { (ac_try="$ac_compile"
2930case "(($ac_try" in
2931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2932 *) ac_try_echo=$ac_try;;
2933esac
2934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002937 grep -v '^ *+' conftest.er1 >conftest.err
2938 rm -f conftest.er1
2939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941 (exit $ac_status); } && {
2942 test -z "$ac_c_werror_flag" ||
2943 test ! -s conftest.err
2944 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002945 ac_compiler_gnu=yes
2946else
2947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002948sed 's/^/| /' conftest.$ac_ext >&5
2949
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952
2953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002954ac_cv_c_compiler_gnu=$ac_compiler_gnu
2955
2956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002957{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2958echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959GCC=`test $ac_compiler_gnu = yes && echo yes`
2960ac_test_CFLAGS=${CFLAGS+set}
2961ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002962{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2963echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002964if test "${ac_cv_prog_cc_g+set}" = set; then
2965 echo $ECHO_N "(cached) $ECHO_C" >&6
2966else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967 ac_save_c_werror_flag=$ac_c_werror_flag
2968 ac_c_werror_flag=yes
2969 ac_cv_prog_cc_g=no
2970 CFLAGS="-g"
2971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002972/* confdefs.h. */
2973_ACEOF
2974cat confdefs.h >>conftest.$ac_ext
2975cat >>conftest.$ac_ext <<_ACEOF
2976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978int
2979main ()
2980{
2981
2982 ;
2983 return 0;
2984}
2985_ACEOF
2986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002987if { (ac_try="$ac_compile"
2988case "(($ac_try" in
2989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2990 *) ac_try_echo=$ac_try;;
2991esac
2992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002995 grep -v '^ *+' conftest.er1 >conftest.err
2996 rm -f conftest.er1
2997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002999 (exit $ac_status); } && {
3000 test -z "$ac_c_werror_flag" ||
3001 test ! -s conftest.err
3002 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003003 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004else
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003006sed 's/^/| /' conftest.$ac_ext >&5
3007
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008 CFLAGS=""
3009 cat >conftest.$ac_ext <<_ACEOF
3010/* confdefs.h. */
3011_ACEOF
3012cat confdefs.h >>conftest.$ac_ext
3013cat >>conftest.$ac_ext <<_ACEOF
3014/* end confdefs.h. */
3015
3016int
3017main ()
3018{
3019
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024rm -f conftest.$ac_objext
3025if { (ac_try="$ac_compile"
3026case "(($ac_try" in
3027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3028 *) ac_try_echo=$ac_try;;
3029esac
3030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3031 (eval "$ac_compile") 2>conftest.er1
3032 ac_status=$?
3033 grep -v '^ *+' conftest.er1 >conftest.err
3034 rm -f conftest.er1
3035 cat conftest.err >&5
3036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3037 (exit $ac_status); } && {
3038 test -z "$ac_c_werror_flag" ||
3039 test ! -s conftest.err
3040 } && test -s conftest.$ac_objext; then
3041 :
3042else
3043 echo "$as_me: failed program was:" >&5
3044sed 's/^/| /' conftest.$ac_ext >&5
3045
3046 ac_c_werror_flag=$ac_save_c_werror_flag
3047 CFLAGS="-g"
3048 cat >conftest.$ac_ext <<_ACEOF
3049/* confdefs.h. */
3050_ACEOF
3051cat confdefs.h >>conftest.$ac_ext
3052cat >>conftest.$ac_ext <<_ACEOF
3053/* end confdefs.h. */
3054
3055int
3056main ()
3057{
3058
3059 ;
3060 return 0;
3061}
3062_ACEOF
3063rm -f conftest.$ac_objext
3064if { (ac_try="$ac_compile"
3065case "(($ac_try" in
3066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3067 *) ac_try_echo=$ac_try;;
3068esac
3069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3070 (eval "$ac_compile") 2>conftest.er1
3071 ac_status=$?
3072 grep -v '^ *+' conftest.er1 >conftest.err
3073 rm -f conftest.er1
3074 cat conftest.err >&5
3075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076 (exit $ac_status); } && {
3077 test -z "$ac_c_werror_flag" ||
3078 test ! -s conftest.err
3079 } && test -s conftest.$ac_objext; then
3080 ac_cv_prog_cc_g=yes
3081else
3082 echo "$as_me: failed program was:" >&5
3083sed 's/^/| /' conftest.$ac_ext >&5
3084
3085
Guido van Rossum627b2d71993-12-24 10:39:16 +00003086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087
3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003090
3091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3092fi
3093
3094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3095 ac_c_werror_flag=$ac_save_c_werror_flag
3096fi
3097{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3098echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003100 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003101elif test $ac_cv_prog_cc_g = yes; then
3102 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003103 CFLAGS="-g -O2"
3104 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003105 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106 fi
3107else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108 if test "$GCC" = yes; then
3109 CFLAGS="-O2"
3110 else
3111 CFLAGS=
3112 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003114{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3115echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3116if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003117 echo $ECHO_N "(cached) $ECHO_C" >&6
3118else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003119 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003120ac_save_CC=$CC
3121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003122/* confdefs.h. */
3123_ACEOF
3124cat confdefs.h >>conftest.$ac_ext
3125cat >>conftest.$ac_ext <<_ACEOF
3126/* end confdefs.h. */
3127#include <stdarg.h>
3128#include <stdio.h>
3129#include <sys/types.h>
3130#include <sys/stat.h>
3131/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3132struct buf { int x; };
3133FILE * (*rcsopen) (struct buf *, struct stat *, int);
3134static char *e (p, i)
3135 char **p;
3136 int i;
3137{
3138 return p[i];
3139}
3140static char *f (char * (*g) (char **, int), char **p, ...)
3141{
3142 char *s;
3143 va_list v;
3144 va_start (v,p);
3145 s = g (p, va_arg (v,int));
3146 va_end (v);
3147 return s;
3148}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003149
3150/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3151 function prototypes and stuff, but not '\xHH' hex character constants.
3152 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003154 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3155 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003156 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003157int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3158
Martin v. Löwiseba40652007-08-30 20:10:57 +00003159/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3160 inside strings and character constants. */
3161#define FOO(x) 'x'
3162int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3163
Skip Montanaro6dead952003-09-25 14:50:04 +00003164int test (int i, double x);
3165struct s1 {int (*f) (int a);};
3166struct s2 {int (*f) (double a);};
3167int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3168int argc;
3169char **argv;
3170int
3171main ()
3172{
3173return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3174 ;
3175 return 0;
3176}
3177_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003178for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3179 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003180do
3181 CC="$ac_save_CC $ac_arg"
3182 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183if { (ac_try="$ac_compile"
3184case "(($ac_try" in
3185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3186 *) ac_try_echo=$ac_try;;
3187esac
3188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3189 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003191 grep -v '^ *+' conftest.er1 >conftest.err
3192 rm -f conftest.er1
3193 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003195 (exit $ac_status); } && {
3196 test -z "$ac_c_werror_flag" ||
3197 test ! -s conftest.err
3198 } && test -s conftest.$ac_objext; then
3199 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003200else
3201 echo "$as_me: failed program was:" >&5
3202sed 's/^/| /' conftest.$ac_ext >&5
3203
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204
Skip Montanaro6dead952003-09-25 14:50:04 +00003205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206
3207rm -f core conftest.err conftest.$ac_objext
3208 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003211CC=$ac_save_CC
3212
3213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214# AC_CACHE_VAL
3215case "x$ac_cv_prog_cc_c89" in
3216 x)
3217 { echo "$as_me:$LINENO: result: none needed" >&5
3218echo "${ECHO_T}none needed" >&6; } ;;
3219 xno)
3220 { echo "$as_me:$LINENO: result: unsupported" >&5
3221echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003222 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223 CC="$CC $ac_cv_prog_cc_c89"
3224 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3225echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003226esac
3227
Skip Montanaro6dead952003-09-25 14:50:04 +00003228
Martin v. Löwis11437992002-04-12 09:54:03 +00003229ac_ext=c
3230ac_cpp='$CPP $CPPFLAGS'
3231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3233ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003234
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003235
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003236
3237
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3239echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003240
Martin v. Löwiseba40652007-08-30 20:10:57 +00003241# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003242if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003244
3245 case $withval in
3246 no) with_cxx_main=no
3247 MAINCC='$(CC)';;
3248 yes) with_cxx_main=yes
3249 MAINCC='$(CXX)';;
3250 *) with_cxx_main=yes
3251 MAINCC=$withval
3252 if test -z "$CXX"
3253 then
3254 CXX=$withval
3255 fi;;
3256 esac
3257else
3258
3259 with_cxx_main=no
3260 MAINCC='$(CC)'
3261
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262fi
3263
3264{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3265echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266
3267preset_cxx="$CXX"
3268if test -z "$CXX"
3269then
3270 case "$CC" in
3271 gcc) # Extract the first word of "g++", so it can be a program name with args.
3272set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003275if test "${ac_cv_path_CXX+set}" = set; then
3276 echo $ECHO_N "(cached) $ECHO_C" >&6
3277else
3278 case $CXX in
3279 [\\/]* | ?:[\\/]*)
3280 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3281 ;;
3282 *)
3283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in notfound
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
3288 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003290 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3292 break 2
3293 fi
3294done
3295done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297
3298 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3299 ;;
3300esac
3301fi
3302CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003303if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304 { echo "$as_me:$LINENO: result: $CXX" >&5
3305echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003306else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003307 { echo "$as_me:$LINENO: result: no" >&5
3308echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003310
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311 ;;
3312 cc) # Extract the first word of "c++", so it can be a program name with args.
3313set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003316if test "${ac_cv_path_CXX+set}" = set; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
3318else
3319 case $CXX in
3320 [\\/]* | ?:[\\/]*)
3321 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3322 ;;
3323 *)
3324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3325for as_dir in notfound
3326do
3327 IFS=$as_save_IFS
3328 test -z "$as_dir" && as_dir=.
3329 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003330 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 +00003331 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3332 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3333 break 2
3334 fi
3335done
3336done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003337IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003338
3339 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3340 ;;
3341esac
3342fi
3343CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003344if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345 { echo "$as_me:$LINENO: result: $CXX" >&5
3346echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003347else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003348 { echo "$as_me:$LINENO: result: no" >&5
3349echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003351
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003352 ;;
3353 esac
3354 if test "$CXX" = "notfound"
3355 then
3356 CXX=""
3357 fi
3358fi
3359if test -z "$CXX"
3360then
3361 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3362do
3363 # Extract the first word of "$ac_prog", so it can be a program name with args.
3364set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003365{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003367if test "${ac_cv_prog_CXX+set}" = set; then
3368 echo $ECHO_N "(cached) $ECHO_C" >&6
3369else
3370 if test -n "$CXX"; then
3371 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3372else
3373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3374for as_dir in $PATH
3375do
3376 IFS=$as_save_IFS
3377 test -z "$as_dir" && as_dir=.
3378 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003379 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 +00003380 ac_cv_prog_CXX="$ac_prog"
3381 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3382 break 2
3383 fi
3384done
3385done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003387
3388fi
3389fi
3390CXX=$ac_cv_prog_CXX
3391if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 { echo "$as_me:$LINENO: result: $CXX" >&5
3393echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003395 { echo "$as_me:$LINENO: result: no" >&5
3396echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003397fi
3398
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003400 test -n "$CXX" && break
3401done
3402test -n "$CXX" || CXX="notfound"
3403
3404 if test "$CXX" = "notfound"
3405 then
3406 CXX=""
3407 fi
3408fi
3409if test "$preset_cxx" != "$CXX"
3410then
3411 { echo "$as_me:$LINENO: WARNING:
3412
3413 By default, distutils will build C++ extension modules with \"$CXX\".
3414 If this is not intended, then set CXX on the configure command line.
3415 " >&5
3416echo "$as_me: WARNING:
3417
3418 By default, distutils will build C++ extension modules with \"$CXX\".
3419 If this is not intended, then set CXX on the configure command line.
3420 " >&2;}
3421fi
3422
3423
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003424# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003425
3426ac_ext=c
3427ac_cpp='$CPP $CPPFLAGS'
3428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3430ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003431{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3432echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003433# On Suns, sometimes $CPP names a directory.
3434if test -n "$CPP" && test -d "$CPP"; then
3435 CPP=
3436fi
3437if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 if test "${ac_cv_prog_CPP+set}" = set; then
3439 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 # Double quotes because CPP needs to be expanded
3442 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3443 do
3444 ac_preproc_ok=false
3445for ac_c_preproc_warn_flag in '' yes
3446do
3447 # Use a header file that comes with gcc, so configuring glibc
3448 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003449 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3450 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003451 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # not just through cpp. "Syntax error" is here to catch this case.
3453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003454/* confdefs.h. */
3455_ACEOF
3456cat confdefs.h >>conftest.$ac_ext
3457cat >>conftest.$ac_ext <<_ACEOF
3458/* end confdefs.h. */
3459#ifdef __STDC__
3460# include <limits.h>
3461#else
3462# include <assert.h>
3463#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003464 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003466if { (ac_try="$ac_cpp conftest.$ac_ext"
3467case "(($ac_try" in
3468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469 *) ac_try_echo=$ac_try;;
3470esac
3471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003474 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 rm -f conftest.er1
3476 cat conftest.err >&5
3477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003478 (exit $ac_status); } >/dev/null && {
3479 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3480 test ! -s conftest.err
3481 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003482 :
3483else
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003485sed 's/^/| /' conftest.$ac_ext >&5
3486
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 # Broken: fails on valid input.
3488continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003490
Martin v. Löwis11437992002-04-12 09:54:03 +00003491rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003492
Martin v. Löwiseba40652007-08-30 20:10:57 +00003493 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 # can be detected and how.
3495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003496/* confdefs.h. */
3497_ACEOF
3498cat confdefs.h >>conftest.$ac_ext
3499cat >>conftest.$ac_ext <<_ACEOF
3500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003501#include <ac_nonexistent.h>
3502_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503if { (ac_try="$ac_cpp conftest.$ac_ext"
3504case "(($ac_try" in
3505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3506 *) ac_try_echo=$ac_try;;
3507esac
3508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3509 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003511 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 rm -f conftest.er1
3513 cat conftest.err >&5
3514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515 (exit $ac_status); } >/dev/null && {
3516 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3517 test ! -s conftest.err
3518 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # Broken: success on invalid input.
3520continue
3521else
3522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003523sed 's/^/| /' conftest.$ac_ext >&5
3524
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 # Passes both tests.
3526ac_preproc_ok=:
3527break
3528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003529
Martin v. Löwis11437992002-04-12 09:54:03 +00003530rm -f conftest.err conftest.$ac_ext
3531
3532done
3533# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3534rm -f conftest.err conftest.$ac_ext
3535if $ac_preproc_ok; then
3536 break
3537fi
3538
3539 done
3540 ac_cv_prog_CPP=$CPP
3541
3542fi
3543 CPP=$ac_cv_prog_CPP
3544else
3545 ac_cv_prog_CPP=$CPP
3546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547{ echo "$as_me:$LINENO: result: $CPP" >&5
3548echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003549ac_preproc_ok=false
3550for ac_c_preproc_warn_flag in '' yes
3551do
3552 # Use a header file that comes with gcc, so configuring glibc
3553 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003554 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3555 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 # On the NeXT, cc -E runs the code through the compiler's parser,
3557 # not just through cpp. "Syntax error" is here to catch this case.
3558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003559/* confdefs.h. */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h. */
3564#ifdef __STDC__
3565# include <limits.h>
3566#else
3567# include <assert.h>
3568#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003569 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003570_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571if { (ac_try="$ac_cpp conftest.$ac_ext"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
3576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3577 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003579 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 rm -f conftest.er1
3581 cat conftest.err >&5
3582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583 (exit $ac_status); } >/dev/null && {
3584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3585 test ! -s conftest.err
3586 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 :
3588else
3589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003590sed 's/^/| /' conftest.$ac_ext >&5
3591
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 # Broken: fails on valid input.
3593continue
3594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595
Martin v. Löwis11437992002-04-12 09:54:03 +00003596rm -f conftest.err conftest.$ac_ext
3597
Martin v. Löwiseba40652007-08-30 20:10:57 +00003598 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 # can be detected and how.
3600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003601/* confdefs.h. */
3602_ACEOF
3603cat confdefs.h >>conftest.$ac_ext
3604cat >>conftest.$ac_ext <<_ACEOF
3605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003606#include <ac_nonexistent.h>
3607_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608if { (ac_try="$ac_cpp conftest.$ac_ext"
3609case "(($ac_try" in
3610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3611 *) ac_try_echo=$ac_try;;
3612esac
3613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3614 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003616 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 rm -f conftest.er1
3618 cat conftest.err >&5
3619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003620 (exit $ac_status); } >/dev/null && {
3621 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3622 test ! -s conftest.err
3623 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 # Broken: success on invalid input.
3625continue
3626else
3627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003628sed 's/^/| /' conftest.$ac_ext >&5
3629
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 # Passes both tests.
3631ac_preproc_ok=:
3632break
3633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634
Martin v. Löwis11437992002-04-12 09:54:03 +00003635rm -f conftest.err conftest.$ac_ext
3636
3637done
3638# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3639rm -f conftest.err conftest.$ac_ext
3640if $ac_preproc_ok; then
3641 :
3642else
Skip Montanaro6dead952003-09-25 14:50:04 +00003643 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3644See \`config.log' for more details." >&5
3645echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3646See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 { (exit 1); exit 1; }; }
3648fi
3649
3650ac_ext=c
3651ac_cpp='$CPP $CPPFLAGS'
3652ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3653ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3654ac_compiler_gnu=$ac_cv_c_compiler_gnu
3655
3656
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3658echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3659if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003660 echo $ECHO_N "(cached) $ECHO_C" >&6
3661else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003662 # Extract the first word of "grep ggrep" to use in msg output
3663if test -z "$GREP"; then
3664set dummy grep ggrep; ac_prog_name=$2
3665if test "${ac_cv_path_GREP+set}" = set; then
3666 echo $ECHO_N "(cached) $ECHO_C" >&6
3667else
3668 ac_path_GREP_found=false
3669# Loop through the user's path and test for each of PROGNAME-LIST
3670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
3675 for ac_prog in grep ggrep; do
3676 for ac_exec_ext in '' $ac_executable_extensions; do
3677 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3678 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3679 # Check for GNU ac_path_GREP and select it if it is found.
3680 # Check for GNU $ac_path_GREP
3681case `"$ac_path_GREP" --version 2>&1` in
3682*GNU*)
3683 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3684*)
3685 ac_count=0
3686 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3687 while :
3688 do
3689 cat "conftest.in" "conftest.in" >"conftest.tmp"
3690 mv "conftest.tmp" "conftest.in"
3691 cp "conftest.in" "conftest.nl"
3692 echo 'GREP' >> "conftest.nl"
3693 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3694 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3695 ac_count=`expr $ac_count + 1`
3696 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3697 # Best one so far, save it but keep looking for a better one
3698 ac_cv_path_GREP="$ac_path_GREP"
3699 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003700 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003701 # 10*(2^10) chars as input seems more than enough
3702 test $ac_count -gt 10 && break
3703 done
3704 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3705esac
3706
3707
3708 $ac_path_GREP_found && break 3
3709 done
3710done
3711
3712done
3713IFS=$as_save_IFS
3714
3715
Skip Montanaro6dead952003-09-25 14:50:04 +00003716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003717
3718GREP="$ac_cv_path_GREP"
3719if test -z "$GREP"; then
3720 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3721echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3722 { (exit 1); exit 1; }; }
3723fi
3724
3725else
3726 ac_cv_path_GREP=$GREP
3727fi
3728
3729
3730fi
3731{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3732echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3733 GREP="$ac_cv_path_GREP"
3734
3735
3736{ echo "$as_me:$LINENO: checking for egrep" >&5
3737echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3738if test "${ac_cv_path_EGREP+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
3740else
3741 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3742 then ac_cv_path_EGREP="$GREP -E"
3743 else
3744 # Extract the first word of "egrep" to use in msg output
3745if test -z "$EGREP"; then
3746set dummy egrep; ac_prog_name=$2
3747if test "${ac_cv_path_EGREP+set}" = set; then
3748 echo $ECHO_N "(cached) $ECHO_C" >&6
3749else
3750 ac_path_EGREP_found=false
3751# Loop through the user's path and test for each of PROGNAME-LIST
3752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3753for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3754do
3755 IFS=$as_save_IFS
3756 test -z "$as_dir" && as_dir=.
3757 for ac_prog in egrep; do
3758 for ac_exec_ext in '' $ac_executable_extensions; do
3759 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3760 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3761 # Check for GNU ac_path_EGREP and select it if it is found.
3762 # Check for GNU $ac_path_EGREP
3763case `"$ac_path_EGREP" --version 2>&1` in
3764*GNU*)
3765 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3766*)
3767 ac_count=0
3768 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3769 while :
3770 do
3771 cat "conftest.in" "conftest.in" >"conftest.tmp"
3772 mv "conftest.tmp" "conftest.in"
3773 cp "conftest.in" "conftest.nl"
3774 echo 'EGREP' >> "conftest.nl"
3775 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3776 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3777 ac_count=`expr $ac_count + 1`
3778 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3779 # Best one so far, save it but keep looking for a better one
3780 ac_cv_path_EGREP="$ac_path_EGREP"
3781 ac_path_EGREP_max=$ac_count
3782 fi
3783 # 10*(2^10) chars as input seems more than enough
3784 test $ac_count -gt 10 && break
3785 done
3786 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3787esac
3788
3789
3790 $ac_path_EGREP_found && break 3
3791 done
3792done
3793
3794done
3795IFS=$as_save_IFS
3796
3797
3798fi
3799
3800EGREP="$ac_cv_path_EGREP"
3801if test -z "$EGREP"; then
3802 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3803echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3804 { (exit 1); exit 1; }; }
3805fi
3806
3807else
3808 ac_cv_path_EGREP=$EGREP
3809fi
3810
3811
3812 fi
3813fi
3814{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3815echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3816 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003817
3818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819
Martin v. Löwiseba40652007-08-30 20:10:57 +00003820{ echo "$as_me:$LINENO: checking for AIX" >&5
3821echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003823/* confdefs.h. */
3824_ACEOF
3825cat confdefs.h >>conftest.$ac_ext
3826cat >>conftest.$ac_ext <<_ACEOF
3827/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003828#ifdef _AIX
3829 yes
3830#endif
3831
Martin v. Löwis11437992002-04-12 09:54:03 +00003832_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003834 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 { echo "$as_me:$LINENO: result: yes" >&5
3836echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003838#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003839_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003840
3841else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842 { echo "$as_me:$LINENO: result: no" >&5
3843echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003844fi
3845rm -f conftest*
3846
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003848
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003849# Check for unsupported systems
3850case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003851atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003852 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3853 echo See README for details.
3854 exit 1;;
3855esac
3856
Michael W. Hudson54241132001-12-07 15:38:26 +00003857
Martin v. Löwiseba40652007-08-30 20:10:57 +00003858{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3859echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003862if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003864 case $withval in
3865 no) EXEEXT=;;
3866 yes) EXEEXT=.exe;;
3867 *) EXEEXT=$withval;;
3868 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869fi
3870
3871{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3872echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003873
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003874# Test whether we're running on a non-case-sensitive system, in which
3875# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003876
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3878echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003879if test ! -d CaseSensitiveTestDir; then
3880mkdir CaseSensitiveTestDir
3881fi
3882
3883if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003884then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003885 { echo "$as_me:$LINENO: result: yes" >&5
3886echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003887 BUILDEXEEXT=.exe
3888else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003889 { echo "$as_me:$LINENO: result: no" >&5
3890echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003891 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003892fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003893rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003894
Guido van Rossumdd997f71998-10-07 19:58:26 +00003895case $MACHDEP in
3896bsdos*)
3897 case $CC in
3898 gcc) CC="$CC -D_HAVE_BSDI";;
3899 esac;;
3900esac
3901
Guido van Rossum24b1e751997-08-21 02:29:16 +00003902case $ac_sys_system in
3903hp*|HP*)
3904 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003905 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003906 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003907Monterey*)
3908 case $CC in
3909 cc) CC="$CC -Wl,-Bexport";;
3910 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003911SunOS*)
3912 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003913
3914cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003915#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003916_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003917
3918 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003919esac
3920
Michael W. Hudson54241132001-12-07 15:38:26 +00003921
3922
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3924echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003925if test -z "$LIBRARY"
3926then
3927 LIBRARY='libpython$(VERSION).a'
3928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003929{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3930echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003931
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003932# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003933# name of the library into which to insert object files). BLDLIBRARY is also
3934# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3935# is blank as the main program is not linked directly against LDLIBRARY.
3936# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3937# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3938# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3939# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003940#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003941# RUNSHARED is used to run shared python without installed libraries
3942#
3943# INSTSONAME is the name of the shared library that will be use to install
3944# on the system - some systems like version suffix, others don't
3945
3946
Michael W. Hudson54241132001-12-07 15:38:26 +00003947
3948
3949
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003950
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003951LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003952BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003953INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003954DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003955LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003956RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003957
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003958# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003959# If CXX is set, and if it is needed to link a main function that was
3960# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3961# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003962# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003963# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003964
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965{ echo "$as_me:$LINENO: checking LINKCC" >&5
3966echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003967if test -z "$LINKCC"
3968then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003969 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003970 case $ac_sys_system in
3971 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003972 exp_extra="\"\""
3973 if test $ac_sys_release -ge 5 -o \
3974 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3975 exp_extra="."
3976 fi
3977 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003978 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003979 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003980 QNX*)
3981 # qcc must be used because the other compilers do not
3982 # support -N.
3983 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003984 esac
3985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003986{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3987echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003988
Martin v. Löwiseba40652007-08-30 20:10:57 +00003989{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3990echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3991# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003992if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003993 enableval=$enable_shared;
3994fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003995
Martin v. Löwis1142de32002-03-29 16:28:31 +00003996
3997if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003998then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003999 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004000 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004001 enable_shared="yes";;
4002 *)
4003 enable_shared="no";;
4004 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4007echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004008
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4010echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4011# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004012if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004013 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004014 CC="$CC -pg"
4015 if test "$cross_compiling" = yes; then
4016 ac_enable_profiling="no"
4017else
4018 cat >conftest.$ac_ext <<_ACEOF
4019/* confdefs.h. */
4020_ACEOF
4021cat confdefs.h >>conftest.$ac_ext
4022cat >>conftest.$ac_ext <<_ACEOF
4023/* end confdefs.h. */
4024int main() { return 0; }
4025_ACEOF
4026rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004027if { (ac_try="$ac_link"
4028case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
4032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4033 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004034 ac_status=$?
4035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004037 { (case "(($ac_try" in
4038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4039 *) ac_try_echo=$ac_try;;
4040esac
4041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4042 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004043 ac_status=$?
4044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4045 (exit $ac_status); }; }; then
4046 ac_enable_profiling="yes"
4047else
4048 echo "$as_me: program exited with status $ac_status" >&5
4049echo "$as_me: failed program was:" >&5
4050sed 's/^/| /' conftest.$ac_ext >&5
4051
4052( exit $ac_status )
4053ac_enable_profiling="no"
4054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055rm -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 +00004056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004057
4058
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004059 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004060fi
4061
4062{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4063echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004064
4065case "$ac_enable_profiling" in
4066 "yes")
4067 BASECFLAGS="-pg $BASECFLAGS"
4068 LDFLAGS="-pg $LDFLAGS"
4069 ;;
4070esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004071
Martin v. Löwiseba40652007-08-30 20:10:57 +00004072{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4073echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004074
Guido van Rossumb8552162001-09-05 14:58:11 +00004075# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4076# library that we build, but we do not want to link against it (we
4077# will find it with a -framework option). For this reason there is an
4078# extra variable BLDLIBRARY against which Python and the extension
4079# modules are linked, BLDLIBRARY. This is normally the same as
4080# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004081if test "$enable_framework"
4082then
4083 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004084 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004085 BLDLIBRARY=''
4086else
4087 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004088fi
Jack Jansene578a632001-08-15 01:27:14 +00004089
Martin v. Löwis1142de32002-03-29 16:28:31 +00004090# Other platforms follow
4091if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004092
4093cat >>confdefs.h <<\_ACEOF
4094#define Py_ENABLE_SHARED 1
4095_ACEOF
4096
Martin v. Löwis1142de32002-03-29 16:28:31 +00004097 case $ac_sys_system in
4098 BeOS*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 ;;
4101 CYGWIN*)
4102 LDLIBRARY='libpython$(VERSION).dll.a'
4103 DLLLIBRARY='libpython$(VERSION).dll'
4104 ;;
4105 SunOS*)
4106 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004107 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004108 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004109 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004110 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004111 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004112 LDLIBRARY='libpython$(VERSION).so'
4113 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004114 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004115 case $ac_sys_system in
4116 FreeBSD*)
4117 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4118 ;;
4119 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004120 INSTSONAME="$LDLIBRARY".$SOVERSION
4121 ;;
4122 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004123 case `uname -m` in
4124 ia64)
4125 LDLIBRARY='libpython$(VERSION).so'
4126 ;;
4127 *)
4128 LDLIBRARY='libpython$(VERSION).sl'
4129 ;;
4130 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004131 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004132 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004133 ;;
4134 OSF*)
4135 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004136 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004137 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004139 atheos*)
4140 LDLIBRARY='libpython$(VERSION).so'
4141 BLDLIBRARY='-L. -lpython$(VERSION)'
4142 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4143 ;;
Ronald Oussorene9cce8e2009-01-02 10:46:42 +00004144 Darwin*)
4145 LDLIBRARY='libpython$(VERSION).dylib'
4146 BLDLIBRARY='-L. -lpython$(VERSION)'
4147 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4148 ;;
4149
Martin v. Löwis1142de32002-03-29 16:28:31 +00004150 esac
Jason Tishler30765592003-09-04 11:04:06 +00004151else # shared is disabled
4152 case $ac_sys_system in
4153 CYGWIN*)
4154 BLDLIBRARY='$(LIBRARY)'
4155 LDLIBRARY='libpython$(VERSION).dll.a'
4156 ;;
4157 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004158fi
4159
Martin v. Löwiseba40652007-08-30 20:10:57 +00004160{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4161echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004162
Martin v. Löwis11437992002-04-12 09:54:03 +00004163if test -n "$ac_tool_prefix"; then
4164 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4165set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168if test "${ac_cv_prog_RANLIB+set}" = set; then
4169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170else
4171 if test -n "$RANLIB"; then
4172 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4173else
Martin v. Löwis11437992002-04-12 09:54:03 +00004174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175for as_dir in $PATH
4176do
4177 IFS=$as_save_IFS
4178 test -z "$as_dir" && as_dir=.
4179 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004180 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 +00004181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4182 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4183 break 2
4184 fi
4185done
4186done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4194echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004196 { echo "$as_me:$LINENO: result: no" >&5
4197echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004198fi
4199
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
4202if test -z "$ac_cv_prog_RANLIB"; then
4203 ac_ct_RANLIB=$RANLIB
4204 # Extract the first word of "ranlib", so it can be a program name with args.
4205set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004206{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4207echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004208if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4209 echo $ECHO_N "(cached) $ECHO_C" >&6
4210else
4211 if test -n "$ac_ct_RANLIB"; then
4212 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4213else
4214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH
4216do
4217 IFS=$as_save_IFS
4218 test -z "$as_dir" && as_dir=.
4219 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004220 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 +00004221 ac_cv_prog_ac_ct_RANLIB="ranlib"
4222 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4223 break 2
4224 fi
4225done
4226done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004228
Martin v. Löwis11437992002-04-12 09:54:03 +00004229fi
4230fi
4231ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4232if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4234echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004235else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 { echo "$as_me:$LINENO: result: no" >&5
4237echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004238fi
4239
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240 if test "x$ac_ct_RANLIB" = x; then
4241 RANLIB=":"
4242 else
4243 case $cross_compiling:$ac_tool_warned in
4244yes:)
4245{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4246whose name does not start with the host triplet. If you think this
4247configuration is useful to you, please write to autoconf@gnu.org." >&5
4248echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4249whose name does not start with the host triplet. If you think this
4250configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4251ac_tool_warned=yes ;;
4252esac
4253 RANLIB=$ac_ct_RANLIB
4254 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004255else
4256 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258
4259
Guido van Rossum7f43da71994-08-01 12:15:30 +00004260for ac_prog in ar aal
4261do
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004266if test "${ac_cv_prog_AR+set}" = set; then
4267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268else
4269 if test -n "$AR"; then
4270 ac_cv_prog_AR="$AR" # Let the user override the test.
4271else
Martin v. Löwis11437992002-04-12 09:54:03 +00004272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4273for as_dir in $PATH
4274do
4275 IFS=$as_save_IFS
4276 test -z "$as_dir" && as_dir=.
4277 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278 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 +00004279 ac_cv_prog_AR="$ac_prog"
4280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4281 break 2
4282 fi
4283done
4284done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004286
Guido van Rossum7f43da71994-08-01 12:15:30 +00004287fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004289AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 { echo "$as_me:$LINENO: result: $AR" >&5
4292echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004294 { echo "$as_me:$LINENO: result: no" >&5
4295echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004297
Martin v. Löwiseba40652007-08-30 20:10:57 +00004298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004300done
4301test -n "$AR" || AR="ar"
4302
Michael W. Hudson54241132001-12-07 15:38:26 +00004303
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004304
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004305# Extract the first word of "svnversion", so it can be a program name with args.
4306set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004307{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004309if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
4311else
4312 if test -n "$SVNVERSION"; then
4313 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4314else
4315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316for as_dir in $PATH
4317do
4318 IFS=$as_save_IFS
4319 test -z "$as_dir" && as_dir=.
4320 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321 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 +00004322 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4324 break 2
4325 fi
4326done
4327done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004329
Martin v. Löwisff600232006-04-03 19:12:32 +00004330 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004331fi
4332fi
4333SVNVERSION=$ac_cv_prog_SVNVERSION
4334if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4336echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004337else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004338 { echo "$as_me:$LINENO: result: no" >&5
4339echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004340fi
4341
Martin v. Löwiseba40652007-08-30 20:10:57 +00004342
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004343if test $SVNVERSION = found
4344then
4345 SVNVERSION="svnversion \$(srcdir)"
4346else
Benjamin Peterson2eb65452009-05-23 19:35:33 +00004347 SVNVERSION="echo Unversioned directory"
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004348fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004349
Neil Schemenauera42c8272001-03-31 00:01:55 +00004350case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004351bsdos*|hp*|HP*)
4352 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004353 if test -z "$INSTALL"
4354 then
4355 INSTALL="${srcdir}/install-sh -c"
4356 fi
4357esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004358ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004359for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4360 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004361 ac_aux_dir=$ac_dir
4362 ac_install_sh="$ac_aux_dir/install-sh -c"
4363 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004364 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004365 ac_aux_dir=$ac_dir
4366 ac_install_sh="$ac_aux_dir/install.sh -c"
4367 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004368 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004369 ac_aux_dir=$ac_dir
4370 ac_install_sh="$ac_aux_dir/shtool install -c"
4371 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004372 fi
4373done
4374if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4376echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004377 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004379
4380# These three variables are undocumented and unsupported,
4381# and are intended to be withdrawn in a future Autoconf release.
4382# They can cause serious problems if a builder's source tree is in a directory
4383# whose full name contains unusual characters.
4384ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4385ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4386ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4387
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004388
4389# Find a good install program. We prefer a C program (faster),
4390# so one script is as good as another. But avoid the broken or
4391# incompatible versions:
4392# SysV /etc/install, /usr/sbin/install
4393# SunOS /usr/etc/install
4394# IRIX /sbin/install
4395# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004396# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004397# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4398# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4399# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004400# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004401# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4403echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004404if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004405if test "${ac_cv_path_install+set}" = set; then
4406 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004407else
Martin v. Löwis11437992002-04-12 09:54:03 +00004408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4409for as_dir in $PATH
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
4413 # Account for people who put trailing slashes in PATH elements.
4414case $as_dir/ in
4415 ./ | .// | /cC/* | \
4416 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004417 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004418 /usr/ucb/* ) ;;
4419 *)
4420 # OSF1 and SCO ODT 3.0 have their own names for install.
4421 # Don't use installbsd from OSF since it installs stuff as root
4422 # by default.
4423 for ac_prog in ginstall scoinst install; do
4424 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004425 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 +00004426 if test $ac_prog = install &&
4427 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4428 # AIX install. It has an incompatible calling convention.
4429 :
4430 elif test $ac_prog = install &&
4431 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4432 # program-specific install script used by HP pwplus--don't use.
4433 :
4434 else
4435 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4436 break 3
4437 fi
4438 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004440 done
4441 ;;
4442esac
4443done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004445
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004446
4447fi
4448 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004449 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004450 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451 # As a last resort, use the slow shell script. Don't cache a
4452 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004453 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004454 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004455 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004456 fi
4457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004458{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4459echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004460
4461# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4462# It thinks the first close brace ends the variable substitution.
4463test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4464
Martin v. Löwis11437992002-04-12 09:54:03 +00004465test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004466
4467test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4468
Michael W. Hudson54241132001-12-07 15:38:26 +00004469
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004470# Not every filesystem supports hard links
4471
4472if test -z "$LN" ; then
4473 case $ac_sys_system in
4474 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004475 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004476 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004477 *) LN=ln;;
4478 esac
4479fi
4480
Fred Drake109d9862001-07-11 06:27:56 +00004481# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004482{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4483echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004484
Martin v. Löwiseba40652007-08-30 20:10:57 +00004485# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004486if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004488if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004489then
4490
4491cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004492#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004493_ACEOF
4494
Martin v. Löwiseba40652007-08-30 20:10:57 +00004495 { echo "$as_me:$LINENO: result: yes" >&5
4496echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004497 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004498else { echo "$as_me:$LINENO: result: no" >&5
4499echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004500fi
4501else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004502 { echo "$as_me:$LINENO: result: no" >&5
4503echo "${ECHO_T}no" >&6; }
4504fi
4505
Fred Drake109d9862001-07-11 06:27:56 +00004506
Skip Montanarodecc6a42003-01-01 20:07:49 +00004507# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4508# merged with this chunk of code?
4509
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004510# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004511# ------------------------
4512# (The following bit of code is complicated enough - please keep things
4513# indented properly. Just pretend you're editing Python code. ;-)
4514
4515# There are two parallel sets of case statements below, one that checks to
4516# see if OPT was set and one that does BASECFLAGS setting based upon
4517# compiler and platform. BASECFLAGS tweaks need to be made even if the
4518# user set OPT.
4519
4520# tweak OPT based on compiler and platform, only if the user didn't set
4521# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004522
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004523if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004524then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004525 case $GCC in
4526 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004527 if test "$CC" != 'g++' ; then
4528 STRICT_PROTO="-Wstrict-prototypes"
4529 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004530 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4531 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4532 WRAP="-fwrapv"
4533 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004534 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004535 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004536 if test "$Py_DEBUG" = 'true' ; then
4537 # Optimization messes up debuggers, so turn it off for
4538 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004539 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004540 else
Thomas Hellere5529592007-12-13 21:20:29 +00004541 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004542 fi
4543 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004544 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004545 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004547 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004548 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004549 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4550 ;;
4551 esac
Fred Drake109d9862001-07-11 06:27:56 +00004552 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004553
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004554 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004555 OPT="-O"
4556 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004557 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004558
4559 # The current (beta) Monterey compiler dies with optimizations
4560 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004561 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 Monterey*)
4563 OPT=""
4564 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004565 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004566
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004567fi
4568
Skip Montanarodecc6a42003-01-01 20:07:49 +00004569
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004570
4571# The -arch flags for universal builds on OSX
4572UNIVERSAL_ARCH_FLAGS=
4573
4574
Skip Montanarodecc6a42003-01-01 20:07:49 +00004575# tweak BASECFLAGS based on compiler and platform
4576case $GCC in
4577yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004578 # Python violates C99 rules, by casting between incompatible
4579 # pointer types. GCC may generate bad code as a result of that,
4580 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004581 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4582echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004583 ac_save_cc="$CC"
4584 CC="$CC -fno-strict-aliasing"
4585 if test "$cross_compiling" = yes; then
4586 ac_cv_no_strict_aliasing_ok=no
4587else
4588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004589/* confdefs.h. */
4590_ACEOF
4591cat confdefs.h >>conftest.$ac_ext
4592cat >>conftest.$ac_ext <<_ACEOF
4593/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004594int main() { return 0; }
4595_ACEOF
4596rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004597if { (ac_try="$ac_link"
4598case "(($ac_try" in
4599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4600 *) ac_try_echo=$ac_try;;
4601esac
4602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4603 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004607 { (case "(($ac_try" in
4608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4609 *) ac_try_echo=$ac_try;;
4610esac
4611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4612 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; }; then
4616 ac_cv_no_strict_aliasing_ok=yes
4617else
4618 echo "$as_me: program exited with status $ac_status" >&5
4619echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004620sed 's/^/| /' conftest.$ac_ext >&5
4621
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004622( exit $ac_status )
4623ac_cv_no_strict_aliasing_ok=no
4624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004625rm -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 +00004626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004627
4628
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004629 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004630 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4631echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004632 if test $ac_cv_no_strict_aliasing_ok = yes
4633 then
4634 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4635 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004636
4637 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4638 # support. Without this, treatment of subnormals doesn't follow
4639 # the standard.
4640 case $ac_sys_machine in
4641 alpha*)
4642 BASECFLAGS="$BASECFLAGS -mieee"
4643 ;;
4644 esac
4645
Skip Montanarodecc6a42003-01-01 20:07:49 +00004646 case $ac_sys_system in
4647 SCO_SV*)
4648 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4649 ;;
4650 # is there any other compiler on Darwin besides gcc?
4651 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004652 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4653 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004654
4655
Ronald Oussoren988117f2006-04-29 11:31:35 +00004656 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004657 UNIVERSAL_ARCH_FLAGS=""
4658 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004660 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004661
4662 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4663 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4664
4665 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4666 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004667 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004668
4669 else
4670 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4671echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4672 { (exit 1); exit 1; }; }
4673
4674 fi
4675
4676
4677 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004678 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004679 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4680 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4681 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004682 fi
4683
Benjamin Peterson4347c442008-07-17 15:59:24 +00004684 # Calculate the right deployment target for this build.
4685 #
4686 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4687 if test ${cur_target} '>' 10.2; then
4688 cur_target=10.3
4689 fi
4690 if test "${UNIVERSAL_ARCHS}" = "all"; then
4691 # Ensure that the default platform for a 4-way
4692 # universal build is OSX 10.5, that's the first
4693 # OS release where 4-way builds make sense.
4694 cur_target='10.5'
4695 fi
4696 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4697
4698 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4699 # environment with a value that is the same as what we'll use
4700 # in the Makefile to ensure that we'll get the same compiler
4701 # environment during configure and build time.
4702 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4703 export MACOSX_DEPLOYMENT_TARGET
4704 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4705
Skip Montanarodecc6a42003-01-01 20:07:49 +00004706 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004707 OSF*)
4708 BASECFLAGS="$BASECFLAGS -mieee"
4709 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004710 esac
4711 ;;
4712
4713*)
4714 case $ac_sys_system in
4715 OpenUNIX*|UnixWare*)
4716 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4717 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004718 OSF*)
4719 BASECFLAGS="$BASECFLAGS -ieee -std"
4720 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004721 SCO_SV*)
4722 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4723 ;;
4724 esac
4725 ;;
4726esac
4727
Fred Drakee1ceaa02001-12-04 20:55:47 +00004728if test "$Py_DEBUG" = 'true'; then
4729 :
4730else
4731 OPT="-DNDEBUG $OPT"
4732fi
4733
Guido van Rossum563e7081996-09-10 18:20:48 +00004734if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004735then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004736 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004737fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004738
Neal Norwitz020c46a2006-01-07 21:39:28 +00004739# disable check for icc since it seems to pass, but generates a warning
4740if test "$CC" = icc
4741then
4742 ac_cv_opt_olimit_ok=no
4743fi
4744
Martin v. Löwiseba40652007-08-30 20:10:57 +00004745{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4746echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004747if test "${ac_cv_opt_olimit_ok+set}" = set; then
4748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004749else
4750 ac_save_cc="$CC"
4751CC="$CC -OPT:Olimit=0"
4752if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004753 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004754else
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004756/* confdefs.h. */
4757_ACEOF
4758cat confdefs.h >>conftest.$ac_ext
4759cat >>conftest.$ac_ext <<_ACEOF
4760/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004761int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004762_ACEOF
4763rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004764if { (ac_try="$ac_link"
4765case "(($ac_try" in
4766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4767 *) ac_try_echo=$ac_try;;
4768esac
4769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4770 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004771 ac_status=$?
4772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004774 { (case "(($ac_try" in
4775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4776 *) ac_try_echo=$ac_try;;
4777esac
4778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 ac_status=$?
4781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4782 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004783 ac_cv_opt_olimit_ok=yes
4784else
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 echo "$as_me: program exited with status $ac_status" >&5
4786echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004787sed 's/^/| /' conftest.$ac_ext >&5
4788
Martin v. Löwis11437992002-04-12 09:54:03 +00004789( exit $ac_status )
4790ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004792rm -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 +00004793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004794
4795
Guido van Rossum91922671997-10-09 20:24:13 +00004796CC="$ac_save_cc"
4797fi
4798
Martin v. Löwiseba40652007-08-30 20:10:57 +00004799{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4800echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004801if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004802 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004803 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4804 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4805 # environment?
4806 Darwin*)
4807 ;;
4808 *)
4809 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4810 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004811 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004812else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004813 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4814echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 if test "${ac_cv_olimit_ok+set}" = set; then
4816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004817else
4818 ac_save_cc="$CC"
4819 CC="$CC -Olimit 1500"
4820 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004821 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004822else
Martin v. Löwis11437992002-04-12 09:54:03 +00004823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004824/* confdefs.h. */
4825_ACEOF
4826cat confdefs.h >>conftest.$ac_ext
4827cat >>conftest.$ac_ext <<_ACEOF
4828/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004829int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004830_ACEOF
4831rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004832if { (ac_try="$ac_link"
4833case "(($ac_try" in
4834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4835 *) ac_try_echo=$ac_try;;
4836esac
4837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4838 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 ac_status=$?
4840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 { (case "(($ac_try" in
4843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4844 *) ac_try_echo=$ac_try;;
4845esac
4846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4847 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004851 ac_cv_olimit_ok=yes
4852else
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 echo "$as_me: program exited with status $ac_status" >&5
4854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004855sed 's/^/| /' conftest.$ac_ext >&5
4856
Martin v. Löwis11437992002-04-12 09:54:03 +00004857( exit $ac_status )
4858ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004860rm -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 +00004861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862
4863
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004864 CC="$ac_save_cc"
4865fi
4866
Martin v. Löwiseba40652007-08-30 20:10:57 +00004867 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4868echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004869 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004870 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004871 fi
4872fi
4873
Martin v. Löwisaac13162006-10-19 10:58:46 +00004874# Check whether GCC supports PyArg_ParseTuple format
4875if test "$GCC" = "yes"
4876then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004877 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4878echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004879 save_CFLAGS=$CFLAGS
4880 CFLAGS="$CFLAGS -Werror"
4881 cat >conftest.$ac_ext <<_ACEOF
4882/* confdefs.h. */
4883_ACEOF
4884cat confdefs.h >>conftest.$ac_ext
4885cat >>conftest.$ac_ext <<_ACEOF
4886/* end confdefs.h. */
4887
4888 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4889
4890int
4891main ()
4892{
4893
4894 ;
4895 return 0;
4896}
4897_ACEOF
4898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899if { (ac_try="$ac_compile"
4900case "(($ac_try" in
4901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4902 *) ac_try_echo=$ac_try;;
4903esac
4904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004906 ac_status=$?
4907 grep -v '^ *+' conftest.er1 >conftest.err
4908 rm -f conftest.er1
4909 cat conftest.err >&5
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004911 (exit $ac_status); } && {
4912 test -z "$ac_c_werror_flag" ||
4913 test ! -s conftest.err
4914 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004915
4916cat >>confdefs.h <<\_ACEOF
4917#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4918_ACEOF
4919
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920 { echo "$as_me:$LINENO: result: yes" >&5
4921echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004922else
4923 echo "$as_me: failed program was:" >&5
4924sed 's/^/| /' conftest.$ac_ext >&5
4925
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926 { echo "$as_me:$LINENO: result: no" >&5
4927echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004928
4929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004930
4931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004932 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004933fi
4934
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004935# On some compilers, pthreads are available without further options
4936# (e.g. MacOS X). On some of these systems, the compiler will not
4937# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4938# So we have to see first whether pthreads are available without
4939# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4941echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004942if test "${ac_cv_pthread_is_default+set}" = set; then
4943 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004944else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004945 if test "$cross_compiling" = yes; then
4946 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004947else
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004949/* confdefs.h. */
4950_ACEOF
4951cat confdefs.h >>conftest.$ac_ext
4952cat >>conftest.$ac_ext <<_ACEOF
4953/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004954
Martin v. Löwis130fb172001-07-19 11:00:41 +00004955#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004956
4957void* routine(void* p){return NULL;}
4958
4959int main(){
4960 pthread_t p;
4961 if(pthread_create(&p,NULL,routine,NULL)!=0)
4962 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004963 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004964 return 0;
4965}
4966
Martin v. Löwis11437992002-04-12 09:54:03 +00004967_ACEOF
4968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969if { (ac_try="$ac_link"
4970case "(($ac_try" in
4971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4972 *) ac_try_echo=$ac_try;;
4973esac
4974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4975 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 { (case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4982esac
4983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004988
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004989 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004990 ac_cv_kthread=no
4991 ac_cv_pthread=no
4992
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 echo "$as_me: program exited with status $ac_status" >&5
4995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004996sed 's/^/| /' conftest.$ac_ext >&5
4997
Martin v. Löwis11437992002-04-12 09:54:03 +00004998( exit $ac_status )
4999ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005001rm -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 +00005002fi
5003
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004
5005
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005006fi
5007
Martin v. Löwiseba40652007-08-30 20:10:57 +00005008{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5009echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005010
Michael W. Hudson54241132001-12-07 15:38:26 +00005011
Martin v. Löwis11437992002-04-12 09:54:03 +00005012if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005013then
5014 ac_cv_kpthread=no
5015else
5016# -Kpthread, if available, provides the right #defines
5017# and linker options to make pthread_create available
5018# Some compilers won't report that they do not support -Kpthread,
5019# so we need to run a program to see whether it really made the
5020# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5022echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005023if test "${ac_cv_kpthread+set}" = set; then
5024 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005025else
5026 ac_save_cc="$CC"
5027CC="$CC -Kpthread"
5028if test "$cross_compiling" = yes; then
5029 ac_cv_kpthread=no
5030else
Martin v. Löwis11437992002-04-12 09:54:03 +00005031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005032/* confdefs.h. */
5033_ACEOF
5034cat confdefs.h >>conftest.$ac_ext
5035cat >>conftest.$ac_ext <<_ACEOF
5036/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005037
5038#include <pthread.h>
5039
5040void* routine(void* p){return NULL;}
5041
5042int main(){
5043 pthread_t p;
5044 if(pthread_create(&p,NULL,routine,NULL)!=0)
5045 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005046 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005047 return 0;
5048}
5049
Martin v. Löwis11437992002-04-12 09:54:03 +00005050_ACEOF
5051rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005052if { (ac_try="$ac_link"
5053case "(($ac_try" in
5054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5055 *) ac_try_echo=$ac_try;;
5056esac
5057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5058 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 ac_status=$?
5060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005062 { (case "(($ac_try" in
5063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5064 *) ac_try_echo=$ac_try;;
5065esac
5066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5067 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005068 ac_status=$?
5069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005071 ac_cv_kpthread=yes
5072else
Martin v. Löwis11437992002-04-12 09:54:03 +00005073 echo "$as_me: program exited with status $ac_status" >&5
5074echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005075sed 's/^/| /' conftest.$ac_ext >&5
5076
Martin v. Löwis11437992002-04-12 09:54:03 +00005077( exit $ac_status )
5078ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005080rm -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 +00005081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005082
5083
Martin v. Löwis130fb172001-07-19 11:00:41 +00005084CC="$ac_save_cc"
5085fi
5086
Martin v. Löwiseba40652007-08-30 20:10:57 +00005087{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5088echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005089fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005090
Skip Montanarod8d39a02003-07-10 20:44:10 +00005091if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005092then
5093# -Kthread, if available, provides the right #defines
5094# and linker options to make pthread_create available
5095# Some compilers won't report that they do not support -Kthread,
5096# so we need to run a program to see whether it really made the
5097# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005098{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5099echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005100if test "${ac_cv_kthread+set}" = set; then
5101 echo $ECHO_N "(cached) $ECHO_C" >&6
5102else
5103 ac_save_cc="$CC"
5104CC="$CC -Kthread"
5105if test "$cross_compiling" = yes; then
5106 ac_cv_kthread=no
5107else
5108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005109/* confdefs.h. */
5110_ACEOF
5111cat confdefs.h >>conftest.$ac_ext
5112cat >>conftest.$ac_ext <<_ACEOF
5113/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005114
5115#include <pthread.h>
5116
5117void* routine(void* p){return NULL;}
5118
5119int main(){
5120 pthread_t p;
5121 if(pthread_create(&p,NULL,routine,NULL)!=0)
5122 return 1;
5123 (void)pthread_detach(p);
5124 return 0;
5125}
5126
5127_ACEOF
5128rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005129if { (ac_try="$ac_link"
5130case "(($ac_try" in
5131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5132 *) ac_try_echo=$ac_try;;
5133esac
5134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5135 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005139 { (case "(($ac_try" in
5140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5141 *) ac_try_echo=$ac_try;;
5142esac
5143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5144 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005145 ac_status=$?
5146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147 (exit $ac_status); }; }; then
5148 ac_cv_kthread=yes
5149else
5150 echo "$as_me: program exited with status $ac_status" >&5
5151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005152sed 's/^/| /' conftest.$ac_ext >&5
5153
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005154( exit $ac_status )
5155ac_cv_kthread=no
5156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005157rm -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 +00005158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005159
5160
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005161CC="$ac_save_cc"
5162fi
5163
Martin v. Löwiseba40652007-08-30 20:10:57 +00005164{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5165echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005166fi
5167
Skip Montanarod8d39a02003-07-10 20:44:10 +00005168if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005169then
5170# -pthread, if available, provides the right #defines
5171# and linker options to make pthread_create available
5172# Some compilers won't report that they do not support -pthread,
5173# so we need to run a program to see whether it really made the
5174# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5176echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005177if test "${ac_cv_thread+set}" = set; then
5178 echo $ECHO_N "(cached) $ECHO_C" >&6
5179else
5180 ac_save_cc="$CC"
5181CC="$CC -pthread"
5182if test "$cross_compiling" = yes; then
5183 ac_cv_pthread=no
5184else
5185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005186/* confdefs.h. */
5187_ACEOF
5188cat confdefs.h >>conftest.$ac_ext
5189cat >>conftest.$ac_ext <<_ACEOF
5190/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005191
5192#include <pthread.h>
5193
5194void* routine(void* p){return NULL;}
5195
5196int main(){
5197 pthread_t p;
5198 if(pthread_create(&p,NULL,routine,NULL)!=0)
5199 return 1;
5200 (void)pthread_detach(p);
5201 return 0;
5202}
5203
5204_ACEOF
5205rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005206if { (ac_try="$ac_link"
5207case "(($ac_try" in
5208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5209 *) ac_try_echo=$ac_try;;
5210esac
5211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5212 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005213 ac_status=$?
5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005216 { (case "(($ac_try" in
5217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5218 *) ac_try_echo=$ac_try;;
5219esac
5220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5221 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005222 ac_status=$?
5223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5224 (exit $ac_status); }; }; then
5225 ac_cv_pthread=yes
5226else
5227 echo "$as_me: program exited with status $ac_status" >&5
5228echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005229sed 's/^/| /' conftest.$ac_ext >&5
5230
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005231( exit $ac_status )
5232ac_cv_pthread=no
5233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005234rm -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 +00005235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005236
5237
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005238CC="$ac_save_cc"
5239fi
5240
Martin v. Löwiseba40652007-08-30 20:10:57 +00005241{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5242echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005243fi
5244
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005245# If we have set a CC compiler flag for thread support then
5246# check if it works for CXX, too.
5247ac_cv_cxx_thread=no
5248if test ! -z "$CXX"
5249then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005250{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5251echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005252ac_save_cxx="$CXX"
5253
5254if test "$ac_cv_kpthread" = "yes"
5255then
5256 CXX="$CXX -Kpthread"
5257 ac_cv_cxx_thread=yes
5258elif test "$ac_cv_kthread" = "yes"
5259then
5260 CXX="$CXX -Kthread"
5261 ac_cv_cxx_thread=yes
5262elif test "$ac_cv_pthread" = "yes"
5263then
5264 CXX="$CXX -pthread"
5265 ac_cv_cxx_thread=yes
5266fi
5267
5268if test $ac_cv_cxx_thread = yes
5269then
5270 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5271 $CXX -c conftest.$ac_ext 2>&5
5272 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5273 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5274 then
5275 ac_cv_cxx_thread=yes
5276 else
5277 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005278 fi
5279 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005281{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5282echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005283fi
5284CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005285
Michael W. Hudson54241132001-12-07 15:38:26 +00005286
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005287# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005288{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5289echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005290if test "${ac_cv_header_stdc+set}" = set; then
5291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292else
Martin v. Löwis11437992002-04-12 09:54:03 +00005293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005294/* confdefs.h. */
5295_ACEOF
5296cat confdefs.h >>conftest.$ac_ext
5297cat >>conftest.$ac_ext <<_ACEOF
5298/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299#include <stdlib.h>
5300#include <stdarg.h>
5301#include <string.h>
5302#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005303
Skip Montanaro6dead952003-09-25 14:50:04 +00005304int
5305main ()
5306{
5307
5308 ;
5309 return 0;
5310}
Martin v. Löwis11437992002-04-12 09:54:03 +00005311_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005313if { (ac_try="$ac_compile"
5314case "(($ac_try" in
5315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5316 *) ac_try_echo=$ac_try;;
5317esac
5318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005321 grep -v '^ *+' conftest.er1 >conftest.err
5322 rm -f conftest.er1
5323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005325 (exit $ac_status); } && {
5326 test -z "$ac_c_werror_flag" ||
5327 test ! -s conftest.err
5328 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005329 ac_cv_header_stdc=yes
5330else
Martin v. Löwis11437992002-04-12 09:54:03 +00005331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005332sed 's/^/| /' conftest.$ac_ext >&5
5333
Martin v. Löwiseba40652007-08-30 20:10:57 +00005334 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005336
5337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005338
5339if test $ac_cv_header_stdc = yes; then
5340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005342/* confdefs.h. */
5343_ACEOF
5344cat confdefs.h >>conftest.$ac_ext
5345cat >>conftest.$ac_ext <<_ACEOF
5346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005347#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005348
5349_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005351 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005352 :
5353else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354 ac_cv_header_stdc=no
5355fi
5356rm -f conftest*
5357
5358fi
5359
5360if test $ac_cv_header_stdc = yes; then
5361 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005363/* confdefs.h. */
5364_ACEOF
5365cat confdefs.h >>conftest.$ac_ext
5366cat >>conftest.$ac_ext <<_ACEOF
5367/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005368#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005369
5370_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005372 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373 :
5374else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375 ac_cv_header_stdc=no
5376fi
5377rm -f conftest*
5378
5379fi
5380
5381if test $ac_cv_header_stdc = yes; then
5382 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005383 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005384 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005385else
Martin v. Löwis11437992002-04-12 09:54:03 +00005386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005387/* confdefs.h. */
5388_ACEOF
5389cat confdefs.h >>conftest.$ac_ext
5390cat >>conftest.$ac_ext <<_ACEOF
5391/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005392#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005393#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005394#if ((' ' & 0x0FF) == 0x020)
5395# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5396# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5397#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005398# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005399 (('a' <= (c) && (c) <= 'i') \
5400 || ('j' <= (c) && (c) <= 'r') \
5401 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005402# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5403#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005404
Martin v. Löwis11437992002-04-12 09:54:03 +00005405#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5406int
5407main ()
5408{
5409 int i;
5410 for (i = 0; i < 256; i++)
5411 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005412 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005413 return 2;
5414 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005415}
5416_ACEOF
5417rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005418if { (ac_try="$ac_link"
5419case "(($ac_try" in
5420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5421 *) ac_try_echo=$ac_try;;
5422esac
5423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5424 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005425 ac_status=$?
5426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005428 { (case "(($ac_try" in
5429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5430 *) ac_try_echo=$ac_try;;
5431esac
5432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5433 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005437 :
5438else
Martin v. Löwis11437992002-04-12 09:54:03 +00005439 echo "$as_me: program exited with status $ac_status" >&5
5440echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005441sed 's/^/| /' conftest.$ac_ext >&5
5442
Martin v. Löwis11437992002-04-12 09:54:03 +00005443( exit $ac_status )
5444ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5447fi
5448
5449
Michael W. Hudson54241132001-12-07 15:38:26 +00005450fi
5451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005452{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5453echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005454if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005455
5456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005457#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005458_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005459
5460fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005461
Skip Montanarob9820a32004-01-17 00:16:12 +00005462# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005473 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005474do
5475as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005476{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5478if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005479 echo $ECHO_N "(cached) $ECHO_C" >&6
5480else
5481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005482/* confdefs.h. */
5483_ACEOF
5484cat confdefs.h >>conftest.$ac_ext
5485cat >>conftest.$ac_ext <<_ACEOF
5486/* end confdefs.h. */
5487$ac_includes_default
5488
5489#include <$ac_header>
5490_ACEOF
5491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005492if { (ac_try="$ac_compile"
5493case "(($ac_try" in
5494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5495 *) ac_try_echo=$ac_try;;
5496esac
5497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5498 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005500 grep -v '^ *+' conftest.er1 >conftest.err
5501 rm -f conftest.er1
5502 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005504 (exit $ac_status); } && {
5505 test -z "$ac_c_werror_flag" ||
5506 test ! -s conftest.err
5507 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005508 eval "$as_ac_Header=yes"
5509else
5510 echo "$as_me: failed program was:" >&5
5511sed 's/^/| /' conftest.$ac_ext >&5
5512
Martin v. Löwiseba40652007-08-30 20:10:57 +00005513 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005515
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005518ac_res=`eval echo '${'$as_ac_Header'}'`
5519 { echo "$as_me:$LINENO: result: $ac_res" >&5
5520echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005521if test `eval echo '${'$as_ac_Header'}'` = yes; then
5522 cat >>confdefs.h <<_ACEOF
5523#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5524_ACEOF
5525
5526fi
5527
5528done
5529
5530
Martin v. Löwis11437992002-04-12 09:54:03 +00005531
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
5559
5560
5561
5562
5563
5564
5565
5566
Anthony Baxter8a560de2004-10-13 15:30:56 +00005567
Martin v. Löwisc3001752005-01-23 09:27:24 +00005568
Martin v. Löwis11017b12006-01-14 18:12:57 +00005569
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005570
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005571
5572
5573
5574
5575
5576
5577
5578
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005579
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005580
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005581
5582
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005583
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005584
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005585for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5586fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005587ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005588shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005589unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005590sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5591sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005592sys/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 +00005593sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005594sys/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 +00005595sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005596bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005597do
Martin v. Löwis11437992002-04-12 09:54:03 +00005598as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5600 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5601echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5602if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005603 echo $ECHO_N "(cached) $ECHO_C" >&6
5604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005605ac_res=`eval echo '${'$as_ac_Header'}'`
5606 { echo "$as_me:$LINENO: result: $ac_res" >&5
5607echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005608else
Martin v. Löwis11437992002-04-12 09:54:03 +00005609 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005610{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5611echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005613/* confdefs.h. */
5614_ACEOF
5615cat confdefs.h >>conftest.$ac_ext
5616cat >>conftest.$ac_ext <<_ACEOF
5617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005618$ac_includes_default
5619#include <$ac_header>
5620_ACEOF
5621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005622if { (ac_try="$ac_compile"
5623case "(($ac_try" in
5624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5625 *) ac_try_echo=$ac_try;;
5626esac
5627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005630 grep -v '^ *+' conftest.er1 >conftest.err
5631 rm -f conftest.er1
5632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005634 (exit $ac_status); } && {
5635 test -z "$ac_c_werror_flag" ||
5636 test ! -s conftest.err
5637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005638 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005639else
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005641sed 's/^/| /' conftest.$ac_ext >&5
5642
Martin v. Löwiseba40652007-08-30 20:10:57 +00005643 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645
5646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5648echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005649
5650# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5652echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005654/* confdefs.h. */
5655_ACEOF
5656cat confdefs.h >>conftest.$ac_ext
5657cat >>conftest.$ac_ext <<_ACEOF
5658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005659#include <$ac_header>
5660_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661if { (ac_try="$ac_cpp conftest.$ac_ext"
5662case "(($ac_try" in
5663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664 *) ac_try_echo=$ac_try;;
5665esac
5666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5667 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005669 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 rm -f conftest.er1
5671 cat conftest.err >&5
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005673 (exit $ac_status); } >/dev/null && {
5674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5675 test ! -s conftest.err
5676 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 ac_header_preproc=yes
5678else
5679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005680sed 's/^/| /' conftest.$ac_ext >&5
5681
Martin v. Löwis11437992002-04-12 09:54:03 +00005682 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684
Martin v. Löwis11437992002-04-12 09:54:03 +00005685rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005686{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5687echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005688
5689# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5691 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005692 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5693echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005694 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5695echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5696 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005697 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005698 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005699 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5700echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5702echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5703 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5704echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5705 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5706echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005707 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5708echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5710echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005712## ------------------------------------------------ ##
5713## Report this to http://www.python.org/python-bugs ##
5714## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005715_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005716 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005717 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005718esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005719{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5720echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5721if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005722 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005723else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005724 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726ac_res=`eval echo '${'$as_ac_Header'}'`
5727 { echo "$as_me:$LINENO: result: $ac_res" >&5
5728echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005729
5730fi
5731if test `eval echo '${'$as_ac_Header'}'` = yes; then
5732 cat >>confdefs.h <<_ACEOF
5733#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5734_ACEOF
5735
5736fi
5737
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738done
5739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740
5741
5742
5743
5744
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005746for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5747 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5749echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5750if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005752else
Martin v. Löwis11437992002-04-12 09:54:03 +00005753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005754/* confdefs.h. */
5755_ACEOF
5756cat confdefs.h >>conftest.$ac_ext
5757cat >>conftest.$ac_ext <<_ACEOF
5758/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005759#include <sys/types.h>
5760#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005761
Martin v. Löwis11437992002-04-12 09:54:03 +00005762int
5763main ()
5764{
5765if ((DIR *) 0)
5766return 0;
5767 ;
5768 return 0;
5769}
5770_ACEOF
5771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005772if { (ac_try="$ac_compile"
5773case "(($ac_try" in
5774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5775 *) ac_try_echo=$ac_try;;
5776esac
5777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005780 grep -v '^ *+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784 (exit $ac_status); } && {
5785 test -z "$ac_c_werror_flag" ||
5786 test ! -s conftest.err
5787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005789else
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005791sed 's/^/| /' conftest.$ac_ext >&5
5792
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005795
5796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798ac_res=`eval echo '${'$as_ac_Header'}'`
5799 { echo "$as_me:$LINENO: result: $ac_res" >&5
5800echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005801if test `eval echo '${'$as_ac_Header'}'` = yes; then
5802 cat >>confdefs.h <<_ACEOF
5803#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5804_ACEOF
5805
5806ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809done
5810# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5811if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005812 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5813echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005814if test "${ac_cv_search_opendir+set}" = set; then
5815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816else
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005818cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005819/* confdefs.h. */
5820_ACEOF
5821cat confdefs.h >>conftest.$ac_ext
5822cat >>conftest.$ac_ext <<_ACEOF
5823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005824
Martin v. Löwiseba40652007-08-30 20:10:57 +00005825/* Override any GCC internal prototype to avoid an error.
5826 Use char because int might match the return type of a GCC
5827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005828#ifdef __cplusplus
5829extern "C"
5830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005831char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005832int
5833main ()
5834{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005836 ;
5837 return 0;
5838}
5839_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005840for ac_lib in '' dir; do
5841 if test -z "$ac_lib"; then
5842 ac_res="none required"
5843 else
5844 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005845 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005846 fi
5847 rm -f conftest.$ac_objext conftest$ac_exeext
5848if { (ac_try="$ac_link"
5849case "(($ac_try" in
5850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5851 *) ac_try_echo=$ac_try;;
5852esac
5853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5854 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005855 ac_status=$?
5856 grep -v '^ *+' conftest.er1 >conftest.err
5857 rm -f conftest.er1
5858 cat conftest.err >&5
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860 (exit $ac_status); } && {
5861 test -z "$ac_c_werror_flag" ||
5862 test ! -s conftest.err
5863 } && test -s conftest$ac_exeext &&
5864 $as_test_x conftest$ac_exeext; then
5865 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005866else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005867 echo "$as_me: failed program was:" >&5
5868sed 's/^/| /' conftest.$ac_ext >&5
5869
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870
Brett Cannon19fab762007-06-02 03:02:29 +00005871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872
5873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5874 conftest$ac_exeext
5875 if test "${ac_cv_search_opendir+set}" = set; then
5876 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005878done
5879if test "${ac_cv_search_opendir+set}" = set; then
5880 :
5881else
5882 ac_cv_search_opendir=no
5883fi
5884rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005885LIBS=$ac_func_search_save_LIBS
5886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5888echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5889ac_res=$ac_cv_search_opendir
5890if test "$ac_res" != no; then
5891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005894
Michael W. Hudson54241132001-12-07 15:38:26 +00005895else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005896 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5897echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005898if test "${ac_cv_search_opendir+set}" = set; then
5899 echo $ECHO_N "(cached) $ECHO_C" >&6
5900else
5901 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005903/* confdefs.h. */
5904_ACEOF
5905cat confdefs.h >>conftest.$ac_ext
5906cat >>conftest.$ac_ext <<_ACEOF
5907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005908
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909/* Override any GCC internal prototype to avoid an error.
5910 Use char because int might match the return type of a GCC
5911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005912#ifdef __cplusplus
5913extern "C"
5914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005915char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005916int
5917main ()
5918{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005920 ;
5921 return 0;
5922}
5923_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924for ac_lib in '' x; do
5925 if test -z "$ac_lib"; then
5926 ac_res="none required"
5927 else
5928 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005929 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930 fi
5931 rm -f conftest.$ac_objext conftest$ac_exeext
5932if { (ac_try="$ac_link"
5933case "(($ac_try" in
5934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5935 *) ac_try_echo=$ac_try;;
5936esac
5937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5938 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005939 ac_status=$?
5940 grep -v '^ *+' conftest.er1 >conftest.err
5941 rm -f conftest.er1
5942 cat conftest.err >&5
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944 (exit $ac_status); } && {
5945 test -z "$ac_c_werror_flag" ||
5946 test ! -s conftest.err
5947 } && test -s conftest$ac_exeext &&
5948 $as_test_x conftest$ac_exeext; then
5949 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005950else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005951 echo "$as_me: failed program was:" >&5
5952sed 's/^/| /' conftest.$ac_ext >&5
5953
Martin v. Löwiseba40652007-08-30 20:10:57 +00005954
Brett Cannon19fab762007-06-02 03:02:29 +00005955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956
5957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5958 conftest$ac_exeext
5959 if test "${ac_cv_search_opendir+set}" = set; then
5960 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005962done
5963if test "${ac_cv_search_opendir+set}" = set; then
5964 :
5965else
5966 ac_cv_search_opendir=no
5967fi
5968rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005969LIBS=$ac_func_search_save_LIBS
5970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005971{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5972echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5973ac_res=$ac_cv_search_opendir
5974if test "$ac_res" != no; then
5975 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005977fi
5978
5979fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005980
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5982echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005983if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5984 echo $ECHO_N "(cached) $ECHO_C" >&6
5985else
5986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005987/* confdefs.h. */
5988_ACEOF
5989cat confdefs.h >>conftest.$ac_ext
5990cat >>conftest.$ac_ext <<_ACEOF
5991/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993int
5994main ()
5995{
5996return makedev(0, 0);
5997 ;
5998 return 0;
5999}
6000_ACEOF
6001rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006002if { (ac_try="$ac_link"
6003case "(($ac_try" in
6004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6005 *) ac_try_echo=$ac_try;;
6006esac
6007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6008 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006010 grep -v '^ *+' conftest.er1 >conftest.err
6011 rm -f conftest.er1
6012 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014 (exit $ac_status); } && {
6015 test -z "$ac_c_werror_flag" ||
6016 test ! -s conftest.err
6017 } && test -s conftest$ac_exeext &&
6018 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019 ac_cv_header_sys_types_h_makedev=yes
6020else
6021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006022sed 's/^/| /' conftest.$ac_ext >&5
6023
Martin v. Löwiseba40652007-08-30 20:10:57 +00006024 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006026
6027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029
6030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006031{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6032echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033
6034if test $ac_cv_header_sys_types_h_makedev = no; then
6035if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6037echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6039 echo $ECHO_N "(cached) $ECHO_C" >&6
6040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006041{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6042echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043else
6044 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6046echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006048/* confdefs.h. */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053$ac_includes_default
6054#include <sys/mkdev.h>
6055_ACEOF
6056rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057if { (ac_try="$ac_compile"
6058case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061esac
6062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 (exit $ac_status); } && {
6070 test -z "$ac_c_werror_flag" ||
6071 test ! -s conftest.err
6072 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073 ac_header_compiler=yes
6074else
6075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006076sed 's/^/| /' conftest.$ac_ext >&5
6077
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080
6081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6082{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6083echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6087echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094#include <sys/mkdev.h>
6095_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006096if { (ac_try="$ac_cpp conftest.$ac_ext"
6097case "(($ac_try" in
6098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6099 *) ac_try_echo=$ac_try;;
6100esac
6101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6102 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006104 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 rm -f conftest.er1
6106 cat conftest.err >&5
6107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006108 (exit $ac_status); } >/dev/null && {
6109 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6110 test ! -s conftest.err
6111 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112 ac_header_preproc=yes
6113else
6114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006115sed 's/^/| /' conftest.$ac_ext >&5
6116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117 ac_header_preproc=no
6118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6122echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123
6124# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6126 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6128echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6131 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006132 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006133 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6140 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6141echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006142 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6143echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006144 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6145echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006147## ------------------------------------------------ ##
6148## Report this to http://www.python.org/python-bugs ##
6149## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006150_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006152 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6155echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6157 echo $ECHO_N "(cached) $ECHO_C" >&6
6158else
6159 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006161{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6162echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163
6164fi
6165if test $ac_cv_header_sys_mkdev_h = yes; then
6166
6167cat >>confdefs.h <<\_ACEOF
6168#define MAJOR_IN_MKDEV 1
6169_ACEOF
6170
6171fi
6172
6173
6174
6175 if test $ac_cv_header_sys_mkdev_h = no; then
6176 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6178echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6180 echo $ECHO_N "(cached) $ECHO_C" >&6
6181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006182{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6183echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184else
6185 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006186{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6187echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* confdefs.h. */
6190_ACEOF
6191cat confdefs.h >>conftest.$ac_ext
6192cat >>conftest.$ac_ext <<_ACEOF
6193/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194$ac_includes_default
6195#include <sys/sysmacros.h>
6196_ACEOF
6197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006198if { (ac_try="$ac_compile"
6199case "(($ac_try" in
6200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6201 *) ac_try_echo=$ac_try;;
6202esac
6203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006206 grep -v '^ *+' conftest.er1 >conftest.err
6207 rm -f conftest.er1
6208 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210 (exit $ac_status); } && {
6211 test -z "$ac_c_werror_flag" ||
6212 test ! -s conftest.err
6213 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214 ac_header_compiler=yes
6215else
6216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006217sed 's/^/| /' conftest.$ac_ext >&5
6218
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221
6222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6223{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6224echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225
6226# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6228echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235#include <sys/sysmacros.h>
6236_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237if { (ac_try="$ac_cpp conftest.$ac_ext"
6238case "(($ac_try" in
6239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6240 *) ac_try_echo=$ac_try;;
6241esac
6242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006245 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 rm -f conftest.er1
6247 cat conftest.err >&5
6248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006249 (exit $ac_status); } >/dev/null && {
6250 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6251 test ! -s conftest.err
6252 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253 ac_header_preproc=yes
6254else
6255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006256sed 's/^/| /' conftest.$ac_ext >&5
6257
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258 ac_header_preproc=no
6259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6263echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264
6265# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6267 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006268 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6269echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6272 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006273 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006274 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6281 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6282echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006283 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6284echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006285 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6286echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006288## ------------------------------------------------ ##
6289## Report this to http://www.python.org/python-bugs ##
6290## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006291_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006293 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006295{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6296echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6298 echo $ECHO_N "(cached) $ECHO_C" >&6
6299else
6300 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6303echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304
6305fi
6306if test $ac_cv_header_sys_sysmacros_h = yes; then
6307
6308cat >>confdefs.h <<\_ACEOF
6309#define MAJOR_IN_SYSMACROS 1
6310_ACEOF
6311
6312fi
6313
6314
6315 fi
6316fi
6317
Michael W. Hudson54241132001-12-07 15:38:26 +00006318
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006320
6321for ac_header in term.h
6322do
6323as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6325echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6326if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327 echo $ECHO_N "(cached) $ECHO_C" >&6
6328else
6329 cat >conftest.$ac_ext <<_ACEOF
6330/* confdefs.h. */
6331_ACEOF
6332cat confdefs.h >>conftest.$ac_ext
6333cat >>conftest.$ac_ext <<_ACEOF
6334/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006336#ifdef HAVE_CURSES_H
6337#include <curses.h>
6338#endif
6339
6340
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006341#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006342_ACEOF
6343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006344if { (ac_try="$ac_compile"
6345case "(($ac_try" in
6346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6347 *) ac_try_echo=$ac_try;;
6348esac
6349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351 ac_status=$?
6352 grep -v '^ *+' conftest.er1 >conftest.err
6353 rm -f conftest.er1
6354 cat conftest.err >&5
6355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356 (exit $ac_status); } && {
6357 test -z "$ac_c_werror_flag" ||
6358 test ! -s conftest.err
6359 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006360 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361else
6362 echo "$as_me: failed program was:" >&5
6363sed 's/^/| /' conftest.$ac_ext >&5
6364
Martin v. Löwiseba40652007-08-30 20:10:57 +00006365 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367
6368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370ac_res=`eval echo '${'$as_ac_Header'}'`
6371 { echo "$as_me:$LINENO: result: $ac_res" >&5
6372echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006373if test `eval echo '${'$as_ac_Header'}'` = yes; then
6374 cat >>confdefs.h <<_ACEOF
6375#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6376_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006378fi
6379
6380done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381
6382
Martin v. Löwis11017b12006-01-14 18:12:57 +00006383# On Linux, netlink.h requires asm/types.h
6384
6385for ac_header in linux/netlink.h
6386do
6387as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006388{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6389echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6390if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006391 echo $ECHO_N "(cached) $ECHO_C" >&6
6392else
6393 cat >conftest.$ac_ext <<_ACEOF
6394/* confdefs.h. */
6395_ACEOF
6396cat confdefs.h >>conftest.$ac_ext
6397cat >>conftest.$ac_ext <<_ACEOF
6398/* end confdefs.h. */
6399
6400#ifdef HAVE_ASM_TYPES_H
6401#include <asm/types.h>
6402#endif
6403#ifdef HAVE_SYS_SOCKET_H
6404#include <sys/socket.h>
6405#endif
6406
6407
6408#include <$ac_header>
6409_ACEOF
6410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411if { (ac_try="$ac_compile"
6412case "(($ac_try" in
6413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6414 *) ac_try_echo=$ac_try;;
6415esac
6416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418 ac_status=$?
6419 grep -v '^ *+' conftest.er1 >conftest.err
6420 rm -f conftest.er1
6421 cat conftest.err >&5
6422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006423 (exit $ac_status); } && {
6424 test -z "$ac_c_werror_flag" ||
6425 test ! -s conftest.err
6426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427 eval "$as_ac_Header=yes"
6428else
6429 echo "$as_me: failed program was:" >&5
6430sed 's/^/| /' conftest.$ac_ext >&5
6431
Martin v. Löwiseba40652007-08-30 20:10:57 +00006432 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434
6435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006437ac_res=`eval echo '${'$as_ac_Header'}'`
6438 { echo "$as_me:$LINENO: result: $ac_res" >&5
6439echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440if test `eval echo '${'$as_ac_Header'}'` = yes; then
6441 cat >>confdefs.h <<_ACEOF
6442#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6443_ACEOF
6444
6445fi
6446
6447done
6448
6449
Guido van Rossum627b2d71993-12-24 10:39:16 +00006450# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006451was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006452{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6453echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006455/* confdefs.h. */
6456_ACEOF
6457cat confdefs.h >>conftest.$ac_ext
6458cat >>conftest.$ac_ext <<_ACEOF
6459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006464 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466else
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
6468
6469cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006471_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006472
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006473
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474fi
6475rm -f conftest*
6476
Martin v. Löwiseba40652007-08-30 20:10:57 +00006477{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6478echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006479
Neal Norwitz11690112002-07-30 01:08:28 +00006480# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481{ echo "$as_me:$LINENO: checking for makedev" >&5
6482echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006484/* confdefs.h. */
6485_ACEOF
6486cat confdefs.h >>conftest.$ac_ext
6487cat >>conftest.$ac_ext <<_ACEOF
6488/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006489#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006490int
6491main ()
6492{
6493 makedev(0, 0)
6494 ;
6495 return 0;
6496}
6497_ACEOF
6498rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006499if { (ac_try="$ac_link"
6500case "(($ac_try" in
6501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6502 *) ac_try_echo=$ac_try;;
6503esac
6504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6505 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006507 grep -v '^ *+' conftest.er1 >conftest.err
6508 rm -f conftest.er1
6509 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511 (exit $ac_status); } && {
6512 test -z "$ac_c_werror_flag" ||
6513 test ! -s conftest.err
6514 } && test -s conftest$ac_exeext &&
6515 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006516 ac_cv_has_makedev=yes
6517else
6518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006519sed 's/^/| /' conftest.$ac_ext >&5
6520
Martin v. Löwiseba40652007-08-30 20:10:57 +00006521 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006523
6524rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006525 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006526if test "$ac_cv_has_makedev" = "no"; then
6527 # we didn't link, try if _OSF_SOURCE will allow us to link
6528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006529/* confdefs.h. */
6530_ACEOF
6531cat confdefs.h >>conftest.$ac_ext
6532cat >>conftest.$ac_ext <<_ACEOF
6533/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006534
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006535#define _OSF_SOURCE 1
6536#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006537
Neal Norwitz11690112002-07-30 01:08:28 +00006538int
6539main ()
6540{
6541 makedev(0, 0)
6542 ;
6543 return 0;
6544}
6545_ACEOF
6546rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006547if { (ac_try="$ac_link"
6548case "(($ac_try" in
6549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6550 *) ac_try_echo=$ac_try;;
6551esac
6552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6553 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006555 grep -v '^ *+' conftest.er1 >conftest.err
6556 rm -f conftest.er1
6557 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559 (exit $ac_status); } && {
6560 test -z "$ac_c_werror_flag" ||
6561 test ! -s conftest.err
6562 } && test -s conftest$ac_exeext &&
6563 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006564 ac_cv_has_makedev=yes
6565else
6566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006567sed 's/^/| /' conftest.$ac_ext >&5
6568
Martin v. Löwiseba40652007-08-30 20:10:57 +00006569 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571
6572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006573 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006574 if test "$ac_cv_has_makedev" = "yes"; then
6575
6576cat >>confdefs.h <<\_ACEOF
6577#define _OSF_SOURCE 1
6578_ACEOF
6579
6580 fi
6581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6583echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006584if test "$ac_cv_has_makedev" = "yes"; then
6585
6586cat >>confdefs.h <<\_ACEOF
6587#define HAVE_MAKEDEV 1
6588_ACEOF
6589
6590fi
6591
Martin v. Löwis399a6892002-10-04 10:22:02 +00006592# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6593# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6594# defined, but the compiler does not support pragma redefine_extname,
6595# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6596# structures (such as rlimit64) without declaring them. As a
6597# work-around, disable LFS on such configurations
6598
6599use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006600{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6601echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006603/* confdefs.h. */
6604_ACEOF
6605cat confdefs.h >>conftest.$ac_ext
6606cat >>conftest.$ac_ext <<_ACEOF
6607/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006608
6609#define _LARGEFILE_SOURCE 1
6610#define _FILE_OFFSET_BITS 64
6611#include <sys/resource.h>
6612
Martin v. Löwis399a6892002-10-04 10:22:02 +00006613int
6614main ()
6615{
6616struct rlimit foo;
6617 ;
6618 return 0;
6619}
6620_ACEOF
6621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006622if { (ac_try="$ac_compile"
6623case "(($ac_try" in
6624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6625 *) ac_try_echo=$ac_try;;
6626esac
6627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006634 (exit $ac_status); } && {
6635 test -z "$ac_c_werror_flag" ||
6636 test ! -s conftest.err
6637 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638 sol_lfs_bug=no
6639else
6640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006641sed 's/^/| /' conftest.$ac_ext >&5
6642
Martin v. Löwiseba40652007-08-30 20:10:57 +00006643 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006645
6646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6647{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6648echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649if test "$sol_lfs_bug" = "yes"; then
6650 use_lfs=no
6651fi
6652
6653if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006654# Two defines needed to enable largefile support on various platforms
6655# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<\_ACEOF
6658#define _LARGEFILE_SOURCE 1
6659_ACEOF
6660
6661
6662cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006663#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006664_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006665
Martin v. Löwis399a6892002-10-04 10:22:02 +00006666fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006667
Guido van Rossum84e7b241996-08-19 21:59:00 +00006668# Add some code to confdefs.h so that the test for off_t works on SCO
6669cat >> confdefs.h <<\EOF
6670#if defined(SCO_DS)
6671#undef _OFF_T
6672#endif
6673EOF
6674
Guido van Rossumef2255b2000-03-10 22:30:29 +00006675# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676{ echo "$as_me:$LINENO: checking for mode_t" >&5
6677echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006678if test "${ac_cv_type_mode_t+set}" = set; then
6679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006680else
Martin v. Löwis11437992002-04-12 09:54:03 +00006681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006682/* confdefs.h. */
6683_ACEOF
6684cat confdefs.h >>conftest.$ac_ext
6685cat >>conftest.$ac_ext <<_ACEOF
6686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006687$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006689int
6690main ()
6691{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006693 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006695 return 0;
6696 ;
6697 return 0;
6698}
6699_ACEOF
6700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701if { (ac_try="$ac_compile"
6702case "(($ac_try" in
6703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6704 *) ac_try_echo=$ac_try;;
6705esac
6706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006709 grep -v '^ *+' conftest.er1 >conftest.err
6710 rm -f conftest.er1
6711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006713 (exit $ac_status); } && {
6714 test -z "$ac_c_werror_flag" ||
6715 test ! -s conftest.err
6716 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006717 ac_cv_type_mode_t=yes
6718else
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006720sed 's/^/| /' conftest.$ac_ext >&5
6721
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724
6725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6728echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006729if test $ac_cv_type_mode_t = yes; then
6730 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006731else
Martin v. Löwis11437992002-04-12 09:54:03 +00006732
6733cat >>confdefs.h <<_ACEOF
6734#define mode_t int
6735_ACEOF
6736
6737fi
6738
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739{ echo "$as_me:$LINENO: checking for off_t" >&5
6740echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006741if test "${ac_cv_type_off_t+set}" = set; then
6742 echo $ECHO_N "(cached) $ECHO_C" >&6
6743else
6744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006745/* confdefs.h. */
6746_ACEOF
6747cat confdefs.h >>conftest.$ac_ext
6748cat >>conftest.$ac_ext <<_ACEOF
6749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006750$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006752int
6753main ()
6754{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006756 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006757if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006758 return 0;
6759 ;
6760 return 0;
6761}
6762_ACEOF
6763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764if { (ac_try="$ac_compile"
6765case "(($ac_try" in
6766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6767 *) ac_try_echo=$ac_try;;
6768esac
6769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006772 grep -v '^ *+' conftest.er1 >conftest.err
6773 rm -f conftest.er1
6774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776 (exit $ac_status); } && {
6777 test -z "$ac_c_werror_flag" ||
6778 test ! -s conftest.err
6779 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006780 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006781else
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006783sed 's/^/| /' conftest.$ac_ext >&5
6784
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787
6788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6791echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006792if test $ac_cv_type_off_t = yes; then
6793 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006794else
Martin v. Löwis11437992002-04-12 09:54:03 +00006795
6796cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006798_ACEOF
6799
6800fi
6801
Martin v. Löwiseba40652007-08-30 20:10:57 +00006802{ echo "$as_me:$LINENO: checking for pid_t" >&5
6803echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006804if test "${ac_cv_type_pid_t+set}" = set; then
6805 echo $ECHO_N "(cached) $ECHO_C" >&6
6806else
6807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006808/* confdefs.h. */
6809_ACEOF
6810cat confdefs.h >>conftest.$ac_ext
6811cat >>conftest.$ac_ext <<_ACEOF
6812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006813$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006815int
6816main ()
6817{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006819 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 return 0;
6822 ;
6823 return 0;
6824}
6825_ACEOF
6826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006827if { (ac_try="$ac_compile"
6828case "(($ac_try" in
6829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6830 *) ac_try_echo=$ac_try;;
6831esac
6832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006835 grep -v '^ *+' conftest.er1 >conftest.err
6836 rm -f conftest.er1
6837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839 (exit $ac_status); } && {
6840 test -z "$ac_c_werror_flag" ||
6841 test ! -s conftest.err
6842 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006843 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844else
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006846sed 's/^/| /' conftest.$ac_ext >&5
6847
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006850
6851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006853{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6854echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006855if test $ac_cv_type_pid_t = yes; then
6856 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006857else
Martin v. Löwis11437992002-04-12 09:54:03 +00006858
6859cat >>confdefs.h <<_ACEOF
6860#define pid_t int
6861_ACEOF
6862
6863fi
6864
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6866echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006867if test "${ac_cv_type_signal+set}" = set; then
6868 echo $ECHO_N "(cached) $ECHO_C" >&6
6869else
6870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006871/* confdefs.h. */
6872_ACEOF
6873cat confdefs.h >>conftest.$ac_ext
6874cat >>conftest.$ac_ext <<_ACEOF
6875/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006876#include <sys/types.h>
6877#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006878
Martin v. Löwis11437992002-04-12 09:54:03 +00006879int
6880main ()
6881{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006882return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006883 ;
6884 return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006888if { (ac_try="$ac_compile"
6889case "(($ac_try" in
6890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6891 *) ac_try_echo=$ac_try;;
6892esac
6893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006896 grep -v '^ *+' conftest.er1 >conftest.err
6897 rm -f conftest.er1
6898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006900 (exit $ac_status); } && {
6901 test -z "$ac_c_werror_flag" ||
6902 test ! -s conftest.err
6903 } && test -s conftest.$ac_objext; then
6904 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006905else
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006907sed 's/^/| /' conftest.$ac_ext >&5
6908
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6915echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006918#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006919_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006920
Michael W. Hudson54241132001-12-07 15:38:26 +00006921
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922{ echo "$as_me:$LINENO: checking for size_t" >&5
6923echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_size_t+set}" = set; then
6925 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926else
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006935int
6936main ()
6937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006939 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 return 0;
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
6952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006963 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964else
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006966sed 's/^/| /' conftest.$ac_ext >&5
6967
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6974echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006975if test $ac_cv_type_size_t = yes; then
6976 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977else
Martin v. Löwis11437992002-04-12 09:54:03 +00006978
6979cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
6982
6983fi
6984
Martin v. Löwiseba40652007-08-30 20:10:57 +00006985{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6986echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006987if test "${ac_cv_type_uid_t+set}" = set; then
6988 echo $ECHO_N "(cached) $ECHO_C" >&6
6989else
6990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006991/* confdefs.h. */
6992_ACEOF
6993cat confdefs.h >>conftest.$ac_ext
6994cat >>conftest.$ac_ext <<_ACEOF
6995/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
6998_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007000 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007001 ac_cv_type_uid_t=yes
7002else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007003 ac_cv_type_uid_t=no
7004fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007005rm -f conftest*
7006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7009echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007010if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007011
Martin v. Löwis11437992002-04-12 09:54:03 +00007012cat >>confdefs.h <<\_ACEOF
7013#define uid_t int
7014_ACEOF
7015
7016
7017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007019_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020
7021fi
7022
Martin v. Löwiseba40652007-08-30 20:10:57 +00007023{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7024echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007025if test "${ac_cv_type_ssize_t+set}" = set; then
7026 echo $ECHO_N "(cached) $ECHO_C" >&6
7027else
7028 cat >conftest.$ac_ext <<_ACEOF
7029/* confdefs.h. */
7030_ACEOF
7031cat confdefs.h >>conftest.$ac_ext
7032cat >>conftest.$ac_ext <<_ACEOF
7033/* end confdefs.h. */
7034$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007036int
7037main ()
7038{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007040 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007041if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007042 return 0;
7043 ;
7044 return 0;
7045}
7046_ACEOF
7047rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007048if { (ac_try="$ac_compile"
7049case "(($ac_try" in
7050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7051 *) ac_try_echo=$ac_try;;
7052esac
7053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007055 ac_status=$?
7056 grep -v '^ *+' conftest.er1 >conftest.err
7057 rm -f conftest.er1
7058 cat conftest.err >&5
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060 (exit $ac_status); } && {
7061 test -z "$ac_c_werror_flag" ||
7062 test ! -s conftest.err
7063 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007064 ac_cv_type_ssize_t=yes
7065else
7066 echo "$as_me: failed program was:" >&5
7067sed 's/^/| /' conftest.$ac_ext >&5
7068
Martin v. Löwiseba40652007-08-30 20:10:57 +00007069 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007071
7072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007074{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7075echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007076if test $ac_cv_type_ssize_t = yes; then
7077
7078cat >>confdefs.h <<\_ACEOF
7079#define HAVE_SSIZE_T 1
7080_ACEOF
7081
7082fi
7083
Jack Jansendd19cf82001-12-06 22:36:17 +00007084
Michael W. Hudson54241132001-12-07 15:38:26 +00007085# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007086# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007087{ echo "$as_me:$LINENO: checking for int" >&5
7088echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007089if test "${ac_cv_type_int+set}" = set; then
7090 echo $ECHO_N "(cached) $ECHO_C" >&6
7091else
7092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007098$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007100int
7101main ()
7102{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007103if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007105if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007106 return 0;
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007112if { (ac_try="$ac_compile"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
7117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007120 grep -v '^ *+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124 (exit $ac_status); } && {
7125 test -z "$ac_c_werror_flag" ||
7126 test ! -s conftest.err
7127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007128 ac_cv_type_int=yes
7129else
7130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007131sed 's/^/| /' conftest.$ac_ext >&5
7132
Martin v. Löwiseba40652007-08-30 20:10:57 +00007133 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007134fi
Brett Cannon19fab762007-06-02 03:02:29 +00007135
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7139echo "${ECHO_T}$ac_cv_type_int" >&6; }
7140
7141# The cast to long int works around a bug in the HP C Compiler
7142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7144# This bug is HP SR number 8606223364.
7145{ echo "$as_me:$LINENO: checking size of int" >&5
7146echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007147if test "${ac_cv_sizeof_int+set}" = set; then
7148 echo $ECHO_N "(cached) $ECHO_C" >&6
7149else
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 if test "$cross_compiling" = yes; then
7151 # Depending upon the size, compute the lo and hi bounds.
7152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007153/* confdefs.h. */
7154_ACEOF
7155cat confdefs.h >>conftest.$ac_ext
7156cat >>conftest.$ac_ext <<_ACEOF
7157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007158$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007160int
7161main ()
7162{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007164test_array [0] = 0
7165
7166 ;
7167 return 0;
7168}
7169_ACEOF
7170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171if { (ac_try="$ac_compile"
7172case "(($ac_try" in
7173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7174 *) ac_try_echo=$ac_try;;
7175esac
7176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007179 grep -v '^ *+' conftest.er1 >conftest.err
7180 rm -f conftest.er1
7181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007183 (exit $ac_status); } && {
7184 test -z "$ac_c_werror_flag" ||
7185 test ! -s conftest.err
7186 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007187 ac_lo=0 ac_mid=0
7188 while :; do
7189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007190/* confdefs.h. */
7191_ACEOF
7192cat confdefs.h >>conftest.$ac_ext
7193cat >>conftest.$ac_ext <<_ACEOF
7194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007195$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007196 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007197int
7198main ()
7199{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007201test_array [0] = 0
7202
7203 ;
7204 return 0;
7205}
7206_ACEOF
7207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007208if { (ac_try="$ac_compile"
7209case "(($ac_try" in
7210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7211 *) ac_try_echo=$ac_try;;
7212esac
7213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007216 grep -v '^ *+' conftest.er1 >conftest.err
7217 rm -f conftest.er1
7218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007220 (exit $ac_status); } && {
7221 test -z "$ac_c_werror_flag" ||
7222 test ! -s conftest.err
7223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007224 ac_hi=$ac_mid; break
7225else
7226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007227sed 's/^/| /' conftest.$ac_ext >&5
7228
Martin v. Löwiseba40652007-08-30 20:10:57 +00007229 ac_lo=`expr $ac_mid + 1`
7230 if test $ac_lo -le $ac_mid; then
7231 ac_lo= ac_hi=
7232 break
7233 fi
7234 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007236
7237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007238 done
7239else
7240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007241sed 's/^/| /' conftest.$ac_ext >&5
7242
Martin v. Löwiseba40652007-08-30 20:10:57 +00007243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007244/* confdefs.h. */
7245_ACEOF
7246cat confdefs.h >>conftest.$ac_ext
7247cat >>conftest.$ac_ext <<_ACEOF
7248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007251int
7252main ()
7253{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007255test_array [0] = 0
7256
7257 ;
7258 return 0;
7259}
7260_ACEOF
7261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007262if { (ac_try="$ac_compile"
7263case "(($ac_try" in
7264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7265 *) ac_try_echo=$ac_try;;
7266esac
7267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007270 grep -v '^ *+' conftest.er1 >conftest.err
7271 rm -f conftest.er1
7272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007274 (exit $ac_status); } && {
7275 test -z "$ac_c_werror_flag" ||
7276 test ! -s conftest.err
7277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007278 ac_hi=-1 ac_mid=-1
7279 while :; do
7280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007281/* confdefs.h. */
7282_ACEOF
7283cat confdefs.h >>conftest.$ac_ext
7284cat >>conftest.$ac_ext <<_ACEOF
7285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007286$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007287 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007288int
7289main ()
7290{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007292test_array [0] = 0
7293
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007299if { (ac_try="$ac_compile"
7300case "(($ac_try" in
7301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7302 *) ac_try_echo=$ac_try;;
7303esac
7304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007307 grep -v '^ *+' conftest.er1 >conftest.err
7308 rm -f conftest.er1
7309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007311 (exit $ac_status); } && {
7312 test -z "$ac_c_werror_flag" ||
7313 test ! -s conftest.err
7314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007315 ac_lo=$ac_mid; break
7316else
7317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007318sed 's/^/| /' conftest.$ac_ext >&5
7319
Martin v. Löwiseba40652007-08-30 20:10:57 +00007320 ac_hi=`expr '(' $ac_mid ')' - 1`
7321 if test $ac_mid -le $ac_hi; then
7322 ac_lo= ac_hi=
7323 break
7324 fi
7325 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007329 done
7330else
7331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007332sed 's/^/| /' conftest.$ac_ext >&5
7333
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007336
7337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007339
7340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007341# Binary search between lo and hi bounds.
7342while test "x$ac_lo" != "x$ac_hi"; do
7343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007345/* confdefs.h. */
7346_ACEOF
7347cat confdefs.h >>conftest.$ac_ext
7348cat >>conftest.$ac_ext <<_ACEOF
7349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007350$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007351 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007352int
7353main ()
7354{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007356test_array [0] = 0
7357
7358 ;
7359 return 0;
7360}
7361_ACEOF
7362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007363if { (ac_try="$ac_compile"
7364case "(($ac_try" in
7365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7366 *) ac_try_echo=$ac_try;;
7367esac
7368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007371 grep -v '^ *+' conftest.er1 >conftest.err
7372 rm -f conftest.er1
7373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375 (exit $ac_status); } && {
7376 test -z "$ac_c_werror_flag" ||
7377 test ! -s conftest.err
7378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007379 ac_hi=$ac_mid
7380else
7381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007382sed 's/^/| /' conftest.$ac_ext >&5
7383
Martin v. Löwiseba40652007-08-30 20:10:57 +00007384 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007386
7387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007388done
7389case $ac_lo in
7390?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007391'') if test "$ac_cv_type_int" = yes; then
7392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007393See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007395See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007396 { (exit 77); exit 77; }; }
7397 else
7398 ac_cv_sizeof_int=0
7399 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007400esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007401else
Martin v. Löwis11437992002-04-12 09:54:03 +00007402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007403/* confdefs.h. */
7404_ACEOF
7405cat confdefs.h >>conftest.$ac_ext
7406cat >>conftest.$ac_ext <<_ACEOF
7407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007408$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007409 typedef int ac__type_sizeof_;
7410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007412#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007413#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007414int
7415main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007416{
Martin v. Löwis11437992002-04-12 09:54:03 +00007417
7418 FILE *f = fopen ("conftest.val", "w");
7419 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007420 return 1;
7421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007423 long int i = longval ();
7424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7425 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007426 fprintf (f, "%ld\n", i);
7427 }
7428 else
7429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430 unsigned long int i = ulongval ();
7431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7432 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007433 fprintf (f, "%lu\n", i);
7434 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007435 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007436
7437 ;
7438 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007439}
Martin v. Löwis11437992002-04-12 09:54:03 +00007440_ACEOF
7441rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007442if { (ac_try="$ac_link"
7443case "(($ac_try" in
7444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7445 *) ac_try_echo=$ac_try;;
7446esac
7447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7448 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007452 { (case "(($ac_try" in
7453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7454 *) ac_try_echo=$ac_try;;
7455esac
7456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7457 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007458 ac_status=$?
7459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); }; }; then
7461 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007462else
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 echo "$as_me: program exited with status $ac_status" >&5
7464echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007465sed 's/^/| /' conftest.$ac_ext >&5
7466
Martin v. Löwis11437992002-04-12 09:54:03 +00007467( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007468if test "$ac_cv_type_int" = yes; then
7469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007470See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007471echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007472See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007473 { (exit 77); exit 77; }; }
7474 else
7475 ac_cv_sizeof_int=0
7476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007478rm -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 +00007479fi
7480rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7483echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7484
7485
7486
Martin v. Löwis11437992002-04-12 09:54:03 +00007487cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007488#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007489_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007490
7491
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492{ echo "$as_me:$LINENO: checking for long" >&5
7493echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007494if test "${ac_cv_type_long+set}" = set; then
7495 echo $ECHO_N "(cached) $ECHO_C" >&6
7496else
7497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007498/* confdefs.h. */
7499_ACEOF
7500cat confdefs.h >>conftest.$ac_ext
7501cat >>conftest.$ac_ext <<_ACEOF
7502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007503$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007505int
7506main ()
7507{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007508if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007509 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007510if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 return 0;
7512 ;
7513 return 0;
7514}
7515_ACEOF
7516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007517if { (ac_try="$ac_compile"
7518case "(($ac_try" in
7519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7520 *) ac_try_echo=$ac_try;;
7521esac
7522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007525 grep -v '^ *+' conftest.er1 >conftest.err
7526 rm -f conftest.er1
7527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007529 (exit $ac_status); } && {
7530 test -z "$ac_c_werror_flag" ||
7531 test ! -s conftest.err
7532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007533 ac_cv_type_long=yes
7534else
7535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007536sed 's/^/| /' conftest.$ac_ext >&5
7537
Martin v. Löwiseba40652007-08-30 20:10:57 +00007538 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007539fi
Brett Cannon19fab762007-06-02 03:02:29 +00007540
Martin v. Löwiseba40652007-08-30 20:10:57 +00007541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7542fi
7543{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7544echo "${ECHO_T}$ac_cv_type_long" >&6; }
7545
7546# The cast to long int works around a bug in the HP C Compiler
7547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7549# This bug is HP SR number 8606223364.
7550{ echo "$as_me:$LINENO: checking size of long" >&5
7551echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007552if test "${ac_cv_sizeof_long+set}" = set; then
7553 echo $ECHO_N "(cached) $ECHO_C" >&6
7554else
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 if test "$cross_compiling" = yes; then
7556 # Depending upon the size, compute the lo and hi bounds.
7557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007558/* confdefs.h. */
7559_ACEOF
7560cat confdefs.h >>conftest.$ac_ext
7561cat >>conftest.$ac_ext <<_ACEOF
7562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007563$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007565int
7566main ()
7567{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007568static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007569test_array [0] = 0
7570
7571 ;
7572 return 0;
7573}
7574_ACEOF
7575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576if { (ac_try="$ac_compile"
7577case "(($ac_try" in
7578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7579 *) ac_try_echo=$ac_try;;
7580esac
7581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007584 grep -v '^ *+' conftest.er1 >conftest.err
7585 rm -f conftest.er1
7586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588 (exit $ac_status); } && {
7589 test -z "$ac_c_werror_flag" ||
7590 test ! -s conftest.err
7591 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 ac_lo=0 ac_mid=0
7593 while :; do
7594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007595/* confdefs.h. */
7596_ACEOF
7597cat confdefs.h >>conftest.$ac_ext
7598cat >>conftest.$ac_ext <<_ACEOF
7599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007600$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007601 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007602int
7603main ()
7604{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007606test_array [0] = 0
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613if { (ac_try="$ac_compile"
7614case "(($ac_try" in
7615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7616 *) ac_try_echo=$ac_try;;
7617esac
7618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007621 grep -v '^ *+' conftest.er1 >conftest.err
7622 rm -f conftest.er1
7623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007625 (exit $ac_status); } && {
7626 test -z "$ac_c_werror_flag" ||
7627 test ! -s conftest.err
7628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 ac_hi=$ac_mid; break
7630else
7631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007632sed 's/^/| /' conftest.$ac_ext >&5
7633
Martin v. Löwiseba40652007-08-30 20:10:57 +00007634 ac_lo=`expr $ac_mid + 1`
7635 if test $ac_lo -le $ac_mid; then
7636 ac_lo= ac_hi=
7637 break
7638 fi
7639 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641
7642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 done
7644else
7645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007646sed 's/^/| /' conftest.$ac_ext >&5
7647
Martin v. Löwiseba40652007-08-30 20:10:57 +00007648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007649/* confdefs.h. */
7650_ACEOF
7651cat confdefs.h >>conftest.$ac_ext
7652cat >>conftest.$ac_ext <<_ACEOF
7653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007654$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007656int
7657main ()
7658{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007659static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007660test_array [0] = 0
7661
7662 ;
7663 return 0;
7664}
7665_ACEOF
7666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007667if { (ac_try="$ac_compile"
7668case "(($ac_try" in
7669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7670 *) ac_try_echo=$ac_try;;
7671esac
7672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679 (exit $ac_status); } && {
7680 test -z "$ac_c_werror_flag" ||
7681 test ! -s conftest.err
7682 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_hi=-1 ac_mid=-1
7684 while :; do
7685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007691$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007693int
7694main ()
7695{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007697test_array [0] = 0
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704if { (ac_try="$ac_compile"
7705case "(($ac_try" in
7706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7707 *) ac_try_echo=$ac_try;;
7708esac
7709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7710 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007712 grep -v '^ *+' conftest.er1 >conftest.err
7713 rm -f conftest.er1
7714 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007716 (exit $ac_status); } && {
7717 test -z "$ac_c_werror_flag" ||
7718 test ! -s conftest.err
7719 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 ac_lo=$ac_mid; break
7721else
7722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007723sed 's/^/| /' conftest.$ac_ext >&5
7724
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725 ac_hi=`expr '(' $ac_mid ')' - 1`
7726 if test $ac_mid -le $ac_hi; then
7727 ac_lo= ac_hi=
7728 break
7729 fi
7730 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007732
7733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 done
7735else
7736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007737sed 's/^/| /' conftest.$ac_ext >&5
7738
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007741
7742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007744
7745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007746# Binary search between lo and hi bounds.
7747while test "x$ac_lo" != "x$ac_hi"; do
7748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007750/* confdefs.h. */
7751_ACEOF
7752cat confdefs.h >>conftest.$ac_ext
7753cat >>conftest.$ac_ext <<_ACEOF
7754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007755$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007756 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007757int
7758main ()
7759{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007761test_array [0] = 0
7762
7763 ;
7764 return 0;
7765}
7766_ACEOF
7767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768if { (ac_try="$ac_compile"
7769case "(($ac_try" in
7770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7771 *) ac_try_echo=$ac_try;;
7772esac
7773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007776 grep -v '^ *+' conftest.er1 >conftest.err
7777 rm -f conftest.er1
7778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780 (exit $ac_status); } && {
7781 test -z "$ac_c_werror_flag" ||
7782 test ! -s conftest.err
7783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007784 ac_hi=$ac_mid
7785else
7786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007787sed 's/^/| /' conftest.$ac_ext >&5
7788
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007791
7792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007793done
7794case $ac_lo in
7795?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007796'') if test "$ac_cv_type_long" = yes; then
7797 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007798See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007800See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801 { (exit 77); exit 77; }; }
7802 else
7803 ac_cv_sizeof_long=0
7804 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007805esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007806else
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007808/* confdefs.h. */
7809_ACEOF
7810cat confdefs.h >>conftest.$ac_ext
7811cat >>conftest.$ac_ext <<_ACEOF
7812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007813$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814 typedef long ac__type_sizeof_;
7815static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7816static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007817#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007818#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007819int
7820main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007821{
Martin v. Löwis11437992002-04-12 09:54:03 +00007822
7823 FILE *f = fopen ("conftest.val", "w");
7824 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825 return 1;
7826 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828 long int i = longval ();
7829 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7830 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 fprintf (f, "%ld\n", i);
7832 }
7833 else
7834 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835 unsigned long int i = ulongval ();
7836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7837 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 fprintf (f, "%lu\n", i);
7839 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007841
7842 ;
7843 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007844}
Martin v. Löwis11437992002-04-12 09:54:03 +00007845_ACEOF
7846rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007847if { (ac_try="$ac_link"
7848case "(($ac_try" in
7849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7850 *) ac_try_echo=$ac_try;;
7851esac
7852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7853 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 ac_status=$?
7855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007857 { (case "(($ac_try" in
7858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7859 *) ac_try_echo=$ac_try;;
7860esac
7861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7862 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ac_status=$?
7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); }; }; then
7866 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007867else
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 echo "$as_me: program exited with status $ac_status" >&5
7869echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007870sed 's/^/| /' conftest.$ac_ext >&5
7871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873if test "$ac_cv_type_long" = yes; then
7874 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007875See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007877See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878 { (exit 77); exit 77; }; }
7879 else
7880 ac_cv_sizeof_long=0
7881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883rm -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 +00007884fi
7885rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7888echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7889
7890
7891
Martin v. Löwis11437992002-04-12 09:54:03 +00007892cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007893#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007894_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007895
7896
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897{ echo "$as_me:$LINENO: checking for void *" >&5
7898echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007899if test "${ac_cv_type_void_p+set}" = set; then
7900 echo $ECHO_N "(cached) $ECHO_C" >&6
7901else
7902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* confdefs.h. */
7904_ACEOF
7905cat confdefs.h >>conftest.$ac_ext
7906cat >>conftest.$ac_ext <<_ACEOF
7907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007908$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007910int
7911main ()
7912{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 return 0;
7917 ;
7918 return 0;
7919}
7920_ACEOF
7921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007922if { (ac_try="$ac_compile"
7923case "(($ac_try" in
7924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7925 *) ac_try_echo=$ac_try;;
7926esac
7927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007930 grep -v '^ *+' conftest.er1 >conftest.err
7931 rm -f conftest.er1
7932 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007934 (exit $ac_status); } && {
7935 test -z "$ac_c_werror_flag" ||
7936 test ! -s conftest.err
7937 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ac_cv_type_void_p=yes
7939else
7940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007941sed 's/^/| /' conftest.$ac_ext >&5
7942
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007944fi
Brett Cannon19fab762007-06-02 03:02:29 +00007945
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7947fi
7948{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7949echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7950
7951# The cast to long int works around a bug in the HP C Compiler
7952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7954# This bug is HP SR number 8606223364.
7955{ echo "$as_me:$LINENO: checking size of void *" >&5
7956echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007957if test "${ac_cv_sizeof_void_p+set}" = set; then
7958 echo $ECHO_N "(cached) $ECHO_C" >&6
7959else
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 if test "$cross_compiling" = yes; then
7961 # Depending upon the size, compute the lo and hi bounds.
7962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007963/* confdefs.h. */
7964_ACEOF
7965cat confdefs.h >>conftest.$ac_ext
7966cat >>conftest.$ac_ext <<_ACEOF
7967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007968$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007974test_array [0] = 0
7975
7976 ;
7977 return 0;
7978}
7979_ACEOF
7980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981if { (ac_try="$ac_compile"
7982case "(($ac_try" in
7983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7984 *) ac_try_echo=$ac_try;;
7985esac
7986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007989 grep -v '^ *+' conftest.er1 >conftest.err
7990 rm -f conftest.er1
7991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007993 (exit $ac_status); } && {
7994 test -z "$ac_c_werror_flag" ||
7995 test ! -s conftest.err
7996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_lo=0 ac_mid=0
7998 while :; do
7999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008000/* confdefs.h. */
8001_ACEOF
8002cat confdefs.h >>conftest.$ac_ext
8003cat >>conftest.$ac_ext <<_ACEOF
8004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008005$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008006 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008007int
8008main ()
8009{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008011test_array [0] = 0
8012
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008018if { (ac_try="$ac_compile"
8019case "(($ac_try" in
8020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8021 *) ac_try_echo=$ac_try;;
8022esac
8023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008026 grep -v '^ *+' conftest.er1 >conftest.err
8027 rm -f conftest.er1
8028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030 (exit $ac_status); } && {
8031 test -z "$ac_c_werror_flag" ||
8032 test ! -s conftest.err
8033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008034 ac_hi=$ac_mid; break
8035else
8036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008037sed 's/^/| /' conftest.$ac_ext >&5
8038
Martin v. Löwiseba40652007-08-30 20:10:57 +00008039 ac_lo=`expr $ac_mid + 1`
8040 if test $ac_lo -le $ac_mid; then
8041 ac_lo= ac_hi=
8042 break
8043 fi
8044 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046
8047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 done
8049else
8050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008051sed 's/^/| /' conftest.$ac_ext >&5
8052
Martin v. Löwiseba40652007-08-30 20:10:57 +00008053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008054/* confdefs.h. */
8055_ACEOF
8056cat confdefs.h >>conftest.$ac_ext
8057cat >>conftest.$ac_ext <<_ACEOF
8058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008059$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008065test_array [0] = 0
8066
8067 ;
8068 return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072if { (ac_try="$ac_compile"
8073case "(($ac_try" in
8074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8075 *) ac_try_echo=$ac_try;;
8076esac
8077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008080 grep -v '^ *+' conftest.er1 >conftest.err
8081 rm -f conftest.er1
8082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008084 (exit $ac_status); } && {
8085 test -z "$ac_c_werror_flag" ||
8086 test ! -s conftest.err
8087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_hi=-1 ac_mid=-1
8089 while :; do
8090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* confdefs.h. */
8092_ACEOF
8093cat confdefs.h >>conftest.$ac_ext
8094cat >>conftest.$ac_ext <<_ACEOF
8095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008096$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008097 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
8099main ()
8100{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008102test_array [0] = 0
8103
8104 ;
8105 return 0;
8106}
8107_ACEOF
8108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008109if { (ac_try="$ac_compile"
8110case "(($ac_try" in
8111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8112 *) ac_try_echo=$ac_try;;
8113esac
8114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008117 grep -v '^ *+' conftest.er1 >conftest.err
8118 rm -f conftest.er1
8119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121 (exit $ac_status); } && {
8122 test -z "$ac_c_werror_flag" ||
8123 test ! -s conftest.err
8124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 ac_lo=$ac_mid; break
8126else
8127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008128sed 's/^/| /' conftest.$ac_ext >&5
8129
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130 ac_hi=`expr '(' $ac_mid ')' - 1`
8131 if test $ac_mid -le $ac_hi; then
8132 ac_lo= ac_hi=
8133 break
8134 fi
8135 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008137
8138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 done
8140else
8141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008142sed 's/^/| /' conftest.$ac_ext >&5
8143
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008146
8147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008149
8150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008151# Binary search between lo and hi bounds.
8152while test "x$ac_lo" != "x$ac_hi"; do
8153 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008155/* confdefs.h. */
8156_ACEOF
8157cat confdefs.h >>conftest.$ac_ext
8158cat >>conftest.$ac_ext <<_ACEOF
8159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008160$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008161 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008162int
8163main ()
8164{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008166test_array [0] = 0
8167
8168 ;
8169 return 0;
8170}
8171_ACEOF
8172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173if { (ac_try="$ac_compile"
8174case "(($ac_try" in
8175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8176 *) ac_try_echo=$ac_try;;
8177esac
8178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008181 grep -v '^ *+' conftest.er1 >conftest.err
8182 rm -f conftest.er1
8183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185 (exit $ac_status); } && {
8186 test -z "$ac_c_werror_flag" ||
8187 test ! -s conftest.err
8188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 ac_hi=$ac_mid
8190else
8191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008192sed 's/^/| /' conftest.$ac_ext >&5
8193
Martin v. Löwiseba40652007-08-30 20:10:57 +00008194 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008196
8197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008198done
8199case $ac_lo in
8200?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008201'') if test "$ac_cv_type_void_p" = yes; then
8202 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008203See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008205See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206 { (exit 77); exit 77; }; }
8207 else
8208 ac_cv_sizeof_void_p=0
8209 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008210esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008211else
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008213/* confdefs.h. */
8214_ACEOF
8215cat confdefs.h >>conftest.$ac_ext
8216cat >>conftest.$ac_ext <<_ACEOF
8217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008218$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008219 typedef void * ac__type_sizeof_;
8220static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8221static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008222#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008223#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008224int
8225main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008226{
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
8228 FILE *f = fopen ("conftest.val", "w");
8229 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230 return 1;
8231 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233 long int i = longval ();
8234 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8235 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 fprintf (f, "%ld\n", i);
8237 }
8238 else
8239 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008240 unsigned long int i = ulongval ();
8241 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8242 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008243 fprintf (f, "%lu\n", i);
8244 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
8247 ;
8248 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008249}
Martin v. Löwis11437992002-04-12 09:54:03 +00008250_ACEOF
8251rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008252if { (ac_try="$ac_link"
8253case "(($ac_try" in
8254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8255 *) ac_try_echo=$ac_try;;
8256esac
8257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8258 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008259 ac_status=$?
8260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8261 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008262 { (case "(($ac_try" in
8263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8264 *) ac_try_echo=$ac_try;;
8265esac
8266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8267 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); }; }; then
8271 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008272else
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 echo "$as_me: program exited with status $ac_status" >&5
8274echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008275sed 's/^/| /' conftest.$ac_ext >&5
8276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278if test "$ac_cv_type_void_p" = yes; then
8279 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008280See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008282See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283 { (exit 77); exit 77; }; }
8284 else
8285 ac_cv_sizeof_void_p=0
8286 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288rm -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 +00008289fi
8290rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8293echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8294
8295
8296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008298#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008299_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008300
8301
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302{ echo "$as_me:$LINENO: checking for short" >&5
8303echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008304if test "${ac_cv_type_short+set}" = set; then
8305 echo $ECHO_N "(cached) $ECHO_C" >&6
8306else
8307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008308/* confdefs.h. */
8309_ACEOF
8310cat confdefs.h >>conftest.$ac_ext
8311cat >>conftest.$ac_ext <<_ACEOF
8312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008313$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008315int
8316main ()
8317{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008321 return 0;
8322 ;
8323 return 0;
8324}
8325_ACEOF
8326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008327if { (ac_try="$ac_compile"
8328case "(($ac_try" in
8329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8330 *) ac_try_echo=$ac_try;;
8331esac
8332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008335 grep -v '^ *+' conftest.er1 >conftest.err
8336 rm -f conftest.er1
8337 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008339 (exit $ac_status); } && {
8340 test -z "$ac_c_werror_flag" ||
8341 test ! -s conftest.err
8342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008343 ac_cv_type_short=yes
8344else
8345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008346sed 's/^/| /' conftest.$ac_ext >&5
8347
Martin v. Löwiseba40652007-08-30 20:10:57 +00008348 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008349fi
Brett Cannon19fab762007-06-02 03:02:29 +00008350
Martin v. Löwiseba40652007-08-30 20:10:57 +00008351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8352fi
8353{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8354echo "${ECHO_T}$ac_cv_type_short" >&6; }
8355
8356# The cast to long int works around a bug in the HP C Compiler
8357# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8358# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8359# This bug is HP SR number 8606223364.
8360{ echo "$as_me:$LINENO: checking size of short" >&5
8361echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008362if test "${ac_cv_sizeof_short+set}" = set; then
8363 echo $ECHO_N "(cached) $ECHO_C" >&6
8364else
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 if test "$cross_compiling" = yes; then
8366 # Depending upon the size, compute the lo and hi bounds.
8367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008368/* confdefs.h. */
8369_ACEOF
8370cat confdefs.h >>conftest.$ac_ext
8371cat >>conftest.$ac_ext <<_ACEOF
8372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008373$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008375int
8376main ()
8377{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008379test_array [0] = 0
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386if { (ac_try="$ac_compile"
8387case "(($ac_try" in
8388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8389 *) ac_try_echo=$ac_try;;
8390esac
8391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008394 grep -v '^ *+' conftest.er1 >conftest.err
8395 rm -f conftest.er1
8396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008398 (exit $ac_status); } && {
8399 test -z "$ac_c_werror_flag" ||
8400 test ! -s conftest.err
8401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 ac_lo=0 ac_mid=0
8403 while :; do
8404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008405/* confdefs.h. */
8406_ACEOF
8407cat confdefs.h >>conftest.$ac_ext
8408cat >>conftest.$ac_ext <<_ACEOF
8409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008410$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008411 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008412int
8413main ()
8414{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008416test_array [0] = 0
8417
8418 ;
8419 return 0;
8420}
8421_ACEOF
8422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008423if { (ac_try="$ac_compile"
8424case "(($ac_try" in
8425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8426 *) ac_try_echo=$ac_try;;
8427esac
8428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008431 grep -v '^ *+' conftest.er1 >conftest.err
8432 rm -f conftest.er1
8433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435 (exit $ac_status); } && {
8436 test -z "$ac_c_werror_flag" ||
8437 test ! -s conftest.err
8438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 ac_hi=$ac_mid; break
8440else
8441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008442sed 's/^/| /' conftest.$ac_ext >&5
8443
Martin v. Löwiseba40652007-08-30 20:10:57 +00008444 ac_lo=`expr $ac_mid + 1`
8445 if test $ac_lo -le $ac_mid; then
8446 ac_lo= ac_hi=
8447 break
8448 fi
8449 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451
8452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 done
8454else
8455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008456sed 's/^/| /' conftest.$ac_ext >&5
8457
Martin v. Löwiseba40652007-08-30 20:10:57 +00008458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008459/* confdefs.h. */
8460_ACEOF
8461cat confdefs.h >>conftest.$ac_ext
8462cat >>conftest.$ac_ext <<_ACEOF
8463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008464$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008470test_array [0] = 0
8471
8472 ;
8473 return 0;
8474}
8475_ACEOF
8476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008477if { (ac_try="$ac_compile"
8478case "(($ac_try" in
8479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8480 *) ac_try_echo=$ac_try;;
8481esac
8482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008485 grep -v '^ *+' conftest.er1 >conftest.err
8486 rm -f conftest.er1
8487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489 (exit $ac_status); } && {
8490 test -z "$ac_c_werror_flag" ||
8491 test ! -s conftest.err
8492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_hi=-1 ac_mid=-1
8494 while :; do
8495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008496/* confdefs.h. */
8497_ACEOF
8498cat confdefs.h >>conftest.$ac_ext
8499cat >>conftest.$ac_ext <<_ACEOF
8500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008501$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008502 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008503int
8504main ()
8505{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008507test_array [0] = 0
8508
8509 ;
8510 return 0;
8511}
8512_ACEOF
8513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514if { (ac_try="$ac_compile"
8515case "(($ac_try" in
8516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8517 *) ac_try_echo=$ac_try;;
8518esac
8519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008522 grep -v '^ *+' conftest.er1 >conftest.err
8523 rm -f conftest.er1
8524 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008526 (exit $ac_status); } && {
8527 test -z "$ac_c_werror_flag" ||
8528 test ! -s conftest.err
8529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ac_lo=$ac_mid; break
8531else
8532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008533sed 's/^/| /' conftest.$ac_ext >&5
8534
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535 ac_hi=`expr '(' $ac_mid ')' - 1`
8536 if test $ac_mid -le $ac_hi; then
8537 ac_lo= ac_hi=
8538 break
8539 fi
8540 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008542
8543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 done
8545else
8546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008547sed 's/^/| /' conftest.$ac_ext >&5
8548
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008551
8552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008554
8555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008556# Binary search between lo and hi bounds.
8557while test "x$ac_lo" != "x$ac_hi"; do
8558 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008560/* confdefs.h. */
8561_ACEOF
8562cat confdefs.h >>conftest.$ac_ext
8563cat >>conftest.$ac_ext <<_ACEOF
8564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008565$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008567int
8568main ()
8569{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008571test_array [0] = 0
8572
8573 ;
8574 return 0;
8575}
8576_ACEOF
8577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578if { (ac_try="$ac_compile"
8579case "(($ac_try" in
8580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8581 *) ac_try_echo=$ac_try;;
8582esac
8583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008586 grep -v '^ *+' conftest.er1 >conftest.err
8587 rm -f conftest.er1
8588 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590 (exit $ac_status); } && {
8591 test -z "$ac_c_werror_flag" ||
8592 test ! -s conftest.err
8593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 ac_hi=$ac_mid
8595else
8596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008597sed 's/^/| /' conftest.$ac_ext >&5
8598
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008601
8602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008603done
8604case $ac_lo in
8605?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008606'') if test "$ac_cv_type_short" = yes; then
8607 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008608See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008610See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008611 { (exit 77); exit 77; }; }
8612 else
8613 ac_cv_sizeof_short=0
8614 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008615esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008616else
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* confdefs.h. */
8619_ACEOF
8620cat confdefs.h >>conftest.$ac_ext
8621cat >>conftest.$ac_ext <<_ACEOF
8622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008624 typedef short ac__type_sizeof_;
8625static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8626static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008627#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008628#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008629int
8630main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008631{
Martin v. Löwis11437992002-04-12 09:54:03 +00008632
8633 FILE *f = fopen ("conftest.val", "w");
8634 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 return 1;
8636 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638 long int i = longval ();
8639 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8640 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 fprintf (f, "%ld\n", i);
8642 }
8643 else
8644 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645 unsigned long int i = ulongval ();
8646 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8647 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 fprintf (f, "%lu\n", i);
8649 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008650 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
8652 ;
8653 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008654}
Martin v. Löwis11437992002-04-12 09:54:03 +00008655_ACEOF
8656rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008657if { (ac_try="$ac_link"
8658case "(($ac_try" in
8659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8660 *) ac_try_echo=$ac_try;;
8661esac
8662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8663 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_status=$?
8665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008667 { (case "(($ac_try" in
8668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8669 *) ac_try_echo=$ac_try;;
8670esac
8671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8672 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ac_status=$?
8674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675 (exit $ac_status); }; }; then
8676 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008677else
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 echo "$as_me: program exited with status $ac_status" >&5
8679echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008680sed 's/^/| /' conftest.$ac_ext >&5
8681
Martin v. Löwis11437992002-04-12 09:54:03 +00008682( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683if test "$ac_cv_type_short" = yes; then
8684 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008685See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008687See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688 { (exit 77); exit 77; }; }
8689 else
8690 ac_cv_sizeof_short=0
8691 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693rm -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 +00008694fi
8695rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8698echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8699
8700
8701
Martin v. Löwis11437992002-04-12 09:54:03 +00008702cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008703#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008704_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008705
8706
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707{ echo "$as_me:$LINENO: checking for float" >&5
8708echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008709if test "${ac_cv_type_float+set}" = set; then
8710 echo $ECHO_N "(cached) $ECHO_C" >&6
8711else
8712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* confdefs.h. */
8714_ACEOF
8715cat confdefs.h >>conftest.$ac_ext
8716cat >>conftest.$ac_ext <<_ACEOF
8717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008720int
8721main ()
8722{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 return 0;
8727 ;
8728 return 0;
8729}
8730_ACEOF
8731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008732if { (ac_try="$ac_compile"
8733case "(($ac_try" in
8734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8735 *) ac_try_echo=$ac_try;;
8736esac
8737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008740 grep -v '^ *+' conftest.er1 >conftest.err
8741 rm -f conftest.er1
8742 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744 (exit $ac_status); } && {
8745 test -z "$ac_c_werror_flag" ||
8746 test ! -s conftest.err
8747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 ac_cv_type_float=yes
8749else
8750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008751sed 's/^/| /' conftest.$ac_ext >&5
8752
Martin v. Löwiseba40652007-08-30 20:10:57 +00008753 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008754fi
Brett Cannon19fab762007-06-02 03:02:29 +00008755
Martin v. Löwiseba40652007-08-30 20:10:57 +00008756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8757fi
8758{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8759echo "${ECHO_T}$ac_cv_type_float" >&6; }
8760
8761# The cast to long int works around a bug in the HP C Compiler
8762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8764# This bug is HP SR number 8606223364.
8765{ echo "$as_me:$LINENO: checking size of float" >&5
8766echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008767if test "${ac_cv_sizeof_float+set}" = set; then
8768 echo $ECHO_N "(cached) $ECHO_C" >&6
8769else
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 if test "$cross_compiling" = yes; then
8771 # Depending upon the size, compute the lo and hi bounds.
8772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008773/* confdefs.h. */
8774_ACEOF
8775cat confdefs.h >>conftest.$ac_ext
8776cat >>conftest.$ac_ext <<_ACEOF
8777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008778$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008784test_array [0] = 0
8785
8786 ;
8787 return 0;
8788}
8789_ACEOF
8790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791if { (ac_try="$ac_compile"
8792case "(($ac_try" in
8793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8794 *) ac_try_echo=$ac_try;;
8795esac
8796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008799 grep -v '^ *+' conftest.er1 >conftest.err
8800 rm -f conftest.er1
8801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008803 (exit $ac_status); } && {
8804 test -z "$ac_c_werror_flag" ||
8805 test ! -s conftest.err
8806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_lo=0 ac_mid=0
8808 while :; do
8809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* confdefs.h. */
8811_ACEOF
8812cat confdefs.h >>conftest.$ac_ext
8813cat >>conftest.$ac_ext <<_ACEOF
8814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008816 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008821test_array [0] = 0
8822
8823 ;
8824 return 0;
8825}
8826_ACEOF
8827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008828if { (ac_try="$ac_compile"
8829case "(($ac_try" in
8830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8831 *) ac_try_echo=$ac_try;;
8832esac
8833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008836 grep -v '^ *+' conftest.er1 >conftest.err
8837 rm -f conftest.er1
8838 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840 (exit $ac_status); } && {
8841 test -z "$ac_c_werror_flag" ||
8842 test ! -s conftest.err
8843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ac_hi=$ac_mid; break
8845else
8846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008847sed 's/^/| /' conftest.$ac_ext >&5
8848
Martin v. Löwiseba40652007-08-30 20:10:57 +00008849 ac_lo=`expr $ac_mid + 1`
8850 if test $ac_lo -le $ac_mid; then
8851 ac_lo= ac_hi=
8852 break
8853 fi
8854 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856
8857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 done
8859else
8860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008861sed 's/^/| /' conftest.$ac_ext >&5
8862
Martin v. Löwiseba40652007-08-30 20:10:57 +00008863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008864/* confdefs.h. */
8865_ACEOF
8866cat confdefs.h >>conftest.$ac_ext
8867cat >>conftest.$ac_ext <<_ACEOF
8868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008869$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882if { (ac_try="$ac_compile"
8883case "(($ac_try" in
8884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8885 *) ac_try_echo=$ac_try;;
8886esac
8887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008890 grep -v '^ *+' conftest.er1 >conftest.err
8891 rm -f conftest.er1
8892 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894 (exit $ac_status); } && {
8895 test -z "$ac_c_werror_flag" ||
8896 test ! -s conftest.err
8897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_hi=-1 ac_mid=-1
8899 while :; do
8900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008901/* confdefs.h. */
8902_ACEOF
8903cat confdefs.h >>conftest.$ac_ext
8904cat >>conftest.$ac_ext <<_ACEOF
8905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008906$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008908int
8909main ()
8910{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008912test_array [0] = 0
8913
8914 ;
8915 return 0;
8916}
8917_ACEOF
8918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919if { (ac_try="$ac_compile"
8920case "(($ac_try" in
8921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8922 *) ac_try_echo=$ac_try;;
8923esac
8924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008927 grep -v '^ *+' conftest.er1 >conftest.err
8928 rm -f conftest.er1
8929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008931 (exit $ac_status); } && {
8932 test -z "$ac_c_werror_flag" ||
8933 test ! -s conftest.err
8934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ac_lo=$ac_mid; break
8936else
8937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008938sed 's/^/| /' conftest.$ac_ext >&5
8939
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940 ac_hi=`expr '(' $ac_mid ')' - 1`
8941 if test $ac_mid -le $ac_hi; then
8942 ac_lo= ac_hi=
8943 break
8944 fi
8945 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947
8948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 done
8950else
8951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008952sed 's/^/| /' conftest.$ac_ext >&5
8953
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008956
8957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959
8960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008961# Binary search between lo and hi bounds.
8962while test "x$ac_lo" != "x$ac_hi"; do
8963 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008965/* confdefs.h. */
8966_ACEOF
8967cat confdefs.h >>conftest.$ac_ext
8968cat >>conftest.$ac_ext <<_ACEOF
8969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008970$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008971 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008972int
8973main ()
8974{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008976test_array [0] = 0
8977
8978 ;
8979 return 0;
8980}
8981_ACEOF
8982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983if { (ac_try="$ac_compile"
8984case "(($ac_try" in
8985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8986 *) ac_try_echo=$ac_try;;
8987esac
8988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008991 grep -v '^ *+' conftest.er1 >conftest.err
8992 rm -f conftest.er1
8993 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995 (exit $ac_status); } && {
8996 test -z "$ac_c_werror_flag" ||
8997 test ! -s conftest.err
8998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 ac_hi=$ac_mid
9000else
9001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009002sed 's/^/| /' conftest.$ac_ext >&5
9003
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009006
9007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009008done
9009case $ac_lo in
9010?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009011'') if test "$ac_cv_type_float" = yes; then
9012 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009013See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009015See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016 { (exit 77); exit 77; }; }
9017 else
9018 ac_cv_sizeof_float=0
9019 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009020esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009023/* confdefs.h. */
9024_ACEOF
9025cat confdefs.h >>conftest.$ac_ext
9026cat >>conftest.$ac_ext <<_ACEOF
9027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009028$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029 typedef float ac__type_sizeof_;
9030static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9031static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009032#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009033#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009034int
9035main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009036{
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
9038 FILE *f = fopen ("conftest.val", "w");
9039 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 return 1;
9041 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043 long int i = longval ();
9044 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9045 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 fprintf (f, "%ld\n", i);
9047 }
9048 else
9049 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009050 unsigned long int i = ulongval ();
9051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9052 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009053 fprintf (f, "%lu\n", i);
9054 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009056
9057 ;
9058 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009059}
Martin v. Löwis11437992002-04-12 09:54:03 +00009060_ACEOF
9061rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009062if { (ac_try="$ac_link"
9063case "(($ac_try" in
9064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9065 *) ac_try_echo=$ac_try;;
9066esac
9067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9068 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 ac_status=$?
9070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072 { (case "(($ac_try" in
9073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9074 *) ac_try_echo=$ac_try;;
9075esac
9076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9077 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 ac_status=$?
9079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9080 (exit $ac_status); }; }; then
9081 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009082else
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 echo "$as_me: program exited with status $ac_status" >&5
9084echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009085sed 's/^/| /' conftest.$ac_ext >&5
9086
Martin v. Löwis11437992002-04-12 09:54:03 +00009087( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088if test "$ac_cv_type_float" = yes; then
9089 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009090See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009092See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093 { (exit 77); exit 77; }; }
9094 else
9095 ac_cv_sizeof_float=0
9096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098rm -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 +00009099fi
9100rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9103echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9104
9105
9106
Martin v. Löwis11437992002-04-12 09:54:03 +00009107cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009108#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009109_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009110
9111
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112{ echo "$as_me:$LINENO: checking for double" >&5
9113echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009114if test "${ac_cv_type_double+set}" = set; then
9115 echo $ECHO_N "(cached) $ECHO_C" >&6
9116else
9117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009118/* confdefs.h. */
9119_ACEOF
9120cat confdefs.h >>conftest.$ac_ext
9121cat >>conftest.$ac_ext <<_ACEOF
9122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009123$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009125int
9126main ()
9127{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009129 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 return 0;
9132 ;
9133 return 0;
9134}
9135_ACEOF
9136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009137if { (ac_try="$ac_compile"
9138case "(($ac_try" in
9139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9140 *) ac_try_echo=$ac_try;;
9141esac
9142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009145 grep -v '^ *+' conftest.er1 >conftest.err
9146 rm -f conftest.er1
9147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149 (exit $ac_status); } && {
9150 test -z "$ac_c_werror_flag" ||
9151 test ! -s conftest.err
9152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ac_cv_type_double=yes
9154else
9155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009156sed 's/^/| /' conftest.$ac_ext >&5
9157
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009159fi
Brett Cannon19fab762007-06-02 03:02:29 +00009160
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162fi
9163{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9164echo "${ECHO_T}$ac_cv_type_double" >&6; }
9165
9166# The cast to long int works around a bug in the HP C Compiler
9167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9169# This bug is HP SR number 8606223364.
9170{ echo "$as_me:$LINENO: checking size of double" >&5
9171echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009172if test "${ac_cv_sizeof_double+set}" = set; then
9173 echo $ECHO_N "(cached) $ECHO_C" >&6
9174else
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 if test "$cross_compiling" = yes; then
9176 # Depending upon the size, compute the lo and hi bounds.
9177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009178/* confdefs.h. */
9179_ACEOF
9180cat confdefs.h >>conftest.$ac_ext
9181cat >>conftest.$ac_ext <<_ACEOF
9182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009183$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009185int
9186main ()
9187{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009189test_array [0] = 0
9190
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196if { (ac_try="$ac_compile"
9197case "(($ac_try" in
9198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9199 *) ac_try_echo=$ac_try;;
9200esac
9201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009204 grep -v '^ *+' conftest.er1 >conftest.err
9205 rm -f conftest.er1
9206 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009208 (exit $ac_status); } && {
9209 test -z "$ac_c_werror_flag" ||
9210 test ! -s conftest.err
9211 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_lo=0 ac_mid=0
9213 while :; do
9214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009215/* confdefs.h. */
9216_ACEOF
9217cat confdefs.h >>conftest.$ac_ext
9218cat >>conftest.$ac_ext <<_ACEOF
9219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009220$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009221 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009222int
9223main ()
9224{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009226test_array [0] = 0
9227
9228 ;
9229 return 0;
9230}
9231_ACEOF
9232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009233if { (ac_try="$ac_compile"
9234case "(($ac_try" in
9235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9236 *) ac_try_echo=$ac_try;;
9237esac
9238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009241 grep -v '^ *+' conftest.er1 >conftest.err
9242 rm -f conftest.er1
9243 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245 (exit $ac_status); } && {
9246 test -z "$ac_c_werror_flag" ||
9247 test ! -s conftest.err
9248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 ac_hi=$ac_mid; break
9250else
9251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009252sed 's/^/| /' conftest.$ac_ext >&5
9253
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254 ac_lo=`expr $ac_mid + 1`
9255 if test $ac_lo -le $ac_mid; then
9256 ac_lo= ac_hi=
9257 break
9258 fi
9259 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261
9262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 done
9264else
9265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009266sed 's/^/| /' conftest.$ac_ext >&5
9267
Martin v. Löwiseba40652007-08-30 20:10:57 +00009268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009269/* confdefs.h. */
9270_ACEOF
9271cat confdefs.h >>conftest.$ac_ext
9272cat >>conftest.$ac_ext <<_ACEOF
9273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009274$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009276int
9277main ()
9278{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009280test_array [0] = 0
9281
9282 ;
9283 return 0;
9284}
9285_ACEOF
9286rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009287if { (ac_try="$ac_compile"
9288case "(($ac_try" in
9289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9290 *) ac_try_echo=$ac_try;;
9291esac
9292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009295 grep -v '^ *+' conftest.er1 >conftest.err
9296 rm -f conftest.er1
9297 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299 (exit $ac_status); } && {
9300 test -z "$ac_c_werror_flag" ||
9301 test ! -s conftest.err
9302 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_hi=-1 ac_mid=-1
9304 while :; do
9305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009306/* confdefs.h. */
9307_ACEOF
9308cat confdefs.h >>conftest.$ac_ext
9309cat >>conftest.$ac_ext <<_ACEOF
9310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009311$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009312 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009313int
9314main ()
9315{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009317test_array [0] = 0
9318
9319 ;
9320 return 0;
9321}
9322_ACEOF
9323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324if { (ac_try="$ac_compile"
9325case "(($ac_try" in
9326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9327 *) ac_try_echo=$ac_try;;
9328esac
9329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009332 grep -v '^ *+' conftest.er1 >conftest.err
9333 rm -f conftest.er1
9334 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009336 (exit $ac_status); } && {
9337 test -z "$ac_c_werror_flag" ||
9338 test ! -s conftest.err
9339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ac_lo=$ac_mid; break
9341else
9342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009343sed 's/^/| /' conftest.$ac_ext >&5
9344
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345 ac_hi=`expr '(' $ac_mid ')' - 1`
9346 if test $ac_mid -le $ac_hi; then
9347 ac_lo= ac_hi=
9348 break
9349 fi
9350 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352
9353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 done
9355else
9356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009357sed 's/^/| /' conftest.$ac_ext >&5
9358
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009361
9362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009364
9365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009366# Binary search between lo and hi bounds.
9367while test "x$ac_lo" != "x$ac_hi"; do
9368 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009370/* confdefs.h. */
9371_ACEOF
9372cat confdefs.h >>conftest.$ac_ext
9373cat >>conftest.$ac_ext <<_ACEOF
9374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009375$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009376 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009377int
9378main ()
9379{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009381test_array [0] = 0
9382
9383 ;
9384 return 0;
9385}
9386_ACEOF
9387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388if { (ac_try="$ac_compile"
9389case "(($ac_try" in
9390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9391 *) ac_try_echo=$ac_try;;
9392esac
9393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009396 grep -v '^ *+' conftest.er1 >conftest.err
9397 rm -f conftest.er1
9398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400 (exit $ac_status); } && {
9401 test -z "$ac_c_werror_flag" ||
9402 test ! -s conftest.err
9403 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 ac_hi=$ac_mid
9405else
9406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009407sed 's/^/| /' conftest.$ac_ext >&5
9408
Martin v. Löwiseba40652007-08-30 20:10:57 +00009409 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009411
9412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009413done
9414case $ac_lo in
9415?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009416'') if test "$ac_cv_type_double" = yes; then
9417 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009418See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009420See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421 { (exit 77); exit 77; }; }
9422 else
9423 ac_cv_sizeof_double=0
9424 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009425esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009426else
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* confdefs.h. */
9429_ACEOF
9430cat confdefs.h >>conftest.$ac_ext
9431cat >>conftest.$ac_ext <<_ACEOF
9432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009433$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009434 typedef double ac__type_sizeof_;
9435static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9436static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009437#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009438#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009439int
9440main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009441{
Martin v. Löwis11437992002-04-12 09:54:03 +00009442
9443 FILE *f = fopen ("conftest.val", "w");
9444 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445 return 1;
9446 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448 long int i = longval ();
9449 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9450 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 fprintf (f, "%ld\n", i);
9452 }
9453 else
9454 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455 unsigned long int i = ulongval ();
9456 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9457 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 fprintf (f, "%lu\n", i);
9459 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
9462 ;
9463 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009464}
Martin v. Löwis11437992002-04-12 09:54:03 +00009465_ACEOF
9466rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467if { (ac_try="$ac_link"
9468case "(($ac_try" in
9469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9470 *) ac_try_echo=$ac_try;;
9471esac
9472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9473 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 ac_status=$?
9475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477 { (case "(($ac_try" in
9478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9479 *) ac_try_echo=$ac_try;;
9480esac
9481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9482 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ac_status=$?
9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
9486 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009487else
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 echo "$as_me: program exited with status $ac_status" >&5
9489echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009490sed 's/^/| /' conftest.$ac_ext >&5
9491
Martin v. Löwis11437992002-04-12 09:54:03 +00009492( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493if test "$ac_cv_type_double" = yes; then
9494 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009495See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009497See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498 { (exit 77); exit 77; }; }
9499 else
9500 ac_cv_sizeof_double=0
9501 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503rm -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 +00009504fi
9505rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9508echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9509
9510
9511
Martin v. Löwis11437992002-04-12 09:54:03 +00009512cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009513#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009514_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009515
9516
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9518echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009519if test "${ac_cv_type_fpos_t+set}" = set; then
9520 echo $ECHO_N "(cached) $ECHO_C" >&6
9521else
9522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009523/* confdefs.h. */
9524_ACEOF
9525cat confdefs.h >>conftest.$ac_ext
9526cat >>conftest.$ac_ext <<_ACEOF
9527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009528$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009530int
9531main ()
9532{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 return 0;
9537 ;
9538 return 0;
9539}
9540_ACEOF
9541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009542if { (ac_try="$ac_compile"
9543case "(($ac_try" in
9544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9545 *) ac_try_echo=$ac_try;;
9546esac
9547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009550 grep -v '^ *+' conftest.er1 >conftest.err
9551 rm -f conftest.er1
9552 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009554 (exit $ac_status); } && {
9555 test -z "$ac_c_werror_flag" ||
9556 test ! -s conftest.err
9557 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 ac_cv_type_fpos_t=yes
9559else
9560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009561sed 's/^/| /' conftest.$ac_ext >&5
9562
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009564fi
Brett Cannon19fab762007-06-02 03:02:29 +00009565
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9567fi
9568{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9569echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9570
9571# The cast to long int works around a bug in the HP C Compiler
9572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9574# This bug is HP SR number 8606223364.
9575{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9576echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009577if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9578 echo $ECHO_N "(cached) $ECHO_C" >&6
9579else
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 if test "$cross_compiling" = yes; then
9581 # Depending upon the size, compute the lo and hi bounds.
9582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009583/* confdefs.h. */
9584_ACEOF
9585cat confdefs.h >>conftest.$ac_ext
9586cat >>conftest.$ac_ext <<_ACEOF
9587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009590int
9591main ()
9592{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009594test_array [0] = 0
9595
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601if { (ac_try="$ac_compile"
9602case "(($ac_try" in
9603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9604 *) ac_try_echo=$ac_try;;
9605esac
9606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009609 grep -v '^ *+' conftest.er1 >conftest.err
9610 rm -f conftest.er1
9611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009613 (exit $ac_status); } && {
9614 test -z "$ac_c_werror_flag" ||
9615 test ! -s conftest.err
9616 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_lo=0 ac_mid=0
9618 while :; do
9619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* confdefs.h. */
9621_ACEOF
9622cat confdefs.h >>conftest.$ac_ext
9623cat >>conftest.$ac_ext <<_ACEOF
9624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009625$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009626 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009627int
9628main ()
9629{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009631test_array [0] = 0
9632
9633 ;
9634 return 0;
9635}
9636_ACEOF
9637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009638if { (ac_try="$ac_compile"
9639case "(($ac_try" in
9640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9641 *) ac_try_echo=$ac_try;;
9642esac
9643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009646 grep -v '^ *+' conftest.er1 >conftest.err
9647 rm -f conftest.er1
9648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650 (exit $ac_status); } && {
9651 test -z "$ac_c_werror_flag" ||
9652 test ! -s conftest.err
9653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ac_hi=$ac_mid; break
9655else
9656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009657sed 's/^/| /' conftest.$ac_ext >&5
9658
Martin v. Löwiseba40652007-08-30 20:10:57 +00009659 ac_lo=`expr $ac_mid + 1`
9660 if test $ac_lo -le $ac_mid; then
9661 ac_lo= ac_hi=
9662 break
9663 fi
9664 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666
9667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 done
9669else
9670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009671sed 's/^/| /' conftest.$ac_ext >&5
9672
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* confdefs.h. */
9675_ACEOF
9676cat confdefs.h >>conftest.$ac_ext
9677cat >>conftest.$ac_ext <<_ACEOF
9678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
9683{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009685test_array [0] = 0
9686
9687 ;
9688 return 0;
9689}
9690_ACEOF
9691rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692if { (ac_try="$ac_compile"
9693case "(($ac_try" in
9694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9695 *) ac_try_echo=$ac_try;;
9696esac
9697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009700 grep -v '^ *+' conftest.er1 >conftest.err
9701 rm -f conftest.er1
9702 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009704 (exit $ac_status); } && {
9705 test -z "$ac_c_werror_flag" ||
9706 test ! -s conftest.err
9707 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_hi=-1 ac_mid=-1
9709 while :; do
9710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* confdefs.h. */
9712_ACEOF
9713cat confdefs.h >>conftest.$ac_ext
9714cat >>conftest.$ac_ext <<_ACEOF
9715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009718int
9719main ()
9720{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009722test_array [0] = 0
9723
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009729if { (ac_try="$ac_compile"
9730case "(($ac_try" in
9731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9732 *) ac_try_echo=$ac_try;;
9733esac
9734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 grep -v '^ *+' conftest.er1 >conftest.err
9738 rm -f conftest.er1
9739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009741 (exit $ac_status); } && {
9742 test -z "$ac_c_werror_flag" ||
9743 test ! -s conftest.err
9744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_lo=$ac_mid; break
9746else
9747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009748sed 's/^/| /' conftest.$ac_ext >&5
9749
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750 ac_hi=`expr '(' $ac_mid ')' - 1`
9751 if test $ac_mid -le $ac_hi; then
9752 ac_lo= ac_hi=
9753 break
9754 fi
9755 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009757
9758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 done
9760else
9761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009762sed 's/^/| /' conftest.$ac_ext >&5
9763
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009766
9767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009769
9770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771# Binary search between lo and hi bounds.
9772while test "x$ac_lo" != "x$ac_hi"; do
9773 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009775/* confdefs.h. */
9776_ACEOF
9777cat confdefs.h >>conftest.$ac_ext
9778cat >>conftest.$ac_ext <<_ACEOF
9779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009782int
9783main ()
9784{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009786test_array [0] = 0
9787
9788 ;
9789 return 0;
9790}
9791_ACEOF
9792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793if { (ac_try="$ac_compile"
9794case "(($ac_try" in
9795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9796 *) ac_try_echo=$ac_try;;
9797esac
9798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009801 grep -v '^ *+' conftest.er1 >conftest.err
9802 rm -f conftest.er1
9803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009805 (exit $ac_status); } && {
9806 test -z "$ac_c_werror_flag" ||
9807 test ! -s conftest.err
9808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ac_hi=$ac_mid
9810else
9811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009812sed 's/^/| /' conftest.$ac_ext >&5
9813
Martin v. Löwiseba40652007-08-30 20:10:57 +00009814 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009816
9817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009818done
9819case $ac_lo in
9820?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009821'') if test "$ac_cv_type_fpos_t" = yes; then
9822 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009823See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009825See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826 { (exit 77); exit 77; }; }
9827 else
9828 ac_cv_sizeof_fpos_t=0
9829 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009830esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009831else
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* confdefs.h. */
9834_ACEOF
9835cat confdefs.h >>conftest.$ac_ext
9836cat >>conftest.$ac_ext <<_ACEOF
9837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839 typedef fpos_t ac__type_sizeof_;
9840static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9841static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009842#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009843#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009844int
9845main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009846{
Martin v. Löwis11437992002-04-12 09:54:03 +00009847
9848 FILE *f = fopen ("conftest.val", "w");
9849 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850 return 1;
9851 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853 long int i = longval ();
9854 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9855 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 fprintf (f, "%ld\n", i);
9857 }
9858 else
9859 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860 unsigned long int i = ulongval ();
9861 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9862 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 fprintf (f, "%lu\n", i);
9864 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
9867 ;
9868 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009869}
Martin v. Löwis11437992002-04-12 09:54:03 +00009870_ACEOF
9871rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009872if { (ac_try="$ac_link"
9873case "(($ac_try" in
9874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9875 *) ac_try_echo=$ac_try;;
9876esac
9877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9878 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 ac_status=$?
9880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009882 { (case "(($ac_try" in
9883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9884 *) ac_try_echo=$ac_try;;
9885esac
9886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9887 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ac_status=$?
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); }; }; then
9891 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009892else
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 echo "$as_me: program exited with status $ac_status" >&5
9894echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009895sed 's/^/| /' conftest.$ac_ext >&5
9896
Martin v. Löwis11437992002-04-12 09:54:03 +00009897( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898if test "$ac_cv_type_fpos_t" = yes; then
9899 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009900See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009902See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903 { (exit 77); exit 77; }; }
9904 else
9905 ac_cv_sizeof_fpos_t=0
9906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908rm -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 +00009909fi
9910rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9913echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9914
9915
9916
Martin v. Löwis11437992002-04-12 09:54:03 +00009917cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009918#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009919_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009920
Michael W. Hudson54241132001-12-07 15:38:26 +00009921
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922{ echo "$as_me:$LINENO: checking for size_t" >&5
9923echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009924if test "${ac_cv_type_size_t+set}" = set; then
9925 echo $ECHO_N "(cached) $ECHO_C" >&6
9926else
9927 cat >conftest.$ac_ext <<_ACEOF
9928/* confdefs.h. */
9929_ACEOF
9930cat confdefs.h >>conftest.$ac_ext
9931cat >>conftest.$ac_ext <<_ACEOF
9932/* end confdefs.h. */
9933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009935int
9936main ()
9937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009939 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009941 return 0;
9942 ;
9943 return 0;
9944}
9945_ACEOF
9946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009947if { (ac_try="$ac_compile"
9948case "(($ac_try" in
9949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9950 *) ac_try_echo=$ac_try;;
9951esac
9952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009954 ac_status=$?
9955 grep -v '^ *+' conftest.er1 >conftest.err
9956 rm -f conftest.er1
9957 cat conftest.err >&5
9958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009959 (exit $ac_status); } && {
9960 test -z "$ac_c_werror_flag" ||
9961 test ! -s conftest.err
9962 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963 ac_cv_type_size_t=yes
9964else
9965 echo "$as_me: failed program was:" >&5
9966sed 's/^/| /' conftest.$ac_ext >&5
9967
Martin v. Löwiseba40652007-08-30 20:10:57 +00009968 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009969fi
Brett Cannon19fab762007-06-02 03:02:29 +00009970
Martin v. Löwiseba40652007-08-30 20:10:57 +00009971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9972fi
9973{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9974echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9975
9976# The cast to long int works around a bug in the HP C Compiler
9977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9979# This bug is HP SR number 8606223364.
9980{ echo "$as_me:$LINENO: checking size of size_t" >&5
9981echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009982if test "${ac_cv_sizeof_size_t+set}" = set; then
9983 echo $ECHO_N "(cached) $ECHO_C" >&6
9984else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009985 if test "$cross_compiling" = yes; then
9986 # Depending upon the size, compute the lo and hi bounds.
9987cat >conftest.$ac_ext <<_ACEOF
9988/* confdefs.h. */
9989_ACEOF
9990cat confdefs.h >>conftest.$ac_ext
9991cat >>conftest.$ac_ext <<_ACEOF
9992/* end confdefs.h. */
9993$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009995int
9996main ()
9997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009999test_array [0] = 0
10000
10001 ;
10002 return 0;
10003}
10004_ACEOF
10005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006if { (ac_try="$ac_compile"
10007case "(($ac_try" in
10008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10009 *) ac_try_echo=$ac_try;;
10010esac
10011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013 ac_status=$?
10014 grep -v '^ *+' conftest.er1 >conftest.err
10015 rm -f conftest.er1
10016 cat conftest.err >&5
10017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010018 (exit $ac_status); } && {
10019 test -z "$ac_c_werror_flag" ||
10020 test ! -s conftest.err
10021 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010022 ac_lo=0 ac_mid=0
10023 while :; do
10024 cat >conftest.$ac_ext <<_ACEOF
10025/* confdefs.h. */
10026_ACEOF
10027cat confdefs.h >>conftest.$ac_ext
10028cat >>conftest.$ac_ext <<_ACEOF
10029/* end confdefs.h. */
10030$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010031 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010032int
10033main ()
10034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010036test_array [0] = 0
10037
10038 ;
10039 return 0;
10040}
10041_ACEOF
10042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010043if { (ac_try="$ac_compile"
10044case "(($ac_try" in
10045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10046 *) ac_try_echo=$ac_try;;
10047esac
10048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050 ac_status=$?
10051 grep -v '^ *+' conftest.er1 >conftest.err
10052 rm -f conftest.er1
10053 cat conftest.err >&5
10054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055 (exit $ac_status); } && {
10056 test -z "$ac_c_werror_flag" ||
10057 test ! -s conftest.err
10058 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059 ac_hi=$ac_mid; break
10060else
10061 echo "$as_me: failed program was:" >&5
10062sed 's/^/| /' conftest.$ac_ext >&5
10063
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064 ac_lo=`expr $ac_mid + 1`
10065 if test $ac_lo -le $ac_mid; then
10066 ac_lo= ac_hi=
10067 break
10068 fi
10069 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071
10072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010073 done
10074else
10075 echo "$as_me: failed program was:" >&5
10076sed 's/^/| /' conftest.$ac_ext >&5
10077
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010079/* confdefs.h. */
10080_ACEOF
10081cat confdefs.h >>conftest.$ac_ext
10082cat >>conftest.$ac_ext <<_ACEOF
10083/* end confdefs.h. */
10084$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086int
10087main ()
10088{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010090test_array [0] = 0
10091
10092 ;
10093 return 0;
10094}
10095_ACEOF
10096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010097if { (ac_try="$ac_compile"
10098case "(($ac_try" in
10099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10100 *) ac_try_echo=$ac_try;;
10101esac
10102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010104 ac_status=$?
10105 grep -v '^ *+' conftest.er1 >conftest.err
10106 rm -f conftest.er1
10107 cat conftest.err >&5
10108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109 (exit $ac_status); } && {
10110 test -z "$ac_c_werror_flag" ||
10111 test ! -s conftest.err
10112 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010113 ac_hi=-1 ac_mid=-1
10114 while :; do
10115 cat >conftest.$ac_ext <<_ACEOF
10116/* confdefs.h. */
10117_ACEOF
10118cat confdefs.h >>conftest.$ac_ext
10119cat >>conftest.$ac_ext <<_ACEOF
10120/* end confdefs.h. */
10121$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010123int
10124main ()
10125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010127test_array [0] = 0
10128
10129 ;
10130 return 0;
10131}
10132_ACEOF
10133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010134if { (ac_try="$ac_compile"
10135case "(($ac_try" in
10136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10137 *) ac_try_echo=$ac_try;;
10138esac
10139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010141 ac_status=$?
10142 grep -v '^ *+' conftest.er1 >conftest.err
10143 rm -f conftest.er1
10144 cat conftest.err >&5
10145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010146 (exit $ac_status); } && {
10147 test -z "$ac_c_werror_flag" ||
10148 test ! -s conftest.err
10149 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010150 ac_lo=$ac_mid; break
10151else
10152 echo "$as_me: failed program was:" >&5
10153sed 's/^/| /' conftest.$ac_ext >&5
10154
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155 ac_hi=`expr '(' $ac_mid ')' - 1`
10156 if test $ac_mid -le $ac_hi; then
10157 ac_lo= ac_hi=
10158 break
10159 fi
10160 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010162
10163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010164 done
10165else
10166 echo "$as_me: failed program was:" >&5
10167sed 's/^/| /' conftest.$ac_ext >&5
10168
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010171
10172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010174
10175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010176# Binary search between lo and hi bounds.
10177while test "x$ac_lo" != "x$ac_hi"; do
10178 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10179 cat >conftest.$ac_ext <<_ACEOF
10180/* confdefs.h. */
10181_ACEOF
10182cat confdefs.h >>conftest.$ac_ext
10183cat >>conftest.$ac_ext <<_ACEOF
10184/* end confdefs.h. */
10185$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010186 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010187int
10188main ()
10189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010191test_array [0] = 0
10192
10193 ;
10194 return 0;
10195}
10196_ACEOF
10197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198if { (ac_try="$ac_compile"
10199case "(($ac_try" in
10200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10201 *) ac_try_echo=$ac_try;;
10202esac
10203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010205 ac_status=$?
10206 grep -v '^ *+' conftest.er1 >conftest.err
10207 rm -f conftest.er1
10208 cat conftest.err >&5
10209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210 (exit $ac_status); } && {
10211 test -z "$ac_c_werror_flag" ||
10212 test ! -s conftest.err
10213 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010214 ac_hi=$ac_mid
10215else
10216 echo "$as_me: failed program was:" >&5
10217sed 's/^/| /' conftest.$ac_ext >&5
10218
Martin v. Löwiseba40652007-08-30 20:10:57 +000010219 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010221
10222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010223done
10224case $ac_lo in
10225?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010226'') if test "$ac_cv_type_size_t" = yes; then
10227 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010228See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010230See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010231 { (exit 77); exit 77; }; }
10232 else
10233 ac_cv_sizeof_size_t=0
10234 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010235esac
10236else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010237 cat >conftest.$ac_ext <<_ACEOF
10238/* confdefs.h. */
10239_ACEOF
10240cat confdefs.h >>conftest.$ac_ext
10241cat >>conftest.$ac_ext <<_ACEOF
10242/* end confdefs.h. */
10243$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010244 typedef size_t ac__type_sizeof_;
10245static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10246static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010247#include <stdio.h>
10248#include <stdlib.h>
10249int
10250main ()
10251{
10252
10253 FILE *f = fopen ("conftest.val", "w");
10254 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255 return 1;
10256 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010257 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258 long int i = longval ();
10259 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10260 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010261 fprintf (f, "%ld\n", i);
10262 }
10263 else
10264 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010265 unsigned long int i = ulongval ();
10266 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10267 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010268 fprintf (f, "%lu\n", i);
10269 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010270 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010271
10272 ;
10273 return 0;
10274}
10275_ACEOF
10276rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010277if { (ac_try="$ac_link"
10278case "(($ac_try" in
10279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10280 *) ac_try_echo=$ac_try;;
10281esac
10282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10283 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010284 ac_status=$?
10285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010287 { (case "(($ac_try" in
10288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10289 *) ac_try_echo=$ac_try;;
10290esac
10291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10292 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010293 ac_status=$?
10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10296 ac_cv_sizeof_size_t=`cat conftest.val`
10297else
10298 echo "$as_me: program exited with status $ac_status" >&5
10299echo "$as_me: failed program was:" >&5
10300sed 's/^/| /' conftest.$ac_ext >&5
10301
10302( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010303if test "$ac_cv_type_size_t" = yes; then
10304 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010305See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010307See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010308 { (exit 77); exit 77; }; }
10309 else
10310 ac_cv_sizeof_size_t=0
10311 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313rm -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 +000010314fi
10315rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10318echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10319
10320
10321
Martin v. Löwis18e16552006-02-15 17:27:45 +000010322cat >>confdefs.h <<_ACEOF
10323#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10324_ACEOF
10325
10326
Christian Heimes951cc0f2008-01-31 23:08:23 +000010327{ echo "$as_me:$LINENO: checking for pid_t" >&5
10328echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10329if test "${ac_cv_type_pid_t+set}" = set; then
10330 echo $ECHO_N "(cached) $ECHO_C" >&6
10331else
10332 cat >conftest.$ac_ext <<_ACEOF
10333/* confdefs.h. */
10334_ACEOF
10335cat confdefs.h >>conftest.$ac_ext
10336cat >>conftest.$ac_ext <<_ACEOF
10337/* end confdefs.h. */
10338$ac_includes_default
10339typedef pid_t ac__type_new_;
10340int
10341main ()
10342{
10343if ((ac__type_new_ *) 0)
10344 return 0;
10345if (sizeof (ac__type_new_))
10346 return 0;
10347 ;
10348 return 0;
10349}
10350_ACEOF
10351rm -f conftest.$ac_objext
10352if { (ac_try="$ac_compile"
10353case "(($ac_try" in
10354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10355 *) ac_try_echo=$ac_try;;
10356esac
10357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10358 (eval "$ac_compile") 2>conftest.er1
10359 ac_status=$?
10360 grep -v '^ *+' conftest.er1 >conftest.err
10361 rm -f conftest.er1
10362 cat conftest.err >&5
10363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10364 (exit $ac_status); } && {
10365 test -z "$ac_c_werror_flag" ||
10366 test ! -s conftest.err
10367 } && test -s conftest.$ac_objext; then
10368 ac_cv_type_pid_t=yes
10369else
10370 echo "$as_me: failed program was:" >&5
10371sed 's/^/| /' conftest.$ac_ext >&5
10372
10373 ac_cv_type_pid_t=no
10374fi
10375
10376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10377fi
10378{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10379echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10380
10381# The cast to long int works around a bug in the HP C Compiler
10382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10384# This bug is HP SR number 8606223364.
10385{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10386echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10387if test "${ac_cv_sizeof_pid_t+set}" = set; then
10388 echo $ECHO_N "(cached) $ECHO_C" >&6
10389else
10390 if test "$cross_compiling" = yes; then
10391 # Depending upon the size, compute the lo and hi bounds.
10392cat >conftest.$ac_ext <<_ACEOF
10393/* confdefs.h. */
10394_ACEOF
10395cat confdefs.h >>conftest.$ac_ext
10396cat >>conftest.$ac_ext <<_ACEOF
10397/* end confdefs.h. */
10398$ac_includes_default
10399 typedef pid_t ac__type_sizeof_;
10400int
10401main ()
10402{
10403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10404test_array [0] = 0
10405
10406 ;
10407 return 0;
10408}
10409_ACEOF
10410rm -f conftest.$ac_objext
10411if { (ac_try="$ac_compile"
10412case "(($ac_try" in
10413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10414 *) ac_try_echo=$ac_try;;
10415esac
10416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10417 (eval "$ac_compile") 2>conftest.er1
10418 ac_status=$?
10419 grep -v '^ *+' conftest.er1 >conftest.err
10420 rm -f conftest.er1
10421 cat conftest.err >&5
10422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10423 (exit $ac_status); } && {
10424 test -z "$ac_c_werror_flag" ||
10425 test ! -s conftest.err
10426 } && test -s conftest.$ac_objext; then
10427 ac_lo=0 ac_mid=0
10428 while :; do
10429 cat >conftest.$ac_ext <<_ACEOF
10430/* confdefs.h. */
10431_ACEOF
10432cat confdefs.h >>conftest.$ac_ext
10433cat >>conftest.$ac_ext <<_ACEOF
10434/* end confdefs.h. */
10435$ac_includes_default
10436 typedef pid_t ac__type_sizeof_;
10437int
10438main ()
10439{
10440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10441test_array [0] = 0
10442
10443 ;
10444 return 0;
10445}
10446_ACEOF
10447rm -f conftest.$ac_objext
10448if { (ac_try="$ac_compile"
10449case "(($ac_try" in
10450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10451 *) ac_try_echo=$ac_try;;
10452esac
10453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10454 (eval "$ac_compile") 2>conftest.er1
10455 ac_status=$?
10456 grep -v '^ *+' conftest.er1 >conftest.err
10457 rm -f conftest.er1
10458 cat conftest.err >&5
10459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10460 (exit $ac_status); } && {
10461 test -z "$ac_c_werror_flag" ||
10462 test ! -s conftest.err
10463 } && test -s conftest.$ac_objext; then
10464 ac_hi=$ac_mid; break
10465else
10466 echo "$as_me: failed program was:" >&5
10467sed 's/^/| /' conftest.$ac_ext >&5
10468
10469 ac_lo=`expr $ac_mid + 1`
10470 if test $ac_lo -le $ac_mid; then
10471 ac_lo= ac_hi=
10472 break
10473 fi
10474 ac_mid=`expr 2 '*' $ac_mid + 1`
10475fi
10476
10477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10478 done
10479else
10480 echo "$as_me: failed program was:" >&5
10481sed 's/^/| /' conftest.$ac_ext >&5
10482
10483 cat >conftest.$ac_ext <<_ACEOF
10484/* confdefs.h. */
10485_ACEOF
10486cat confdefs.h >>conftest.$ac_ext
10487cat >>conftest.$ac_ext <<_ACEOF
10488/* end confdefs.h. */
10489$ac_includes_default
10490 typedef pid_t ac__type_sizeof_;
10491int
10492main ()
10493{
10494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10495test_array [0] = 0
10496
10497 ;
10498 return 0;
10499}
10500_ACEOF
10501rm -f conftest.$ac_objext
10502if { (ac_try="$ac_compile"
10503case "(($ac_try" in
10504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10505 *) ac_try_echo=$ac_try;;
10506esac
10507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10508 (eval "$ac_compile") 2>conftest.er1
10509 ac_status=$?
10510 grep -v '^ *+' conftest.er1 >conftest.err
10511 rm -f conftest.er1
10512 cat conftest.err >&5
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } && {
10515 test -z "$ac_c_werror_flag" ||
10516 test ! -s conftest.err
10517 } && test -s conftest.$ac_objext; then
10518 ac_hi=-1 ac_mid=-1
10519 while :; do
10520 cat >conftest.$ac_ext <<_ACEOF
10521/* confdefs.h. */
10522_ACEOF
10523cat confdefs.h >>conftest.$ac_ext
10524cat >>conftest.$ac_ext <<_ACEOF
10525/* end confdefs.h. */
10526$ac_includes_default
10527 typedef pid_t ac__type_sizeof_;
10528int
10529main ()
10530{
10531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10532test_array [0] = 0
10533
10534 ;
10535 return 0;
10536}
10537_ACEOF
10538rm -f conftest.$ac_objext
10539if { (ac_try="$ac_compile"
10540case "(($ac_try" in
10541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10542 *) ac_try_echo=$ac_try;;
10543esac
10544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10545 (eval "$ac_compile") 2>conftest.er1
10546 ac_status=$?
10547 grep -v '^ *+' conftest.er1 >conftest.err
10548 rm -f conftest.er1
10549 cat conftest.err >&5
10550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551 (exit $ac_status); } && {
10552 test -z "$ac_c_werror_flag" ||
10553 test ! -s conftest.err
10554 } && test -s conftest.$ac_objext; then
10555 ac_lo=$ac_mid; break
10556else
10557 echo "$as_me: failed program was:" >&5
10558sed 's/^/| /' conftest.$ac_ext >&5
10559
10560 ac_hi=`expr '(' $ac_mid ')' - 1`
10561 if test $ac_mid -le $ac_hi; then
10562 ac_lo= ac_hi=
10563 break
10564 fi
10565 ac_mid=`expr 2 '*' $ac_mid`
10566fi
10567
10568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10569 done
10570else
10571 echo "$as_me: failed program was:" >&5
10572sed 's/^/| /' conftest.$ac_ext >&5
10573
10574 ac_lo= ac_hi=
10575fi
10576
10577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10578fi
10579
10580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10581# Binary search between lo and hi bounds.
10582while test "x$ac_lo" != "x$ac_hi"; do
10583 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10584 cat >conftest.$ac_ext <<_ACEOF
10585/* confdefs.h. */
10586_ACEOF
10587cat confdefs.h >>conftest.$ac_ext
10588cat >>conftest.$ac_ext <<_ACEOF
10589/* end confdefs.h. */
10590$ac_includes_default
10591 typedef pid_t ac__type_sizeof_;
10592int
10593main ()
10594{
10595static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10596test_array [0] = 0
10597
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602rm -f conftest.$ac_objext
10603if { (ac_try="$ac_compile"
10604case "(($ac_try" in
10605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10606 *) ac_try_echo=$ac_try;;
10607esac
10608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10609 (eval "$ac_compile") 2>conftest.er1
10610 ac_status=$?
10611 grep -v '^ *+' conftest.er1 >conftest.err
10612 rm -f conftest.er1
10613 cat conftest.err >&5
10614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10615 (exit $ac_status); } && {
10616 test -z "$ac_c_werror_flag" ||
10617 test ! -s conftest.err
10618 } && test -s conftest.$ac_objext; then
10619 ac_hi=$ac_mid
10620else
10621 echo "$as_me: failed program was:" >&5
10622sed 's/^/| /' conftest.$ac_ext >&5
10623
10624 ac_lo=`expr '(' $ac_mid ')' + 1`
10625fi
10626
10627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10628done
10629case $ac_lo in
10630?*) ac_cv_sizeof_pid_t=$ac_lo;;
10631'') if test "$ac_cv_type_pid_t" = yes; then
10632 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10633See \`config.log' for more details." >&5
10634echo "$as_me: error: cannot compute sizeof (pid_t)
10635See \`config.log' for more details." >&2;}
10636 { (exit 77); exit 77; }; }
10637 else
10638 ac_cv_sizeof_pid_t=0
10639 fi ;;
10640esac
10641else
10642 cat >conftest.$ac_ext <<_ACEOF
10643/* confdefs.h. */
10644_ACEOF
10645cat confdefs.h >>conftest.$ac_ext
10646cat >>conftest.$ac_ext <<_ACEOF
10647/* end confdefs.h. */
10648$ac_includes_default
10649 typedef pid_t ac__type_sizeof_;
10650static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10651static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10652#include <stdio.h>
10653#include <stdlib.h>
10654int
10655main ()
10656{
10657
10658 FILE *f = fopen ("conftest.val", "w");
10659 if (! f)
10660 return 1;
10661 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10662 {
10663 long int i = longval ();
10664 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10665 return 1;
10666 fprintf (f, "%ld\n", i);
10667 }
10668 else
10669 {
10670 unsigned long int i = ulongval ();
10671 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10672 return 1;
10673 fprintf (f, "%lu\n", i);
10674 }
10675 return ferror (f) || fclose (f) != 0;
10676
10677 ;
10678 return 0;
10679}
10680_ACEOF
10681rm -f conftest$ac_exeext
10682if { (ac_try="$ac_link"
10683case "(($ac_try" in
10684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10685 *) ac_try_echo=$ac_try;;
10686esac
10687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10688 (eval "$ac_link") 2>&5
10689 ac_status=$?
10690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10692 { (case "(($ac_try" in
10693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10694 *) ac_try_echo=$ac_try;;
10695esac
10696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10697 (eval "$ac_try") 2>&5
10698 ac_status=$?
10699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10700 (exit $ac_status); }; }; then
10701 ac_cv_sizeof_pid_t=`cat conftest.val`
10702else
10703 echo "$as_me: program exited with status $ac_status" >&5
10704echo "$as_me: failed program was:" >&5
10705sed 's/^/| /' conftest.$ac_ext >&5
10706
10707( exit $ac_status )
10708if test "$ac_cv_type_pid_t" = yes; then
10709 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10710See \`config.log' for more details." >&5
10711echo "$as_me: error: cannot compute sizeof (pid_t)
10712See \`config.log' for more details." >&2;}
10713 { (exit 77); exit 77; }; }
10714 else
10715 ac_cv_sizeof_pid_t=0
10716 fi
10717fi
10718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10719fi
10720rm -f conftest.val
10721fi
10722{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10723echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10724
10725
10726
10727cat >>confdefs.h <<_ACEOF
10728#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10729_ACEOF
10730
10731
Michael W. Hudson54241132001-12-07 15:38:26 +000010732
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733{ echo "$as_me:$LINENO: checking for long long support" >&5
10734echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010735have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010737/* confdefs.h. */
10738_ACEOF
10739cat confdefs.h >>conftest.$ac_ext
10740cat >>conftest.$ac_ext <<_ACEOF
10741/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010742
Martin v. Löwis11437992002-04-12 09:54:03 +000010743int
10744main ()
10745{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010746long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ;
10748 return 0;
10749}
10750_ACEOF
10751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752if { (ac_try="$ac_compile"
10753case "(($ac_try" in
10754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10755 *) ac_try_echo=$ac_try;;
10756esac
10757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010760 grep -v '^ *+' conftest.er1 >conftest.err
10761 rm -f conftest.er1
10762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764 (exit $ac_status); } && {
10765 test -z "$ac_c_werror_flag" ||
10766 test ! -s conftest.err
10767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
10769
10770cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010771#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010772_ACEOF
10773
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010774 have_long_long=yes
10775
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010776else
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010778sed 's/^/| /' conftest.$ac_ext >&5
10779
Martin v. Löwiseba40652007-08-30 20:10:57 +000010780
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782
10783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10784{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10785echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010786if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787{ echo "$as_me:$LINENO: checking for long long" >&5
10788echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010789if test "${ac_cv_type_long_long+set}" = set; then
10790 echo $ECHO_N "(cached) $ECHO_C" >&6
10791else
10792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010793/* confdefs.h. */
10794_ACEOF
10795cat confdefs.h >>conftest.$ac_ext
10796cat >>conftest.$ac_ext <<_ACEOF
10797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010798$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010800int
10801main ()
10802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010803if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010805if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 return 0;
10807 ;
10808 return 0;
10809}
10810_ACEOF
10811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010812if { (ac_try="$ac_compile"
10813case "(($ac_try" in
10814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10815 *) ac_try_echo=$ac_try;;
10816esac
10817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010820 grep -v '^ *+' conftest.er1 >conftest.err
10821 rm -f conftest.er1
10822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010824 (exit $ac_status); } && {
10825 test -z "$ac_c_werror_flag" ||
10826 test ! -s conftest.err
10827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 ac_cv_type_long_long=yes
10829else
10830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010831sed 's/^/| /' conftest.$ac_ext >&5
10832
Martin v. Löwiseba40652007-08-30 20:10:57 +000010833 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010834fi
Brett Cannon19fab762007-06-02 03:02:29 +000010835
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10837fi
10838{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10839echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10840
10841# The cast to long int works around a bug in the HP C Compiler
10842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10844# This bug is HP SR number 8606223364.
10845{ echo "$as_me:$LINENO: checking size of long long" >&5
10846echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010847if test "${ac_cv_sizeof_long_long+set}" = set; then
10848 echo $ECHO_N "(cached) $ECHO_C" >&6
10849else
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 if test "$cross_compiling" = yes; then
10851 # Depending upon the size, compute the lo and hi bounds.
10852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010853/* confdefs.h. */
10854_ACEOF
10855cat confdefs.h >>conftest.$ac_ext
10856cat >>conftest.$ac_ext <<_ACEOF
10857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010858$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010860int
10861main ()
10862{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010863static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010864test_array [0] = 0
10865
10866 ;
10867 return 0;
10868}
10869_ACEOF
10870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010871if { (ac_try="$ac_compile"
10872case "(($ac_try" in
10873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10874 *) ac_try_echo=$ac_try;;
10875esac
10876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010879 grep -v '^ *+' conftest.er1 >conftest.err
10880 rm -f conftest.er1
10881 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010883 (exit $ac_status); } && {
10884 test -z "$ac_c_werror_flag" ||
10885 test ! -s conftest.err
10886 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 ac_lo=0 ac_mid=0
10888 while :; do
10889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* confdefs.h. */
10891_ACEOF
10892cat confdefs.h >>conftest.$ac_ext
10893cat >>conftest.$ac_ext <<_ACEOF
10894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010895$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010896 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010897int
10898main ()
10899{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010901test_array [0] = 0
10902
10903 ;
10904 return 0;
10905}
10906_ACEOF
10907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010908if { (ac_try="$ac_compile"
10909case "(($ac_try" in
10910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10911 *) ac_try_echo=$ac_try;;
10912esac
10913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010916 grep -v '^ *+' conftest.er1 >conftest.err
10917 rm -f conftest.er1
10918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920 (exit $ac_status); } && {
10921 test -z "$ac_c_werror_flag" ||
10922 test ! -s conftest.err
10923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 ac_hi=$ac_mid; break
10925else
10926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010927sed 's/^/| /' conftest.$ac_ext >&5
10928
Martin v. Löwiseba40652007-08-30 20:10:57 +000010929 ac_lo=`expr $ac_mid + 1`
10930 if test $ac_lo -le $ac_mid; then
10931 ac_lo= ac_hi=
10932 break
10933 fi
10934 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936
10937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010938 done
10939else
10940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010941sed 's/^/| /' conftest.$ac_ext >&5
10942
Martin v. Löwiseba40652007-08-30 20:10:57 +000010943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010944/* confdefs.h. */
10945_ACEOF
10946cat confdefs.h >>conftest.$ac_ext
10947cat >>conftest.$ac_ext <<_ACEOF
10948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010949$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010950 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010951int
10952main ()
10953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010954static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010955test_array [0] = 0
10956
10957 ;
10958 return 0;
10959}
10960_ACEOF
10961rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010962if { (ac_try="$ac_compile"
10963case "(($ac_try" in
10964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10965 *) ac_try_echo=$ac_try;;
10966esac
10967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010970 grep -v '^ *+' conftest.er1 >conftest.err
10971 rm -f conftest.er1
10972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010974 (exit $ac_status); } && {
10975 test -z "$ac_c_werror_flag" ||
10976 test ! -s conftest.err
10977 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ac_hi=-1 ac_mid=-1
10979 while :; do
10980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010981/* confdefs.h. */
10982_ACEOF
10983cat confdefs.h >>conftest.$ac_ext
10984cat >>conftest.$ac_ext <<_ACEOF
10985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010986$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010987 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010988int
10989main ()
10990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010992test_array [0] = 0
10993
10994 ;
10995 return 0;
10996}
10997_ACEOF
10998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010999if { (ac_try="$ac_compile"
11000case "(($ac_try" in
11001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11002 *) ac_try_echo=$ac_try;;
11003esac
11004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011007 grep -v '^ *+' conftest.er1 >conftest.err
11008 rm -f conftest.er1
11009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011011 (exit $ac_status); } && {
11012 test -z "$ac_c_werror_flag" ||
11013 test ! -s conftest.err
11014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 ac_lo=$ac_mid; break
11016else
11017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011018sed 's/^/| /' conftest.$ac_ext >&5
11019
Martin v. Löwiseba40652007-08-30 20:10:57 +000011020 ac_hi=`expr '(' $ac_mid ')' - 1`
11021 if test $ac_mid -le $ac_hi; then
11022 ac_lo= ac_hi=
11023 break
11024 fi
11025 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011027
11028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 done
11030else
11031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011032sed 's/^/| /' conftest.$ac_ext >&5
11033
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011036
11037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011039
11040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011041# Binary search between lo and hi bounds.
11042while test "x$ac_lo" != "x$ac_hi"; do
11043 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011045/* confdefs.h. */
11046_ACEOF
11047cat confdefs.h >>conftest.$ac_ext
11048cat >>conftest.$ac_ext <<_ACEOF
11049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011050$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011051 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011052int
11053main ()
11054{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011056test_array [0] = 0
11057
11058 ;
11059 return 0;
11060}
11061_ACEOF
11062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011063if { (ac_try="$ac_compile"
11064case "(($ac_try" in
11065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11066 *) ac_try_echo=$ac_try;;
11067esac
11068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011071 grep -v '^ *+' conftest.er1 >conftest.err
11072 rm -f conftest.er1
11073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011075 (exit $ac_status); } && {
11076 test -z "$ac_c_werror_flag" ||
11077 test ! -s conftest.err
11078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 ac_hi=$ac_mid
11080else
11081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011082sed 's/^/| /' conftest.$ac_ext >&5
11083
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011086
11087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011088done
11089case $ac_lo in
11090?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011091'') if test "$ac_cv_type_long_long" = yes; then
11092 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011093See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011095See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011096 { (exit 77); exit 77; }; }
11097 else
11098 ac_cv_sizeof_long_long=0
11099 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011100esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011101else
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* confdefs.h. */
11104_ACEOF
11105cat confdefs.h >>conftest.$ac_ext
11106cat >>conftest.$ac_ext <<_ACEOF
11107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011108$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011109 typedef long long ac__type_sizeof_;
11110static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11111static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011112#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011113#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011114int
11115main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011116{
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
11118 FILE *f = fopen ("conftest.val", "w");
11119 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011120 return 1;
11121 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011123 long int i = longval ();
11124 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11125 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 fprintf (f, "%ld\n", i);
11127 }
11128 else
11129 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011130 unsigned long int i = ulongval ();
11131 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11132 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 fprintf (f, "%lu\n", i);
11134 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011135 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
11137 ;
11138 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011139}
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
11141rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011142if { (ac_try="$ac_link"
11143case "(($ac_try" in
11144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11145 *) ac_try_echo=$ac_try;;
11146esac
11147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11148 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 ac_status=$?
11150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011152 { (case "(($ac_try" in
11153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11154 *) ac_try_echo=$ac_try;;
11155esac
11156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ac_status=$?
11159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11160 (exit $ac_status); }; }; then
11161 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011162else
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 echo "$as_me: program exited with status $ac_status" >&5
11164echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011165sed 's/^/| /' conftest.$ac_ext >&5
11166
Martin v. Löwis11437992002-04-12 09:54:03 +000011167( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011168if test "$ac_cv_type_long_long" = yes; then
11169 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011170See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011172See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173 { (exit 77); exit 77; }; }
11174 else
11175 ac_cv_sizeof_long_long=0
11176 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011178rm -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 +000011179fi
11180rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011182{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11183echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11184
11185
11186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011188#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011189_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011190
Michael W. Hudson54241132001-12-07 15:38:26 +000011191
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011192fi
11193
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011194{ echo "$as_me:$LINENO: checking for long double support" >&5
11195echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11196have_long_double=no
11197cat >conftest.$ac_ext <<_ACEOF
11198/* confdefs.h. */
11199_ACEOF
11200cat confdefs.h >>conftest.$ac_ext
11201cat >>conftest.$ac_ext <<_ACEOF
11202/* end confdefs.h. */
11203
11204int
11205main ()
11206{
11207long double x; x = (long double)0.;
11208 ;
11209 return 0;
11210}
11211_ACEOF
11212rm -f conftest.$ac_objext
11213if { (ac_try="$ac_compile"
11214case "(($ac_try" in
11215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11216 *) ac_try_echo=$ac_try;;
11217esac
11218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11219 (eval "$ac_compile") 2>conftest.er1
11220 ac_status=$?
11221 grep -v '^ *+' conftest.er1 >conftest.err
11222 rm -f conftest.er1
11223 cat conftest.err >&5
11224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11225 (exit $ac_status); } && {
11226 test -z "$ac_c_werror_flag" ||
11227 test ! -s conftest.err
11228 } && test -s conftest.$ac_objext; then
11229
11230
11231cat >>confdefs.h <<\_ACEOF
11232#define HAVE_LONG_DOUBLE 1
11233_ACEOF
11234
11235 have_long_double=yes
11236
11237else
11238 echo "$as_me: failed program was:" >&5
11239sed 's/^/| /' conftest.$ac_ext >&5
11240
11241
11242fi
11243
11244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11246echo "${ECHO_T}$have_long_double" >&6; }
11247if test "$have_long_double" = yes ; then
11248{ echo "$as_me:$LINENO: checking for long double" >&5
11249echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11250if test "${ac_cv_type_long_double+set}" = set; then
11251 echo $ECHO_N "(cached) $ECHO_C" >&6
11252else
11253 cat >conftest.$ac_ext <<_ACEOF
11254/* confdefs.h. */
11255_ACEOF
11256cat confdefs.h >>conftest.$ac_ext
11257cat >>conftest.$ac_ext <<_ACEOF
11258/* end confdefs.h. */
11259$ac_includes_default
11260typedef long double ac__type_new_;
11261int
11262main ()
11263{
11264if ((ac__type_new_ *) 0)
11265 return 0;
11266if (sizeof (ac__type_new_))
11267 return 0;
11268 ;
11269 return 0;
11270}
11271_ACEOF
11272rm -f conftest.$ac_objext
11273if { (ac_try="$ac_compile"
11274case "(($ac_try" in
11275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11276 *) ac_try_echo=$ac_try;;
11277esac
11278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11279 (eval "$ac_compile") 2>conftest.er1
11280 ac_status=$?
11281 grep -v '^ *+' conftest.er1 >conftest.err
11282 rm -f conftest.er1
11283 cat conftest.err >&5
11284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11285 (exit $ac_status); } && {
11286 test -z "$ac_c_werror_flag" ||
11287 test ! -s conftest.err
11288 } && test -s conftest.$ac_objext; then
11289 ac_cv_type_long_double=yes
11290else
11291 echo "$as_me: failed program was:" >&5
11292sed 's/^/| /' conftest.$ac_ext >&5
11293
11294 ac_cv_type_long_double=no
11295fi
11296
11297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11298fi
11299{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11300echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11301
11302# The cast to long int works around a bug in the HP C Compiler
11303# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11304# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11305# This bug is HP SR number 8606223364.
11306{ echo "$as_me:$LINENO: checking size of long double" >&5
11307echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11308if test "${ac_cv_sizeof_long_double+set}" = set; then
11309 echo $ECHO_N "(cached) $ECHO_C" >&6
11310else
11311 if test "$cross_compiling" = yes; then
11312 # Depending upon the size, compute the lo and hi bounds.
11313cat >conftest.$ac_ext <<_ACEOF
11314/* confdefs.h. */
11315_ACEOF
11316cat confdefs.h >>conftest.$ac_ext
11317cat >>conftest.$ac_ext <<_ACEOF
11318/* end confdefs.h. */
11319$ac_includes_default
11320 typedef long double ac__type_sizeof_;
11321int
11322main ()
11323{
11324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11325test_array [0] = 0
11326
11327 ;
11328 return 0;
11329}
11330_ACEOF
11331rm -f conftest.$ac_objext
11332if { (ac_try="$ac_compile"
11333case "(($ac_try" in
11334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11335 *) ac_try_echo=$ac_try;;
11336esac
11337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11338 (eval "$ac_compile") 2>conftest.er1
11339 ac_status=$?
11340 grep -v '^ *+' conftest.er1 >conftest.err
11341 rm -f conftest.er1
11342 cat conftest.err >&5
11343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344 (exit $ac_status); } && {
11345 test -z "$ac_c_werror_flag" ||
11346 test ! -s conftest.err
11347 } && test -s conftest.$ac_objext; then
11348 ac_lo=0 ac_mid=0
11349 while :; do
11350 cat >conftest.$ac_ext <<_ACEOF
11351/* confdefs.h. */
11352_ACEOF
11353cat confdefs.h >>conftest.$ac_ext
11354cat >>conftest.$ac_ext <<_ACEOF
11355/* end confdefs.h. */
11356$ac_includes_default
11357 typedef long double ac__type_sizeof_;
11358int
11359main ()
11360{
11361static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11362test_array [0] = 0
11363
11364 ;
11365 return 0;
11366}
11367_ACEOF
11368rm -f conftest.$ac_objext
11369if { (ac_try="$ac_compile"
11370case "(($ac_try" in
11371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11372 *) ac_try_echo=$ac_try;;
11373esac
11374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11375 (eval "$ac_compile") 2>conftest.er1
11376 ac_status=$?
11377 grep -v '^ *+' conftest.er1 >conftest.err
11378 rm -f conftest.er1
11379 cat conftest.err >&5
11380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11381 (exit $ac_status); } && {
11382 test -z "$ac_c_werror_flag" ||
11383 test ! -s conftest.err
11384 } && test -s conftest.$ac_objext; then
11385 ac_hi=$ac_mid; break
11386else
11387 echo "$as_me: failed program was:" >&5
11388sed 's/^/| /' conftest.$ac_ext >&5
11389
11390 ac_lo=`expr $ac_mid + 1`
11391 if test $ac_lo -le $ac_mid; then
11392 ac_lo= ac_hi=
11393 break
11394 fi
11395 ac_mid=`expr 2 '*' $ac_mid + 1`
11396fi
11397
11398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11399 done
11400else
11401 echo "$as_me: failed program was:" >&5
11402sed 's/^/| /' conftest.$ac_ext >&5
11403
11404 cat >conftest.$ac_ext <<_ACEOF
11405/* confdefs.h. */
11406_ACEOF
11407cat confdefs.h >>conftest.$ac_ext
11408cat >>conftest.$ac_ext <<_ACEOF
11409/* end confdefs.h. */
11410$ac_includes_default
11411 typedef long double ac__type_sizeof_;
11412int
11413main ()
11414{
11415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11416test_array [0] = 0
11417
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext
11423if { (ac_try="$ac_compile"
11424case "(($ac_try" in
11425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11426 *) ac_try_echo=$ac_try;;
11427esac
11428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11429 (eval "$ac_compile") 2>conftest.er1
11430 ac_status=$?
11431 grep -v '^ *+' conftest.er1 >conftest.err
11432 rm -f conftest.er1
11433 cat conftest.err >&5
11434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11435 (exit $ac_status); } && {
11436 test -z "$ac_c_werror_flag" ||
11437 test ! -s conftest.err
11438 } && test -s conftest.$ac_objext; then
11439 ac_hi=-1 ac_mid=-1
11440 while :; do
11441 cat >conftest.$ac_ext <<_ACEOF
11442/* confdefs.h. */
11443_ACEOF
11444cat confdefs.h >>conftest.$ac_ext
11445cat >>conftest.$ac_ext <<_ACEOF
11446/* end confdefs.h. */
11447$ac_includes_default
11448 typedef long double ac__type_sizeof_;
11449int
11450main ()
11451{
11452static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11453test_array [0] = 0
11454
11455 ;
11456 return 0;
11457}
11458_ACEOF
11459rm -f conftest.$ac_objext
11460if { (ac_try="$ac_compile"
11461case "(($ac_try" in
11462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11463 *) ac_try_echo=$ac_try;;
11464esac
11465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11466 (eval "$ac_compile") 2>conftest.er1
11467 ac_status=$?
11468 grep -v '^ *+' conftest.er1 >conftest.err
11469 rm -f conftest.er1
11470 cat conftest.err >&5
11471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472 (exit $ac_status); } && {
11473 test -z "$ac_c_werror_flag" ||
11474 test ! -s conftest.err
11475 } && test -s conftest.$ac_objext; then
11476 ac_lo=$ac_mid; break
11477else
11478 echo "$as_me: failed program was:" >&5
11479sed 's/^/| /' conftest.$ac_ext >&5
11480
11481 ac_hi=`expr '(' $ac_mid ')' - 1`
11482 if test $ac_mid -le $ac_hi; then
11483 ac_lo= ac_hi=
11484 break
11485 fi
11486 ac_mid=`expr 2 '*' $ac_mid`
11487fi
11488
11489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11490 done
11491else
11492 echo "$as_me: failed program was:" >&5
11493sed 's/^/| /' conftest.$ac_ext >&5
11494
11495 ac_lo= ac_hi=
11496fi
11497
11498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11499fi
11500
11501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502# Binary search between lo and hi bounds.
11503while test "x$ac_lo" != "x$ac_hi"; do
11504 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11505 cat >conftest.$ac_ext <<_ACEOF
11506/* confdefs.h. */
11507_ACEOF
11508cat confdefs.h >>conftest.$ac_ext
11509cat >>conftest.$ac_ext <<_ACEOF
11510/* end confdefs.h. */
11511$ac_includes_default
11512 typedef long double ac__type_sizeof_;
11513int
11514main ()
11515{
11516static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11517test_array [0] = 0
11518
11519 ;
11520 return 0;
11521}
11522_ACEOF
11523rm -f conftest.$ac_objext
11524if { (ac_try="$ac_compile"
11525case "(($ac_try" in
11526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11527 *) ac_try_echo=$ac_try;;
11528esac
11529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11530 (eval "$ac_compile") 2>conftest.er1
11531 ac_status=$?
11532 grep -v '^ *+' conftest.er1 >conftest.err
11533 rm -f conftest.er1
11534 cat conftest.err >&5
11535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11536 (exit $ac_status); } && {
11537 test -z "$ac_c_werror_flag" ||
11538 test ! -s conftest.err
11539 } && test -s conftest.$ac_objext; then
11540 ac_hi=$ac_mid
11541else
11542 echo "$as_me: failed program was:" >&5
11543sed 's/^/| /' conftest.$ac_ext >&5
11544
11545 ac_lo=`expr '(' $ac_mid ')' + 1`
11546fi
11547
11548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11549done
11550case $ac_lo in
11551?*) ac_cv_sizeof_long_double=$ac_lo;;
11552'') if test "$ac_cv_type_long_double" = yes; then
11553 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11554See \`config.log' for more details." >&5
11555echo "$as_me: error: cannot compute sizeof (long double)
11556See \`config.log' for more details." >&2;}
11557 { (exit 77); exit 77; }; }
11558 else
11559 ac_cv_sizeof_long_double=0
11560 fi ;;
11561esac
11562else
11563 cat >conftest.$ac_ext <<_ACEOF
11564/* confdefs.h. */
11565_ACEOF
11566cat confdefs.h >>conftest.$ac_ext
11567cat >>conftest.$ac_ext <<_ACEOF
11568/* end confdefs.h. */
11569$ac_includes_default
11570 typedef long double ac__type_sizeof_;
11571static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11572static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11573#include <stdio.h>
11574#include <stdlib.h>
11575int
11576main ()
11577{
11578
11579 FILE *f = fopen ("conftest.val", "w");
11580 if (! f)
11581 return 1;
11582 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11583 {
11584 long int i = longval ();
11585 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11586 return 1;
11587 fprintf (f, "%ld\n", i);
11588 }
11589 else
11590 {
11591 unsigned long int i = ulongval ();
11592 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11593 return 1;
11594 fprintf (f, "%lu\n", i);
11595 }
11596 return ferror (f) || fclose (f) != 0;
11597
11598 ;
11599 return 0;
11600}
11601_ACEOF
11602rm -f conftest$ac_exeext
11603if { (ac_try="$ac_link"
11604case "(($ac_try" in
11605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11606 *) ac_try_echo=$ac_try;;
11607esac
11608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11609 (eval "$ac_link") 2>&5
11610 ac_status=$?
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11613 { (case "(($ac_try" in
11614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11615 *) ac_try_echo=$ac_try;;
11616esac
11617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11618 (eval "$ac_try") 2>&5
11619 ac_status=$?
11620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11621 (exit $ac_status); }; }; then
11622 ac_cv_sizeof_long_double=`cat conftest.val`
11623else
11624 echo "$as_me: program exited with status $ac_status" >&5
11625echo "$as_me: failed program was:" >&5
11626sed 's/^/| /' conftest.$ac_ext >&5
11627
11628( exit $ac_status )
11629if test "$ac_cv_type_long_double" = yes; then
11630 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11631See \`config.log' for more details." >&5
11632echo "$as_me: error: cannot compute sizeof (long double)
11633See \`config.log' for more details." >&2;}
11634 { (exit 77); exit 77; }; }
11635 else
11636 ac_cv_sizeof_long_double=0
11637 fi
11638fi
11639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11640fi
11641rm -f conftest.val
11642fi
11643{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11644echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11645
11646
11647
11648cat >>confdefs.h <<_ACEOF
11649#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11650_ACEOF
11651
11652
11653fi
11654
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11656echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011657have_c99_bool=no
11658cat >conftest.$ac_ext <<_ACEOF
11659/* confdefs.h. */
11660_ACEOF
11661cat confdefs.h >>conftest.$ac_ext
11662cat >>conftest.$ac_ext <<_ACEOF
11663/* end confdefs.h. */
11664
11665int
11666main ()
11667{
11668_Bool x; x = (_Bool)0;
11669 ;
11670 return 0;
11671}
11672_ACEOF
11673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674if { (ac_try="$ac_compile"
11675case "(($ac_try" in
11676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11677 *) ac_try_echo=$ac_try;;
11678esac
11679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011681 ac_status=$?
11682 grep -v '^ *+' conftest.er1 >conftest.err
11683 rm -f conftest.er1
11684 cat conftest.err >&5
11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686 (exit $ac_status); } && {
11687 test -z "$ac_c_werror_flag" ||
11688 test ! -s conftest.err
11689 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011690
11691
11692cat >>confdefs.h <<\_ACEOF
11693#define HAVE_C99_BOOL 1
11694_ACEOF
11695
11696 have_c99_bool=yes
11697
11698else
11699 echo "$as_me: failed program was:" >&5
11700sed 's/^/| /' conftest.$ac_ext >&5
11701
Martin v. Löwiseba40652007-08-30 20:10:57 +000011702
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011704
11705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11706{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11707echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011708if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011709{ echo "$as_me:$LINENO: checking for _Bool" >&5
11710echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011711if test "${ac_cv_type__Bool+set}" = set; then
11712 echo $ECHO_N "(cached) $ECHO_C" >&6
11713else
11714 cat >conftest.$ac_ext <<_ACEOF
11715/* confdefs.h. */
11716_ACEOF
11717cat confdefs.h >>conftest.$ac_ext
11718cat >>conftest.$ac_ext <<_ACEOF
11719/* end confdefs.h. */
11720$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011721typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011722int
11723main ()
11724{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011725if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011726 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011727if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011728 return 0;
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011734if { (ac_try="$ac_compile"
11735case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;;
11738esac
11739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011741 ac_status=$?
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011746 (exit $ac_status); } && {
11747 test -z "$ac_c_werror_flag" ||
11748 test ! -s conftest.err
11749 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011750 ac_cv_type__Bool=yes
11751else
11752 echo "$as_me: failed program was:" >&5
11753sed 's/^/| /' conftest.$ac_ext >&5
11754
Martin v. Löwiseba40652007-08-30 20:10:57 +000011755 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011756fi
Brett Cannon19fab762007-06-02 03:02:29 +000011757
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11759fi
11760{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11761echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11762
11763# The cast to long int works around a bug in the HP C Compiler
11764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11766# This bug is HP SR number 8606223364.
11767{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11768echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011769if test "${ac_cv_sizeof__Bool+set}" = set; then
11770 echo $ECHO_N "(cached) $ECHO_C" >&6
11771else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011772 if test "$cross_compiling" = yes; then
11773 # Depending upon the size, compute the lo and hi bounds.
11774cat >conftest.$ac_ext <<_ACEOF
11775/* confdefs.h. */
11776_ACEOF
11777cat confdefs.h >>conftest.$ac_ext
11778cat >>conftest.$ac_ext <<_ACEOF
11779/* end confdefs.h. */
11780$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011781 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011782int
11783main ()
11784{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011786test_array [0] = 0
11787
11788 ;
11789 return 0;
11790}
11791_ACEOF
11792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793if { (ac_try="$ac_compile"
11794case "(($ac_try" in
11795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11796 *) ac_try_echo=$ac_try;;
11797esac
11798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011800 ac_status=$?
11801 grep -v '^ *+' conftest.er1 >conftest.err
11802 rm -f conftest.er1
11803 cat conftest.err >&5
11804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805 (exit $ac_status); } && {
11806 test -z "$ac_c_werror_flag" ||
11807 test ! -s conftest.err
11808 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011809 ac_lo=0 ac_mid=0
11810 while :; do
11811 cat >conftest.$ac_ext <<_ACEOF
11812/* confdefs.h. */
11813_ACEOF
11814cat confdefs.h >>conftest.$ac_ext
11815cat >>conftest.$ac_ext <<_ACEOF
11816/* end confdefs.h. */
11817$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011819int
11820main ()
11821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011823test_array [0] = 0
11824
11825 ;
11826 return 0;
11827}
11828_ACEOF
11829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830if { (ac_try="$ac_compile"
11831case "(($ac_try" in
11832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11833 *) ac_try_echo=$ac_try;;
11834esac
11835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011837 ac_status=$?
11838 grep -v '^ *+' conftest.er1 >conftest.err
11839 rm -f conftest.er1
11840 cat conftest.err >&5
11841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011842 (exit $ac_status); } && {
11843 test -z "$ac_c_werror_flag" ||
11844 test ! -s conftest.err
11845 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011846 ac_hi=$ac_mid; break
11847else
11848 echo "$as_me: failed program was:" >&5
11849sed 's/^/| /' conftest.$ac_ext >&5
11850
Martin v. Löwiseba40652007-08-30 20:10:57 +000011851 ac_lo=`expr $ac_mid + 1`
11852 if test $ac_lo -le $ac_mid; then
11853 ac_lo= ac_hi=
11854 break
11855 fi
11856 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011858
11859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011860 done
11861else
11862 echo "$as_me: failed program was:" >&5
11863sed 's/^/| /' conftest.$ac_ext >&5
11864
Martin v. Löwiseba40652007-08-30 20:10:57 +000011865 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011866/* confdefs.h. */
11867_ACEOF
11868cat confdefs.h >>conftest.$ac_ext
11869cat >>conftest.$ac_ext <<_ACEOF
11870/* end confdefs.h. */
11871$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011872 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011873int
11874main ()
11875{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011877test_array [0] = 0
11878
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011884if { (ac_try="$ac_compile"
11885case "(($ac_try" in
11886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11887 *) ac_try_echo=$ac_try;;
11888esac
11889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011891 ac_status=$?
11892 grep -v '^ *+' conftest.er1 >conftest.err
11893 rm -f conftest.er1
11894 cat conftest.err >&5
11895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011896 (exit $ac_status); } && {
11897 test -z "$ac_c_werror_flag" ||
11898 test ! -s conftest.err
11899 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011900 ac_hi=-1 ac_mid=-1
11901 while :; do
11902 cat >conftest.$ac_ext <<_ACEOF
11903/* confdefs.h. */
11904_ACEOF
11905cat confdefs.h >>conftest.$ac_ext
11906cat >>conftest.$ac_ext <<_ACEOF
11907/* end confdefs.h. */
11908$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011909 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011910int
11911main ()
11912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011914test_array [0] = 0
11915
11916 ;
11917 return 0;
11918}
11919_ACEOF
11920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921if { (ac_try="$ac_compile"
11922case "(($ac_try" in
11923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11924 *) ac_try_echo=$ac_try;;
11925esac
11926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011928 ac_status=$?
11929 grep -v '^ *+' conftest.er1 >conftest.err
11930 rm -f conftest.er1
11931 cat conftest.err >&5
11932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011933 (exit $ac_status); } && {
11934 test -z "$ac_c_werror_flag" ||
11935 test ! -s conftest.err
11936 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011937 ac_lo=$ac_mid; break
11938else
11939 echo "$as_me: failed program was:" >&5
11940sed 's/^/| /' conftest.$ac_ext >&5
11941
Martin v. Löwiseba40652007-08-30 20:10:57 +000011942 ac_hi=`expr '(' $ac_mid ')' - 1`
11943 if test $ac_mid -le $ac_hi; then
11944 ac_lo= ac_hi=
11945 break
11946 fi
11947 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949
11950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011951 done
11952else
11953 echo "$as_me: failed program was:" >&5
11954sed 's/^/| /' conftest.$ac_ext >&5
11955
Martin v. Löwiseba40652007-08-30 20:10:57 +000011956 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011958
11959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011961
11962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011963# Binary search between lo and hi bounds.
11964while test "x$ac_lo" != "x$ac_hi"; do
11965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11966 cat >conftest.$ac_ext <<_ACEOF
11967/* confdefs.h. */
11968_ACEOF
11969cat confdefs.h >>conftest.$ac_ext
11970cat >>conftest.$ac_ext <<_ACEOF
11971/* end confdefs.h. */
11972$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011973 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011974int
11975main ()
11976{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011977static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011978test_array [0] = 0
11979
11980 ;
11981 return 0;
11982}
11983_ACEOF
11984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011985if { (ac_try="$ac_compile"
11986case "(($ac_try" in
11987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11988 *) ac_try_echo=$ac_try;;
11989esac
11990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011992 ac_status=$?
11993 grep -v '^ *+' conftest.er1 >conftest.err
11994 rm -f conftest.er1
11995 cat conftest.err >&5
11996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011997 (exit $ac_status); } && {
11998 test -z "$ac_c_werror_flag" ||
11999 test ! -s conftest.err
12000 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012001 ac_hi=$ac_mid
12002else
12003 echo "$as_me: failed program was:" >&5
12004sed 's/^/| /' conftest.$ac_ext >&5
12005
Martin v. Löwiseba40652007-08-30 20:10:57 +000012006 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008
12009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012010done
12011case $ac_lo in
12012?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012013'') if test "$ac_cv_type__Bool" = yes; then
12014 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012015See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012017See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012018 { (exit 77); exit 77; }; }
12019 else
12020 ac_cv_sizeof__Bool=0
12021 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012022esac
12023else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012024 cat >conftest.$ac_ext <<_ACEOF
12025/* confdefs.h. */
12026_ACEOF
12027cat confdefs.h >>conftest.$ac_ext
12028cat >>conftest.$ac_ext <<_ACEOF
12029/* end confdefs.h. */
12030$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012031 typedef _Bool ac__type_sizeof_;
12032static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12033static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012034#include <stdio.h>
12035#include <stdlib.h>
12036int
12037main ()
12038{
12039
12040 FILE *f = fopen ("conftest.val", "w");
12041 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012042 return 1;
12043 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012044 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012045 long int i = longval ();
12046 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12047 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012048 fprintf (f, "%ld\n", i);
12049 }
12050 else
12051 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052 unsigned long int i = ulongval ();
12053 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12054 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012055 fprintf (f, "%lu\n", i);
12056 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012057 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012058
12059 ;
12060 return 0;
12061}
12062_ACEOF
12063rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012064if { (ac_try="$ac_link"
12065case "(($ac_try" in
12066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12067 *) ac_try_echo=$ac_try;;
12068esac
12069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12070 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012071 ac_status=$?
12072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012074 { (case "(($ac_try" in
12075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12076 *) ac_try_echo=$ac_try;;
12077esac
12078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12079 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012080 ac_status=$?
12081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12082 (exit $ac_status); }; }; then
12083 ac_cv_sizeof__Bool=`cat conftest.val`
12084else
12085 echo "$as_me: program exited with status $ac_status" >&5
12086echo "$as_me: failed program was:" >&5
12087sed 's/^/| /' conftest.$ac_ext >&5
12088
12089( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012090if test "$ac_cv_type__Bool" = yes; then
12091 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012092See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012093echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012094See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012095 { (exit 77); exit 77; }; }
12096 else
12097 ac_cv_sizeof__Bool=0
12098 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012100rm -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 +000012101fi
12102rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012104{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12105echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12106
12107
12108
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012109cat >>confdefs.h <<_ACEOF
12110#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12111_ACEOF
12112
12113
12114fi
12115
Martin v. Löwiseba40652007-08-30 20:10:57 +000012116{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12117echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012118if test "${ac_cv_type_uintptr_t+set}" = set; then
12119 echo $ECHO_N "(cached) $ECHO_C" >&6
12120else
12121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012122/* confdefs.h. */
12123_ACEOF
12124cat confdefs.h >>conftest.$ac_ext
12125cat >>conftest.$ac_ext <<_ACEOF
12126/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012127#ifdef HAVE_STDINT_H
12128 #include <stdint.h>
12129 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012130
Martin v. Löwiseba40652007-08-30 20:10:57 +000012131typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012132int
12133main ()
12134{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012136 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012138 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 ;
12140 return 0;
12141}
12142_ACEOF
12143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012144if { (ac_try="$ac_compile"
12145case "(($ac_try" in
12146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12147 *) ac_try_echo=$ac_try;;
12148esac
12149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012152 grep -v '^ *+' conftest.er1 >conftest.err
12153 rm -f conftest.er1
12154 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012156 (exit $ac_status); } && {
12157 test -z "$ac_c_werror_flag" ||
12158 test ! -s conftest.err
12159 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012160 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012161else
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012163sed 's/^/| /' conftest.$ac_ext >&5
12164
Martin v. Löwiseba40652007-08-30 20:10:57 +000012165 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012167
12168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12171echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012172if test $ac_cv_type_uintptr_t = yes; then
12173
12174cat >>confdefs.h <<_ACEOF
12175#define HAVE_UINTPTR_T 1
12176_ACEOF
12177
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12179echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012180if test "${ac_cv_type_uintptr_t+set}" = set; then
12181 echo $ECHO_N "(cached) $ECHO_C" >&6
12182else
12183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012184/* confdefs.h. */
12185_ACEOF
12186cat confdefs.h >>conftest.$ac_ext
12187cat >>conftest.$ac_ext <<_ACEOF
12188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012189$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012190typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012191int
12192main ()
12193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012194if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012196if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 return 0;
12198 ;
12199 return 0;
12200}
12201_ACEOF
12202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203if { (ac_try="$ac_compile"
12204case "(($ac_try" in
12205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12206 *) ac_try_echo=$ac_try;;
12207esac
12208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012211 grep -v '^ *+' conftest.er1 >conftest.err
12212 rm -f conftest.er1
12213 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012215 (exit $ac_status); } && {
12216 test -z "$ac_c_werror_flag" ||
12217 test ! -s conftest.err
12218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ac_cv_type_uintptr_t=yes
12220else
12221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012222sed 's/^/| /' conftest.$ac_ext >&5
12223
Martin v. Löwiseba40652007-08-30 20:10:57 +000012224 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012225fi
Brett Cannon19fab762007-06-02 03:02:29 +000012226
Martin v. Löwiseba40652007-08-30 20:10:57 +000012227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12228fi
12229{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12230echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12231
12232# The cast to long int works around a bug in the HP C Compiler
12233# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12234# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12235# This bug is HP SR number 8606223364.
12236{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12237echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012238if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12239 echo $ECHO_N "(cached) $ECHO_C" >&6
12240else
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 if test "$cross_compiling" = yes; then
12242 # Depending upon the size, compute the lo and hi bounds.
12243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012251int
12252main ()
12253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
12267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012270 grep -v '^ *+' conftest.er1 >conftest.err
12271 rm -f conftest.er1
12272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012274 (exit $ac_status); } && {
12275 test -z "$ac_c_werror_flag" ||
12276 test ! -s conftest.err
12277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ac_lo=0 ac_mid=0
12279 while :; do
12280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* confdefs.h. */
12282_ACEOF
12283cat confdefs.h >>conftest.$ac_ext
12284cat >>conftest.$ac_ext <<_ACEOF
12285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012286$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012287 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012288int
12289main ()
12290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012292test_array [0] = 0
12293
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299if { (ac_try="$ac_compile"
12300case "(($ac_try" in
12301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12302 *) ac_try_echo=$ac_try;;
12303esac
12304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012307 grep -v '^ *+' conftest.er1 >conftest.err
12308 rm -f conftest.er1
12309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012311 (exit $ac_status); } && {
12312 test -z "$ac_c_werror_flag" ||
12313 test ! -s conftest.err
12314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 ac_hi=$ac_mid; break
12316else
12317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320 ac_lo=`expr $ac_mid + 1`
12321 if test $ac_lo -le $ac_mid; then
12322 ac_lo= ac_hi=
12323 break
12324 fi
12325 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 done
12330else
12331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012332sed 's/^/| /' conftest.$ac_ext >&5
12333
Martin v. Löwiseba40652007-08-30 20:10:57 +000012334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012335/* confdefs.h. */
12336_ACEOF
12337cat confdefs.h >>conftest.$ac_ext
12338cat >>conftest.$ac_ext <<_ACEOF
12339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012340$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012342int
12343main ()
12344{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012346test_array [0] = 0
12347
12348 ;
12349 return 0;
12350}
12351_ACEOF
12352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353if { (ac_try="$ac_compile"
12354case "(($ac_try" in
12355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12356 *) ac_try_echo=$ac_try;;
12357esac
12358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012361 grep -v '^ *+' conftest.er1 >conftest.err
12362 rm -f conftest.er1
12363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365 (exit $ac_status); } && {
12366 test -z "$ac_c_werror_flag" ||
12367 test ! -s conftest.err
12368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 ac_hi=-1 ac_mid=-1
12370 while :; do
12371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012372/* confdefs.h. */
12373_ACEOF
12374cat confdefs.h >>conftest.$ac_ext
12375cat >>conftest.$ac_ext <<_ACEOF
12376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012377$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012379int
12380main ()
12381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012383test_array [0] = 0
12384
12385 ;
12386 return 0;
12387}
12388_ACEOF
12389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390if { (ac_try="$ac_compile"
12391case "(($ac_try" in
12392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12393 *) ac_try_echo=$ac_try;;
12394esac
12395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012398 grep -v '^ *+' conftest.er1 >conftest.err
12399 rm -f conftest.er1
12400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402 (exit $ac_status); } && {
12403 test -z "$ac_c_werror_flag" ||
12404 test ! -s conftest.err
12405 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 ac_lo=$ac_mid; break
12407else
12408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012409sed 's/^/| /' conftest.$ac_ext >&5
12410
Martin v. Löwiseba40652007-08-30 20:10:57 +000012411 ac_hi=`expr '(' $ac_mid ')' - 1`
12412 if test $ac_mid -le $ac_hi; then
12413 ac_lo= ac_hi=
12414 break
12415 fi
12416 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012418
12419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 done
12421else
12422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012423sed 's/^/| /' conftest.$ac_ext >&5
12424
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012427
12428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012430
12431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012432# Binary search between lo and hi bounds.
12433while test "x$ac_lo" != "x$ac_hi"; do
12434 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* confdefs.h. */
12437_ACEOF
12438cat confdefs.h >>conftest.$ac_ext
12439cat >>conftest.$ac_ext <<_ACEOF
12440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012441$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012443int
12444main ()
12445{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012447test_array [0] = 0
12448
12449 ;
12450 return 0;
12451}
12452_ACEOF
12453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454if { (ac_try="$ac_compile"
12455case "(($ac_try" in
12456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12457 *) ac_try_echo=$ac_try;;
12458esac
12459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012462 grep -v '^ *+' conftest.er1 >conftest.err
12463 rm -f conftest.er1
12464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466 (exit $ac_status); } && {
12467 test -z "$ac_c_werror_flag" ||
12468 test ! -s conftest.err
12469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 ac_hi=$ac_mid
12471else
12472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012473sed 's/^/| /' conftest.$ac_ext >&5
12474
Martin v. Löwiseba40652007-08-30 20:10:57 +000012475 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477
12478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012479done
12480case $ac_lo in
12481?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482'') if test "$ac_cv_type_uintptr_t" = yes; then
12483 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012484See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012486See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 { (exit 77); exit 77; }; }
12488 else
12489 ac_cv_sizeof_uintptr_t=0
12490 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012491esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* confdefs.h. */
12495_ACEOF
12496cat confdefs.h >>conftest.$ac_ext
12497cat >>conftest.$ac_ext <<_ACEOF
12498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012499$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012500 typedef uintptr_t ac__type_sizeof_;
12501static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12502static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012503#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012504#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012507{
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
12509 FILE *f = fopen ("conftest.val", "w");
12510 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012511 return 1;
12512 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 long int i = longval ();
12515 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12516 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 fprintf (f, "%ld\n", i);
12518 }
12519 else
12520 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012521 unsigned long int i = ulongval ();
12522 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12523 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 fprintf (f, "%lu\n", i);
12525 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
12528 ;
12529 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012530}
Martin v. Löwis11437992002-04-12 09:54:03 +000012531_ACEOF
12532rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012533if { (ac_try="$ac_link"
12534case "(($ac_try" in
12535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12536 *) ac_try_echo=$ac_try;;
12537esac
12538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12539 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ac_status=$?
12541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012543 { (case "(($ac_try" in
12544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12545 *) ac_try_echo=$ac_try;;
12546esac
12547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12548 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 ac_status=$?
12550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551 (exit $ac_status); }; }; then
12552 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012553else
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 echo "$as_me: program exited with status $ac_status" >&5
12555echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012556sed 's/^/| /' conftest.$ac_ext >&5
12557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559if test "$ac_cv_type_uintptr_t" = yes; then
12560 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012561See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012563See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564 { (exit 77); exit 77; }; }
12565 else
12566 ac_cv_sizeof_uintptr_t=0
12567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569rm -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 +000012570fi
12571rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012573{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12574echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12575
12576
12577
Martin v. Löwis11437992002-04-12 09:54:03 +000012578cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012579#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012580_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012581
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012583fi
12584
Martin v. Löwisebe26702006-10-02 14:55:51 +000012585
12586
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012587# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012588{ echo "$as_me:$LINENO: checking size of off_t" >&5
12589echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012590if test "${ac_cv_sizeof_off_t+set}" = set; then
12591 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012592else
12593 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012594 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012595else
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012597/* confdefs.h. */
12598_ACEOF
12599cat confdefs.h >>conftest.$ac_ext
12600cat >>conftest.$ac_ext <<_ACEOF
12601/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012602#include <stdio.h>
12603#include <sys/types.h>
12604main()
12605{
12606 FILE *f=fopen("conftestval", "w");
12607 if (!f) exit(1);
12608 fprintf(f, "%d\n", sizeof(off_t));
12609 exit(0);
12610}
Martin v. Löwis11437992002-04-12 09:54:03 +000012611_ACEOF
12612rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613if { (ac_try="$ac_link"
12614case "(($ac_try" in
12615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12616 *) ac_try_echo=$ac_try;;
12617esac
12618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12619 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ac_status=$?
12621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12622 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623 { (case "(($ac_try" in
12624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12625 *) ac_try_echo=$ac_try;;
12626esac
12627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12628 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ac_status=$?
12630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12631 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012632 ac_cv_sizeof_off_t=`cat conftestval`
12633else
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 echo "$as_me: program exited with status $ac_status" >&5
12635echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012636sed 's/^/| /' conftest.$ac_ext >&5
12637
Martin v. Löwis11437992002-04-12 09:54:03 +000012638( exit $ac_status )
12639ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012641rm -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 +000012642fi
12643
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644
12645
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012646fi
12647
Martin v. Löwiseba40652007-08-30 20:10:57 +000012648{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12649echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
12651cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012652#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012653_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012654
Michael W. Hudson54241132001-12-07 15:38:26 +000012655
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12657echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012658if test "$have_long_long" = yes -a \
12659 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12660 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012661
Martin v. Löwis11437992002-04-12 09:54:03 +000012662cat >>confdefs.h <<\_ACEOF
12663#define HAVE_LARGEFILE_SUPPORT 1
12664_ACEOF
12665
Martin v. Löwiseba40652007-08-30 20:10:57 +000012666 { echo "$as_me:$LINENO: result: yes" >&5
12667echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012668else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012669 { echo "$as_me:$LINENO: result: no" >&5
12670echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012671fi
12672
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012673# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674{ echo "$as_me:$LINENO: checking size of time_t" >&5
12675echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012676if test "${ac_cv_sizeof_time_t+set}" = set; then
12677 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012678else
12679 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012680 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012681else
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* confdefs.h. */
12684_ACEOF
12685cat confdefs.h >>conftest.$ac_ext
12686cat >>conftest.$ac_ext <<_ACEOF
12687/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012688#include <stdio.h>
12689#include <time.h>
12690main()
12691{
12692 FILE *f=fopen("conftestval", "w");
12693 if (!f) exit(1);
12694 fprintf(f, "%d\n", sizeof(time_t));
12695 exit(0);
12696}
Martin v. Löwis11437992002-04-12 09:54:03 +000012697_ACEOF
12698rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699if { (ac_try="$ac_link"
12700case "(($ac_try" in
12701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12702 *) ac_try_echo=$ac_try;;
12703esac
12704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12705 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ac_status=$?
12707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709 { (case "(($ac_try" in
12710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12711 *) ac_try_echo=$ac_try;;
12712esac
12713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12714 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_status=$?
12716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12717 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012718 ac_cv_sizeof_time_t=`cat conftestval`
12719else
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 echo "$as_me: program exited with status $ac_status" >&5
12721echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012722sed 's/^/| /' conftest.$ac_ext >&5
12723
Martin v. Löwis11437992002-04-12 09:54:03 +000012724( exit $ac_status )
12725ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012727rm -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 +000012728fi
12729
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730
12731
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012732fi
12733
Martin v. Löwiseba40652007-08-30 20:10:57 +000012734{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12735echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012736
12737cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012738#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012739_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012740
Michael W. Hudson54241132001-12-07 15:38:26 +000012741
12742
Trent Mick635f6fb2000-08-23 21:33:05 +000012743# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012744ac_save_cc="$CC"
12745if test "$ac_cv_kpthread" = "yes"
12746then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012747elif test "$ac_cv_kthread" = "yes"
12748then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012749elif test "$ac_cv_pthread" = "yes"
12750then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12753echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012754have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012756/* confdefs.h. */
12757_ACEOF
12758cat confdefs.h >>conftest.$ac_ext
12759cat >>conftest.$ac_ext <<_ACEOF
12760/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012761#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012762int
12763main ()
12764{
Guido van Rossum12580492000-09-24 16:47:19 +000012765pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 ;
12767 return 0;
12768}
12769_ACEOF
12770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012771if { (ac_try="$ac_compile"
12772case "(($ac_try" in
12773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12774 *) ac_try_echo=$ac_try;;
12775esac
12776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012779 grep -v '^ *+' conftest.er1 >conftest.err
12780 rm -f conftest.er1
12781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012783 (exit $ac_status); } && {
12784 test -z "$ac_c_werror_flag" ||
12785 test ! -s conftest.err
12786 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012787 have_pthread_t=yes
12788else
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012790sed 's/^/| /' conftest.$ac_ext >&5
12791
Martin v. Löwiseba40652007-08-30 20:10:57 +000012792
Trent Mick635f6fb2000-08-23 21:33:05 +000012793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794
12795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12796{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12797echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012798if test "$have_pthread_t" = yes ; then
12799 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12801echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12803 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012804else
12805 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012806 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012807else
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012809/* confdefs.h. */
12810_ACEOF
12811cat confdefs.h >>conftest.$ac_ext
12812cat >>conftest.$ac_ext <<_ACEOF
12813/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012814#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012815#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012816 main()
12817 {
12818 FILE *f=fopen("conftestval", "w");
12819 if (!f) exit(1);
12820 fprintf(f, "%d\n", sizeof(pthread_t));
12821 exit(0);
12822 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012823_ACEOF
12824rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012825if { (ac_try="$ac_link"
12826case "(($ac_try" in
12827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12828 *) ac_try_echo=$ac_try;;
12829esac
12830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12831 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ac_status=$?
12833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835 { (case "(($ac_try" in
12836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12837 *) ac_try_echo=$ac_try;;
12838esac
12839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12840 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ac_status=$?
12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012844 ac_cv_sizeof_pthread_t=`cat conftestval`
12845else
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 echo "$as_me: program exited with status $ac_status" >&5
12847echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012848sed 's/^/| /' conftest.$ac_ext >&5
12849
Martin v. Löwis11437992002-04-12 09:54:03 +000012850( exit $ac_status )
12851ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853rm -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 +000012854fi
12855
Martin v. Löwiseba40652007-08-30 20:10:57 +000012856
12857
Trent Mick635f6fb2000-08-23 21:33:05 +000012858fi
12859
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12861echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
12863cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012864#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012865_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012866
12867fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012868CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012869
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12871echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12872# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012873if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 enableval=$enable_toolbox_glue;
12875fi
Jack Jansene578a632001-08-15 01:27:14 +000012876
12877
12878if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012879then
Jack Jansene578a632001-08-15 01:27:14 +000012880 case $ac_sys_system/$ac_sys_release in
12881 Darwin/*)
12882 enable_toolbox_glue="yes";;
12883 *)
12884 enable_toolbox_glue="no";;
12885 esac
12886fi
12887case "$enable_toolbox_glue" in
12888yes)
Jack Jansene578a632001-08-15 01:27:14 +000012889 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012890 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
12892cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012893#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012894_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012895
12896 ;;
12897*)
Jack Jansene578a632001-08-15 01:27:14 +000012898 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012899 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012900 ;;
12901esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12903echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012904
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012905
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012906
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012907case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012908 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012909 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12910 ;;
12911 Darwin/*)
12912 OTHER_LIBTOOL_OPT=""
12913 ;;
12914esac
12915
12916
12917case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012918 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012919 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12920 if test "${enable_universalsdk}"; then
12921 :
12922 else
12923 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12924 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012925 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012926 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012927 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012928 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12929 if test ${gcc_version} '<' 4.0
12930 then
12931 LIBTOOL_CRUFT="-lcc_dynamic"
12932 else
12933 LIBTOOL_CRUFT=""
12934 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012935 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012936 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012937 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012938esac
12939
Martin v. Löwiseba40652007-08-30 20:10:57 +000012940{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12941echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012942if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012943then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012944 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012946 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012947
Martin v. Löwis11437992002-04-12 09:54:03 +000012948cat >>confdefs.h <<\_ACEOF
12949#define WITH_NEXT_FRAMEWORK 1
12950_ACEOF
12951
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 { echo "$as_me:$LINENO: result: yes" >&5
12953echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012954else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 { echo "$as_me:$LINENO: result: no" >&5
12956echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012957fi
12958
Martin v. Löwiseba40652007-08-30 20:10:57 +000012959{ echo "$as_me:$LINENO: checking for dyld" >&5
12960echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012961case $ac_sys_system/$ac_sys_release in
12962 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964cat >>confdefs.h <<\_ACEOF
12965#define WITH_DYLD 1
12966_ACEOF
12967
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12969echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012970 ;;
12971 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972 { echo "$as_me:$LINENO: result: no" >&5
12973echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012974 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012975esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012976
Guido van Rossum0a516c91994-09-12 10:58:40 +000012977# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012978
Michael W. Hudson54241132001-12-07 15:38:26 +000012979
12980
12981
12982
Guido van Rossum0a516c91994-09-12 10:58:40 +000012983# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012984# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985{ echo "$as_me:$LINENO: checking SO" >&5
12986echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012987if test -z "$SO"
12988then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012990 hp*|HP*)
12991 case `uname -m` in
12992 ia64) SO=.so;;
12993 *) SO=.sl;;
12994 esac
12995 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012996 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012997 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012998 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012999else
13000 # this might also be a termcap variable, see #610332
13001 echo
13002 echo '====================================================================='
13003 echo '+ +'
13004 echo '+ WARNING: You have set SO in your environment. +'
13005 echo '+ Do you really mean to change the extension for shared libraries? +'
13006 echo '+ Continuing in 10 seconds to let you to ponder. +'
13007 echo '+ +'
13008 echo '====================================================================='
13009 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013011{ echo "$as_me:$LINENO: result: $SO" >&5
13012echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013013
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013014
Neal Norwitz58e28882006-05-19 07:00:58 +000013015cat >>confdefs.h <<_ACEOF
13016#define SHLIB_EXT "$SO"
13017_ACEOF
13018
Guido van Rossum0a516c91994-09-12 10:58:40 +000013019# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013020# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013021# (Shared libraries in this instance are shared modules to be loaded into
13022# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13024echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013025if test -z "$LDSHARED"
13026then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013027 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013028 AIX*)
13029 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013030 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013031 ;;
13032 BeOS*)
13033 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013034 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013035 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013036 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013037 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013039 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013040 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013041 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013042 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013043 hp*|HP*)
13044 if test "$GCC" = "yes"
13045 then LDSHARED='$(CC) -shared'
13046 else LDSHARED='ld -b';
13047 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013048 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013049 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013050 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13051 if test "$enable_framework" ; then
13052 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013053 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13054 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013055 else
13056 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013057 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013058 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013059 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013060 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13061 if test "$enable_framework" ; then
13062 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013063 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13064 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013065 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013066 # No framework, use the Python app as bundle-loader
13067 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013068 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013069 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013070 Darwin/*)
13071 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13072 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013073
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013074 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013075 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013076 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013077 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013078 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013079 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13080 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013081 else
13082 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13083 if test "$enable_framework" ; then
13084 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013085 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13086 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013087 else
13088 # No framework, use the Python app as bundle-loader
13089 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13090 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13091 fi
13092 fi
13093 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013094 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013095 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013096 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013097 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013098 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013099 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013100 else
13101 LDSHARED="ld -Bshareable ${LDFLAGS}"
13102 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013103 OpenBSD*)
13104 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13105 then
13106 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13107 else
13108 case `uname -r` in
13109 [01].* | 2.[0-7] | 2.[0-7].*)
13110 LDSHARED="ld -Bshareable ${LDFLAGS}"
13111 ;;
13112 *)
13113 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13114 ;;
13115 esac
13116 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013117 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013118 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013119 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013120 then LDSHARED='$(CC) -shared'
13121 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013122 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013123 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013124 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013125 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013126 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013127 *) LDSHARED="ld";;
13128 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013130{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13131echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013132BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013133# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013134# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013135{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13136echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013137if test -z "$CCSHARED"
13138then
Guido van Rossum07397971997-04-29 21:49:50 +000013139 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013140 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013141 then CCSHARED="-fPIC";
13142 elif test `uname -p` = sparc;
13143 then CCSHARED="-xcode=pic32";
13144 else CCSHARED="-Kpic";
13145 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013146 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013147 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013148 else CCSHARED="+z";
13149 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013150 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013151 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013152 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013153 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013154 if test "$GCC" = "yes"
13155 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013156 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013157 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013158 SCO_SV*)
13159 if test "$GCC" = "yes"
13160 then CCSHARED="-fPIC"
13161 else CCSHARED="-Kpic -belf"
13162 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013163 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013164 IRIX*/6*) case $CC in
13165 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013166 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013167 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013168 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013169 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013171{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13172echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013173# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013174# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013175{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13176echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013177if test -z "$LINKFORSHARED"
13178then
Guido van Rossum07397971997-04-29 21:49:50 +000013179 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013180 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013181 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013182 LINKFORSHARED="-Wl,-E -Wl,+s";;
13183# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013184 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013185 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013186 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013187 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013188 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13189 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013190 # not used by the core itself but which needs to be in the core so
13191 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013192 # -prebind is no longer used, because it actually seems to give a
13193 # slowdown in stead of a speedup, maybe due to the large number of
13194 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013195
13196 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013197 if test "$enable_framework"
13198 then
Jack Jansenda49e192005-01-07 13:08:22 +000013199 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013200 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013201 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013202 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013203 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013204 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013205 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013206 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13207 then
13208 LINKFORSHARED="-Wl,--export-dynamic"
13209 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013210 SunOS/5*) case $CC in
13211 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013212 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013213 then
13214 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013215 fi;;
13216 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013217 CYGWIN*)
13218 if test $enable_shared = "no"
13219 then
13220 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13221 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013222 QNX*)
13223 # -Wl,-E causes the symbols to be added to the dynamic
13224 # symbol table so that they can be found when a module
13225 # is loaded. -N 2048K causes the stack size to be set
13226 # to 2048 kilobytes so that the stack doesn't overflow
13227 # when running test_compile.py.
13228 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013229 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013231{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13232echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013233
Michael W. Hudson54241132001-12-07 15:38:26 +000013234
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013235
Martin v. Löwiseba40652007-08-30 20:10:57 +000013236{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13237echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013238if test ! "$LIBRARY" = "$LDLIBRARY"
13239then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013240 case $ac_sys_system in
13241 CYGWIN*)
13242 # Cygwin needs CCSHARED when building extension DLLs
13243 # but not when building the interpreter DLL.
13244 CFLAGSFORSHARED='';;
13245 *)
13246 CFLAGSFORSHARED='$(CCSHARED)'
13247 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013249{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13250echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013251
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013252# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13253# library (with --enable-shared).
13254# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013255# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13256# if it is not required, since it creates a dependency of the shared library
13257# to LIBS. This, in turn, means that applications linking the shared libpython
13258# don't need to link LIBS explicitly. The default should be only changed
13259# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013260
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13262echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013263case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013264 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013265 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013266esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13268echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013269
13270
Guido van Rossum627b2d71993-12-24 10:39:16 +000013271# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13274echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013275if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13276 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277else
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013279LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013280cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013281/* confdefs.h. */
13282_ACEOF
13283cat confdefs.h >>conftest.$ac_ext
13284cat >>conftest.$ac_ext <<_ACEOF
13285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Martin v. Löwiseba40652007-08-30 20:10:57 +000013287/* Override any GCC internal prototype to avoid an error.
13288 Use char because int might match the return type of a GCC
13289 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013290#ifdef __cplusplus
13291extern "C"
13292#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013293char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013294int
13295main ()
13296{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 ;
13299 return 0;
13300}
13301_ACEOF
13302rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303if { (ac_try="$ac_link"
13304case "(($ac_try" in
13305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13306 *) ac_try_echo=$ac_try;;
13307esac
13308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13309 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013311 grep -v '^ *+' conftest.er1 >conftest.err
13312 rm -f conftest.er1
13313 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013315 (exit $ac_status); } && {
13316 test -z "$ac_c_werror_flag" ||
13317 test ! -s conftest.err
13318 } && test -s conftest$ac_exeext &&
13319 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321else
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013323sed 's/^/| /' conftest.$ac_ext >&5
13324
Martin v. Löwiseba40652007-08-30 20:10:57 +000013325 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013327
13328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013330LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013332{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13333echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013334if test $ac_cv_lib_dl_dlopen = yes; then
13335 cat >>confdefs.h <<_ACEOF
13336#define HAVE_LIBDL 1
13337_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013338
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013339 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341fi
13342 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
Martin v. Löwiseba40652007-08-30 20:10:57 +000013344{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13345echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013346if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348else
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013350LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013352/* confdefs.h. */
13353_ACEOF
13354cat confdefs.h >>conftest.$ac_ext
13355cat >>conftest.$ac_ext <<_ACEOF
13356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013357
Martin v. Löwiseba40652007-08-30 20:10:57 +000013358/* Override any GCC internal prototype to avoid an error.
13359 Use char because int might match the return type of a GCC
13360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013361#ifdef __cplusplus
13362extern "C"
13363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013364char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013365int
13366main ()
13367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013368return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 ;
13370 return 0;
13371}
13372_ACEOF
13373rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013374if { (ac_try="$ac_link"
13375case "(($ac_try" in
13376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13377 *) ac_try_echo=$ac_try;;
13378esac
13379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13380 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013382 grep -v '^ *+' conftest.er1 >conftest.err
13383 rm -f conftest.er1
13384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386 (exit $ac_status); } && {
13387 test -z "$ac_c_werror_flag" ||
13388 test ! -s conftest.err
13389 } && test -s conftest$ac_exeext &&
13390 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392else
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013394sed 's/^/| /' conftest.$ac_ext >&5
13395
Martin v. Löwiseba40652007-08-30 20:10:57 +000013396 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013398
13399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013401LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013403{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13404echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013405if test $ac_cv_lib_dld_shl_load = yes; then
13406 cat >>confdefs.h <<_ACEOF
13407#define HAVE_LIBDLD 1
13408_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013409
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013410 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412fi
13413 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013414
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013415# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013416if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13418echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013419if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013421else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013422 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013423cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013424/* confdefs.h. */
13425_ACEOF
13426cat confdefs.h >>conftest.$ac_ext
13427cat >>conftest.$ac_ext <<_ACEOF
13428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430/* Override any GCC internal prototype to avoid an error.
13431 Use char because int might match the return type of a GCC
13432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013433#ifdef __cplusplus
13434extern "C"
13435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013436char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013437int
13438main ()
13439{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ;
13442 return 0;
13443}
13444_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013445for ac_lib in '' pthread rt posix4; do
13446 if test -z "$ac_lib"; then
13447 ac_res="none required"
13448 else
13449 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013450 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451 fi
13452 rm -f conftest.$ac_objext conftest$ac_exeext
13453if { (ac_try="$ac_link"
13454case "(($ac_try" in
13455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13456 *) ac_try_echo=$ac_try;;
13457esac
13458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13459 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013460 ac_status=$?
13461 grep -v '^ *+' conftest.er1 >conftest.err
13462 rm -f conftest.er1
13463 cat conftest.err >&5
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013465 (exit $ac_status); } && {
13466 test -z "$ac_c_werror_flag" ||
13467 test ! -s conftest.err
13468 } && test -s conftest$ac_exeext &&
13469 $as_test_x conftest$ac_exeext; then
13470 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013471else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013472 echo "$as_me: failed program was:" >&5
13473sed 's/^/| /' conftest.$ac_ext >&5
13474
Martin v. Löwiseba40652007-08-30 20:10:57 +000013475
Brett Cannon19fab762007-06-02 03:02:29 +000013476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477
13478rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13479 conftest$ac_exeext
13480 if test "${ac_cv_search_sem_init+set}" = set; then
13481 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013483done
13484if test "${ac_cv_search_sem_init+set}" = set; then
13485 :
13486else
13487 ac_cv_search_sem_init=no
13488fi
13489rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013490LIBS=$ac_func_search_save_LIBS
13491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013492{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13493echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13494ac_res=$ac_cv_search_sem_init
13495if test "$ac_res" != no; then
13496 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013497
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013498fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013499 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013500 # posix4 on Solaris 2.6
13501 # pthread (first!) on Linux
13502fi
13503
Martin v. Löwis19d17342003-06-14 21:03:05 +000013504# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013505{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13506echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013507if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13508 echo $ECHO_N "(cached) $ECHO_C" >&6
13509else
13510 ac_check_lib_save_LIBS=$LIBS
13511LIBS="-lintl $LIBS"
13512cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013513/* confdefs.h. */
13514_ACEOF
13515cat confdefs.h >>conftest.$ac_ext
13516cat >>conftest.$ac_ext <<_ACEOF
13517/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013518
Martin v. Löwiseba40652007-08-30 20:10:57 +000013519/* Override any GCC internal prototype to avoid an error.
13520 Use char because int might match the return type of a GCC
13521 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013522#ifdef __cplusplus
13523extern "C"
13524#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013525char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013526int
13527main ()
13528{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013530 ;
13531 return 0;
13532}
13533_ACEOF
13534rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013535if { (ac_try="$ac_link"
13536case "(($ac_try" in
13537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13538 *) ac_try_echo=$ac_try;;
13539esac
13540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13541 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013543 grep -v '^ *+' conftest.er1 >conftest.err
13544 rm -f conftest.er1
13545 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013547 (exit $ac_status); } && {
13548 test -z "$ac_c_werror_flag" ||
13549 test ! -s conftest.err
13550 } && test -s conftest$ac_exeext &&
13551 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013552 ac_cv_lib_intl_textdomain=yes
13553else
13554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013555sed 's/^/| /' conftest.$ac_ext >&5
13556
Martin v. Löwiseba40652007-08-30 20:10:57 +000013557 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013559
13560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013562LIBS=$ac_check_lib_save_LIBS
13563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013564{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13565echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013566if test $ac_cv_lib_intl_textdomain = yes; then
13567
13568cat >>confdefs.h <<\_ACEOF
13569#define WITH_LIBINTL 1
13570_ACEOF
13571
13572fi
13573
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013574
13575# checks for system dependent C++ extensions support
13576case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013577 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13578echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* confdefs.h. */
13581_ACEOF
13582cat confdefs.h >>conftest.$ac_ext
13583cat >>conftest.$ac_ext <<_ACEOF
13584/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013585#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013586int
13587main ()
13588{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013589loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 ;
13591 return 0;
13592}
13593_ACEOF
13594rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013595if { (ac_try="$ac_link"
13596case "(($ac_try" in
13597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13598 *) ac_try_echo=$ac_try;;
13599esac
13600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13601 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013603 grep -v '^ *+' conftest.er1 >conftest.err
13604 rm -f conftest.er1
13605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607 (exit $ac_status); } && {
13608 test -z "$ac_c_werror_flag" ||
13609 test ! -s conftest.err
13610 } && test -s conftest$ac_exeext &&
13611 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613cat >>confdefs.h <<\_ACEOF
13614#define AIX_GENUINE_CPLUSPLUS 1
13615_ACEOF
13616
Martin v. Löwiseba40652007-08-30 20:10:57 +000013617 { echo "$as_me:$LINENO: result: yes" >&5
13618echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013619else
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013621sed 's/^/| /' conftest.$ac_ext >&5
13622
Martin v. Löwiseba40652007-08-30 20:10:57 +000013623 { echo "$as_me:$LINENO: result: no" >&5
13624echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013626
13627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013628 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013629 *) ;;
13630esac
13631
Guido van Rossum70c7f481998-03-26 18:44:10 +000013632# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013633# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013634{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13635echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013636if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013640LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013642/* confdefs.h. */
13643_ACEOF
13644cat confdefs.h >>conftest.$ac_ext
13645cat >>conftest.$ac_ext <<_ACEOF
13646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648/* Override any GCC internal prototype to avoid an error.
13649 Use char because int might match the return type of a GCC
13650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013651#ifdef __cplusplus
13652extern "C"
13653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013654char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013655int
13656main ()
13657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013658return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013659 ;
13660 return 0;
13661}
13662_ACEOF
13663rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664if { (ac_try="$ac_link"
13665case "(($ac_try" in
13666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13667 *) ac_try_echo=$ac_try;;
13668esac
13669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13670 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013672 grep -v '^ *+' conftest.er1 >conftest.err
13673 rm -f conftest.er1
13674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013676 (exit $ac_status); } && {
13677 test -z "$ac_c_werror_flag" ||
13678 test ! -s conftest.err
13679 } && test -s conftest$ac_exeext &&
13680 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013682else
Martin v. Löwis11437992002-04-12 09:54:03 +000013683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013684sed 's/^/| /' conftest.$ac_ext >&5
13685
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688
13689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013693{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13694echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013695if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013696 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013697fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013698 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013699{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13700echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013701if test "${ac_cv_lib_socket_socket+set}" = set; then
13702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013703else
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013705LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013707/* confdefs.h. */
13708_ACEOF
13709cat confdefs.h >>conftest.$ac_ext
13710cat >>conftest.$ac_ext <<_ACEOF
13711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013712
Martin v. Löwiseba40652007-08-30 20:10:57 +000013713/* Override any GCC internal prototype to avoid an error.
13714 Use char because int might match the return type of a GCC
13715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013716#ifdef __cplusplus
13717extern "C"
13718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013719char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013720int
13721main ()
13722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013723return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 ;
13725 return 0;
13726}
13727_ACEOF
13728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013729if { (ac_try="$ac_link"
13730case "(($ac_try" in
13731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13732 *) ac_try_echo=$ac_try;;
13733esac
13734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13735 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013737 grep -v '^ *+' conftest.er1 >conftest.err
13738 rm -f conftest.er1
13739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741 (exit $ac_status); } && {
13742 test -z "$ac_c_werror_flag" ||
13743 test ! -s conftest.err
13744 } && test -s conftest$ac_exeext &&
13745 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013747else
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013749sed 's/^/| /' conftest.$ac_ext >&5
13750
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013753
13754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013756LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13759echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013760if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013761 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013762fi
13763 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013764
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013765case "$ac_sys_system" in
13766BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13768echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013769if test "${ac_cv_lib_net_socket+set}" = set; then
13770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013771else
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013773LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013775/* confdefs.h. */
13776_ACEOF
13777cat confdefs.h >>conftest.$ac_ext
13778cat >>conftest.$ac_ext <<_ACEOF
13779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013780
Martin v. Löwiseba40652007-08-30 20:10:57 +000013781/* Override any GCC internal prototype to avoid an error.
13782 Use char because int might match the return type of a GCC
13783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013784#ifdef __cplusplus
13785extern "C"
13786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013787char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013788int
13789main ()
13790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 ;
13793 return 0;
13794}
13795_ACEOF
13796rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797if { (ac_try="$ac_link"
13798case "(($ac_try" in
13799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13800 *) ac_try_echo=$ac_try;;
13801esac
13802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013805 grep -v '^ *+' conftest.er1 >conftest.err
13806 rm -f conftest.er1
13807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013809 (exit $ac_status); } && {
13810 test -z "$ac_c_werror_flag" ||
13811 test ! -s conftest.err
13812 } && test -s conftest$ac_exeext &&
13813 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013815else
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013817sed 's/^/| /' conftest.$ac_ext >&5
13818
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013821
13822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013824LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013826{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13827echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013828if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013829 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013830fi
13831 # BeOS
13832;;
13833esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013834
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13836echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Martin v. Löwiseba40652007-08-30 20:10:57 +000013838# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013839if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840 withval=$with_libs;
13841{ echo "$as_me:$LINENO: result: $withval" >&5
13842echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013843LIBS="$withval $LIBS"
13844
13845else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013846 { echo "$as_me:$LINENO: result: no" >&5
13847echo "${ECHO_T}no" >&6; }
13848fi
13849
Guido van Rossum7f43da71994-08-01 12:15:30 +000013850
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013851# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13853echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013854
Martin v. Löwiseba40652007-08-30 20:10:57 +000013855# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013856if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013857 withval=$with_system_ffi;
13858fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013859
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013860
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13862echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013863
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013864# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013865
13866
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13868echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013871if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872 withval=$with_signal_module;
13873fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013874
13875
13876if test -z "$with_signal_module"
13877then with_signal_module="yes"
13878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013879{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13880echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013881
13882if test "${with_signal_module}" = "yes"; then
13883 USE_SIGNAL_MODULE=""
13884 SIGNAL_OBJS=""
13885else
13886 USE_SIGNAL_MODULE="#"
13887 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13888fi
13889
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013890# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013891
Barry Warsawc0d24d82000-06-29 16:12:00 +000013892USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013893
Martin v. Löwiseba40652007-08-30 20:10:57 +000013894{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13895echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013896
Guido van Rossumec2f0731997-01-22 20:54:01 +000013897
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013899if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 withval=$with_dec_threads;
13901{ echo "$as_me:$LINENO: result: $withval" >&5
13902echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013903LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013904if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013905 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013906fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013907else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908 { echo "$as_me:$LINENO: result: no" >&5
13909echo "${ECHO_T}no" >&6; }
13910fi
13911
Martin v. Löwis11437992002-04-12 09:54:03 +000013912
13913# Templates for things AC_DEFINEd more than once.
13914# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013915
13916
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
13918
13919
13920
13921
Martin v. Löwiseba40652007-08-30 20:10:57 +000013922{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13923echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Martin v. Löwiseba40652007-08-30 20:10:57 +000013925# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013926if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927 withval=$with_threads;
13928fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013929
13930
Barry Warsawc0d24d82000-06-29 16:12:00 +000013931# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013934if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935 withval=$with_thread; with_threads=$with_thread
13936fi
13937
Barry Warsawc0d24d82000-06-29 16:12:00 +000013938
13939if test -z "$with_threads"
13940then with_threads="yes"
13941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942{ echo "$as_me:$LINENO: result: $with_threads" >&5
13943echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013944
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013945
Barry Warsawc0d24d82000-06-29 16:12:00 +000013946if test "$with_threads" = "no"
13947then
13948 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013949elif test "$ac_cv_pthread_is_default" = yes
13950then
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013952#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013953_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013954
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013955 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013957#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013959
13960 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013962elif test "$ac_cv_kpthread" = "yes"
13963then
13964 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013965 if test "$ac_cv_cxx_thread" = "yes"; then
13966 CXX="$CXX -Kpthread"
13967 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013969#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013970_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013971
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013972 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013973 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013974elif test "$ac_cv_kthread" = "yes"
13975then
13976 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013977 if test "$ac_cv_cxx_thread" = "yes"; then
13978 CXX="$CXX -Kthread"
13979 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013980 cat >>confdefs.h <<\_ACEOF
13981#define WITH_THREAD 1
13982_ACEOF
13983
13984 posix_threads=yes
13985 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013986elif test "$ac_cv_pthread" = "yes"
13987then
13988 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013989 if test "$ac_cv_cxx_thread" = "yes"; then
13990 CXX="$CXX -pthread"
13991 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013992 cat >>confdefs.h <<\_ACEOF
13993#define WITH_THREAD 1
13994_ACEOF
13995
13996 posix_threads=yes
13997 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013998else
13999 if test ! -z "$with_threads" -a -d "$with_threads"
14000 then LDFLAGS="$LDFLAGS -L$with_threads"
14001 fi
14002 if test ! -z "$withval" -a -d "$withval"
14003 then LDFLAGS="$LDFLAGS -L$withval"
14004 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014005
14006 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014007 # define _POSIX_THREADS in unistd.h. Some apparently don't
14008 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014009 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14010echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014012/* confdefs.h. */
14013_ACEOF
14014cat confdefs.h >>conftest.$ac_ext
14015cat >>conftest.$ac_ext <<_ACEOF
14016/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014017
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014018#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014019#ifdef _POSIX_THREADS
14020yes
14021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
14023_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014025 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014026 unistd_defines_pthreads=yes
14027else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014028 unistd_defines_pthreads=no
14029fi
14030rm -f conftest*
14031
Martin v. Löwiseba40652007-08-30 20:10:57 +000014032 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14033echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014034
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014036#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014037_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014040 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14041echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014042if test "${ac_cv_header_cthreads_h+set}" = set; then
14043 echo $ECHO_N "(cached) $ECHO_C" >&6
14044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014045{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14046echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014047else
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014049{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14050echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014051cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014052/* confdefs.h. */
14053_ACEOF
14054cat confdefs.h >>conftest.$ac_ext
14055cat >>conftest.$ac_ext <<_ACEOF
14056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014057$ac_includes_default
14058#include <cthreads.h>
14059_ACEOF
14060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014061if { (ac_try="$ac_compile"
14062case "(($ac_try" in
14063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14064 *) ac_try_echo=$ac_try;;
14065esac
14066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014069 grep -v '^ *+' conftest.er1 >conftest.err
14070 rm -f conftest.er1
14071 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073 (exit $ac_status); } && {
14074 test -z "$ac_c_werror_flag" ||
14075 test ! -s conftest.err
14076 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 ac_header_compiler=yes
14078else
14079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014080sed 's/^/| /' conftest.$ac_ext >&5
14081
Martin v. Löwiseba40652007-08-30 20:10:57 +000014082 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014084
14085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14086{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14087echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014088
14089# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14091echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014093/* confdefs.h. */
14094_ACEOF
14095cat confdefs.h >>conftest.$ac_ext
14096cat >>conftest.$ac_ext <<_ACEOF
14097/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014098#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014099_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014100if { (ac_try="$ac_cpp conftest.$ac_ext"
14101case "(($ac_try" in
14102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14103 *) ac_try_echo=$ac_try;;
14104esac
14105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14106 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014108 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 rm -f conftest.er1
14110 cat conftest.err >&5
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014112 (exit $ac_status); } >/dev/null && {
14113 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14114 test ! -s conftest.err
14115 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 ac_header_preproc=yes
14117else
14118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014119sed 's/^/| /' conftest.$ac_ext >&5
14120
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014123
Martin v. Löwis11437992002-04-12 09:54:03 +000014124rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014125{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14126echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014127
14128# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014129case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14130 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14132echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14134echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14135 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014136 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014137 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014138 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14139echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014140 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14141echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14142 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14143echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14144 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14145echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014146 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14147echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014148 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14149echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014151## ------------------------------------------------ ##
14152## Report this to http://www.python.org/python-bugs ##
14153## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014154_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014155 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014156 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014157esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014158{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14159echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014160if test "${ac_cv_header_cthreads_h+set}" = set; then
14161 echo $ECHO_N "(cached) $ECHO_C" >&6
14162else
14163 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14166echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
14168fi
14169if test $ac_cv_header_cthreads_h = yes; then
14170 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014171#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014172_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014173
Martin v. Löwis11437992002-04-12 09:54:03 +000014174 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014175#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014176_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014177
Martin v. Löwis11437992002-04-12 09:54:03 +000014178
14179cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014180#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014181_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014182
14183 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014184 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014185else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014186
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14189echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014190if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14191 echo $ECHO_N "(cached) $ECHO_C" >&6
14192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014193{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14194echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14198echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014200/* confdefs.h. */
14201_ACEOF
14202cat confdefs.h >>conftest.$ac_ext
14203cat >>conftest.$ac_ext <<_ACEOF
14204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014205$ac_includes_default
14206#include <mach/cthreads.h>
14207_ACEOF
14208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209if { (ac_try="$ac_compile"
14210case "(($ac_try" in
14211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14212 *) ac_try_echo=$ac_try;;
14213esac
14214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014217 grep -v '^ *+' conftest.er1 >conftest.err
14218 rm -f conftest.er1
14219 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221 (exit $ac_status); } && {
14222 test -z "$ac_c_werror_flag" ||
14223 test ! -s conftest.err
14224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014225 ac_header_compiler=yes
14226else
14227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014228sed 's/^/| /' conftest.$ac_ext >&5
14229
Martin v. Löwiseba40652007-08-30 20:10:57 +000014230 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014232
14233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14234{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14235echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
14237# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14239echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014240cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014241/* confdefs.h. */
14242_ACEOF
14243cat confdefs.h >>conftest.$ac_ext
14244cat >>conftest.$ac_ext <<_ACEOF
14245/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014246#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014247_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248if { (ac_try="$ac_cpp conftest.$ac_ext"
14249case "(($ac_try" in
14250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14251 *) ac_try_echo=$ac_try;;
14252esac
14253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14254 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014256 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 rm -f conftest.er1
14258 cat conftest.err >&5
14259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014260 (exit $ac_status); } >/dev/null && {
14261 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14262 test ! -s conftest.err
14263 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 ac_header_preproc=yes
14265else
14266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014267sed 's/^/| /' conftest.$ac_ext >&5
14268
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014271
Martin v. Löwis11437992002-04-12 09:54:03 +000014272rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014273{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14274echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
14276# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014277case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14278 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14280echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14282echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14283 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014284 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014285 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014286 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14287echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014288 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14289echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14290 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14291echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14292 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14293echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014294 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14295echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014296 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14297echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014298 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014299## ------------------------------------------------ ##
14300## Report this to http://www.python.org/python-bugs ##
14301## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014302_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014303 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014304 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014305esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14307echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14309 echo $ECHO_N "(cached) $ECHO_C" >&6
14310else
14311 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14314echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
14316fi
14317if test $ac_cv_header_mach_cthreads_h = yes; then
14318 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014319#define WITH_THREAD 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öwis11437992002-04-12 09:54:03 +000014322 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014323#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014324_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014325
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
14327cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014328#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014329_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014330
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014331 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014332else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014333
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14335echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
Martin v. Löwiseba40652007-08-30 20:10:57 +000014337# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014338if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014339 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14340echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014341 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014342#define WITH_THREAD 1
14343_ACEOF
14344
14345
14346cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014347#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014348_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014349
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014350 LIBS="-lpth $LIBS"
14351 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014352else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353 { echo "$as_me:$LINENO: result: no" >&5
14354echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014355
14356 # Just looking for pthread_create in libpthread is not enough:
14357 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14358 # So we really have to include pthread.h, and then link.
14359 _libs=$LIBS
14360 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14362echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014364/* confdefs.h. */
14365_ACEOF
14366cat confdefs.h >>conftest.$ac_ext
14367cat >>conftest.$ac_ext <<_ACEOF
14368/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014369#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014370
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014371void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014372int
14373main ()
14374{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014375
14376pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 ;
14378 return 0;
14379}
14380_ACEOF
14381rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014382if { (ac_try="$ac_link"
14383case "(($ac_try" in
14384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14385 *) ac_try_echo=$ac_try;;
14386esac
14387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14388 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014390 grep -v '^ *+' conftest.er1 >conftest.err
14391 rm -f conftest.er1
14392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014394 (exit $ac_status); } && {
14395 test -z "$ac_c_werror_flag" ||
14396 test ! -s conftest.err
14397 } && test -s conftest$ac_exeext &&
14398 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400 { echo "$as_me:$LINENO: result: yes" >&5
14401echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014403#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014404_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014405
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014406 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014407 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014408else
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014410sed 's/^/| /' conftest.$ac_ext >&5
14411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014413 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014414 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14415echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014416if test "${ac_cv_func_pthread_detach+set}" = set; then
14417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014418else
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014420/* confdefs.h. */
14421_ACEOF
14422cat confdefs.h >>conftest.$ac_ext
14423cat >>conftest.$ac_ext <<_ACEOF
14424/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014425/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14426 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14427#define pthread_detach innocuous_pthread_detach
14428
Guido van Rossumad678af1998-10-02 14:42:15 +000014429/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014430 which can conflict with char pthread_detach (); below.
14431 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014432 <limits.h> exists even on freestanding compilers. */
14433
14434#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014435# include <limits.h>
14436#else
14437# include <assert.h>
14438#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014439
14440#undef pthread_detach
14441
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442/* Override any GCC internal prototype to avoid an error.
14443 Use char because int might match the return type of a GCC
14444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014445#ifdef __cplusplus
14446extern "C"
14447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014448char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014449/* The GNU C library defines this for functions which it implements
14450 to always fail with ENOSYS. Some functions are actually named
14451 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014452#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014453choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014454#endif
14455
Skip Montanaro6dead952003-09-25 14:50:04 +000014456int
14457main ()
14458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 ;
14461 return 0;
14462}
14463_ACEOF
14464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014465if { (ac_try="$ac_link"
14466case "(($ac_try" in
14467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14468 *) ac_try_echo=$ac_try;;
14469esac
14470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014473 grep -v '^ *+' conftest.er1 >conftest.err
14474 rm -f conftest.er1
14475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477 (exit $ac_status); } && {
14478 test -z "$ac_c_werror_flag" ||
14479 test ! -s conftest.err
14480 } && test -s conftest$ac_exeext &&
14481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014485sed 's/^/| /' conftest.$ac_ext >&5
14486
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489
14490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014491 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014493{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14494echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014495if test $ac_cv_func_pthread_detach = yes; then
14496 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014497#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014498_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014499
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014500 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014501 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014502else
Guido van Rossumad678af1998-10-02 14:42:15 +000014503
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014504 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014505 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14506echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014507if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14508 echo $ECHO_N "(cached) $ECHO_C" >&6
14509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14511echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014512else
14513 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14515echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014517/* confdefs.h. */
14518_ACEOF
14519cat confdefs.h >>conftest.$ac_ext
14520cat >>conftest.$ac_ext <<_ACEOF
14521/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014522$ac_includes_default
14523#include <atheos/threads.h>
14524_ACEOF
14525rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526if { (ac_try="$ac_compile"
14527case "(($ac_try" in
14528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14529 *) ac_try_echo=$ac_try;;
14530esac
14531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014534 grep -v '^ *+' conftest.er1 >conftest.err
14535 rm -f conftest.er1
14536 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538 (exit $ac_status); } && {
14539 test -z "$ac_c_werror_flag" ||
14540 test ! -s conftest.err
14541 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014542 ac_header_compiler=yes
14543else
14544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014545sed 's/^/| /' conftest.$ac_ext >&5
14546
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014549
14550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14551{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14552echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014553
14554# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14556echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014558/* confdefs.h. */
14559_ACEOF
14560cat confdefs.h >>conftest.$ac_ext
14561cat >>conftest.$ac_ext <<_ACEOF
14562/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014563#include <atheos/threads.h>
14564_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014565if { (ac_try="$ac_cpp conftest.$ac_ext"
14566case "(($ac_try" in
14567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14568 *) ac_try_echo=$ac_try;;
14569esac
14570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014572 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014573 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014574 rm -f conftest.er1
14575 cat conftest.err >&5
14576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577 (exit $ac_status); } >/dev/null && {
14578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14579 test ! -s conftest.err
14580 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014581 ac_header_preproc=yes
14582else
14583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014584sed 's/^/| /' conftest.$ac_ext >&5
14585
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014586 ac_header_preproc=no
14587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014589rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014590{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14591echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014592
14593# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014594case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14595 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014596 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14597echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014598 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14599echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14600 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014601 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014602 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014603 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14604echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014605 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14606echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14607 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14608echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14609 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14610echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014611 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14612echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014613 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14614echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014615 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014616## ------------------------------------------------ ##
14617## Report this to http://www.python.org/python-bugs ##
14618## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014619_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014620 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014621 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014622esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014623{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14624echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014625if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14626 echo $ECHO_N "(cached) $ECHO_C" >&6
14627else
14628 ac_cv_header_atheos_threads_h=$ac_header_preproc
14629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14631echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014632
14633fi
14634if test $ac_cv_header_atheos_threads_h = yes; then
14635 cat >>confdefs.h <<\_ACEOF
14636#define WITH_THREAD 1
14637_ACEOF
14638
14639
14640cat >>confdefs.h <<\_ACEOF
14641#define ATHEOS_THREADS 1
14642_ACEOF
14643
14644 THREADOBJ="Python/thread.o"
14645else
14646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14649echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014650if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14651 echo $ECHO_N "(cached) $ECHO_C" >&6
14652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14654echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014655else
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14658echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014660/* confdefs.h. */
14661_ACEOF
14662cat confdefs.h >>conftest.$ac_ext
14663cat >>conftest.$ac_ext <<_ACEOF
14664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014665$ac_includes_default
14666#include <kernel/OS.h>
14667_ACEOF
14668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669if { (ac_try="$ac_compile"
14670case "(($ac_try" in
14671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14672 *) ac_try_echo=$ac_try;;
14673esac
14674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014677 grep -v '^ *+' conftest.er1 >conftest.err
14678 rm -f conftest.er1
14679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014681 (exit $ac_status); } && {
14682 test -z "$ac_c_werror_flag" ||
14683 test ! -s conftest.err
14684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 ac_header_compiler=yes
14686else
14687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014688sed 's/^/| /' conftest.$ac_ext >&5
14689
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014692
14693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14694{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14695echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014696
14697# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014698{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14699echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014701/* confdefs.h. */
14702_ACEOF
14703cat confdefs.h >>conftest.$ac_ext
14704cat >>conftest.$ac_ext <<_ACEOF
14705/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014706#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014707_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708if { (ac_try="$ac_cpp conftest.$ac_ext"
14709case "(($ac_try" in
14710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14711 *) ac_try_echo=$ac_try;;
14712esac
14713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14714 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014716 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 rm -f conftest.er1
14718 cat conftest.err >&5
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014720 (exit $ac_status); } >/dev/null && {
14721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14722 test ! -s conftest.err
14723 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 ac_header_preproc=yes
14725else
14726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014727sed 's/^/| /' conftest.$ac_ext >&5
14728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731
Martin v. Löwis11437992002-04-12 09:54:03 +000014732rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14734echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014737case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14738 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014739 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14740echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014741 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14742echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14743 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014745 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014746 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14747echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014748 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14749echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14750 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14751echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14752 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14753echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014754 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14755echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014756 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14757echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014758 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014759## ------------------------------------------------ ##
14760## Report this to http://www.python.org/python-bugs ##
14761## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014762_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014763 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014764 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014765esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014766{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14767echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014768if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14769 echo $ECHO_N "(cached) $ECHO_C" >&6
14770else
14771 ac_cv_header_kernel_OS_h=$ac_header_preproc
14772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14774echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014775
14776fi
14777if test $ac_cv_header_kernel_OS_h = yes; then
14778 cat >>confdefs.h <<\_ACEOF
14779#define WITH_THREAD 1
14780_ACEOF
14781
14782
14783cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014784#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014785_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014786
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014787 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014788else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014789
Martin v. Löwiseba40652007-08-30 20:10:57 +000014790 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14791echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014792if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014794else
Martin v. Löwis11437992002-04-12 09:54:03 +000014795 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014796LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014798/* confdefs.h. */
14799_ACEOF
14800cat confdefs.h >>conftest.$ac_ext
14801cat >>conftest.$ac_ext <<_ACEOF
14802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014803
Martin v. Löwiseba40652007-08-30 20:10:57 +000014804/* Override any GCC internal prototype to avoid an error.
14805 Use char because int might match the return type of a GCC
14806 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014807#ifdef __cplusplus
14808extern "C"
14809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014810char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014811int
14812main ()
14813{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014814return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 ;
14816 return 0;
14817}
14818_ACEOF
14819rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820if { (ac_try="$ac_link"
14821case "(($ac_try" in
14822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14823 *) ac_try_echo=$ac_try;;
14824esac
14825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14826 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014828 grep -v '^ *+' conftest.er1 >conftest.err
14829 rm -f conftest.er1
14830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014832 (exit $ac_status); } && {
14833 test -z "$ac_c_werror_flag" ||
14834 test ! -s conftest.err
14835 } && test -s conftest$ac_exeext &&
14836 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014838else
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014840sed 's/^/| /' conftest.$ac_ext >&5
14841
Martin v. Löwiseba40652007-08-30 20:10:57 +000014842 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844
14845rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014847LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014849{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14850echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014851if test $ac_cv_lib_pthreads_pthread_create = yes; then
14852 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014853#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014854_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014855
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014856 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014857 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014858 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014859else
Greg Steinadf63d62000-07-05 10:38:09 +000014860
Martin v. Löwiseba40652007-08-30 20:10:57 +000014861 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14862echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014863if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14864 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014865else
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014867LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014869/* confdefs.h. */
14870_ACEOF
14871cat confdefs.h >>conftest.$ac_ext
14872cat >>conftest.$ac_ext <<_ACEOF
14873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014874
Martin v. Löwiseba40652007-08-30 20:10:57 +000014875/* Override any GCC internal prototype to avoid an error.
14876 Use char because int might match the return type of a GCC
14877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014878#ifdef __cplusplus
14879extern "C"
14880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014881char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014882int
14883main ()
14884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 ;
14887 return 0;
14888}
14889_ACEOF
14890rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891if { (ac_try="$ac_link"
14892case "(($ac_try" in
14893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14894 *) ac_try_echo=$ac_try;;
14895esac
14896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14897 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014899 grep -v '^ *+' conftest.er1 >conftest.err
14900 rm -f conftest.er1
14901 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 (exit $ac_status); } && {
14904 test -z "$ac_c_werror_flag" ||
14905 test ! -s conftest.err
14906 } && test -s conftest$ac_exeext &&
14907 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014909else
Martin v. Löwis11437992002-04-12 09:54:03 +000014910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014911sed 's/^/| /' conftest.$ac_ext >&5
14912
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915
14916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014918LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014920{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14921echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014922if test $ac_cv_lib_c_r_pthread_create = yes; then
14923 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014924#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014925_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014926
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014927 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014928 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014929 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014930else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014931
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14933echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014934if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014936else
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014938LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014940/* confdefs.h. */
14941_ACEOF
14942cat confdefs.h >>conftest.$ac_ext
14943cat >>conftest.$ac_ext <<_ACEOF
14944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014945
Martin v. Löwiseba40652007-08-30 20:10:57 +000014946/* Override any GCC internal prototype to avoid an error.
14947 Use char because int might match the return type of a GCC
14948 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014949#ifdef __cplusplus
14950extern "C"
14951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014952char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014953int
14954main ()
14955{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ;
14958 return 0;
14959}
14960_ACEOF
14961rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962if { (ac_try="$ac_link"
14963case "(($ac_try" in
14964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14965 *) ac_try_echo=$ac_try;;
14966esac
14967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14968 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014970 grep -v '^ *+' conftest.er1 >conftest.err
14971 rm -f conftest.er1
14972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974 (exit $ac_status); } && {
14975 test -z "$ac_c_werror_flag" ||
14976 test ! -s conftest.err
14977 } && test -s conftest$ac_exeext &&
14978 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014980else
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014982sed 's/^/| /' conftest.$ac_ext >&5
14983
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986
14987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014988 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014989LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14992echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014993if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14994 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014995#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014996_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014997
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014998 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014999 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015000 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015001else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015002
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15004echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015005if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015007else
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015009LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* confdefs.h. */
15012_ACEOF
15013cat confdefs.h >>conftest.$ac_ext
15014cat >>conftest.$ac_ext <<_ACEOF
15015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015016
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017/* Override any GCC internal prototype to avoid an error.
15018 Use char because int might match the return type of a GCC
15019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015020#ifdef __cplusplus
15021extern "C"
15022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015023char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015024int
15025main ()
15026{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ;
15029 return 0;
15030}
15031_ACEOF
15032rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033if { (ac_try="$ac_link"
15034case "(($ac_try" in
15035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15036 *) ac_try_echo=$ac_try;;
15037esac
15038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15039 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015041 grep -v '^ *+' conftest.er1 >conftest.err
15042 rm -f conftest.er1
15043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015045 (exit $ac_status); } && {
15046 test -z "$ac_c_werror_flag" ||
15047 test ! -s conftest.err
15048 } && test -s conftest$ac_exeext &&
15049 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015051else
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015053sed 's/^/| /' conftest.$ac_ext >&5
15054
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057
15058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015060LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15063echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015064if test $ac_cv_lib_cma_pthread_create = yes; then
15065 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015066#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015067_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015068
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015069 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015070 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015071 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015072else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015073
Martin v. Löwis130fb172001-07-19 11:00:41 +000015074 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015075fi
15076
Guido van Rossum627b2d71993-12-24 10:39:16 +000015077
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015078fi
15079
Guido van Rossum0be3e491997-05-22 20:33:33 +000015080fi
15081
Guido van Rossum49545951997-12-02 19:28:29 +000015082fi
15083
Guido van Rossumb93a8621998-05-07 13:27:32 +000015084fi
15085
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015086
Michael W. Hudson54241132001-12-07 15:38:26 +000015087fi
15088
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015089
15090fi
15091
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093
15094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096fi
15097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098fi
15099
15100
15101fi
15102
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015103
Michael W. Hudson54241132001-12-07 15:38:26 +000015104
Martin v. Löwiseba40652007-08-30 20:10:57 +000015105 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15106echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015107if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15108 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015109else
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015111LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* confdefs.h. */
15114_ACEOF
15115cat confdefs.h >>conftest.$ac_ext
15116cat >>conftest.$ac_ext <<_ACEOF
15117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119/* Override any GCC internal prototype to avoid an error.
15120 Use char because int might match the return type of a GCC
15121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015122#ifdef __cplusplus
15123extern "C"
15124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015125char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015126int
15127main ()
15128{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015129return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
15134rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015135if { (ac_try="$ac_link"
15136case "(($ac_try" in
15137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15138 *) ac_try_echo=$ac_try;;
15139esac
15140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15141 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015143 grep -v '^ *+' conftest.er1 >conftest.err
15144 rm -f conftest.er1
15145 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147 (exit $ac_status); } && {
15148 test -z "$ac_c_werror_flag" ||
15149 test ! -s conftest.err
15150 } && test -s conftest$ac_exeext &&
15151 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015153else
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015155sed 's/^/| /' conftest.$ac_ext >&5
15156
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159
15160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015162LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015164{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15165echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015166if test $ac_cv_lib_mpc_usconfig = yes; then
15167 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015168#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015169_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015170
Martin v. Löwis130fb172001-07-19 11:00:41 +000015171 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015172 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015173 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015174fi
15175
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015176
Neal Norwitza978ab02002-11-02 16:58:05 +000015177 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015178 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15179echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015180if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15181 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015182else
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015184LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* confdefs.h. */
15187_ACEOF
15188cat confdefs.h >>conftest.$ac_ext
15189cat >>conftest.$ac_ext <<_ACEOF
15190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015191
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192/* Override any GCC internal prototype to avoid an error.
15193 Use char because int might match the return type of a GCC
15194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015195#ifdef __cplusplus
15196extern "C"
15197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015198char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015199int
15200main ()
15201{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ;
15204 return 0;
15205}
15206_ACEOF
15207rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208if { (ac_try="$ac_link"
15209case "(($ac_try" in
15210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15211 *) ac_try_echo=$ac_try;;
15212esac
15213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15214 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015216 grep -v '^ *+' conftest.er1 >conftest.err
15217 rm -f conftest.er1
15218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 (exit $ac_status); } && {
15221 test -z "$ac_c_werror_flag" ||
15222 test ! -s conftest.err
15223 } && test -s conftest$ac_exeext &&
15224 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015226else
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015228sed 's/^/| /' conftest.$ac_ext >&5
15229
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232
15233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015235LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15238echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015239if test $ac_cv_lib_thread_thr_create = yes; then
15240 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015241#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015242_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015243
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015244 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015245 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015246 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015247fi
15248
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015249 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015250
Martin v. Löwis130fb172001-07-19 11:00:41 +000015251 if test "$USE_THREAD_MODULE" != "#"
15252 then
15253 # If the above checks didn't disable threads, (at least) OSF1
15254 # needs this '-threads' argument during linking.
15255 case $ac_sys_system in
15256 OSF1) LDLAST=-threads;;
15257 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015258 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015259fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015260
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015261if test "$posix_threads" = "yes"; then
15262 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015263
15264cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015265#define _POSIX_THREADS 1
15266_ACEOF
15267
15268 fi
15269
15270 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15271 case $ac_sys_system/$ac_sys_release in
15272 SunOS/5.6)
15273cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015274#define HAVE_PTHREAD_DESTRUCTOR 1
15275_ACEOF
15276
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015277 ;;
15278 SunOS/5.8)
15279cat >>confdefs.h <<\_ACEOF
15280#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15281_ACEOF
15282
15283 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015284 AIX/5)
15285cat >>confdefs.h <<\_ACEOF
15286#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15287_ACEOF
15288
15289 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015290 esac
15291
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15293echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015294 if test "${ac_cv_pthread_system_supported+set}" = set; then
15295 echo $ECHO_N "(cached) $ECHO_C" >&6
15296else
15297 if test "$cross_compiling" = yes; then
15298 ac_cv_pthread_system_supported=no
15299else
15300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015301/* confdefs.h. */
15302_ACEOF
15303cat confdefs.h >>conftest.$ac_ext
15304cat >>conftest.$ac_ext <<_ACEOF
15305/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015306#include <pthread.h>
15307 void *foo(void *parm) {
15308 return NULL;
15309 }
15310 main() {
15311 pthread_attr_t attr;
15312 pthread_t id;
15313 if (pthread_attr_init(&attr)) exit(-1);
15314 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15315 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15316 exit(0);
15317 }
15318_ACEOF
15319rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015320if { (ac_try="$ac_link"
15321case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330 { (case "(($ac_try" in
15331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15332 *) ac_try_echo=$ac_try;;
15333esac
15334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15335 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015336 ac_status=$?
15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338 (exit $ac_status); }; }; then
15339 ac_cv_pthread_system_supported=yes
15340else
15341 echo "$as_me: program exited with status $ac_status" >&5
15342echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015343sed 's/^/| /' conftest.$ac_ext >&5
15344
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015345( exit $ac_status )
15346ac_cv_pthread_system_supported=no
15347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348rm -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 +000015349fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015350
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351
15352
Guido van Rossum627b2d71993-12-24 10:39:16 +000015353fi
15354
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15356echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015357 if test "$ac_cv_pthread_system_supported" = "yes"; then
15358
15359cat >>confdefs.h <<\_ACEOF
15360#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15361_ACEOF
15362
15363 fi
15364
15365for ac_func in pthread_sigmask
15366do
15367as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15369echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15370if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015371 echo $ECHO_N "(cached) $ECHO_C" >&6
15372else
15373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* confdefs.h. */
15375_ACEOF
15376cat confdefs.h >>conftest.$ac_ext
15377cat >>conftest.$ac_ext <<_ACEOF
15378/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015379/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15380 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15381#define $ac_func innocuous_$ac_func
15382
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015383/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015384 which can conflict with char $ac_func (); below.
15385 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015386 <limits.h> exists even on freestanding compilers. */
15387
15388#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015389# include <limits.h>
15390#else
15391# include <assert.h>
15392#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015393
15394#undef $ac_func
15395
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396/* Override any GCC internal prototype to avoid an error.
15397 Use char because int might match the return type of a GCC
15398 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015399#ifdef __cplusplus
15400extern "C"
15401#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015402char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015403/* The GNU C library defines this for functions which it implements
15404 to always fail with ENOSYS. Some functions are actually named
15405 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015406#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015407choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015408#endif
15409
Skip Montanaro6dead952003-09-25 14:50:04 +000015410int
15411main ()
15412{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015413return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015414 ;
15415 return 0;
15416}
15417_ACEOF
15418rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419if { (ac_try="$ac_link"
15420case "(($ac_try" in
15421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15422 *) ac_try_echo=$ac_try;;
15423esac
15424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15425 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015427 grep -v '^ *+' conftest.er1 >conftest.err
15428 rm -f conftest.er1
15429 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015431 (exit $ac_status); } && {
15432 test -z "$ac_c_werror_flag" ||
15433 test ! -s conftest.err
15434 } && test -s conftest$ac_exeext &&
15435 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015436 eval "$as_ac_var=yes"
15437else
15438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015439sed 's/^/| /' conftest.$ac_ext >&5
15440
Martin v. Löwiseba40652007-08-30 20:10:57 +000015441 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443
15444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015447ac_res=`eval echo '${'$as_ac_var'}'`
15448 { echo "$as_me:$LINENO: result: $ac_res" >&5
15449echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015450if test `eval echo '${'$as_ac_var'}'` = yes; then
15451 cat >>confdefs.h <<_ACEOF
15452#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15453_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015454 case $ac_sys_system in
15455 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015456
Jason Tishlerfac083d2003-07-22 15:20:49 +000015457cat >>confdefs.h <<\_ACEOF
15458#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15459_ACEOF
15460
15461 ;;
15462 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015463fi
15464done
15465
15466fi
15467
15468
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015469# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015470
15471
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15473echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15474# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015475if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015476 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015477 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478 { echo "$as_me:$LINENO: result: no" >&5
15479echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015480 ipv6=no
15481 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015482 *) { echo "$as_me:$LINENO: result: yes" >&5
15483echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015485#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015486_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015487
15488 ipv6=yes
15489 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015493 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015494 { echo "$as_me:$LINENO: result: no" >&5
15495echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015496 ipv6=no
15497
15498else
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015500/* confdefs.h. */
15501_ACEOF
15502cat confdefs.h >>conftest.$ac_ext
15503cat >>conftest.$ac_ext <<_ACEOF
15504/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015505 /* AF_INET6 available check */
15506#include <sys/types.h>
15507#include <sys/socket.h>
15508main()
15509{
15510 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15511 exit(1);
15512 else
15513 exit(0);
15514}
15515
Martin v. Löwis11437992002-04-12 09:54:03 +000015516_ACEOF
15517rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518if { (ac_try="$ac_link"
15519case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015528 { (case "(($ac_try" in
15529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15530 *) ac_try_echo=$ac_try;;
15531esac
15532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15533 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 ac_status=$?
15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537 { echo "$as_me:$LINENO: result: yes" >&5
15538echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015539 ipv6=yes
15540else
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 echo "$as_me: program exited with status $ac_status" >&5
15542echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015543sed 's/^/| /' conftest.$ac_ext >&5
15544
Martin v. Löwis11437992002-04-12 09:54:03 +000015545( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546{ echo "$as_me:$LINENO: result: no" >&5
15547echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015548 ipv6=no
15549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015550rm -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 +000015551fi
15552
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553
15554
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015555if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015556 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15557echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015559/* confdefs.h. */
15560_ACEOF
15561cat confdefs.h >>conftest.$ac_ext
15562cat >>conftest.$ac_ext <<_ACEOF
15563/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015564#include <sys/types.h>
15565#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015566int
15567main ()
15568{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015569struct sockaddr_in6 x;
15570x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 ;
15572 return 0;
15573}
15574_ACEOF
15575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015576if { (ac_try="$ac_compile"
15577case "(($ac_try" in
15578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15579 *) ac_try_echo=$ac_try;;
15580esac
15581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015584 grep -v '^ *+' conftest.er1 >conftest.err
15585 rm -f conftest.er1
15586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588 (exit $ac_status); } && {
15589 test -z "$ac_c_werror_flag" ||
15590 test ! -s conftest.err
15591 } && test -s conftest.$ac_objext; then
15592 { echo "$as_me:$LINENO: result: yes" >&5
15593echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015594 ipv6=yes
15595else
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015597sed 's/^/| /' conftest.$ac_ext >&5
15598
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 { echo "$as_me:$LINENO: result: no" >&5
15600echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015601 ipv6=no
15602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015603
15604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015605fi
15606
15607if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015609#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015611
15612fi
15613
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614fi
15615
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015616
15617ipv6type=unknown
15618ipv6lib=none
15619ipv6trylibc=no
15620
15621if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15623echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015624 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15625 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015626 case $i in
15627 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015629/* confdefs.h. */
15630_ACEOF
15631cat confdefs.h >>conftest.$ac_ext
15632cat >>conftest.$ac_ext <<_ACEOF
15633/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015634
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015635#include <netinet/in.h>
15636#ifdef IPV6_INRIA_VERSION
15637yes
15638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015639_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015641 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015642 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015643fi
15644rm -f conftest*
15645
15646 ;;
15647 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015649/* confdefs.h. */
15650_ACEOF
15651cat confdefs.h >>conftest.$ac_ext
15652cat >>conftest.$ac_ext <<_ACEOF
15653/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015655#include <netinet/in.h>
15656#ifdef __KAME__
15657yes
15658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015659_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015661 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015662 ipv6type=$i;
15663 ipv6lib=inet6
15664 ipv6libdir=/usr/local/v6/lib
15665 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015666fi
15667rm -f conftest*
15668
15669 ;;
15670 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015672/* confdefs.h. */
15673_ACEOF
15674cat confdefs.h >>conftest.$ac_ext
15675cat >>conftest.$ac_ext <<_ACEOF
15676/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015677
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015678#include <features.h>
15679#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15680yes
15681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015682_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015684 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015685 ipv6type=$i;
15686 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015687fi
15688rm -f conftest*
15689
15690 ;;
15691 linux-inet6)
15692 if test -d /usr/inet6; then
15693 ipv6type=$i
15694 ipv6lib=inet6
15695 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015696 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015697 fi
15698 ;;
15699 solaris)
15700 if test -f /etc/netconfig; then
15701 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15702 ipv6type=$i
15703 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015704 fi
15705 fi
15706 ;;
15707 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015709/* confdefs.h. */
15710_ACEOF
15711cat confdefs.h >>conftest.$ac_ext
15712cat >>conftest.$ac_ext <<_ACEOF
15713/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015715#include <sys/param.h>
15716#ifdef _TOSHIBA_INET6
15717yes
15718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015719_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015721 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015722 ipv6type=$i;
15723 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015724 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015725fi
15726rm -f conftest*
15727
15728 ;;
15729 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015731/* confdefs.h. */
15732_ACEOF
15733cat confdefs.h >>conftest.$ac_ext
15734cat >>conftest.$ac_ext <<_ACEOF
15735/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015737#include </usr/local/v6/include/sys/v6config.h>
15738#ifdef __V6D__
15739yes
15740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015741_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015744 ipv6type=$i;
15745 ipv6lib=v6;
15746 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015747 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015748fi
15749rm -f conftest*
15750
15751 ;;
15752 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015754/* confdefs.h. */
15755_ACEOF
15756cat confdefs.h >>conftest.$ac_ext
15757cat >>conftest.$ac_ext <<_ACEOF
15758/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015759
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015760#include <sys/param.h>
15761#ifdef _ZETA_MINAMI_INET6
15762yes
15763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015764_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015766 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015767 ipv6type=$i;
15768 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015769 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015770fi
15771rm -f conftest*
15772
15773 ;;
15774 esac
15775 if test "$ipv6type" != "unknown"; then
15776 break
15777 fi
15778 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15780echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781fi
15782
15783if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15784 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15785 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15786 echo "using lib$ipv6lib"
15787 else
15788 if test $ipv6trylibc = "yes"; then
15789 echo "using libc"
15790 else
15791 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15792 echo "You need to fetch lib$ipv6lib.a from appropriate"
15793 echo 'ipv6 kit and compile beforehand.'
15794 exit 1
15795 fi
15796 fi
15797fi
15798
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015799{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15800echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15801cat >conftest.$ac_ext <<_ACEOF
15802/* confdefs.h. */
15803_ACEOF
15804cat confdefs.h >>conftest.$ac_ext
15805cat >>conftest.$ac_ext <<_ACEOF
15806/* end confdefs.h. */
15807#include <Carbon/Carbon.h>
15808int
15809main ()
15810{
15811FSIORefNum fRef = 0
15812 ;
15813 return 0;
15814}
15815_ACEOF
15816rm -f conftest.$ac_objext
15817if { (ac_try="$ac_compile"
15818case "(($ac_try" in
15819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15820 *) ac_try_echo=$ac_try;;
15821esac
15822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15823 (eval "$ac_compile") 2>conftest.er1
15824 ac_status=$?
15825 grep -v '^ *+' conftest.er1 >conftest.err
15826 rm -f conftest.er1
15827 cat conftest.err >&5
15828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829 (exit $ac_status); } && {
15830 test -z "$ac_c_werror_flag" ||
15831 test ! -s conftest.err
15832 } && test -s conftest.$ac_objext; then
15833
15834cat >>confdefs.h <<\_ACEOF
15835#define HAVE_OSX105_SDK 1
15836_ACEOF
15837
15838 { echo "$as_me:$LINENO: result: yes" >&5
15839echo "${ECHO_T}yes" >&6; }
15840else
15841 echo "$as_me: failed program was:" >&5
15842sed 's/^/| /' conftest.$ac_ext >&5
15843
15844 { echo "$as_me:$LINENO: result: no" >&5
15845echo "${ECHO_T}no" >&6; }
15846
15847fi
15848
15849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15850
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015851# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15853echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015854
Martin v. Löwiseba40652007-08-30 20:10:57 +000015855# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015856if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857 withval=$with_doc_strings;
15858fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015859
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015860
15861if test -z "$with_doc_strings"
15862then with_doc_strings="yes"
15863fi
15864if test "$with_doc_strings" != "no"
15865then
15866
15867cat >>confdefs.h <<\_ACEOF
15868#define WITH_DOC_STRINGS 1
15869_ACEOF
15870
15871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15873echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015874
Neil Schemenauera35c6882001-02-27 04:45:05 +000015875# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015876{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15877echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015878
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015880if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015882if test "$withval" != no
15883then
15884
15885cat >>confdefs.h <<\_ACEOF
15886#define WITH_TSC 1
15887_ACEOF
15888
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889 { echo "$as_me:$LINENO: result: yes" >&5
15890echo "${ECHO_T}yes" >&6; }
15891else { echo "$as_me:$LINENO: result: no" >&5
15892echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015893fi
15894else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895 { echo "$as_me:$LINENO: result: no" >&5
15896echo "${ECHO_T}no" >&6; }
15897fi
15898
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015899
15900# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15902echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015905if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015906 withval=$with_pymalloc;
15907fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015908
Neil Schemenauera35c6882001-02-27 04:45:05 +000015909
Neil Schemenauer16c22972002-03-22 15:34:49 +000015910if test -z "$with_pymalloc"
15911then with_pymalloc="yes"
15912fi
15913if test "$with_pymalloc" != "no"
15914then
Martin v. Löwis11437992002-04-12 09:54:03 +000015915
15916cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015917#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015918_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015919
15920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15922echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015923
Barry Warsawef82cd72000-06-30 16:21:01 +000015924# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15926echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015927
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015929if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015931if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015932then
15933
15934cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015935#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015936_ACEOF
15937
Martin v. Löwiseba40652007-08-30 20:10:57 +000015938 { echo "$as_me:$LINENO: result: yes" >&5
15939echo "${ECHO_T}yes" >&6; }
15940else { echo "$as_me:$LINENO: result: no" >&5
15941echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015942fi
15943else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944 { echo "$as_me:$LINENO: result: no" >&5
15945echo "${ECHO_T}no" >&6; }
15946fi
15947
Barry Warsawef82cd72000-06-30 16:21:01 +000015948
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015949# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015950
Guido van Rossum98935bf2001-09-05 19:13:16 +000015951DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015952
Guido van Rossume97ee181999-12-20 21:27:22 +000015953# the dlopen() function means we might want to use dynload_shlib.o. some
15954# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015955
Thomas Wouters3a584202000-08-05 23:28:51 +000015956for ac_func in dlopen
15957do
Martin v. Löwis11437992002-04-12 09:54:03 +000015958as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015959{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15960echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15961if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015963else
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015965/* confdefs.h. */
15966_ACEOF
15967cat confdefs.h >>conftest.$ac_ext
15968cat >>conftest.$ac_ext <<_ACEOF
15969/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015970/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15971 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15972#define $ac_func innocuous_$ac_func
15973
Guido van Rossume97ee181999-12-20 21:27:22 +000015974/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015975 which can conflict with char $ac_func (); below.
15976 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015977 <limits.h> exists even on freestanding compilers. */
15978
15979#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015980# include <limits.h>
15981#else
15982# include <assert.h>
15983#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015984
15985#undef $ac_func
15986
Martin v. Löwiseba40652007-08-30 20:10:57 +000015987/* Override any GCC internal prototype to avoid an error.
15988 Use char because int might match the return type of a GCC
15989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015990#ifdef __cplusplus
15991extern "C"
15992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015993char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015994/* The GNU C library defines this for functions which it implements
15995 to always fail with ENOSYS. Some functions are actually named
15996 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015997#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015998choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015999#endif
16000
Skip Montanaro6dead952003-09-25 14:50:04 +000016001int
16002main ()
16003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016004return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 ;
16006 return 0;
16007}
16008_ACEOF
16009rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016010if { (ac_try="$ac_link"
16011case "(($ac_try" in
16012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16013 *) ac_try_echo=$ac_try;;
16014esac
16015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16016 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016018 grep -v '^ *+' conftest.er1 >conftest.err
16019 rm -f conftest.er1
16020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016022 (exit $ac_status); } && {
16023 test -z "$ac_c_werror_flag" ||
16024 test ! -s conftest.err
16025 } && test -s conftest$ac_exeext &&
16026 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016028else
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016030sed 's/^/| /' conftest.$ac_ext >&5
16031
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016034
16035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016036 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016038ac_res=`eval echo '${'$as_ac_var'}'`
16039 { echo "$as_me:$LINENO: result: $ac_res" >&5
16040echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016041if test `eval echo '${'$as_ac_var'}'` = yes; then
16042 cat >>confdefs.h <<_ACEOF
16043#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16044_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016045
Guido van Rossume97ee181999-12-20 21:27:22 +000016046fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016047done
Guido van Rossume97ee181999-12-20 21:27:22 +000016048
Michael W. Hudson54241132001-12-07 15:38:26 +000016049
Guido van Rossume97ee181999-12-20 21:27:22 +000016050# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16051# loading of modules.
16052
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16054echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016055if test -z "$DYNLOADFILE"
16056then
16057 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016058 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16059 if test "$ac_cv_func_dlopen" = yes
16060 then DYNLOADFILE="dynload_shlib.o"
16061 else DYNLOADFILE="dynload_aix.o"
16062 fi
16063 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016064 BeOS*) DYNLOADFILE="dynload_beos.o";;
16065 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016066 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16067 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016068 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016069 *)
16070 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16071 # out any dynamic loading
16072 if test "$ac_cv_func_dlopen" = yes
16073 then DYNLOADFILE="dynload_shlib.o"
16074 else DYNLOADFILE="dynload_stub.o"
16075 fi
16076 ;;
16077 esac
16078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016079{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16080echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016081if test "$DYNLOADFILE" != "dynload_stub.o"
16082then
Martin v. Löwis11437992002-04-12 09:54:03 +000016083
16084cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016085#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016086_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016087
16088fi
16089
Neil Schemenauer4e425612001-06-19 15:44:15 +000016090# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16091
Michael W. Hudson54241132001-12-07 15:38:26 +000016092
Martin v. Löwiseba40652007-08-30 20:10:57 +000016093{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16094echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016095if test -z "$MACHDEP_OBJS"
16096then
Jack Jansene578a632001-08-15 01:27:14 +000016097 MACHDEP_OBJS=$extra_machdep_objs
16098else
16099 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016101{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16102echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016103
Guido van Rossum627b2d71993-12-24 10:39:16 +000016104# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016105
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
16167
16168
16169
16170
16171
16172
16173
16174
16175
Martin v. Löwisd6320502004-08-12 13:45:08 +000016176
Martin v. Löwisc3001752005-01-23 09:27:24 +000016177
16178
Neal Norwitz05a45592006-03-20 06:30:08 +000016179
16180
Martin v. Löwis382abef2007-02-19 10:55:19 +000016181
16182
Christian Heimes36281872007-11-30 21:11:28 +000016183
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016184
16185
16186for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16187 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016188 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016189 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016190 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016191 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016192 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016193 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016194 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016195 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016196 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016197 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016198do
Martin v. Löwis11437992002-04-12 09:54:03 +000016199as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016200{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16201echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16202if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016204else
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016206/* confdefs.h. */
16207_ACEOF
16208cat confdefs.h >>conftest.$ac_ext
16209cat >>conftest.$ac_ext <<_ACEOF
16210/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016211/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16212 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16213#define $ac_func innocuous_$ac_func
16214
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016215/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016216 which can conflict with char $ac_func (); below.
16217 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016218 <limits.h> exists even on freestanding compilers. */
16219
16220#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016221# include <limits.h>
16222#else
16223# include <assert.h>
16224#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016225
16226#undef $ac_func
16227
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228/* Override any GCC internal prototype to avoid an error.
16229 Use char because int might match the return type of a GCC
16230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016231#ifdef __cplusplus
16232extern "C"
16233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016234char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016235/* The GNU C library defines this for functions which it implements
16236 to always fail with ENOSYS. Some functions are actually named
16237 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016238#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016239choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016240#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016241
Skip Montanaro6dead952003-09-25 14:50:04 +000016242int
16243main ()
16244{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ;
16247 return 0;
16248}
16249_ACEOF
16250rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251if { (ac_try="$ac_link"
16252case "(($ac_try" in
16253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16254 *) ac_try_echo=$ac_try;;
16255esac
16256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16257 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016259 grep -v '^ *+' conftest.er1 >conftest.err
16260 rm -f conftest.er1
16261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 (exit $ac_status); } && {
16264 test -z "$ac_c_werror_flag" ||
16265 test ! -s conftest.err
16266 } && test -s conftest$ac_exeext &&
16267 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016269else
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016271sed 's/^/| /' conftest.$ac_ext >&5
16272
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275
16276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016277 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279ac_res=`eval echo '${'$as_ac_var'}'`
16280 { echo "$as_me:$LINENO: result: $ac_res" >&5
16281echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016282if test `eval echo '${'$as_ac_var'}'` = yes; then
16283 cat >>confdefs.h <<_ACEOF
16284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16285_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016286
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016287fi
16288done
16289
Michael W. Hudson54241132001-12-07 15:38:26 +000016290
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016291# For some functions, having a definition is not sufficient, since
16292# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293{ echo "$as_me:$LINENO: checking for chroot" >&5
16294echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016295cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016296/* confdefs.h. */
16297_ACEOF
16298cat confdefs.h >>conftest.$ac_ext
16299cat >>conftest.$ac_ext <<_ACEOF
16300/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016301#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016302int
16303main ()
16304{
16305void *x=chroot
16306 ;
16307 return 0;
16308}
16309_ACEOF
16310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016311if { (ac_try="$ac_compile"
16312case "(($ac_try" in
16313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16314 *) ac_try_echo=$ac_try;;
16315esac
16316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016319 grep -v '^ *+' conftest.er1 >conftest.err
16320 rm -f conftest.er1
16321 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323 (exit $ac_status); } && {
16324 test -z "$ac_c_werror_flag" ||
16325 test ! -s conftest.err
16326 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016327
16328cat >>confdefs.h <<\_ACEOF
16329#define HAVE_CHROOT 1
16330_ACEOF
16331
Martin v. Löwiseba40652007-08-30 20:10:57 +000016332 { echo "$as_me:$LINENO: result: yes" >&5
16333echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016334else
16335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016336sed 's/^/| /' conftest.$ac_ext >&5
16337
Martin v. Löwiseba40652007-08-30 20:10:57 +000016338 { echo "$as_me:$LINENO: result: no" >&5
16339echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016340
16341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016342
16343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16344{ echo "$as_me:$LINENO: checking for link" >&5
16345echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016347/* confdefs.h. */
16348_ACEOF
16349cat confdefs.h >>conftest.$ac_ext
16350cat >>conftest.$ac_ext <<_ACEOF
16351/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016352#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016353int
16354main ()
16355{
16356void *x=link
16357 ;
16358 return 0;
16359}
16360_ACEOF
16361rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016362if { (ac_try="$ac_compile"
16363case "(($ac_try" in
16364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16365 *) ac_try_echo=$ac_try;;
16366esac
16367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016370 grep -v '^ *+' conftest.er1 >conftest.err
16371 rm -f conftest.er1
16372 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374 (exit $ac_status); } && {
16375 test -z "$ac_c_werror_flag" ||
16376 test ! -s conftest.err
16377 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016378
16379cat >>confdefs.h <<\_ACEOF
16380#define HAVE_LINK 1
16381_ACEOF
16382
Martin v. Löwiseba40652007-08-30 20:10:57 +000016383 { echo "$as_me:$LINENO: result: yes" >&5
16384echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016385else
16386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016387sed 's/^/| /' conftest.$ac_ext >&5
16388
Martin v. Löwiseba40652007-08-30 20:10:57 +000016389 { echo "$as_me:$LINENO: result: no" >&5
16390echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016391
16392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016393
16394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16395{ echo "$as_me:$LINENO: checking for symlink" >&5
16396echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016403#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016404int
16405main ()
16406{
16407void *x=symlink
16408 ;
16409 return 0;
16410}
16411_ACEOF
16412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016413if { (ac_try="$ac_compile"
16414case "(($ac_try" in
16415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16416 *) ac_try_echo=$ac_try;;
16417esac
16418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016421 grep -v '^ *+' conftest.er1 >conftest.err
16422 rm -f conftest.er1
16423 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425 (exit $ac_status); } && {
16426 test -z "$ac_c_werror_flag" ||
16427 test ! -s conftest.err
16428 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016429
16430cat >>confdefs.h <<\_ACEOF
16431#define HAVE_SYMLINK 1
16432_ACEOF
16433
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434 { echo "$as_me:$LINENO: result: yes" >&5
16435echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016436else
16437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016438sed 's/^/| /' conftest.$ac_ext >&5
16439
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440 { echo "$as_me:$LINENO: result: no" >&5
16441echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016442
16443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016444
16445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16446{ echo "$as_me:$LINENO: checking for fchdir" >&5
16447echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016449/* confdefs.h. */
16450_ACEOF
16451cat confdefs.h >>conftest.$ac_ext
16452cat >>conftest.$ac_ext <<_ACEOF
16453/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016454#include <unistd.h>
16455int
16456main ()
16457{
16458void *x=fchdir
16459 ;
16460 return 0;
16461}
16462_ACEOF
16463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016464if { (ac_try="$ac_compile"
16465case "(($ac_try" in
16466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16467 *) ac_try_echo=$ac_try;;
16468esac
16469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016472 grep -v '^ *+' conftest.er1 >conftest.err
16473 rm -f conftest.er1
16474 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476 (exit $ac_status); } && {
16477 test -z "$ac_c_werror_flag" ||
16478 test ! -s conftest.err
16479 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016480
16481cat >>confdefs.h <<\_ACEOF
16482#define HAVE_FCHDIR 1
16483_ACEOF
16484
Martin v. Löwiseba40652007-08-30 20:10:57 +000016485 { echo "$as_me:$LINENO: result: yes" >&5
16486echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016487else
16488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016489sed 's/^/| /' conftest.$ac_ext >&5
16490
Martin v. Löwiseba40652007-08-30 20:10:57 +000016491 { echo "$as_me:$LINENO: result: no" >&5
16492echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016493
16494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016495
16496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16497{ echo "$as_me:$LINENO: checking for fsync" >&5
16498echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016500/* confdefs.h. */
16501_ACEOF
16502cat confdefs.h >>conftest.$ac_ext
16503cat >>conftest.$ac_ext <<_ACEOF
16504/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016505#include <unistd.h>
16506int
16507main ()
16508{
16509void *x=fsync
16510 ;
16511 return 0;
16512}
16513_ACEOF
16514rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515if { (ac_try="$ac_compile"
16516case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
16520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16521 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016523 grep -v '^ *+' conftest.er1 >conftest.err
16524 rm -f conftest.er1
16525 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527 (exit $ac_status); } && {
16528 test -z "$ac_c_werror_flag" ||
16529 test ! -s conftest.err
16530 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016531
16532cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016533#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016534_ACEOF
16535
Martin v. Löwiseba40652007-08-30 20:10:57 +000016536 { echo "$as_me:$LINENO: result: yes" >&5
16537echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016538else
16539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016540sed 's/^/| /' conftest.$ac_ext >&5
16541
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542 { echo "$as_me:$LINENO: result: no" >&5
16543echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016544
16545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016546
16547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16548{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16549echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016551/* confdefs.h. */
16552_ACEOF
16553cat confdefs.h >>conftest.$ac_ext
16554cat >>conftest.$ac_ext <<_ACEOF
16555/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016556#include <unistd.h>
16557int
16558main ()
16559{
16560void *x=fdatasync
16561 ;
16562 return 0;
16563}
16564_ACEOF
16565rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016566if { (ac_try="$ac_compile"
16567case "(($ac_try" in
16568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16569 *) ac_try_echo=$ac_try;;
16570esac
16571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016574 grep -v '^ *+' conftest.er1 >conftest.err
16575 rm -f conftest.er1
16576 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016578 (exit $ac_status); } && {
16579 test -z "$ac_c_werror_flag" ||
16580 test ! -s conftest.err
16581 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016582
16583cat >>confdefs.h <<\_ACEOF
16584#define HAVE_FDATASYNC 1
16585_ACEOF
16586
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587 { echo "$as_me:$LINENO: result: yes" >&5
16588echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016589else
16590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016591sed 's/^/| /' conftest.$ac_ext >&5
16592
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 { echo "$as_me:$LINENO: result: no" >&5
16594echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016595
16596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016597
16598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016599{ echo "$as_me:$LINENO: checking for epoll" >&5
16600echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16601cat >conftest.$ac_ext <<_ACEOF
16602/* confdefs.h. */
16603_ACEOF
16604cat confdefs.h >>conftest.$ac_ext
16605cat >>conftest.$ac_ext <<_ACEOF
16606/* end confdefs.h. */
16607#include <sys/epoll.h>
16608int
16609main ()
16610{
16611void *x=epoll_create
16612 ;
16613 return 0;
16614}
16615_ACEOF
16616rm -f conftest.$ac_objext
16617if { (ac_try="$ac_compile"
16618case "(($ac_try" in
16619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16620 *) ac_try_echo=$ac_try;;
16621esac
16622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16623 (eval "$ac_compile") 2>conftest.er1
16624 ac_status=$?
16625 grep -v '^ *+' conftest.er1 >conftest.err
16626 rm -f conftest.er1
16627 cat conftest.err >&5
16628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16629 (exit $ac_status); } && {
16630 test -z "$ac_c_werror_flag" ||
16631 test ! -s conftest.err
16632 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016633
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016634cat >>confdefs.h <<\_ACEOF
16635#define HAVE_EPOLL 1
16636_ACEOF
16637
16638 { echo "$as_me:$LINENO: result: yes" >&5
16639echo "${ECHO_T}yes" >&6; }
16640else
16641 echo "$as_me: failed program was:" >&5
16642sed 's/^/| /' conftest.$ac_ext >&5
16643
16644 { echo "$as_me:$LINENO: result: no" >&5
16645echo "${ECHO_T}no" >&6; }
16646
16647fi
16648
16649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16650{ echo "$as_me:$LINENO: checking for kqueue" >&5
16651echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16652cat >conftest.$ac_ext <<_ACEOF
16653/* confdefs.h. */
16654_ACEOF
16655cat confdefs.h >>conftest.$ac_ext
16656cat >>conftest.$ac_ext <<_ACEOF
16657/* end confdefs.h. */
16658
16659#include <sys/types.h>
16660#include <sys/event.h>
16661
16662int
16663main ()
16664{
16665int x=kqueue()
16666 ;
16667 return 0;
16668}
16669_ACEOF
16670rm -f conftest.$ac_objext
16671if { (ac_try="$ac_compile"
16672case "(($ac_try" in
16673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16674 *) ac_try_echo=$ac_try;;
16675esac
16676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16677 (eval "$ac_compile") 2>conftest.er1
16678 ac_status=$?
16679 grep -v '^ *+' conftest.er1 >conftest.err
16680 rm -f conftest.er1
16681 cat conftest.err >&5
16682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16683 (exit $ac_status); } && {
16684 test -z "$ac_c_werror_flag" ||
16685 test ! -s conftest.err
16686 } && test -s conftest.$ac_objext; then
16687
16688cat >>confdefs.h <<\_ACEOF
16689#define HAVE_KQUEUE 1
16690_ACEOF
16691
16692 { echo "$as_me:$LINENO: result: yes" >&5
16693echo "${ECHO_T}yes" >&6; }
16694else
16695 echo "$as_me: failed program was:" >&5
16696sed 's/^/| /' conftest.$ac_ext >&5
16697
16698 { echo "$as_me:$LINENO: result: no" >&5
16699echo "${ECHO_T}no" >&6; }
16700
16701fi
16702
16703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016704# On some systems (eg. FreeBSD 5), we would find a definition of the
16705# functions ctermid_r, setgroups in the library, but no prototype
16706# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16707# address to avoid compiler warnings and potential miscompilations
16708# because of the missing prototypes.
16709
Martin v. Löwiseba40652007-08-30 20:10:57 +000016710{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16711echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016713/* confdefs.h. */
16714_ACEOF
16715cat confdefs.h >>conftest.$ac_ext
16716cat >>conftest.$ac_ext <<_ACEOF
16717/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016718
16719#include "confdefs.h"
16720#include <stdio.h>
16721
Martin v. Löwisd5843682002-11-21 20:41:28 +000016722int
16723main ()
16724{
16725void* p = ctermid_r
16726 ;
16727 return 0;
16728}
16729_ACEOF
16730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731if { (ac_try="$ac_compile"
16732case "(($ac_try" in
16733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16734 *) ac_try_echo=$ac_try;;
16735esac
16736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016739 grep -v '^ *+' conftest.er1 >conftest.err
16740 rm -f conftest.er1
16741 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743 (exit $ac_status); } && {
16744 test -z "$ac_c_werror_flag" ||
16745 test ! -s conftest.err
16746 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016747
16748cat >>confdefs.h <<\_ACEOF
16749#define HAVE_CTERMID_R 1
16750_ACEOF
16751
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752 { echo "$as_me:$LINENO: result: yes" >&5
16753echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016754else
16755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016756sed 's/^/| /' conftest.$ac_ext >&5
16757
Martin v. Löwiseba40652007-08-30 20:10:57 +000016758 { echo "$as_me:$LINENO: result: no" >&5
16759echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016760
16761fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016762
Martin v. Löwiseba40652007-08-30 20:10:57 +000016763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16764
16765{ echo "$as_me:$LINENO: checking for flock" >&5
16766echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016768/* confdefs.h. */
16769_ACEOF
16770cat confdefs.h >>conftest.$ac_ext
16771cat >>conftest.$ac_ext <<_ACEOF
16772/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016773
16774#include "confdefs.h"
16775#include <sys/file.h>
16776
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016777int
16778main ()
16779{
16780void* p = flock
16781 ;
16782 return 0;
16783}
16784_ACEOF
16785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016786if { (ac_try="$ac_compile"
16787case "(($ac_try" in
16788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16789 *) ac_try_echo=$ac_try;;
16790esac
16791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016794 grep -v '^ *+' conftest.er1 >conftest.err
16795 rm -f conftest.er1
16796 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016798 (exit $ac_status); } && {
16799 test -z "$ac_c_werror_flag" ||
16800 test ! -s conftest.err
16801 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016802
16803cat >>confdefs.h <<\_ACEOF
16804#define HAVE_FLOCK 1
16805_ACEOF
16806
Martin v. Löwiseba40652007-08-30 20:10:57 +000016807 { echo "$as_me:$LINENO: result: yes" >&5
16808echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016809else
16810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016811sed 's/^/| /' conftest.$ac_ext >&5
16812
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813 { echo "$as_me:$LINENO: result: no" >&5
16814echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016815
16816fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016817
Martin v. Löwiseba40652007-08-30 20:10:57 +000016818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16819
16820{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16821echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016823/* confdefs.h. */
16824_ACEOF
16825cat confdefs.h >>conftest.$ac_ext
16826cat >>conftest.$ac_ext <<_ACEOF
16827/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016828
16829#include "confdefs.h"
16830#include <unistd.h>
16831
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016832int
16833main ()
16834{
16835void* p = getpagesize
16836 ;
16837 return 0;
16838}
16839_ACEOF
16840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016841if { (ac_try="$ac_compile"
16842case "(($ac_try" in
16843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16844 *) ac_try_echo=$ac_try;;
16845esac
16846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016849 grep -v '^ *+' conftest.er1 >conftest.err
16850 rm -f conftest.er1
16851 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016853 (exit $ac_status); } && {
16854 test -z "$ac_c_werror_flag" ||
16855 test ! -s conftest.err
16856 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016857
16858cat >>confdefs.h <<\_ACEOF
16859#define HAVE_GETPAGESIZE 1
16860_ACEOF
16861
Martin v. Löwiseba40652007-08-30 20:10:57 +000016862 { echo "$as_me:$LINENO: result: yes" >&5
16863echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016864else
16865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016866sed 's/^/| /' conftest.$ac_ext >&5
16867
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868 { echo "$as_me:$LINENO: result: no" >&5
16869echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016870
16871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016872
16873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016874
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016875for ac_prog in true
16876do
16877 # Extract the first word of "$ac_prog", so it can be a program name with args.
16878set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16880echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016881if test "${ac_cv_prog_TRUE+set}" = set; then
16882 echo $ECHO_N "(cached) $ECHO_C" >&6
16883else
16884 if test -n "$TRUE"; then
16885 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16886else
16887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16888for as_dir in $PATH
16889do
16890 IFS=$as_save_IFS
16891 test -z "$as_dir" && as_dir=.
16892 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893 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 +000016894 ac_cv_prog_TRUE="$ac_prog"
16895 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16896 break 2
16897 fi
16898done
16899done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016900IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016901
16902fi
16903fi
16904TRUE=$ac_cv_prog_TRUE
16905if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906 { echo "$as_me:$LINENO: result: $TRUE" >&5
16907echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016908else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 { echo "$as_me:$LINENO: result: no" >&5
16910echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016911fi
16912
Martin v. Löwiseba40652007-08-30 20:10:57 +000016913
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016914 test -n "$TRUE" && break
16915done
16916test -n "$TRUE" || TRUE="/bin/true"
16917
16918
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16920echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016921if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16922 echo $ECHO_N "(cached) $ECHO_C" >&6
16923else
16924 ac_check_lib_save_LIBS=$LIBS
16925LIBS="-lc $LIBS"
16926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016927/* confdefs.h. */
16928_ACEOF
16929cat confdefs.h >>conftest.$ac_ext
16930cat >>conftest.$ac_ext <<_ACEOF
16931/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016932
Martin v. Löwiseba40652007-08-30 20:10:57 +000016933/* Override any GCC internal prototype to avoid an error.
16934 Use char because int might match the return type of a GCC
16935 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016936#ifdef __cplusplus
16937extern "C"
16938#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016939char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016940int
16941main ()
16942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016943return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016944 ;
16945 return 0;
16946}
16947_ACEOF
16948rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016949if { (ac_try="$ac_link"
16950case "(($ac_try" in
16951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16952 *) ac_try_echo=$ac_try;;
16953esac
16954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16955 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016957 grep -v '^ *+' conftest.er1 >conftest.err
16958 rm -f conftest.er1
16959 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016961 (exit $ac_status); } && {
16962 test -z "$ac_c_werror_flag" ||
16963 test ! -s conftest.err
16964 } && test -s conftest$ac_exeext &&
16965 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016966 ac_cv_lib_c_inet_aton=yes
16967else
16968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016969sed 's/^/| /' conftest.$ac_ext >&5
16970
Martin v. Löwiseba40652007-08-30 20:10:57 +000016971 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016973
16974rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016976LIBS=$ac_check_lib_save_LIBS
16977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016978{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16979echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016980if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016981 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016982else
16983
Martin v. Löwiseba40652007-08-30 20:10:57 +000016984{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16985echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016986if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16987 echo $ECHO_N "(cached) $ECHO_C" >&6
16988else
16989 ac_check_lib_save_LIBS=$LIBS
16990LIBS="-lresolv $LIBS"
16991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016992/* confdefs.h. */
16993_ACEOF
16994cat confdefs.h >>conftest.$ac_ext
16995cat >>conftest.$ac_ext <<_ACEOF
16996/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016997
Martin v. Löwiseba40652007-08-30 20:10:57 +000016998/* Override any GCC internal prototype to avoid an error.
16999 Use char because int might match the return type of a GCC
17000 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017001#ifdef __cplusplus
17002extern "C"
17003#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017004char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017005int
17006main ()
17007{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017008return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017009 ;
17010 return 0;
17011}
17012_ACEOF
17013rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017014if { (ac_try="$ac_link"
17015case "(($ac_try" in
17016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17017 *) ac_try_echo=$ac_try;;
17018esac
17019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017022 grep -v '^ *+' conftest.er1 >conftest.err
17023 rm -f conftest.er1
17024 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026 (exit $ac_status); } && {
17027 test -z "$ac_c_werror_flag" ||
17028 test ! -s conftest.err
17029 } && test -s conftest$ac_exeext &&
17030 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017031 ac_cv_lib_resolv_inet_aton=yes
17032else
17033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017034sed 's/^/| /' conftest.$ac_ext >&5
17035
Martin v. Löwiseba40652007-08-30 20:10:57 +000017036 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038
17039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017041LIBS=$ac_check_lib_save_LIBS
17042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17044echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017045if test $ac_cv_lib_resolv_inet_aton = yes; then
17046 cat >>confdefs.h <<_ACEOF
17047#define HAVE_LIBRESOLV 1
17048_ACEOF
17049
17050 LIBS="-lresolv $LIBS"
17051
17052fi
17053
17054
17055fi
17056
17057
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017058# On Tru64, chflags seems to be present, but calling it will
17059# exit Python
17060{ echo "$as_me:$LINENO: checking for chflags" >&5
17061echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17062if test "$cross_compiling" = yes; then
17063 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17064See \`config.log' for more details." >&5
17065echo "$as_me: error: cannot run test program while cross compiling
17066See \`config.log' for more details." >&2;}
17067 { (exit 1); exit 1; }; }
17068else
17069 cat >conftest.$ac_ext <<_ACEOF
17070/* confdefs.h. */
17071_ACEOF
17072cat confdefs.h >>conftest.$ac_ext
17073cat >>conftest.$ac_ext <<_ACEOF
17074/* end confdefs.h. */
17075
17076#include <sys/stat.h>
17077#include <unistd.h>
17078int main(int argc, char*argv[])
17079{
17080 if(chflags(argv[0], 0) != 0)
17081 return 1;
17082 return 0;
17083}
17084
17085_ACEOF
17086rm -f conftest$ac_exeext
17087if { (ac_try="$ac_link"
17088case "(($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_link") 2>&5
17094 ac_status=$?
17095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17097 { (case "(($ac_try" in
17098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17099 *) ac_try_echo=$ac_try;;
17100esac
17101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17102 (eval "$ac_try") 2>&5
17103 ac_status=$?
17104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17105 (exit $ac_status); }; }; then
17106
17107cat >>confdefs.h <<\_ACEOF
17108#define HAVE_CHFLAGS 1
17109_ACEOF
17110
17111 { echo "$as_me:$LINENO: result: yes" >&5
17112echo "${ECHO_T}yes" >&6; }
17113else
17114 echo "$as_me: program exited with status $ac_status" >&5
17115echo "$as_me: failed program was:" >&5
17116sed 's/^/| /' conftest.$ac_ext >&5
17117
17118( exit $ac_status )
17119{ echo "$as_me:$LINENO: result: no" >&5
17120echo "${ECHO_T}no" >&6; }
17121
17122fi
17123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17124fi
17125
17126
17127
17128{ echo "$as_me:$LINENO: checking for lchflags" >&5
17129echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17130if test "$cross_compiling" = yes; then
17131 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17132See \`config.log' for more details." >&5
17133echo "$as_me: error: cannot run test program while cross compiling
17134See \`config.log' for more details." >&2;}
17135 { (exit 1); exit 1; }; }
17136else
17137 cat >conftest.$ac_ext <<_ACEOF
17138/* confdefs.h. */
17139_ACEOF
17140cat confdefs.h >>conftest.$ac_ext
17141cat >>conftest.$ac_ext <<_ACEOF
17142/* end confdefs.h. */
17143
17144#include <sys/stat.h>
17145#include <unistd.h>
17146int main(int argc, char*argv[])
17147{
17148 if(lchflags(argv[0], 0) != 0)
17149 return 1;
17150 return 0;
17151}
17152
17153_ACEOF
17154rm -f conftest$ac_exeext
17155if { (ac_try="$ac_link"
17156case "(($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_link") 2>&5
17162 ac_status=$?
17163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17165 { (case "(($ac_try" in
17166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17167 *) ac_try_echo=$ac_try;;
17168esac
17169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17170 (eval "$ac_try") 2>&5
17171 ac_status=$?
17172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17173 (exit $ac_status); }; }; then
17174
17175cat >>confdefs.h <<\_ACEOF
17176#define HAVE_LCHFLAGS 1
17177_ACEOF
17178
17179 { echo "$as_me:$LINENO: result: yes" >&5
17180echo "${ECHO_T}yes" >&6; }
17181else
17182 echo "$as_me: program exited with status $ac_status" >&5
17183echo "$as_me: failed program was:" >&5
17184sed 's/^/| /' conftest.$ac_ext >&5
17185
17186( exit $ac_status )
17187{ echo "$as_me:$LINENO: result: no" >&5
17188echo "${ECHO_T}no" >&6; }
17189
17190fi
17191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17192fi
17193
17194
17195
Ronald Oussorenf8752642006-07-06 10:13:35 +000017196case $ac_sys_system/$ac_sys_release in
17197Darwin/*)
17198 _CUR_CFLAGS="${CFLAGS}"
17199 _CUR_LDFLAGS="${LDFLAGS}"
17200 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17201 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17202 ;;
17203esac
17204
Martin v. Löwiseba40652007-08-30 20:10:57 +000017205{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17206echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017207if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17208 echo $ECHO_N "(cached) $ECHO_C" >&6
17209else
17210 ac_check_lib_save_LIBS=$LIBS
17211LIBS="-lz $LIBS"
17212cat >conftest.$ac_ext <<_ACEOF
17213/* confdefs.h. */
17214_ACEOF
17215cat confdefs.h >>conftest.$ac_ext
17216cat >>conftest.$ac_ext <<_ACEOF
17217/* end confdefs.h. */
17218
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219/* Override any GCC internal prototype to avoid an error.
17220 Use char because int might match the return type of a GCC
17221 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017222#ifdef __cplusplus
17223extern "C"
17224#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017225char inflateCopy ();
17226int
17227main ()
17228{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017230 ;
17231 return 0;
17232}
17233_ACEOF
17234rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017235if { (ac_try="$ac_link"
17236case "(($ac_try" in
17237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17238 *) ac_try_echo=$ac_try;;
17239esac
17240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17241 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017242 ac_status=$?
17243 grep -v '^ *+' conftest.er1 >conftest.err
17244 rm -f conftest.er1
17245 cat conftest.err >&5
17246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017247 (exit $ac_status); } && {
17248 test -z "$ac_c_werror_flag" ||
17249 test ! -s conftest.err
17250 } && test -s conftest$ac_exeext &&
17251 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017252 ac_cv_lib_z_inflateCopy=yes
17253else
17254 echo "$as_me: failed program was:" >&5
17255sed 's/^/| /' conftest.$ac_ext >&5
17256
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017259
17260rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017261 conftest$ac_exeext conftest.$ac_ext
17262LIBS=$ac_check_lib_save_LIBS
17263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017264{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17265echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017266if test $ac_cv_lib_z_inflateCopy = yes; then
17267
17268cat >>confdefs.h <<\_ACEOF
17269#define HAVE_ZLIB_COPY 1
17270_ACEOF
17271
17272fi
17273
17274
Ronald Oussorenf8752642006-07-06 10:13:35 +000017275case $ac_sys_system/$ac_sys_release in
17276Darwin/*)
17277 CFLAGS="${_CUR_CFLAGS}"
17278 LDFLAGS="${_CUR_LDFLAGS}"
17279 ;;
17280esac
17281
Martin v. Löwiseba40652007-08-30 20:10:57 +000017282{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17283echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017285/* confdefs.h. */
17286_ACEOF
17287cat confdefs.h >>conftest.$ac_ext
17288cat >>conftest.$ac_ext <<_ACEOF
17289/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017290
17291#include "confdefs.h"
17292#include <netdb.h>
17293
Martin v. Löwise9416172003-05-03 10:12:45 +000017294int
17295main ()
17296{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017297void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017298 ;
17299 return 0;
17300}
17301_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017302rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017303if { (ac_try="$ac_link"
17304case "(($ac_try" in
17305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17306 *) ac_try_echo=$ac_try;;
17307esac
17308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17309 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017311 grep -v '^ *+' conftest.er1 >conftest.err
17312 rm -f conftest.er1
17313 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017315 (exit $ac_status); } && {
17316 test -z "$ac_c_werror_flag" ||
17317 test ! -s conftest.err
17318 } && test -s conftest$ac_exeext &&
17319 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017320
17321cat >>confdefs.h <<\_ACEOF
17322#define HAVE_HSTRERROR 1
17323_ACEOF
17324
Martin v. Löwiseba40652007-08-30 20:10:57 +000017325 { echo "$as_me:$LINENO: result: yes" >&5
17326echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017327else
17328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017329sed 's/^/| /' conftest.$ac_ext >&5
17330
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331 { echo "$as_me:$LINENO: result: no" >&5
17332echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017333
17334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017335
17336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017338
Martin v. Löwiseba40652007-08-30 20:10:57 +000017339{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17340echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017342/* confdefs.h. */
17343_ACEOF
17344cat confdefs.h >>conftest.$ac_ext
17345cat >>conftest.$ac_ext <<_ACEOF
17346/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017347
17348#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017349#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017350#include <sys/socket.h>
17351#include <netinet/in.h>
17352#include <arpa/inet.h>
17353
Martin v. Löwise9416172003-05-03 10:12:45 +000017354int
17355main ()
17356{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017357void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017358 ;
17359 return 0;
17360}
17361_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017362rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017363if { (ac_try="$ac_link"
17364case "(($ac_try" in
17365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17366 *) ac_try_echo=$ac_try;;
17367esac
17368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17369 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017371 grep -v '^ *+' conftest.er1 >conftest.err
17372 rm -f conftest.er1
17373 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017375 (exit $ac_status); } && {
17376 test -z "$ac_c_werror_flag" ||
17377 test ! -s conftest.err
17378 } && test -s conftest$ac_exeext &&
17379 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017380
17381cat >>confdefs.h <<\_ACEOF
17382#define HAVE_INET_ATON 1
17383_ACEOF
17384
Martin v. Löwiseba40652007-08-30 20:10:57 +000017385 { echo "$as_me:$LINENO: result: yes" >&5
17386echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017387else
17388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017389sed 's/^/| /' conftest.$ac_ext >&5
17390
Martin v. Löwiseba40652007-08-30 20:10:57 +000017391 { echo "$as_me:$LINENO: result: no" >&5
17392echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017393
17394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017395
17396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017398
Martin v. Löwiseba40652007-08-30 20:10:57 +000017399{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17400echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017402/* confdefs.h. */
17403_ACEOF
17404cat confdefs.h >>conftest.$ac_ext
17405cat >>conftest.$ac_ext <<_ACEOF
17406/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017407
17408#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017409#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017410#include <sys/socket.h>
17411#include <netinet/in.h>
17412#include <arpa/inet.h>
17413
Martin v. Löwise9416172003-05-03 10:12:45 +000017414int
17415main ()
17416{
17417void* p = inet_pton
17418 ;
17419 return 0;
17420}
17421_ACEOF
17422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423if { (ac_try="$ac_compile"
17424case "(($ac_try" in
17425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17426 *) ac_try_echo=$ac_try;;
17427esac
17428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017431 grep -v '^ *+' conftest.er1 >conftest.err
17432 rm -f conftest.er1
17433 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435 (exit $ac_status); } && {
17436 test -z "$ac_c_werror_flag" ||
17437 test ! -s conftest.err
17438 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017439
17440cat >>confdefs.h <<\_ACEOF
17441#define HAVE_INET_PTON 1
17442_ACEOF
17443
Martin v. Löwiseba40652007-08-30 20:10:57 +000017444 { echo "$as_me:$LINENO: result: yes" >&5
17445echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017446else
17447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017448sed 's/^/| /' conftest.$ac_ext >&5
17449
Martin v. Löwiseba40652007-08-30 20:10:57 +000017450 { echo "$as_me:$LINENO: result: no" >&5
17451echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017452
17453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017454
17455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017456
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017457# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017458{ echo "$as_me:$LINENO: checking for setgroups" >&5
17459echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017461/* confdefs.h. */
17462_ACEOF
17463cat confdefs.h >>conftest.$ac_ext
17464cat >>conftest.$ac_ext <<_ACEOF
17465/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017466
17467#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017468#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017469#ifdef HAVE_GRP_H
17470#include <grp.h>
17471#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017472
Martin v. Löwisd5843682002-11-21 20:41:28 +000017473int
17474main ()
17475{
17476void* p = setgroups
17477 ;
17478 return 0;
17479}
17480_ACEOF
17481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017482if { (ac_try="$ac_compile"
17483case "(($ac_try" in
17484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17485 *) ac_try_echo=$ac_try;;
17486esac
17487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017490 grep -v '^ *+' conftest.er1 >conftest.err
17491 rm -f conftest.er1
17492 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017494 (exit $ac_status); } && {
17495 test -z "$ac_c_werror_flag" ||
17496 test ! -s conftest.err
17497 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017498
17499cat >>confdefs.h <<\_ACEOF
17500#define HAVE_SETGROUPS 1
17501_ACEOF
17502
Martin v. Löwiseba40652007-08-30 20:10:57 +000017503 { echo "$as_me:$LINENO: result: yes" >&5
17504echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017505else
17506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017507sed 's/^/| /' conftest.$ac_ext >&5
17508
Martin v. Löwiseba40652007-08-30 20:10:57 +000017509 { echo "$as_me:$LINENO: result: no" >&5
17510echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017511
17512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513
17514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017515
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017516# check for openpty and forkpty
17517
Martin v. Löwis11437992002-04-12 09:54:03 +000017518
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017519for ac_func in openpty
17520do
Martin v. Löwis11437992002-04-12 09:54:03 +000017521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017522{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17524if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017526else
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017528/* confdefs.h. */
17529_ACEOF
17530cat confdefs.h >>conftest.$ac_ext
17531cat >>conftest.$ac_ext <<_ACEOF
17532/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017533/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17535#define $ac_func innocuous_$ac_func
17536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017537/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017538 which can conflict with char $ac_func (); below.
17539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017540 <limits.h> exists even on freestanding compilers. */
17541
17542#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017543# include <limits.h>
17544#else
17545# include <assert.h>
17546#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017547
17548#undef $ac_func
17549
Martin v. Löwiseba40652007-08-30 20:10:57 +000017550/* Override any GCC internal prototype to avoid an error.
17551 Use char because int might match the return type of a GCC
17552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017553#ifdef __cplusplus
17554extern "C"
17555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017556char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017557/* The GNU C library defines this for functions which it implements
17558 to always fail with ENOSYS. Some functions are actually named
17559 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017560#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017561choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017562#endif
17563
Skip Montanaro6dead952003-09-25 14:50:04 +000017564int
17565main ()
17566{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017567return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017568 ;
17569 return 0;
17570}
17571_ACEOF
17572rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017573if { (ac_try="$ac_link"
17574case "(($ac_try" in
17575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17576 *) ac_try_echo=$ac_try;;
17577esac
17578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17579 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017581 grep -v '^ *+' conftest.er1 >conftest.err
17582 rm -f conftest.er1
17583 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017585 (exit $ac_status); } && {
17586 test -z "$ac_c_werror_flag" ||
17587 test ! -s conftest.err
17588 } && test -s conftest$ac_exeext &&
17589 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017591else
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017593sed 's/^/| /' conftest.$ac_ext >&5
17594
Martin v. Löwiseba40652007-08-30 20:10:57 +000017595 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017597
17598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017599 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601ac_res=`eval echo '${'$as_ac_var'}'`
17602 { echo "$as_me:$LINENO: result: $ac_res" >&5
17603echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017604if test `eval echo '${'$as_ac_var'}'` = yes; then
17605 cat >>confdefs.h <<_ACEOF
17606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17607_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017608
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017609else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017610 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17611echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017612if test "${ac_cv_lib_util_openpty+set}" = set; then
17613 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017614else
Martin v. Löwis11437992002-04-12 09:54:03 +000017615 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017616LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017618/* confdefs.h. */
17619_ACEOF
17620cat confdefs.h >>conftest.$ac_ext
17621cat >>conftest.$ac_ext <<_ACEOF
17622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017623
Martin v. Löwiseba40652007-08-30 20:10:57 +000017624/* Override any GCC internal prototype to avoid an error.
17625 Use char because int might match the return type of a GCC
17626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017627#ifdef __cplusplus
17628extern "C"
17629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017630char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017631int
17632main ()
17633{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017634return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017635 ;
17636 return 0;
17637}
17638_ACEOF
17639rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017640if { (ac_try="$ac_link"
17641case "(($ac_try" in
17642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17643 *) ac_try_echo=$ac_try;;
17644esac
17645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17646 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017648 grep -v '^ *+' conftest.er1 >conftest.err
17649 rm -f conftest.er1
17650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017652 (exit $ac_status); } && {
17653 test -z "$ac_c_werror_flag" ||
17654 test ! -s conftest.err
17655 } && test -s conftest$ac_exeext &&
17656 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017658else
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017660sed 's/^/| /' conftest.$ac_ext >&5
17661
Martin v. Löwiseba40652007-08-30 20:10:57 +000017662 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017664
17665rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017667LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017669{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17670echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017671if test $ac_cv_lib_util_openpty = yes; then
17672 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017673#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017674_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017675 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017676else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017677 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17678echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017679if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17680 echo $ECHO_N "(cached) $ECHO_C" >&6
17681else
17682 ac_check_lib_save_LIBS=$LIBS
17683LIBS="-lbsd $LIBS"
17684cat >conftest.$ac_ext <<_ACEOF
17685/* confdefs.h. */
17686_ACEOF
17687cat confdefs.h >>conftest.$ac_ext
17688cat >>conftest.$ac_ext <<_ACEOF
17689/* end confdefs.h. */
17690
Martin v. Löwiseba40652007-08-30 20:10:57 +000017691/* Override any GCC internal prototype to avoid an error.
17692 Use char because int might match the return type of a GCC
17693 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017694#ifdef __cplusplus
17695extern "C"
17696#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017697char openpty ();
17698int
17699main ()
17700{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017701return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017702 ;
17703 return 0;
17704}
17705_ACEOF
17706rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017707if { (ac_try="$ac_link"
17708case "(($ac_try" in
17709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17710 *) ac_try_echo=$ac_try;;
17711esac
17712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17713 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017714 ac_status=$?
17715 grep -v '^ *+' conftest.er1 >conftest.err
17716 rm -f conftest.er1
17717 cat conftest.err >&5
17718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017719 (exit $ac_status); } && {
17720 test -z "$ac_c_werror_flag" ||
17721 test ! -s conftest.err
17722 } && test -s conftest$ac_exeext &&
17723 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017724 ac_cv_lib_bsd_openpty=yes
17725else
17726 echo "$as_me: failed program was:" >&5
17727sed 's/^/| /' conftest.$ac_ext >&5
17728
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017731
17732rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017733 conftest$ac_exeext conftest.$ac_ext
17734LIBS=$ac_check_lib_save_LIBS
17735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017736{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17737echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017738if test $ac_cv_lib_bsd_openpty = yes; then
17739 cat >>confdefs.h <<\_ACEOF
17740#define HAVE_OPENPTY 1
17741_ACEOF
17742 LIBS="$LIBS -lbsd"
17743fi
17744
17745
17746fi
17747
Fred Drake8cef4cf2000-06-28 16:40:38 +000017748
17749fi
17750done
17751
Martin v. Löwis11437992002-04-12 09:54:03 +000017752
Fred Drake8cef4cf2000-06-28 16:40:38 +000017753for ac_func in forkpty
17754do
Martin v. Löwis11437992002-04-12 09:54:03 +000017755as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017756{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17757echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17758if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017760else
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017762/* confdefs.h. */
17763_ACEOF
17764cat confdefs.h >>conftest.$ac_ext
17765cat >>conftest.$ac_ext <<_ACEOF
17766/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017767/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17768 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17769#define $ac_func innocuous_$ac_func
17770
Fred Drake8cef4cf2000-06-28 16:40:38 +000017771/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017772 which can conflict with char $ac_func (); below.
17773 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017774 <limits.h> exists even on freestanding compilers. */
17775
17776#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017777# include <limits.h>
17778#else
17779# include <assert.h>
17780#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017781
17782#undef $ac_func
17783
Martin v. Löwiseba40652007-08-30 20:10:57 +000017784/* Override any GCC internal prototype to avoid an error.
17785 Use char because int might match the return type of a GCC
17786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017787#ifdef __cplusplus
17788extern "C"
17789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017790char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017791/* The GNU C library defines this for functions which it implements
17792 to always fail with ENOSYS. Some functions are actually named
17793 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017794#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017795choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017796#endif
17797
Skip Montanaro6dead952003-09-25 14:50:04 +000017798int
17799main ()
17800{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017801return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017802 ;
17803 return 0;
17804}
17805_ACEOF
17806rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017807if { (ac_try="$ac_link"
17808case "(($ac_try" in
17809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17810 *) ac_try_echo=$ac_try;;
17811esac
17812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815 grep -v '^ *+' conftest.er1 >conftest.err
17816 rm -f conftest.er1
17817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017819 (exit $ac_status); } && {
17820 test -z "$ac_c_werror_flag" ||
17821 test ! -s conftest.err
17822 } && test -s conftest$ac_exeext &&
17823 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017825else
Martin v. Löwis11437992002-04-12 09:54:03 +000017826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017827sed 's/^/| /' conftest.$ac_ext >&5
17828
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017831
17832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017833 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017835ac_res=`eval echo '${'$as_ac_var'}'`
17836 { echo "$as_me:$LINENO: result: $ac_res" >&5
17837echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017838if test `eval echo '${'$as_ac_var'}'` = yes; then
17839 cat >>confdefs.h <<_ACEOF
17840#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17841_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017842
Fred Drake8cef4cf2000-06-28 16:40:38 +000017843else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017844 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17845echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017846if test "${ac_cv_lib_util_forkpty+set}" = set; then
17847 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017848else
Martin v. Löwis11437992002-04-12 09:54:03 +000017849 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017850LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017852/* confdefs.h. */
17853_ACEOF
17854cat confdefs.h >>conftest.$ac_ext
17855cat >>conftest.$ac_ext <<_ACEOF
17856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017857
Martin v. Löwiseba40652007-08-30 20:10:57 +000017858/* Override any GCC internal prototype to avoid an error.
17859 Use char because int might match the return type of a GCC
17860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017861#ifdef __cplusplus
17862extern "C"
17863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017864char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017865int
17866main ()
17867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017868return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ;
17870 return 0;
17871}
17872_ACEOF
17873rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874if { (ac_try="$ac_link"
17875case "(($ac_try" in
17876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17877 *) ac_try_echo=$ac_try;;
17878esac
17879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17880 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017882 grep -v '^ *+' conftest.er1 >conftest.err
17883 rm -f conftest.er1
17884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017886 (exit $ac_status); } && {
17887 test -z "$ac_c_werror_flag" ||
17888 test ! -s conftest.err
17889 } && test -s conftest$ac_exeext &&
17890 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017892else
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017894sed 's/^/| /' conftest.$ac_ext >&5
17895
Martin v. Löwiseba40652007-08-30 20:10:57 +000017896 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017898
17899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017901LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017903{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17904echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017905if test $ac_cv_lib_util_forkpty = yes; then
17906 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017907#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017908_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017909 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017910else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017911 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17912echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017913if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17914 echo $ECHO_N "(cached) $ECHO_C" >&6
17915else
17916 ac_check_lib_save_LIBS=$LIBS
17917LIBS="-lbsd $LIBS"
17918cat >conftest.$ac_ext <<_ACEOF
17919/* confdefs.h. */
17920_ACEOF
17921cat confdefs.h >>conftest.$ac_ext
17922cat >>conftest.$ac_ext <<_ACEOF
17923/* end confdefs.h. */
17924
Martin v. Löwiseba40652007-08-30 20:10:57 +000017925/* Override any GCC internal prototype to avoid an error.
17926 Use char because int might match the return type of a GCC
17927 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017928#ifdef __cplusplus
17929extern "C"
17930#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017931char forkpty ();
17932int
17933main ()
17934{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017935return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017936 ;
17937 return 0;
17938}
17939_ACEOF
17940rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017941if { (ac_try="$ac_link"
17942case "(($ac_try" in
17943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17944 *) ac_try_echo=$ac_try;;
17945esac
17946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17947 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017948 ac_status=$?
17949 grep -v '^ *+' conftest.er1 >conftest.err
17950 rm -f conftest.er1
17951 cat conftest.err >&5
17952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953 (exit $ac_status); } && {
17954 test -z "$ac_c_werror_flag" ||
17955 test ! -s conftest.err
17956 } && test -s conftest$ac_exeext &&
17957 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017958 ac_cv_lib_bsd_forkpty=yes
17959else
17960 echo "$as_me: failed program was:" >&5
17961sed 's/^/| /' conftest.$ac_ext >&5
17962
Martin v. Löwiseba40652007-08-30 20:10:57 +000017963 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017965
17966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017967 conftest$ac_exeext conftest.$ac_ext
17968LIBS=$ac_check_lib_save_LIBS
17969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017970{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17971echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017972if test $ac_cv_lib_bsd_forkpty = yes; then
17973 cat >>confdefs.h <<\_ACEOF
17974#define HAVE_FORKPTY 1
17975_ACEOF
17976 LIBS="$LIBS -lbsd"
17977fi
17978
17979
17980fi
17981
Fred Drake8cef4cf2000-06-28 16:40:38 +000017982
17983fi
17984done
17985
Jack Jansendd19cf82001-12-06 22:36:17 +000017986
Brett Cannonaa5778d2008-03-18 04:09:00 +000017987# Stuff for expat.
17988
17989for ac_func in memmove
17990do
17991as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17992{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17993echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17994if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17995 echo $ECHO_N "(cached) $ECHO_C" >&6
17996else
17997 cat >conftest.$ac_ext <<_ACEOF
17998/* confdefs.h. */
17999_ACEOF
18000cat confdefs.h >>conftest.$ac_ext
18001cat >>conftest.$ac_ext <<_ACEOF
18002/* end confdefs.h. */
18003/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18004 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18005#define $ac_func innocuous_$ac_func
18006
18007/* System header to define __stub macros and hopefully few prototypes,
18008 which can conflict with char $ac_func (); below.
18009 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18010 <limits.h> exists even on freestanding compilers. */
18011
18012#ifdef __STDC__
18013# include <limits.h>
18014#else
18015# include <assert.h>
18016#endif
18017
18018#undef $ac_func
18019
18020/* Override any GCC internal prototype to avoid an error.
18021 Use char because int might match the return type of a GCC
18022 builtin and then its argument prototype would still apply. */
18023#ifdef __cplusplus
18024extern "C"
18025#endif
18026char $ac_func ();
18027/* The GNU C library defines this for functions which it implements
18028 to always fail with ENOSYS. Some functions are actually named
18029 something starting with __ and the normal name is an alias. */
18030#if defined __stub_$ac_func || defined __stub___$ac_func
18031choke me
18032#endif
18033
18034int
18035main ()
18036{
18037return $ac_func ();
18038 ;
18039 return 0;
18040}
18041_ACEOF
18042rm -f conftest.$ac_objext conftest$ac_exeext
18043if { (ac_try="$ac_link"
18044case "(($ac_try" in
18045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18046 *) ac_try_echo=$ac_try;;
18047esac
18048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18049 (eval "$ac_link") 2>conftest.er1
18050 ac_status=$?
18051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
18054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055 (exit $ac_status); } && {
18056 test -z "$ac_c_werror_flag" ||
18057 test ! -s conftest.err
18058 } && test -s conftest$ac_exeext &&
18059 $as_test_x conftest$ac_exeext; then
18060 eval "$as_ac_var=yes"
18061else
18062 echo "$as_me: failed program was:" >&5
18063sed 's/^/| /' conftest.$ac_ext >&5
18064
18065 eval "$as_ac_var=no"
18066fi
18067
18068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18069 conftest$ac_exeext conftest.$ac_ext
18070fi
18071ac_res=`eval echo '${'$as_ac_var'}'`
18072 { echo "$as_me:$LINENO: result: $ac_res" >&5
18073echo "${ECHO_T}$ac_res" >&6; }
18074if test `eval echo '${'$as_ac_var'}'` = yes; then
18075 cat >>confdefs.h <<_ACEOF
18076#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18077_ACEOF
18078
18079fi
18080done
18081
18082
Michael W. Hudson54241132001-12-07 15:38:26 +000018083# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018084
18085
18086
18087
18088
18089
Fred Drake8cef4cf2000-06-28 16:40:38 +000018090for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18091do
Martin v. Löwis11437992002-04-12 09:54:03 +000018092as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18094echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18095if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018097else
Martin v. Löwis11437992002-04-12 09:54:03 +000018098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018099/* confdefs.h. */
18100_ACEOF
18101cat confdefs.h >>conftest.$ac_ext
18102cat >>conftest.$ac_ext <<_ACEOF
18103/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018104/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18105 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18106#define $ac_func innocuous_$ac_func
18107
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018108/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018109 which can conflict with char $ac_func (); below.
18110 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018111 <limits.h> exists even on freestanding compilers. */
18112
18113#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018114# include <limits.h>
18115#else
18116# include <assert.h>
18117#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018118
18119#undef $ac_func
18120
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121/* Override any GCC internal prototype to avoid an error.
18122 Use char because int might match the return type of a GCC
18123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018124#ifdef __cplusplus
18125extern "C"
18126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018127char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018128/* The GNU C library defines this for functions which it implements
18129 to always fail with ENOSYS. Some functions are actually named
18130 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018131#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018132choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018133#endif
18134
Skip Montanaro6dead952003-09-25 14:50:04 +000018135int
18136main ()
18137{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 ;
18140 return 0;
18141}
18142_ACEOF
18143rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144if { (ac_try="$ac_link"
18145case "(($ac_try" in
18146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18147 *) ac_try_echo=$ac_try;;
18148esac
18149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18150 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018152 grep -v '^ *+' conftest.er1 >conftest.err
18153 rm -f conftest.er1
18154 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018156 (exit $ac_status); } && {
18157 test -z "$ac_c_werror_flag" ||
18158 test ! -s conftest.err
18159 } && test -s conftest$ac_exeext &&
18160 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018161 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018162else
Martin v. Löwis11437992002-04-12 09:54:03 +000018163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018164sed 's/^/| /' conftest.$ac_ext >&5
18165
Martin v. Löwiseba40652007-08-30 20:10:57 +000018166 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018168
18169rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018170 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018172ac_res=`eval echo '${'$as_ac_var'}'`
18173 { echo "$as_me:$LINENO: result: $ac_res" >&5
18174echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018175if test `eval echo '${'$as_ac_var'}'` = yes; then
18176 cat >>confdefs.h <<_ACEOF
18177#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18178_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018179
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018180fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018181done
18182
Michael W. Hudson54241132001-12-07 15:38:26 +000018183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184
18185
18186
Brett Cannonaa5778d2008-03-18 04:09:00 +000018187for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018188do
Martin v. Löwis11437992002-04-12 09:54:03 +000018189as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018190{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18191echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18192if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018194else
Martin v. Löwis11437992002-04-12 09:54:03 +000018195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018196/* confdefs.h. */
18197_ACEOF
18198cat confdefs.h >>conftest.$ac_ext
18199cat >>conftest.$ac_ext <<_ACEOF
18200/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018201/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18202 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18203#define $ac_func innocuous_$ac_func
18204
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018205/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018206 which can conflict with char $ac_func (); below.
18207 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018208 <limits.h> exists even on freestanding compilers. */
18209
18210#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018211# include <limits.h>
18212#else
18213# include <assert.h>
18214#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018215
18216#undef $ac_func
18217
Martin v. Löwiseba40652007-08-30 20:10:57 +000018218/* Override any GCC internal prototype to avoid an error.
18219 Use char because int might match the return type of a GCC
18220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018221#ifdef __cplusplus
18222extern "C"
18223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018224char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018225/* The GNU C library defines this for functions which it implements
18226 to always fail with ENOSYS. Some functions are actually named
18227 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018228#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018229choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018230#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018231
Skip Montanaro6dead952003-09-25 14:50:04 +000018232int
18233main ()
18234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018235return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018236 ;
18237 return 0;
18238}
18239_ACEOF
18240rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018241if { (ac_try="$ac_link"
18242case "(($ac_try" in
18243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18244 *) ac_try_echo=$ac_try;;
18245esac
18246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018249 grep -v '^ *+' conftest.er1 >conftest.err
18250 rm -f conftest.er1
18251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018253 (exit $ac_status); } && {
18254 test -z "$ac_c_werror_flag" ||
18255 test ! -s conftest.err
18256 } && test -s conftest$ac_exeext &&
18257 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018259else
Martin v. Löwis11437992002-04-12 09:54:03 +000018260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018261sed 's/^/| /' conftest.$ac_ext >&5
18262
Martin v. Löwiseba40652007-08-30 20:10:57 +000018263 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018265
18266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018269ac_res=`eval echo '${'$as_ac_var'}'`
18270 { echo "$as_me:$LINENO: result: $ac_res" >&5
18271echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018272if test `eval echo '${'$as_ac_var'}'` = yes; then
18273 cat >>confdefs.h <<_ACEOF
18274#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18275_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018276
Martin v. Löwis1142de32002-03-29 16:28:31 +000018277else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018279 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018280 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18281 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018282esac
18283
Martin v. Löwis1142de32002-03-29 16:28:31 +000018284fi
18285done
18286
18287
Martin v. Löwis11437992002-04-12 09:54:03 +000018288
Martin v. Löwis1142de32002-03-29 16:28:31 +000018289for ac_func in getpgrp
18290do
Martin v. Löwis11437992002-04-12 09:54:03 +000018291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018292{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18293echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18294if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018296else
Martin v. Löwis11437992002-04-12 09:54:03 +000018297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018298/* confdefs.h. */
18299_ACEOF
18300cat confdefs.h >>conftest.$ac_ext
18301cat >>conftest.$ac_ext <<_ACEOF
18302/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018303/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18305#define $ac_func innocuous_$ac_func
18306
Martin v. Löwis1142de32002-03-29 16:28:31 +000018307/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018308 which can conflict with char $ac_func (); below.
18309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018310 <limits.h> exists even on freestanding compilers. */
18311
18312#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018313# include <limits.h>
18314#else
18315# include <assert.h>
18316#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018317
18318#undef $ac_func
18319
Martin v. Löwiseba40652007-08-30 20:10:57 +000018320/* Override any GCC internal prototype to avoid an error.
18321 Use char because int might match the return type of a GCC
18322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018323#ifdef __cplusplus
18324extern "C"
18325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018326char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018327/* The GNU C library defines this for functions which it implements
18328 to always fail with ENOSYS. Some functions are actually named
18329 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018330#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018331choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018332#endif
18333
Skip Montanaro6dead952003-09-25 14:50:04 +000018334int
18335main ()
18336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 ;
18339 return 0;
18340}
18341_ACEOF
18342rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343if { (ac_try="$ac_link"
18344case "(($ac_try" in
18345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18346 *) ac_try_echo=$ac_try;;
18347esac
18348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18349 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018351 grep -v '^ *+' conftest.er1 >conftest.err
18352 rm -f conftest.er1
18353 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018355 (exit $ac_status); } && {
18356 test -z "$ac_c_werror_flag" ||
18357 test ! -s conftest.err
18358 } && test -s conftest$ac_exeext &&
18359 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018360 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018361else
Martin v. Löwis11437992002-04-12 09:54:03 +000018362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018363sed 's/^/| /' conftest.$ac_ext >&5
18364
Martin v. Löwiseba40652007-08-30 20:10:57 +000018365 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018367
18368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018369 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371ac_res=`eval echo '${'$as_ac_var'}'`
18372 { echo "$as_me:$LINENO: result: $ac_res" >&5
18373echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018374if test `eval echo '${'$as_ac_var'}'` = yes; then
18375 cat >>confdefs.h <<_ACEOF
18376#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18377_ACEOF
18378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018379/* confdefs.h. */
18380_ACEOF
18381cat confdefs.h >>conftest.$ac_ext
18382cat >>conftest.$ac_ext <<_ACEOF
18383/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018384#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018385int
18386main ()
18387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018388getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 ;
18390 return 0;
18391}
18392_ACEOF
18393rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018394if { (ac_try="$ac_compile"
18395case "(($ac_try" in
18396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18397 *) ac_try_echo=$ac_try;;
18398esac
18399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018402 grep -v '^ *+' conftest.er1 >conftest.err
18403 rm -f conftest.er1
18404 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018406 (exit $ac_status); } && {
18407 test -z "$ac_c_werror_flag" ||
18408 test ! -s conftest.err
18409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018410
18411cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018412#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018413_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018414
Martin v. Löwis11437992002-04-12 09:54:03 +000018415
Guido van Rossumf78abae1997-01-21 22:02:36 +000018416else
Martin v. Löwis11437992002-04-12 09:54:03 +000018417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018418sed 's/^/| /' conftest.$ac_ext >&5
18419
Martin v. Löwiseba40652007-08-30 20:10:57 +000018420
Guido van Rossum627b2d71993-12-24 10:39:16 +000018421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018422
18423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018424
Guido van Rossum627b2d71993-12-24 10:39:16 +000018425fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018426done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018427
Jack Jansen150753c2003-03-29 22:07:47 +000018428
18429for ac_func in setpgrp
18430do
18431as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18433echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18434if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018436else
Martin v. Löwis11437992002-04-12 09:54:03 +000018437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018438/* confdefs.h. */
18439_ACEOF
18440cat confdefs.h >>conftest.$ac_ext
18441cat >>conftest.$ac_ext <<_ACEOF
18442/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018443/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18444 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18445#define $ac_func innocuous_$ac_func
18446
Jack Jansen150753c2003-03-29 22:07:47 +000018447/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018448 which can conflict with char $ac_func (); below.
18449 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018450 <limits.h> exists even on freestanding compilers. */
18451
18452#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018453# include <limits.h>
18454#else
18455# include <assert.h>
18456#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018457
18458#undef $ac_func
18459
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460/* Override any GCC internal prototype to avoid an error.
18461 Use char because int might match the return type of a GCC
18462 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018463#ifdef __cplusplus
18464extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018465#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018466char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018467/* The GNU C library defines this for functions which it implements
18468 to always fail with ENOSYS. Some functions are actually named
18469 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018471choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018472#endif
18473
Skip Montanaro6dead952003-09-25 14:50:04 +000018474int
18475main ()
18476{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018477return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 ;
18479 return 0;
18480}
18481_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018482rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018483if { (ac_try="$ac_link"
18484case "(($ac_try" in
18485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18486 *) ac_try_echo=$ac_try;;
18487esac
18488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18489 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018491 grep -v '^ *+' conftest.er1 >conftest.err
18492 rm -f conftest.er1
18493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018495 (exit $ac_status); } && {
18496 test -z "$ac_c_werror_flag" ||
18497 test ! -s conftest.err
18498 } && test -s conftest$ac_exeext &&
18499 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018500 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018501else
Jack Jansen150753c2003-03-29 22:07:47 +000018502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018503sed 's/^/| /' conftest.$ac_ext >&5
18504
Martin v. Löwiseba40652007-08-30 20:10:57 +000018505 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507
18508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018509 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511ac_res=`eval echo '${'$as_ac_var'}'`
18512 { echo "$as_me:$LINENO: result: $ac_res" >&5
18513echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018514if test `eval echo '${'$as_ac_var'}'` = yes; then
18515 cat >>confdefs.h <<_ACEOF
18516#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18517_ACEOF
18518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018519/* confdefs.h. */
18520_ACEOF
18521cat confdefs.h >>conftest.$ac_ext
18522cat >>conftest.$ac_ext <<_ACEOF
18523/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018524#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018525int
18526main ()
18527{
18528setpgrp(0,0);
18529 ;
18530 return 0;
18531}
18532_ACEOF
18533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018534if { (ac_try="$ac_compile"
18535case "(($ac_try" in
18536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18537 *) ac_try_echo=$ac_try;;
18538esac
18539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18540 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018542 grep -v '^ *+' conftest.er1 >conftest.err
18543 rm -f conftest.er1
18544 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018546 (exit $ac_status); } && {
18547 test -z "$ac_c_werror_flag" ||
18548 test ! -s conftest.err
18549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018550
18551cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018552#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018553_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018554
Jack Jansen150753c2003-03-29 22:07:47 +000018555
18556else
18557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018558sed 's/^/| /' conftest.$ac_ext >&5
18559
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562
18563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018564
18565fi
18566done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018567
Martin v. Löwis11437992002-04-12 09:54:03 +000018568
Thomas Wouters3a584202000-08-05 23:28:51 +000018569for ac_func in gettimeofday
18570do
Martin v. Löwis11437992002-04-12 09:54:03 +000018571as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018572{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18573echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18574if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018576else
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018578/* confdefs.h. */
18579_ACEOF
18580cat confdefs.h >>conftest.$ac_ext
18581cat >>conftest.$ac_ext <<_ACEOF
18582/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018583/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18584 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18585#define $ac_func innocuous_$ac_func
18586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018587/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018588 which can conflict with char $ac_func (); below.
18589 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018590 <limits.h> exists even on freestanding compilers. */
18591
18592#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018593# include <limits.h>
18594#else
18595# include <assert.h>
18596#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018597
18598#undef $ac_func
18599
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600/* Override any GCC internal prototype to avoid an error.
18601 Use char because int might match the return type of a GCC
18602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018603#ifdef __cplusplus
18604extern "C"
18605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018606char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018607/* The GNU C library defines this for functions which it implements
18608 to always fail with ENOSYS. Some functions are actually named
18609 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018611choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018612#endif
18613
Skip Montanaro6dead952003-09-25 14:50:04 +000018614int
18615main ()
18616{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018617return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 ;
18619 return 0;
18620}
18621_ACEOF
18622rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018623if { (ac_try="$ac_link"
18624case "(($ac_try" in
18625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18626 *) ac_try_echo=$ac_try;;
18627esac
18628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18629 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018631 grep -v '^ *+' conftest.er1 >conftest.err
18632 rm -f conftest.er1
18633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018635 (exit $ac_status); } && {
18636 test -z "$ac_c_werror_flag" ||
18637 test ! -s conftest.err
18638 } && test -s conftest$ac_exeext &&
18639 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018641else
Martin v. Löwis11437992002-04-12 09:54:03 +000018642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018643sed 's/^/| /' conftest.$ac_ext >&5
18644
Martin v. Löwiseba40652007-08-30 20:10:57 +000018645 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018647
18648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018649 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651ac_res=`eval echo '${'$as_ac_var'}'`
18652 { echo "$as_me:$LINENO: result: $ac_res" >&5
18653echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018654if test `eval echo '${'$as_ac_var'}'` = yes; then
18655 cat >>confdefs.h <<_ACEOF
18656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18657_ACEOF
18658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018659/* confdefs.h. */
18660_ACEOF
18661cat confdefs.h >>conftest.$ac_ext
18662cat >>conftest.$ac_ext <<_ACEOF
18663/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018664#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018665int
18666main ()
18667{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018668gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 ;
18670 return 0;
18671}
18672_ACEOF
18673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018674if { (ac_try="$ac_compile"
18675case "(($ac_try" in
18676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18677 *) ac_try_echo=$ac_try;;
18678esac
18679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018682 grep -v '^ *+' conftest.er1 >conftest.err
18683 rm -f conftest.er1
18684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686 (exit $ac_status); } && {
18687 test -z "$ac_c_werror_flag" ||
18688 test ! -s conftest.err
18689 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018690 :
18691else
Martin v. Löwis11437992002-04-12 09:54:03 +000018692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018693sed 's/^/| /' conftest.$ac_ext >&5
18694
Martin v. Löwis11437992002-04-12 09:54:03 +000018695
18696cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018697#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018699
Martin v. Löwis11437992002-04-12 09:54:03 +000018700
Guido van Rossum627b2d71993-12-24 10:39:16 +000018701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018702
18703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018704
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018705fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018706done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018707
Michael W. Hudson54241132001-12-07 15:38:26 +000018708
Martin v. Löwiseba40652007-08-30 20:10:57 +000018709{ echo "$as_me:$LINENO: checking for major" >&5
18710echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018712/* confdefs.h. */
18713_ACEOF
18714cat confdefs.h >>conftest.$ac_ext
18715cat >>conftest.$ac_ext <<_ACEOF
18716/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018717
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018718#if defined(MAJOR_IN_MKDEV)
18719#include <sys/mkdev.h>
18720#elif defined(MAJOR_IN_SYSMACROS)
18721#include <sys/sysmacros.h>
18722#else
18723#include <sys/types.h>
18724#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018725
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018726int
18727main ()
18728{
18729
18730 makedev(major(0),minor(0));
18731
18732 ;
18733 return 0;
18734}
18735_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018736rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018737if { (ac_try="$ac_link"
18738case "(($ac_try" in
18739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18740 *) ac_try_echo=$ac_try;;
18741esac
18742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18743 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018745 grep -v '^ *+' conftest.er1 >conftest.err
18746 rm -f conftest.er1
18747 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018749 (exit $ac_status); } && {
18750 test -z "$ac_c_werror_flag" ||
18751 test ! -s conftest.err
18752 } && test -s conftest$ac_exeext &&
18753 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018754
18755
18756cat >>confdefs.h <<\_ACEOF
18757#define HAVE_DEVICE_MACROS 1
18758_ACEOF
18759
Martin v. Löwiseba40652007-08-30 20:10:57 +000018760 { echo "$as_me:$LINENO: result: yes" >&5
18761echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018762
18763else
18764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018765sed 's/^/| /' conftest.$ac_ext >&5
18766
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018767
Martin v. Löwiseba40652007-08-30 20:10:57 +000018768 { echo "$as_me:$LINENO: result: no" >&5
18769echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018770
18771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018772
18773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018775
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018776# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018777# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018778{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18779echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018781/* confdefs.h. */
18782_ACEOF
18783cat confdefs.h >>conftest.$ac_ext
18784cat >>conftest.$ac_ext <<_ACEOF
18785/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018786
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018787#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018788#include <sys/socket.h>
18789#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018790#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018791
Martin v. Löwis11437992002-04-12 09:54:03 +000018792int
18793main ()
18794{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018795
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018796getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018797
Martin v. Löwis11437992002-04-12 09:54:03 +000018798 ;
18799 return 0;
18800}
18801_ACEOF
18802rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018803if { (ac_try="$ac_link"
18804case "(($ac_try" in
18805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18806 *) ac_try_echo=$ac_try;;
18807esac
18808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018811 grep -v '^ *+' conftest.er1 >conftest.err
18812 rm -f conftest.er1
18813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018815 (exit $ac_status); } && {
18816 test -z "$ac_c_werror_flag" ||
18817 test ! -s conftest.err
18818 } && test -s conftest$ac_exeext &&
18819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018820
Martin v. Löwiseba40652007-08-30 20:10:57 +000018821{ echo "$as_me:$LINENO: result: yes" >&5
18822echo "${ECHO_T}yes" >&6; }
18823{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18824echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018825if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018826 { echo "$as_me:$LINENO: result: buggy" >&5
18827echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018828buggygetaddrinfo=yes
18829else
Martin v. Löwis11437992002-04-12 09:54:03 +000018830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018831/* confdefs.h. */
18832_ACEOF
18833cat confdefs.h >>conftest.$ac_ext
18834cat >>conftest.$ac_ext <<_ACEOF
18835/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018836
18837#include <sys/types.h>
18838#include <netdb.h>
18839#include <string.h>
18840#include <sys/socket.h>
18841#include <netinet/in.h>
18842
18843main()
18844{
18845 int passive, gaierr, inet4 = 0, inet6 = 0;
18846 struct addrinfo hints, *ai, *aitop;
18847 char straddr[INET6_ADDRSTRLEN], strport[16];
18848
18849 for (passive = 0; passive <= 1; passive++) {
18850 memset(&hints, 0, sizeof(hints));
18851 hints.ai_family = AF_UNSPEC;
18852 hints.ai_flags = passive ? AI_PASSIVE : 0;
18853 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018854 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018855 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18856 (void)gai_strerror(gaierr);
18857 goto bad;
18858 }
18859 for (ai = aitop; ai; ai = ai->ai_next) {
18860 if (ai->ai_addr == NULL ||
18861 ai->ai_addrlen == 0 ||
18862 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18863 straddr, sizeof(straddr), strport, sizeof(strport),
18864 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18865 goto bad;
18866 }
18867 switch (ai->ai_family) {
18868 case AF_INET:
18869 if (strcmp(strport, "54321") != 0) {
18870 goto bad;
18871 }
18872 if (passive) {
18873 if (strcmp(straddr, "0.0.0.0") != 0) {
18874 goto bad;
18875 }
18876 } else {
18877 if (strcmp(straddr, "127.0.0.1") != 0) {
18878 goto bad;
18879 }
18880 }
18881 inet4++;
18882 break;
18883 case AF_INET6:
18884 if (strcmp(strport, "54321") != 0) {
18885 goto bad;
18886 }
18887 if (passive) {
18888 if (strcmp(straddr, "::") != 0) {
18889 goto bad;
18890 }
18891 } else {
18892 if (strcmp(straddr, "::1") != 0) {
18893 goto bad;
18894 }
18895 }
18896 inet6++;
18897 break;
18898 case AF_UNSPEC:
18899 goto bad;
18900 break;
18901 default:
18902 /* another family support? */
18903 break;
18904 }
18905 }
18906 }
18907
18908 if (!(inet4 == 0 || inet4 == 2))
18909 goto bad;
18910 if (!(inet6 == 0 || inet6 == 2))
18911 goto bad;
18912
18913 if (aitop)
18914 freeaddrinfo(aitop);
18915 exit(0);
18916
18917 bad:
18918 if (aitop)
18919 freeaddrinfo(aitop);
18920 exit(1);
18921}
18922
Martin v. Löwis11437992002-04-12 09:54:03 +000018923_ACEOF
18924rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925if { (ac_try="$ac_link"
18926case "(($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_link") 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); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018935 { (case "(($ac_try" in
18936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18937 *) ac_try_echo=$ac_try;;
18938esac
18939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18940 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 ac_status=$?
18942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18943 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944 { echo "$as_me:$LINENO: result: good" >&5
18945echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018946buggygetaddrinfo=no
18947else
Martin v. Löwis11437992002-04-12 09:54:03 +000018948 echo "$as_me: program exited with status $ac_status" >&5
18949echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018950sed 's/^/| /' conftest.$ac_ext >&5
18951
Martin v. Löwis11437992002-04-12 09:54:03 +000018952( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018953{ echo "$as_me:$LINENO: result: buggy" >&5
18954echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018955buggygetaddrinfo=yes
18956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018957rm -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 +000018958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959
18960
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018961else
Martin v. Löwis11437992002-04-12 09:54:03 +000018962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018963sed 's/^/| /' conftest.$ac_ext >&5
18964
Martin v. Löwis11437992002-04-12 09:54:03 +000018965
Martin v. Löwiseba40652007-08-30 20:10:57 +000018966{ echo "$as_me:$LINENO: result: no" >&5
18967echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018968buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018969
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018971
18972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018973 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018974
18975if test "$buggygetaddrinfo" = "yes"; then
18976 if test "$ipv6" = "yes"; then
18977 echo 'Fatal: You must get working getaddrinfo() function.'
18978 echo ' or you can specify "--disable-ipv6"'.
18979 exit 1
18980 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018981else
Martin v. Löwis11437992002-04-12 09:54:03 +000018982
18983cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018984#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018985_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018986
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018988
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018989for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018990do
Martin v. Löwis11437992002-04-12 09:54:03 +000018991as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18993echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18994if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018995 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018996else
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018998/* confdefs.h. */
18999_ACEOF
19000cat confdefs.h >>conftest.$ac_ext
19001cat >>conftest.$ac_ext <<_ACEOF
19002/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019003/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19004 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19005#define $ac_func innocuous_$ac_func
19006
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019007/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019008 which can conflict with char $ac_func (); below.
19009 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019010 <limits.h> exists even on freestanding compilers. */
19011
19012#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019013# include <limits.h>
19014#else
19015# include <assert.h>
19016#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019017
19018#undef $ac_func
19019
Martin v. Löwiseba40652007-08-30 20:10:57 +000019020/* Override any GCC internal prototype to avoid an error.
19021 Use char because int might match the return type of a GCC
19022 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019023#ifdef __cplusplus
19024extern "C"
19025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019026char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019027/* The GNU C library defines this for functions which it implements
19028 to always fail with ENOSYS. Some functions are actually named
19029 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019031choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019032#endif
19033
Skip Montanaro6dead952003-09-25 14:50:04 +000019034int
19035main ()
19036{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019037return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019038 ;
19039 return 0;
19040}
19041_ACEOF
19042rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019043if { (ac_try="$ac_link"
19044case "(($ac_try" in
19045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19046 *) ac_try_echo=$ac_try;;
19047esac
19048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019051 grep -v '^ *+' conftest.er1 >conftest.err
19052 rm -f conftest.er1
19053 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019055 (exit $ac_status); } && {
19056 test -z "$ac_c_werror_flag" ||
19057 test ! -s conftest.err
19058 } && test -s conftest$ac_exeext &&
19059 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019061else
Martin v. Löwis11437992002-04-12 09:54:03 +000019062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019063sed 's/^/| /' conftest.$ac_ext >&5
19064
Martin v. Löwiseba40652007-08-30 20:10:57 +000019065 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067
19068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019069 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071ac_res=`eval echo '${'$as_ac_var'}'`
19072 { echo "$as_me:$LINENO: result: $ac_res" >&5
19073echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019074if test `eval echo '${'$as_ac_var'}'` = yes; then
19075 cat >>confdefs.h <<_ACEOF
19076#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19077_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019078
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019079fi
19080done
19081
Michael W. Hudson54241132001-12-07 15:38:26 +000019082
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019083# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019084{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19085echo $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 +000019086if test "${ac_cv_header_time+set}" = set; then
19087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019088else
Martin v. Löwis11437992002-04-12 09:54:03 +000019089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019090/* confdefs.h. */
19091_ACEOF
19092cat confdefs.h >>conftest.$ac_ext
19093cat >>conftest.$ac_ext <<_ACEOF
19094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019095#include <sys/types.h>
19096#include <sys/time.h>
19097#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019098
Martin v. Löwis11437992002-04-12 09:54:03 +000019099int
19100main ()
19101{
19102if ((struct tm *) 0)
19103return 0;
19104 ;
19105 return 0;
19106}
19107_ACEOF
19108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019109if { (ac_try="$ac_compile"
19110case "(($ac_try" in
19111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19112 *) ac_try_echo=$ac_try;;
19113esac
19114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019117 grep -v '^ *+' conftest.er1 >conftest.err
19118 rm -f conftest.er1
19119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019121 (exit $ac_status); } && {
19122 test -z "$ac_c_werror_flag" ||
19123 test ! -s conftest.err
19124 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019125 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019126else
Martin v. Löwis11437992002-04-12 09:54:03 +000019127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019128sed 's/^/| /' conftest.$ac_ext >&5
19129
Martin v. Löwiseba40652007-08-30 20:10:57 +000019130 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019132
19133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019135{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19136echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019137if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019138
19139cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019140#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019141_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019142
19143fi
19144
Martin v. Löwiseba40652007-08-30 20:10:57 +000019145{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19146echo $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 +000019147if test "${ac_cv_struct_tm+set}" = set; then
19148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019149else
Martin v. Löwis11437992002-04-12 09:54:03 +000019150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019151/* confdefs.h. */
19152_ACEOF
19153cat confdefs.h >>conftest.$ac_ext
19154cat >>conftest.$ac_ext <<_ACEOF
19155/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019156#include <sys/types.h>
19157#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019158
Martin v. Löwis11437992002-04-12 09:54:03 +000019159int
19160main ()
19161{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019162struct tm tm;
19163 int *p = &tm.tm_sec;
19164 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019165 ;
19166 return 0;
19167}
19168_ACEOF
19169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019170if { (ac_try="$ac_compile"
19171case "(($ac_try" in
19172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19173 *) ac_try_echo=$ac_try;;
19174esac
19175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019178 grep -v '^ *+' conftest.er1 >conftest.err
19179 rm -f conftest.er1
19180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019182 (exit $ac_status); } && {
19183 test -z "$ac_c_werror_flag" ||
19184 test ! -s conftest.err
19185 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019186 ac_cv_struct_tm=time.h
19187else
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019189sed 's/^/| /' conftest.$ac_ext >&5
19190
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019193
19194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019196{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19197echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019198if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019199
19200cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019201#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019202_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019203
19204fi
19205
Martin v. Löwiseba40652007-08-30 20:10:57 +000019206{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19207echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019208if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019210else
Martin v. Löwis11437992002-04-12 09:54:03 +000019211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019212/* confdefs.h. */
19213_ACEOF
19214cat confdefs.h >>conftest.$ac_ext
19215cat >>conftest.$ac_ext <<_ACEOF
19216/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019217#include <sys/types.h>
19218#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019219
19220
Martin v. Löwis11437992002-04-12 09:54:03 +000019221int
19222main ()
19223{
19224static struct tm ac_aggr;
19225if (ac_aggr.tm_zone)
19226return 0;
19227 ;
19228 return 0;
19229}
19230_ACEOF
19231rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019232if { (ac_try="$ac_compile"
19233case "(($ac_try" in
19234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19235 *) ac_try_echo=$ac_try;;
19236esac
19237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19238 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019240 grep -v '^ *+' conftest.er1 >conftest.err
19241 rm -f conftest.er1
19242 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019244 (exit $ac_status); } && {
19245 test -z "$ac_c_werror_flag" ||
19246 test ! -s conftest.err
19247 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019248 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019249else
Martin v. Löwis11437992002-04-12 09:54:03 +000019250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019251sed 's/^/| /' conftest.$ac_ext >&5
19252
Martin v. Löwiseba40652007-08-30 20:10:57 +000019253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019254/* confdefs.h. */
19255_ACEOF
19256cat confdefs.h >>conftest.$ac_ext
19257cat >>conftest.$ac_ext <<_ACEOF
19258/* end confdefs.h. */
19259#include <sys/types.h>
19260#include <$ac_cv_struct_tm>
19261
19262
19263int
19264main ()
19265{
19266static struct tm ac_aggr;
19267if (sizeof ac_aggr.tm_zone)
19268return 0;
19269 ;
19270 return 0;
19271}
19272_ACEOF
19273rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019274if { (ac_try="$ac_compile"
19275case "(($ac_try" in
19276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19277 *) ac_try_echo=$ac_try;;
19278esac
19279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19280 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019282 grep -v '^ *+' conftest.er1 >conftest.err
19283 rm -f conftest.er1
19284 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286 (exit $ac_status); } && {
19287 test -z "$ac_c_werror_flag" ||
19288 test ! -s conftest.err
19289 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019290 ac_cv_member_struct_tm_tm_zone=yes
19291else
19292 echo "$as_me: failed program was:" >&5
19293sed 's/^/| /' conftest.$ac_ext >&5
19294
Martin v. Löwiseba40652007-08-30 20:10:57 +000019295 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019297
19298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019300
19301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019303{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19304echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
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
19308#define HAVE_STRUCT_TM_TM_ZONE 1
19309_ACEOF
19310
19311
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019312fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019313
Martin v. Löwis11437992002-04-12 09:54:03 +000019314if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19315
19316cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019317#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019318_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019319
19320else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019321 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19322echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19323if test "${ac_cv_have_decl_tzname+set}" = set; then
19324 echo $ECHO_N "(cached) $ECHO_C" >&6
19325else
19326 cat >conftest.$ac_ext <<_ACEOF
19327/* confdefs.h. */
19328_ACEOF
19329cat confdefs.h >>conftest.$ac_ext
19330cat >>conftest.$ac_ext <<_ACEOF
19331/* end confdefs.h. */
19332#include <time.h>
19333
19334int
19335main ()
19336{
19337#ifndef tzname
19338 (void) tzname;
19339#endif
19340
19341 ;
19342 return 0;
19343}
19344_ACEOF
19345rm -f conftest.$ac_objext
19346if { (ac_try="$ac_compile"
19347case "(($ac_try" in
19348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19349 *) ac_try_echo=$ac_try;;
19350esac
19351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19352 (eval "$ac_compile") 2>conftest.er1
19353 ac_status=$?
19354 grep -v '^ *+' conftest.er1 >conftest.err
19355 rm -f conftest.er1
19356 cat conftest.err >&5
19357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19358 (exit $ac_status); } && {
19359 test -z "$ac_c_werror_flag" ||
19360 test ! -s conftest.err
19361 } && test -s conftest.$ac_objext; then
19362 ac_cv_have_decl_tzname=yes
19363else
19364 echo "$as_me: failed program was:" >&5
19365sed 's/^/| /' conftest.$ac_ext >&5
19366
19367 ac_cv_have_decl_tzname=no
19368fi
19369
19370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19371fi
19372{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19373echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19374if test $ac_cv_have_decl_tzname = yes; then
19375
19376cat >>confdefs.h <<_ACEOF
19377#define HAVE_DECL_TZNAME 1
19378_ACEOF
19379
19380
19381else
19382 cat >>confdefs.h <<_ACEOF
19383#define HAVE_DECL_TZNAME 0
19384_ACEOF
19385
19386
19387fi
19388
19389
19390 { echo "$as_me:$LINENO: checking for tzname" >&5
19391echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019392if test "${ac_cv_var_tzname+set}" = set; then
19393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019394else
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019396/* confdefs.h. */
19397_ACEOF
19398cat confdefs.h >>conftest.$ac_ext
19399cat >>conftest.$ac_ext <<_ACEOF
19400/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019401#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019402#if !HAVE_DECL_TZNAME
19403extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019405
Martin v. Löwis11437992002-04-12 09:54:03 +000019406int
19407main ()
19408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019409return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 ;
19411 return 0;
19412}
19413_ACEOF
19414rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415if { (ac_try="$ac_link"
19416case "(($ac_try" in
19417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19418 *) ac_try_echo=$ac_try;;
19419esac
19420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019423 grep -v '^ *+' conftest.er1 >conftest.err
19424 rm -f conftest.er1
19425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019427 (exit $ac_status); } && {
19428 test -z "$ac_c_werror_flag" ||
19429 test ! -s conftest.err
19430 } && test -s conftest$ac_exeext &&
19431 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019432 ac_cv_var_tzname=yes
19433else
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019435sed 's/^/| /' conftest.$ac_ext >&5
19436
Martin v. Löwiseba40652007-08-30 20:10:57 +000019437 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019439
19440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019441 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019443{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19444echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019445 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019446
19447cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019448#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019449_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019451 fi
19452fi
19453
Martin v. Löwiseba40652007-08-30 20:10:57 +000019454{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19455echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019456if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19457 echo $ECHO_N "(cached) $ECHO_C" >&6
19458else
19459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019460/* confdefs.h. */
19461_ACEOF
19462cat confdefs.h >>conftest.$ac_ext
19463cat >>conftest.$ac_ext <<_ACEOF
19464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019465$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019466int
19467main ()
19468{
19469static struct stat ac_aggr;
19470if (ac_aggr.st_rdev)
19471return 0;
19472 ;
19473 return 0;
19474}
19475_ACEOF
19476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019477if { (ac_try="$ac_compile"
19478case "(($ac_try" in
19479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19480 *) ac_try_echo=$ac_try;;
19481esac
19482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019485 grep -v '^ *+' conftest.er1 >conftest.err
19486 rm -f conftest.er1
19487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019489 (exit $ac_status); } && {
19490 test -z "$ac_c_werror_flag" ||
19491 test ! -s conftest.err
19492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 ac_cv_member_struct_stat_st_rdev=yes
19494else
19495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019496sed 's/^/| /' conftest.$ac_ext >&5
19497
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019499/* confdefs.h. */
19500_ACEOF
19501cat confdefs.h >>conftest.$ac_ext
19502cat >>conftest.$ac_ext <<_ACEOF
19503/* end confdefs.h. */
19504$ac_includes_default
19505int
19506main ()
19507{
19508static struct stat ac_aggr;
19509if (sizeof ac_aggr.st_rdev)
19510return 0;
19511 ;
19512 return 0;
19513}
19514_ACEOF
19515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516if { (ac_try="$ac_compile"
19517case "(($ac_try" in
19518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19519 *) ac_try_echo=$ac_try;;
19520esac
19521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19522 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019524 grep -v '^ *+' conftest.er1 >conftest.err
19525 rm -f conftest.er1
19526 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019528 (exit $ac_status); } && {
19529 test -z "$ac_c_werror_flag" ||
19530 test ! -s conftest.err
19531 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019532 ac_cv_member_struct_stat_st_rdev=yes
19533else
19534 echo "$as_me: failed program was:" >&5
19535sed 's/^/| /' conftest.$ac_ext >&5
19536
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019539
19540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019542
19543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019545{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19546echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019547if test $ac_cv_member_struct_stat_st_rdev = yes; then
19548
19549cat >>confdefs.h <<_ACEOF
19550#define HAVE_STRUCT_STAT_ST_RDEV 1
19551_ACEOF
19552
19553
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019554fi
19555
Martin v. Löwiseba40652007-08-30 20:10:57 +000019556{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19557echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019558if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19559 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019560else
Martin v. Löwis11437992002-04-12 09:54:03 +000019561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019562/* confdefs.h. */
19563_ACEOF
19564cat confdefs.h >>conftest.$ac_ext
19565cat >>conftest.$ac_ext <<_ACEOF
19566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019568int
19569main ()
19570{
19571static struct stat ac_aggr;
19572if (ac_aggr.st_blksize)
19573return 0;
19574 ;
19575 return 0;
19576}
19577_ACEOF
19578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019579if { (ac_try="$ac_compile"
19580case "(($ac_try" in
19581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19582 *) ac_try_echo=$ac_try;;
19583esac
19584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019587 grep -v '^ *+' conftest.er1 >conftest.err
19588 rm -f conftest.er1
19589 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019591 (exit $ac_status); } && {
19592 test -z "$ac_c_werror_flag" ||
19593 test ! -s conftest.err
19594 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019595 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019596else
Martin v. Löwis11437992002-04-12 09:54:03 +000019597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019598sed 's/^/| /' conftest.$ac_ext >&5
19599
Martin v. Löwiseba40652007-08-30 20:10:57 +000019600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019601/* confdefs.h. */
19602_ACEOF
19603cat confdefs.h >>conftest.$ac_ext
19604cat >>conftest.$ac_ext <<_ACEOF
19605/* end confdefs.h. */
19606$ac_includes_default
19607int
19608main ()
19609{
19610static struct stat ac_aggr;
19611if (sizeof ac_aggr.st_blksize)
19612return 0;
19613 ;
19614 return 0;
19615}
19616_ACEOF
19617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019618if { (ac_try="$ac_compile"
19619case "(($ac_try" in
19620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19621 *) ac_try_echo=$ac_try;;
19622esac
19623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19624 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019626 grep -v '^ *+' conftest.er1 >conftest.err
19627 rm -f conftest.er1
19628 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630 (exit $ac_status); } && {
19631 test -z "$ac_c_werror_flag" ||
19632 test ! -s conftest.err
19633 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019634 ac_cv_member_struct_stat_st_blksize=yes
19635else
19636 echo "$as_me: failed program was:" >&5
19637sed 's/^/| /' conftest.$ac_ext >&5
19638
Martin v. Löwiseba40652007-08-30 20:10:57 +000019639 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019641
19642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644
19645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019647{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19648echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019649if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019650
Martin v. Löwis11437992002-04-12 09:54:03 +000019651cat >>confdefs.h <<_ACEOF
19652#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19653_ACEOF
19654
19655
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019656fi
19657
Martin v. Löwiseba40652007-08-30 20:10:57 +000019658{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19659echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019660if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19661 echo $ECHO_N "(cached) $ECHO_C" >&6
19662else
19663 cat >conftest.$ac_ext <<_ACEOF
19664/* confdefs.h. */
19665_ACEOF
19666cat confdefs.h >>conftest.$ac_ext
19667cat >>conftest.$ac_ext <<_ACEOF
19668/* end confdefs.h. */
19669$ac_includes_default
19670int
19671main ()
19672{
19673static struct stat ac_aggr;
19674if (ac_aggr.st_flags)
19675return 0;
19676 ;
19677 return 0;
19678}
19679_ACEOF
19680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019681if { (ac_try="$ac_compile"
19682case "(($ac_try" in
19683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19684 *) ac_try_echo=$ac_try;;
19685esac
19686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19687 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019688 ac_status=$?
19689 grep -v '^ *+' conftest.er1 >conftest.err
19690 rm -f conftest.er1
19691 cat conftest.err >&5
19692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019693 (exit $ac_status); } && {
19694 test -z "$ac_c_werror_flag" ||
19695 test ! -s conftest.err
19696 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019697 ac_cv_member_struct_stat_st_flags=yes
19698else
19699 echo "$as_me: failed program was:" >&5
19700sed 's/^/| /' conftest.$ac_ext >&5
19701
Martin v. Löwiseba40652007-08-30 20:10:57 +000019702 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
19708$ac_includes_default
19709int
19710main ()
19711{
19712static struct stat ac_aggr;
19713if (sizeof ac_aggr.st_flags)
19714return 0;
19715 ;
19716 return 0;
19717}
19718_ACEOF
19719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720if { (ac_try="$ac_compile"
19721case "(($ac_try" in
19722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19723 *) ac_try_echo=$ac_try;;
19724esac
19725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19726 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019727 ac_status=$?
19728 grep -v '^ *+' conftest.er1 >conftest.err
19729 rm -f conftest.er1
19730 cat conftest.err >&5
19731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732 (exit $ac_status); } && {
19733 test -z "$ac_c_werror_flag" ||
19734 test ! -s conftest.err
19735 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019736 ac_cv_member_struct_stat_st_flags=yes
19737else
19738 echo "$as_me: failed program was:" >&5
19739sed 's/^/| /' conftest.$ac_ext >&5
19740
Martin v. Löwiseba40652007-08-30 20:10:57 +000019741 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019743
19744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746
19747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019749{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19750echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019751if test $ac_cv_member_struct_stat_st_flags = yes; then
19752
19753cat >>confdefs.h <<_ACEOF
19754#define HAVE_STRUCT_STAT_ST_FLAGS 1
19755_ACEOF
19756
19757
19758fi
19759
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19761echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019762if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19763 echo $ECHO_N "(cached) $ECHO_C" >&6
19764else
19765 cat >conftest.$ac_ext <<_ACEOF
19766/* confdefs.h. */
19767_ACEOF
19768cat confdefs.h >>conftest.$ac_ext
19769cat >>conftest.$ac_ext <<_ACEOF
19770/* end confdefs.h. */
19771$ac_includes_default
19772int
19773main ()
19774{
19775static struct stat ac_aggr;
19776if (ac_aggr.st_gen)
19777return 0;
19778 ;
19779 return 0;
19780}
19781_ACEOF
19782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783if { (ac_try="$ac_compile"
19784case "(($ac_try" in
19785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19786 *) ac_try_echo=$ac_try;;
19787esac
19788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019790 ac_status=$?
19791 grep -v '^ *+' conftest.er1 >conftest.err
19792 rm -f conftest.er1
19793 cat conftest.err >&5
19794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019795 (exit $ac_status); } && {
19796 test -z "$ac_c_werror_flag" ||
19797 test ! -s conftest.err
19798 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019799 ac_cv_member_struct_stat_st_gen=yes
19800else
19801 echo "$as_me: failed program was:" >&5
19802sed 's/^/| /' conftest.$ac_ext >&5
19803
Martin v. Löwiseba40652007-08-30 20:10:57 +000019804 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019805/* confdefs.h. */
19806_ACEOF
19807cat confdefs.h >>conftest.$ac_ext
19808cat >>conftest.$ac_ext <<_ACEOF
19809/* end confdefs.h. */
19810$ac_includes_default
19811int
19812main ()
19813{
19814static struct stat ac_aggr;
19815if (sizeof ac_aggr.st_gen)
19816return 0;
19817 ;
19818 return 0;
19819}
19820_ACEOF
19821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822if { (ac_try="$ac_compile"
19823case "(($ac_try" in
19824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19825 *) ac_try_echo=$ac_try;;
19826esac
19827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019829 ac_status=$?
19830 grep -v '^ *+' conftest.er1 >conftest.err
19831 rm -f conftest.er1
19832 cat conftest.err >&5
19833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834 (exit $ac_status); } && {
19835 test -z "$ac_c_werror_flag" ||
19836 test ! -s conftest.err
19837 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019838 ac_cv_member_struct_stat_st_gen=yes
19839else
19840 echo "$as_me: failed program was:" >&5
19841sed 's/^/| /' conftest.$ac_ext >&5
19842
Martin v. Löwiseba40652007-08-30 20:10:57 +000019843 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019845
19846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848
19849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019851{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19852echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019853if test $ac_cv_member_struct_stat_st_gen = yes; then
19854
19855cat >>confdefs.h <<_ACEOF
19856#define HAVE_STRUCT_STAT_ST_GEN 1
19857_ACEOF
19858
19859
19860fi
19861
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19863echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019864if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19865 echo $ECHO_N "(cached) $ECHO_C" >&6
19866else
19867 cat >conftest.$ac_ext <<_ACEOF
19868/* confdefs.h. */
19869_ACEOF
19870cat confdefs.h >>conftest.$ac_ext
19871cat >>conftest.$ac_ext <<_ACEOF
19872/* end confdefs.h. */
19873$ac_includes_default
19874int
19875main ()
19876{
19877static struct stat ac_aggr;
19878if (ac_aggr.st_birthtime)
19879return 0;
19880 ;
19881 return 0;
19882}
19883_ACEOF
19884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885if { (ac_try="$ac_compile"
19886case "(($ac_try" in
19887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19888 *) ac_try_echo=$ac_try;;
19889esac
19890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019892 ac_status=$?
19893 grep -v '^ *+' conftest.er1 >conftest.err
19894 rm -f conftest.er1
19895 cat conftest.err >&5
19896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019897 (exit $ac_status); } && {
19898 test -z "$ac_c_werror_flag" ||
19899 test ! -s conftest.err
19900 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019901 ac_cv_member_struct_stat_st_birthtime=yes
19902else
19903 echo "$as_me: failed program was:" >&5
19904sed 's/^/| /' conftest.$ac_ext >&5
19905
Martin v. Löwiseba40652007-08-30 20:10:57 +000019906 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019907/* confdefs.h. */
19908_ACEOF
19909cat confdefs.h >>conftest.$ac_ext
19910cat >>conftest.$ac_ext <<_ACEOF
19911/* end confdefs.h. */
19912$ac_includes_default
19913int
19914main ()
19915{
19916static struct stat ac_aggr;
19917if (sizeof ac_aggr.st_birthtime)
19918return 0;
19919 ;
19920 return 0;
19921}
19922_ACEOF
19923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924if { (ac_try="$ac_compile"
19925case "(($ac_try" in
19926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19927 *) ac_try_echo=$ac_try;;
19928esac
19929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019931 ac_status=$?
19932 grep -v '^ *+' conftest.er1 >conftest.err
19933 rm -f conftest.er1
19934 cat conftest.err >&5
19935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936 (exit $ac_status); } && {
19937 test -z "$ac_c_werror_flag" ||
19938 test ! -s conftest.err
19939 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019940 ac_cv_member_struct_stat_st_birthtime=yes
19941else
19942 echo "$as_me: failed program was:" >&5
19943sed 's/^/| /' conftest.$ac_ext >&5
19944
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019947
19948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950
19951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019953{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19954echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019955if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19956
19957cat >>confdefs.h <<_ACEOF
19958#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19959_ACEOF
19960
19961
19962fi
19963
Martin v. Löwiseba40652007-08-30 20:10:57 +000019964{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19965echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019966if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019968else
Martin v. Löwis11437992002-04-12 09:54:03 +000019969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019970/* confdefs.h. */
19971_ACEOF
19972cat confdefs.h >>conftest.$ac_ext
19973cat >>conftest.$ac_ext <<_ACEOF
19974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019976int
19977main ()
19978{
19979static struct stat ac_aggr;
19980if (ac_aggr.st_blocks)
19981return 0;
19982 ;
19983 return 0;
19984}
19985_ACEOF
19986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987if { (ac_try="$ac_compile"
19988case "(($ac_try" in
19989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19990 *) ac_try_echo=$ac_try;;
19991esac
19992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019995 grep -v '^ *+' conftest.er1 >conftest.err
19996 rm -f conftest.er1
19997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999 (exit $ac_status); } && {
20000 test -z "$ac_c_werror_flag" ||
20001 test ! -s conftest.err
20002 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020004else
Martin v. Löwis11437992002-04-12 09:54:03 +000020005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020006sed 's/^/| /' conftest.$ac_ext >&5
20007
Martin v. Löwiseba40652007-08-30 20:10:57 +000020008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020009/* confdefs.h. */
20010_ACEOF
20011cat confdefs.h >>conftest.$ac_ext
20012cat >>conftest.$ac_ext <<_ACEOF
20013/* end confdefs.h. */
20014$ac_includes_default
20015int
20016main ()
20017{
20018static struct stat ac_aggr;
20019if (sizeof ac_aggr.st_blocks)
20020return 0;
20021 ;
20022 return 0;
20023}
20024_ACEOF
20025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026if { (ac_try="$ac_compile"
20027case "(($ac_try" in
20028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029 *) ac_try_echo=$ac_try;;
20030esac
20031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20032 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020034 grep -v '^ *+' conftest.er1 >conftest.err
20035 rm -f conftest.er1
20036 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038 (exit $ac_status); } && {
20039 test -z "$ac_c_werror_flag" ||
20040 test ! -s conftest.err
20041 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020042 ac_cv_member_struct_stat_st_blocks=yes
20043else
20044 echo "$as_me: failed program was:" >&5
20045sed 's/^/| /' conftest.$ac_ext >&5
20046
Martin v. Löwiseba40652007-08-30 20:10:57 +000020047 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020049
20050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020052
20053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020055{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20056echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020057if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020058
Martin v. Löwis11437992002-04-12 09:54:03 +000020059cat >>confdefs.h <<_ACEOF
20060#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20061_ACEOF
20062
20063
20064cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020065#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020066_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020067
20068else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020069 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020070 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020071 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20072 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020073esac
20074
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020075fi
20076
Michael W. Hudson54241132001-12-07 15:38:26 +000020077
Martin v. Löwis11437992002-04-12 09:54:03 +000020078
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20080echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020081if test "${ac_cv_header_time_altzone+set}" = set; then
20082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020083else
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020085/* confdefs.h. */
20086_ACEOF
20087cat confdefs.h >>conftest.$ac_ext
20088cat >>conftest.$ac_ext <<_ACEOF
20089/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020090#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020091int
20092main ()
20093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020094return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020095 ;
20096 return 0;
20097}
20098_ACEOF
20099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020100if { (ac_try="$ac_compile"
20101case "(($ac_try" in
20102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20103 *) ac_try_echo=$ac_try;;
20104esac
20105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020108 grep -v '^ *+' conftest.er1 >conftest.err
20109 rm -f conftest.er1
20110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112 (exit $ac_status); } && {
20113 test -z "$ac_c_werror_flag" ||
20114 test ! -s conftest.err
20115 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020116 ac_cv_header_time_altzone=yes
20117else
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020119sed 's/^/| /' conftest.$ac_ext >&5
20120
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020122fi
20123
Martin v. Löwiseba40652007-08-30 20:10:57 +000020124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20125fi
20126
20127{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20128echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020129if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020130
20131cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020132#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020133_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020134
20135fi
20136
Guido van Rossumda88dad1995-01-26 00:46:29 +000020137was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20139echo $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 +000020140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020141/* confdefs.h. */
20142_ACEOF
20143cat confdefs.h >>conftest.$ac_ext
20144cat >>conftest.$ac_ext <<_ACEOF
20145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020146
20147#include <sys/types.h>
20148#include <sys/select.h>
20149#include <sys/time.h>
20150
Martin v. Löwis11437992002-04-12 09:54:03 +000020151int
20152main ()
20153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020154;
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 ;
20156 return 0;
20157}
20158_ACEOF
20159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160if { (ac_try="$ac_compile"
20161case "(($ac_try" in
20162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20163 *) ac_try_echo=$ac_try;;
20164esac
20165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020168 grep -v '^ *+' conftest.er1 >conftest.err
20169 rm -f conftest.er1
20170 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020172 (exit $ac_status); } && {
20173 test -z "$ac_c_werror_flag" ||
20174 test ! -s conftest.err
20175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020176
20177
20178cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020179#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020180_ACEOF
20181
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020182 was_it_defined=yes
20183
Guido van Rossumf78abae1997-01-21 22:02:36 +000020184else
Martin v. Löwis11437992002-04-12 09:54:03 +000020185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020186sed 's/^/| /' conftest.$ac_ext >&5
20187
Brett Cannon19fab762007-06-02 03:02:29 +000020188
Martin v. Löwiseba40652007-08-30 20:10:57 +000020189fi
20190
20191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20192{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20193echo "${ECHO_T}$was_it_defined" >&6; }
20194
20195{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20196echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020197if test "${ac_cv_struct_addrinfo+set}" = set; then
20198 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020199else
Martin v. Löwis11437992002-04-12 09:54:03 +000020200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020201/* confdefs.h. */
20202_ACEOF
20203cat confdefs.h >>conftest.$ac_ext
20204cat >>conftest.$ac_ext <<_ACEOF
20205/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020206
20207# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020208int
20209main ()
20210{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020211struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020212 ;
20213 return 0;
20214}
20215_ACEOF
20216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020217if { (ac_try="$ac_compile"
20218case "(($ac_try" in
20219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20220 *) ac_try_echo=$ac_try;;
20221esac
20222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020225 grep -v '^ *+' conftest.er1 >conftest.err
20226 rm -f conftest.er1
20227 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020229 (exit $ac_status); } && {
20230 test -z "$ac_c_werror_flag" ||
20231 test ! -s conftest.err
20232 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020233 ac_cv_struct_addrinfo=yes
20234else
Martin v. Löwis11437992002-04-12 09:54:03 +000020235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020236sed 's/^/| /' conftest.$ac_ext >&5
20237
Martin v. Löwiseba40652007-08-30 20:10:57 +000020238 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020239fi
20240
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20242fi
20243
20244{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20245echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020246if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020247
20248cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020249#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020250_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020251
20252fi
20253
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20255echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020256if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20257 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020258else
Martin v. Löwis11437992002-04-12 09:54:03 +000020259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020260/* confdefs.h. */
20261_ACEOF
20262cat confdefs.h >>conftest.$ac_ext
20263cat >>conftest.$ac_ext <<_ACEOF
20264/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020265
20266# include <sys/types.h>
20267# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020268int
20269main ()
20270{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020271struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 ;
20273 return 0;
20274}
20275_ACEOF
20276rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277if { (ac_try="$ac_compile"
20278case "(($ac_try" in
20279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280 *) ac_try_echo=$ac_try;;
20281esac
20282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020285 grep -v '^ *+' conftest.er1 >conftest.err
20286 rm -f conftest.er1
20287 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020289 (exit $ac_status); } && {
20290 test -z "$ac_c_werror_flag" ||
20291 test ! -s conftest.err
20292 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020293 ac_cv_struct_sockaddr_storage=yes
20294else
Martin v. Löwis11437992002-04-12 09:54:03 +000020295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020296sed 's/^/| /' conftest.$ac_ext >&5
20297
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020299fi
20300
Martin v. Löwiseba40652007-08-30 20:10:57 +000020301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20302fi
20303
20304{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20305echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020306if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020307
20308cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020309#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020310_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020311
20312fi
20313
Guido van Rossum627b2d71993-12-24 10:39:16 +000020314# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020315
Michael W. Hudson54241132001-12-07 15:38:26 +000020316
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20318echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020319if test "${ac_cv_c_char_unsigned+set}" = set; then
20320 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020321else
Martin v. Löwis11437992002-04-12 09:54:03 +000020322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020323/* confdefs.h. */
20324_ACEOF
20325cat confdefs.h >>conftest.$ac_ext
20326cat >>conftest.$ac_ext <<_ACEOF
20327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020328$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020329int
20330main ()
20331{
20332static int test_array [1 - 2 * !(((char) -1) < 0)];
20333test_array [0] = 0
20334
20335 ;
20336 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020337}
Martin v. Löwis11437992002-04-12 09:54:03 +000020338_ACEOF
20339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020340if { (ac_try="$ac_compile"
20341case "(($ac_try" in
20342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20343 *) ac_try_echo=$ac_try;;
20344esac
20345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020348 grep -v '^ *+' conftest.er1 >conftest.err
20349 rm -f conftest.er1
20350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352 (exit $ac_status); } && {
20353 test -z "$ac_c_werror_flag" ||
20354 test ! -s conftest.err
20355 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020356 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020357else
20358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020359sed 's/^/| /' conftest.$ac_ext >&5
20360
Martin v. Löwiseba40652007-08-30 20:10:57 +000020361 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020363
20364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020366{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20367echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020368if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020370#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020372
20373fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020374
Martin v. Löwiseba40652007-08-30 20:10:57 +000020375{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20376echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020377if test "${ac_cv_c_const+set}" = set; then
20378 echo $ECHO_N "(cached) $ECHO_C" >&6
20379else
20380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020381/* confdefs.h. */
20382_ACEOF
20383cat confdefs.h >>conftest.$ac_ext
20384cat >>conftest.$ac_ext <<_ACEOF
20385/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020386
Martin v. Löwis11437992002-04-12 09:54:03 +000020387int
20388main ()
20389{
20390/* FIXME: Include the comments suggested by Paul. */
20391#ifndef __cplusplus
20392 /* Ultrix mips cc rejects this. */
20393 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020394 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020396 char const *const *pcpcc;
20397 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020398 /* NEC SVR4.0.2 mips cc rejects this. */
20399 struct point {int x, y;};
20400 static struct point const zero = {0,0};
20401 /* AIX XL C 1.02.0.0 rejects this.
20402 It does not let you subtract one const X* pointer from another in
20403 an arm of an if-expression whose if-part is not a constant
20404 expression */
20405 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020406 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020407 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020408 ++pcpcc;
20409 ppc = (char**) pcpcc;
20410 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020411 { /* SCO 3.2v4 cc rejects this. */
20412 char *t;
20413 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020414
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020416 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 }
20418 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20419 int x[] = {25, 17};
20420 const int *foo = &x[0];
20421 ++foo;
20422 }
20423 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20424 typedef const int *iptr;
20425 iptr p = 0;
20426 ++p;
20427 }
20428 { /* AIX XL C 1.02.0.0 rejects this saying
20429 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20430 struct s { int j; const int *ap[3]; };
20431 struct s *b; b->j = 5;
20432 }
20433 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20434 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020435 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020438#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020439
Martin v. Löwis11437992002-04-12 09:54:03 +000020440 ;
20441 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020442}
Martin v. Löwis11437992002-04-12 09:54:03 +000020443_ACEOF
20444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445if { (ac_try="$ac_compile"
20446case "(($ac_try" in
20447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20448 *) ac_try_echo=$ac_try;;
20449esac
20450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453 grep -v '^ *+' conftest.er1 >conftest.err
20454 rm -f conftest.er1
20455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457 (exit $ac_status); } && {
20458 test -z "$ac_c_werror_flag" ||
20459 test ! -s conftest.err
20460 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020461 ac_cv_c_const=yes
20462else
Martin v. Löwis11437992002-04-12 09:54:03 +000020463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020464sed 's/^/| /' conftest.$ac_ext >&5
20465
Martin v. Löwiseba40652007-08-30 20:10:57 +000020466 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020468
20469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020471{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20472echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020473if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020474
20475cat >>confdefs.h <<\_ACEOF
20476#define const
20477_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020478
20479fi
20480
Michael W. Hudson54241132001-12-07 15:38:26 +000020481
Guido van Rossumda88dad1995-01-26 00:46:29 +000020482works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020483{ echo "$as_me:$LINENO: checking for working volatile" >&5
20484echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020486/* confdefs.h. */
20487_ACEOF
20488cat confdefs.h >>conftest.$ac_ext
20489cat >>conftest.$ac_ext <<_ACEOF
20490/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020491
Martin v. Löwis11437992002-04-12 09:54:03 +000020492int
20493main ()
20494{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020495volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020496 ;
20497 return 0;
20498}
20499_ACEOF
20500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020501if { (ac_try="$ac_compile"
20502case "(($ac_try" in
20503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20504 *) ac_try_echo=$ac_try;;
20505esac
20506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020509 grep -v '^ *+' conftest.er1 >conftest.err
20510 rm -f conftest.er1
20511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020513 (exit $ac_status); } && {
20514 test -z "$ac_c_werror_flag" ||
20515 test ! -s conftest.err
20516 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020517 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020518else
Martin v. Löwis11437992002-04-12 09:54:03 +000020519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020520sed 's/^/| /' conftest.$ac_ext >&5
20521
Martin v. Löwis11437992002-04-12 09:54:03 +000020522
20523cat >>confdefs.h <<\_ACEOF
20524#define volatile
20525_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020526
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020527
Guido van Rossum627b2d71993-12-24 10:39:16 +000020528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020529
20530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20531{ echo "$as_me:$LINENO: result: $works" >&5
20532echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020533
Guido van Rossumda88dad1995-01-26 00:46:29 +000020534works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535{ echo "$as_me:$LINENO: checking for working signed char" >&5
20536echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020538/* confdefs.h. */
20539_ACEOF
20540cat confdefs.h >>conftest.$ac_ext
20541cat >>conftest.$ac_ext <<_ACEOF
20542/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020543
Martin v. Löwis11437992002-04-12 09:54:03 +000020544int
20545main ()
20546{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020547signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 ;
20549 return 0;
20550}
20551_ACEOF
20552rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553if { (ac_try="$ac_compile"
20554case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
20558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020565 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err
20568 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020569 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020570else
Martin v. Löwis11437992002-04-12 09:54:03 +000020571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020572sed 's/^/| /' conftest.$ac_ext >&5
20573
Martin v. Löwis11437992002-04-12 09:54:03 +000020574
20575cat >>confdefs.h <<\_ACEOF
20576#define signed
20577_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020578
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020579
Guido van Rossum7f43da71994-08-01 12:15:30 +000020580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020581
20582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20583{ echo "$as_me:$LINENO: result: $works" >&5
20584echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020585
Guido van Rossumda88dad1995-01-26 00:46:29 +000020586have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020587{ echo "$as_me:$LINENO: checking for prototypes" >&5
20588echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020590/* confdefs.h. */
20591_ACEOF
20592cat confdefs.h >>conftest.$ac_ext
20593cat >>conftest.$ac_ext <<_ACEOF
20594/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020595int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020596int
20597main ()
20598{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020599return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020600 ;
20601 return 0;
20602}
20603_ACEOF
20604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605if { (ac_try="$ac_compile"
20606case "(($ac_try" in
20607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20608 *) ac_try_echo=$ac_try;;
20609esac
20610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020613 grep -v '^ *+' conftest.er1 >conftest.err
20614 rm -f conftest.er1
20615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020617 (exit $ac_status); } && {
20618 test -z "$ac_c_werror_flag" ||
20619 test ! -s conftest.err
20620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020621
20622
20623cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020624#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020625_ACEOF
20626
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020627 have_prototypes=yes
20628
Guido van Rossumf78abae1997-01-21 22:02:36 +000020629else
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020631sed 's/^/| /' conftest.$ac_ext >&5
20632
Martin v. Löwiseba40652007-08-30 20:10:57 +000020633
Guido van Rossum7f43da71994-08-01 12:15:30 +000020634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635
20636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20637{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20638echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020639
Guido van Rossumda88dad1995-01-26 00:46:29 +000020640works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20642echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020644/* confdefs.h. */
20645_ACEOF
20646cat confdefs.h >>conftest.$ac_ext
20647cat >>conftest.$ac_ext <<_ACEOF
20648/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020649
20650#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020651int foo(int x, ...) {
20652 va_list va;
20653 va_start(va, x);
20654 va_arg(va, int);
20655 va_arg(va, char *);
20656 va_arg(va, double);
20657 return 0;
20658}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020659
Martin v. Löwis11437992002-04-12 09:54:03 +000020660int
20661main ()
20662{
Guido van Rossum90eea071996-08-30 20:58:57 +000020663return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ;
20665 return 0;
20666}
20667_ACEOF
20668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669if { (ac_try="$ac_compile"
20670case "(($ac_try" in
20671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20672 *) ac_try_echo=$ac_try;;
20673esac
20674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020677 grep -v '^ *+' conftest.er1 >conftest.err
20678 rm -f conftest.er1
20679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681 (exit $ac_status); } && {
20682 test -z "$ac_c_werror_flag" ||
20683 test ! -s conftest.err
20684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020685
20686
20687cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020688#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020689_ACEOF
20690
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020691 works=yes
20692
Guido van Rossumf78abae1997-01-21 22:02:36 +000020693else
Martin v. Löwis11437992002-04-12 09:54:03 +000020694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020695sed 's/^/| /' conftest.$ac_ext >&5
20696
Martin v. Löwiseba40652007-08-30 20:10:57 +000020697
Guido van Rossum627b2d71993-12-24 10:39:16 +000020698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699
20700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20701{ echo "$as_me:$LINENO: result: $works" >&5
20702echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020703
Martin v. Löwisd6320502004-08-12 13:45:08 +000020704# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705{ echo "$as_me:$LINENO: checking for socketpair" >&5
20706echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020707cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020708/* confdefs.h. */
20709_ACEOF
20710cat confdefs.h >>conftest.$ac_ext
20711cat >>conftest.$ac_ext <<_ACEOF
20712/* end confdefs.h. */
20713
20714#include <sys/types.h>
20715#include <sys/socket.h>
20716
20717int
20718main ()
20719{
20720void *x=socketpair
20721 ;
20722 return 0;
20723}
20724_ACEOF
20725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726if { (ac_try="$ac_compile"
20727case "(($ac_try" in
20728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20729 *) ac_try_echo=$ac_try;;
20730esac
20731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020734 grep -v '^ *+' conftest.er1 >conftest.err
20735 rm -f conftest.er1
20736 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738 (exit $ac_status); } && {
20739 test -z "$ac_c_werror_flag" ||
20740 test ! -s conftest.err
20741 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020742
20743cat >>confdefs.h <<\_ACEOF
20744#define HAVE_SOCKETPAIR 1
20745_ACEOF
20746
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747 { echo "$as_me:$LINENO: result: yes" >&5
20748echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020749else
20750 echo "$as_me: failed program was:" >&5
20751sed 's/^/| /' conftest.$ac_ext >&5
20752
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753 { echo "$as_me:$LINENO: result: no" >&5
20754echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020755
20756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757
20758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020759
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020760# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020761{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20762echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020764/* confdefs.h. */
20765_ACEOF
20766cat confdefs.h >>conftest.$ac_ext
20767cat >>conftest.$ac_ext <<_ACEOF
20768/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020769#include <sys/types.h>
20770#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020771int
20772main ()
20773{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020774struct sockaddr x;
20775x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020776 ;
20777 return 0;
20778}
20779_ACEOF
20780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781if { (ac_try="$ac_compile"
20782case "(($ac_try" in
20783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20784 *) ac_try_echo=$ac_try;;
20785esac
20786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020789 grep -v '^ *+' conftest.er1 >conftest.err
20790 rm -f conftest.er1
20791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793 (exit $ac_status); } && {
20794 test -z "$ac_c_werror_flag" ||
20795 test ! -s conftest.err
20796 } && test -s conftest.$ac_objext; then
20797 { echo "$as_me:$LINENO: result: yes" >&5
20798echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020799
20800cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020801#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020802_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020803
20804else
Martin v. Löwis11437992002-04-12 09:54:03 +000020805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020806sed 's/^/| /' conftest.$ac_ext >&5
20807
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808 { echo "$as_me:$LINENO: result: no" >&5
20809echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020811
20812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020813
Guido van Rossumda88dad1995-01-26 00:46:29 +000020814va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20816echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020818/* confdefs.h. */
20819_ACEOF
20820cat confdefs.h >>conftest.$ac_ext
20821cat >>conftest.$ac_ext <<_ACEOF
20822/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020823
20824#ifdef HAVE_STDARG_PROTOTYPES
20825#include <stdarg.h>
20826#else
20827#include <varargs.h>
20828#endif
20829
Martin v. Löwis11437992002-04-12 09:54:03 +000020830int
20831main ()
20832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020833va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 ;
20835 return 0;
20836}
20837_ACEOF
20838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839if { (ac_try="$ac_compile"
20840case "(($ac_try" in
20841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20842 *) ac_try_echo=$ac_try;;
20843esac
20844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020847 grep -v '^ *+' conftest.er1 >conftest.err
20848 rm -f conftest.er1
20849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020851 (exit $ac_status); } && {
20852 test -z "$ac_c_werror_flag" ||
20853 test ! -s conftest.err
20854 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020855 :
20856else
Martin v. Löwis11437992002-04-12 09:54:03 +000020857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020858sed 's/^/| /' conftest.$ac_ext >&5
20859
Martin v. Löwis11437992002-04-12 09:54:03 +000020860
20861
20862cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020863#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020864_ACEOF
20865
Guido van Rossumda88dad1995-01-26 00:46:29 +000020866 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020869
20870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20871{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20872echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020873
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020874# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020875
20876
20877
Martin v. Löwiseba40652007-08-30 20:10:57 +000020878{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20879echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020880if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20881 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020882else
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020884/* confdefs.h. */
20885_ACEOF
20886cat confdefs.h >>conftest.$ac_ext
20887cat >>conftest.$ac_ext <<_ACEOF
20888/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020889/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20890 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20891#define gethostbyname_r innocuous_gethostbyname_r
20892
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020893/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020894 which can conflict with char gethostbyname_r (); below.
20895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020896 <limits.h> exists even on freestanding compilers. */
20897
20898#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020899# include <limits.h>
20900#else
20901# include <assert.h>
20902#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020903
20904#undef gethostbyname_r
20905
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906/* Override any GCC internal prototype to avoid an error.
20907 Use char because int might match the return type of a GCC
20908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020909#ifdef __cplusplus
20910extern "C"
20911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020912char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020913/* The GNU C library defines this for functions which it implements
20914 to always fail with ENOSYS. Some functions are actually named
20915 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020916#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020917choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020918#endif
20919
Skip Montanaro6dead952003-09-25 14:50:04 +000020920int
20921main ()
20922{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020923return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020924 ;
20925 return 0;
20926}
20927_ACEOF
20928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020929if { (ac_try="$ac_link"
20930case "(($ac_try" in
20931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20932 *) ac_try_echo=$ac_try;;
20933esac
20934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20935 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020937 grep -v '^ *+' conftest.er1 >conftest.err
20938 rm -f conftest.er1
20939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020941 (exit $ac_status); } && {
20942 test -z "$ac_c_werror_flag" ||
20943 test ! -s conftest.err
20944 } && test -s conftest$ac_exeext &&
20945 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020947else
Martin v. Löwis11437992002-04-12 09:54:03 +000020948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020949sed 's/^/| /' conftest.$ac_ext >&5
20950
Martin v. Löwiseba40652007-08-30 20:10:57 +000020951 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020953
20954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020955 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20958echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020959if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020960
Martin v. Löwis11437992002-04-12 09:54:03 +000020961 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020962#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020963_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020964
Martin v. Löwiseba40652007-08-30 20:10:57 +000020965 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20966echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020967 OLD_CFLAGS=$CFLAGS
20968 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020975
20976# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020977
Martin v. Löwis11437992002-04-12 09:54:03 +000020978int
20979main ()
20980{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020981
20982 char *name;
20983 struct hostent *he, *res;
20984 char buffer[2048];
20985 int buflen = 2048;
20986 int h_errnop;
20987
20988 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020989
20990 ;
20991 return 0;
20992}
20993_ACEOF
20994rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020995if { (ac_try="$ac_compile"
20996case "(($ac_try" in
20997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20998 *) ac_try_echo=$ac_try;;
20999esac
21000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021003 grep -v '^ *+' conftest.er1 >conftest.err
21004 rm -f conftest.er1
21005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021007 (exit $ac_status); } && {
21008 test -z "$ac_c_werror_flag" ||
21009 test ! -s conftest.err
21010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021011
21012 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021013#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021014_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021015
Martin v. Löwis11437992002-04-12 09:54:03 +000021016
21017cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021018#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021019_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021020
Martin v. Löwiseba40652007-08-30 20:10:57 +000021021 { echo "$as_me:$LINENO: result: yes" >&5
21022echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021024else
Martin v. Löwis11437992002-04-12 09:54:03 +000021025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021026sed 's/^/| /' conftest.$ac_ext >&5
21027
Martin v. Löwis11437992002-04-12 09:54:03 +000021028
Martin v. Löwiseba40652007-08-30 20:10:57 +000021029 { echo "$as_me:$LINENO: result: no" >&5
21030echo "${ECHO_T}no" >&6; }
21031 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21032echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021034/* confdefs.h. */
21035_ACEOF
21036cat confdefs.h >>conftest.$ac_ext
21037cat >>conftest.$ac_ext <<_ACEOF
21038/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021039
21040# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021041
Martin v. Löwis11437992002-04-12 09:54:03 +000021042int
21043main ()
21044{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021045
21046 char *name;
21047 struct hostent *he;
21048 char buffer[2048];
21049 int buflen = 2048;
21050 int h_errnop;
21051
21052 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021053
21054 ;
21055 return 0;
21056}
21057_ACEOF
21058rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021059if { (ac_try="$ac_compile"
21060case "(($ac_try" in
21061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21062 *) ac_try_echo=$ac_try;;
21063esac
21064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021067 grep -v '^ *+' conftest.er1 >conftest.err
21068 rm -f conftest.er1
21069 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071 (exit $ac_status); } && {
21072 test -z "$ac_c_werror_flag" ||
21073 test ! -s conftest.err
21074 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021075
21076 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021077#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021078_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021079
Martin v. Löwis11437992002-04-12 09:54:03 +000021080
21081cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021082#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021083_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021084
Martin v. Löwiseba40652007-08-30 20:10:57 +000021085 { echo "$as_me:$LINENO: result: yes" >&5
21086echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021088else
Martin v. Löwis11437992002-04-12 09:54:03 +000021089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021090sed 's/^/| /' conftest.$ac_ext >&5
21091
Martin v. Löwis11437992002-04-12 09:54:03 +000021092
Martin v. Löwiseba40652007-08-30 20:10:57 +000021093 { echo "$as_me:$LINENO: result: no" >&5
21094echo "${ECHO_T}no" >&6; }
21095 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21096echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021098/* confdefs.h. */
21099_ACEOF
21100cat confdefs.h >>conftest.$ac_ext
21101cat >>conftest.$ac_ext <<_ACEOF
21102/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021103
21104# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021105
Martin v. Löwis11437992002-04-12 09:54:03 +000021106int
21107main ()
21108{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021109
21110 char *name;
21111 struct hostent *he;
21112 struct hostent_data data;
21113
21114 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021115
21116 ;
21117 return 0;
21118}
21119_ACEOF
21120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021121if { (ac_try="$ac_compile"
21122case "(($ac_try" in
21123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21124 *) ac_try_echo=$ac_try;;
21125esac
21126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021129 grep -v '^ *+' conftest.er1 >conftest.err
21130 rm -f conftest.er1
21131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 (exit $ac_status); } && {
21134 test -z "$ac_c_werror_flag" ||
21135 test ! -s conftest.err
21136 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021137
21138 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021139#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021140_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021141
Martin v. Löwis11437992002-04-12 09:54:03 +000021142
21143cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021144#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021145_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021146
Martin v. Löwiseba40652007-08-30 20:10:57 +000021147 { echo "$as_me:$LINENO: result: yes" >&5
21148echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021149
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021150else
Martin v. Löwis11437992002-04-12 09:54:03 +000021151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021152sed 's/^/| /' conftest.$ac_ext >&5
21153
Martin v. Löwis11437992002-04-12 09:54:03 +000021154
Martin v. Löwiseba40652007-08-30 20:10:57 +000021155 { echo "$as_me:$LINENO: result: no" >&5
21156echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021157
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021159
21160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021161
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021163
21164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021165
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021167
21168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021169 CFLAGS=$OLD_CFLAGS
21170
21171else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021172
Martin v. Löwis11437992002-04-12 09:54:03 +000021173
21174for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021175do
Martin v. Löwis11437992002-04-12 09:54:03 +000021176as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021177{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21179if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021181else
Martin v. Löwis11437992002-04-12 09:54:03 +000021182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021183/* confdefs.h. */
21184_ACEOF
21185cat confdefs.h >>conftest.$ac_ext
21186cat >>conftest.$ac_ext <<_ACEOF
21187/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021188/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21190#define $ac_func innocuous_$ac_func
21191
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021192/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021193 which can conflict with char $ac_func (); below.
21194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021195 <limits.h> exists even on freestanding compilers. */
21196
21197#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021198# include <limits.h>
21199#else
21200# include <assert.h>
21201#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021202
21203#undef $ac_func
21204
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205/* Override any GCC internal prototype to avoid an error.
21206 Use char because int might match the return type of a GCC
21207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021208#ifdef __cplusplus
21209extern "C"
21210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021211char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021212/* The GNU C library defines this for functions which it implements
21213 to always fail with ENOSYS. Some functions are actually named
21214 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021216choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021217#endif
21218
Skip Montanaro6dead952003-09-25 14:50:04 +000021219int
21220main ()
21221{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 ;
21224 return 0;
21225}
21226_ACEOF
21227rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021228if { (ac_try="$ac_link"
21229case "(($ac_try" in
21230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21231 *) ac_try_echo=$ac_try;;
21232esac
21233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21234 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021236 grep -v '^ *+' conftest.er1 >conftest.err
21237 rm -f conftest.er1
21238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021240 (exit $ac_status); } && {
21241 test -z "$ac_c_werror_flag" ||
21242 test ! -s conftest.err
21243 } && test -s conftest$ac_exeext &&
21244 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021245 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021246else
Martin v. Löwis11437992002-04-12 09:54:03 +000021247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021248sed 's/^/| /' conftest.$ac_ext >&5
21249
Martin v. Löwiseba40652007-08-30 20:10:57 +000021250 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021252
21253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021254 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021256ac_res=`eval echo '${'$as_ac_var'}'`
21257 { echo "$as_me:$LINENO: result: $ac_res" >&5
21258echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021259if test `eval echo '${'$as_ac_var'}'` = yes; then
21260 cat >>confdefs.h <<_ACEOF
21261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21262_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021264fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021265done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021266
Michael W. Hudson54241132001-12-07 15:38:26 +000021267
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021268fi
21269
Michael W. Hudson54241132001-12-07 15:38:26 +000021270
21271
21272
21273
21274
21275
Guido van Rossum627b2d71993-12-24 10:39:16 +000021276# checks for system services
21277# (none yet)
21278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021279# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021280{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21281echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021282if test "${ac_cv_func___fpu_control+set}" = set; then
21283 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021284else
Martin v. Löwis11437992002-04-12 09:54:03 +000021285 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021286/* confdefs.h. */
21287_ACEOF
21288cat confdefs.h >>conftest.$ac_ext
21289cat >>conftest.$ac_ext <<_ACEOF
21290/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021291/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21293#define __fpu_control innocuous___fpu_control
21294
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021295/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021296 which can conflict with char __fpu_control (); below.
21297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021298 <limits.h> exists even on freestanding compilers. */
21299
21300#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021301# include <limits.h>
21302#else
21303# include <assert.h>
21304#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021305
21306#undef __fpu_control
21307
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308/* Override any GCC internal prototype to avoid an error.
21309 Use char because int might match the return type of a GCC
21310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021311#ifdef __cplusplus
21312extern "C"
21313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021314char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021315/* The GNU C library defines this for functions which it implements
21316 to always fail with ENOSYS. Some functions are actually named
21317 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021319choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021320#endif
21321
Skip Montanaro6dead952003-09-25 14:50:04 +000021322int
21323main ()
21324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021326 ;
21327 return 0;
21328}
21329_ACEOF
21330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331if { (ac_try="$ac_link"
21332case "(($ac_try" in
21333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21334 *) ac_try_echo=$ac_try;;
21335esac
21336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021339 grep -v '^ *+' conftest.er1 >conftest.err
21340 rm -f conftest.er1
21341 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021343 (exit $ac_status); } && {
21344 test -z "$ac_c_werror_flag" ||
21345 test ! -s conftest.err
21346 } && test -s conftest$ac_exeext &&
21347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021348 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021349else
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021351sed 's/^/| /' conftest.$ac_ext >&5
21352
Martin v. Löwiseba40652007-08-30 20:10:57 +000021353 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355
21356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021357 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21360echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021361if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021362 :
21363else
Martin v. Löwis11437992002-04-12 09:54:03 +000021364
Martin v. Löwiseba40652007-08-30 20:10:57 +000021365{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21366echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021367if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021369else
Martin v. Löwis11437992002-04-12 09:54:03 +000021370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021371LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021373/* confdefs.h. */
21374_ACEOF
21375cat confdefs.h >>conftest.$ac_ext
21376cat >>conftest.$ac_ext <<_ACEOF
21377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021378
Martin v. Löwiseba40652007-08-30 20:10:57 +000021379/* Override any GCC internal prototype to avoid an error.
21380 Use char because int might match the return type of a GCC
21381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021382#ifdef __cplusplus
21383extern "C"
21384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021385char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021386int
21387main ()
21388{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 ;
21391 return 0;
21392}
21393_ACEOF
21394rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021395if { (ac_try="$ac_link"
21396case "(($ac_try" in
21397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21398 *) ac_try_echo=$ac_try;;
21399esac
21400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21401 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021403 grep -v '^ *+' conftest.er1 >conftest.err
21404 rm -f conftest.er1
21405 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021407 (exit $ac_status); } && {
21408 test -z "$ac_c_werror_flag" ||
21409 test ! -s conftest.err
21410 } && test -s conftest$ac_exeext &&
21411 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021412 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021413else
Martin v. Löwis11437992002-04-12 09:54:03 +000021414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021415sed 's/^/| /' conftest.$ac_ext >&5
21416
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021419
21420rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021421 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021422LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021424{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21425echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021426if test $ac_cv_lib_ieee___fpu_control = yes; then
21427 cat >>confdefs.h <<_ACEOF
21428#define HAVE_LIBIEEE 1
21429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021430
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021431 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021432
Guido van Rossum627b2d71993-12-24 10:39:16 +000021433fi
21434
Michael W. Hudson54241132001-12-07 15:38:26 +000021435
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021436fi
21437
Michael W. Hudson54241132001-12-07 15:38:26 +000021438
Guido van Rossum7f253911997-05-09 02:42:48 +000021439# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21441echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021442
Martin v. Löwiseba40652007-08-30 20:10:57 +000021443# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021444if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021445 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021446if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021447then
21448
21449cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021450#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021451_ACEOF
21452
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453 { echo "$as_me:$LINENO: result: yes" >&5
21454echo "${ECHO_T}yes" >&6; }
21455else { echo "$as_me:$LINENO: result: no" >&5
21456echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021457fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021458else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459 { echo "$as_me:$LINENO: result: no" >&5
21460echo "${ECHO_T}no" >&6; }
21461fi
21462
Guido van Rossum7f253911997-05-09 02:42:48 +000021463
Guido van Rossum7f43da71994-08-01 12:15:30 +000021464# check for --with-libm=...
21465
Guido van Rossum563e7081996-09-10 18:20:48 +000021466case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021467Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021468BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021469*) LIBM=-lm
21470esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021471{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21472echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021473
Martin v. Löwiseba40652007-08-30 20:10:57 +000021474# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021475if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021476 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021477if test "$withval" = no
21478then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21480echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021481elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021482then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21484echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021485else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21486echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21487 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021488fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021489else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21491echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21492fi
21493
Guido van Rossum7f43da71994-08-01 12:15:30 +000021494
21495# check for --with-libc=...
21496
Martin v. Löwiseba40652007-08-30 20:10:57 +000021497{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21498echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021499
Martin v. Löwiseba40652007-08-30 20:10:57 +000021500# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021501if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021503if test "$withval" = no
21504then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021505 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21506echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021507elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021508then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21510echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021511else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21512echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21513 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021514fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021515else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21517echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21518fi
21519
Guido van Rossum7f43da71994-08-01 12:15:30 +000021520
Christian Heimes0a8143f2007-12-18 23:22:54 +000021521# ************************************
21522# * Check for mathematical functions *
21523# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021524
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021525LIBS_SAVE=$LIBS
21526LIBS="$LIBS $LIBM"
21527
Mark Dickinsone05e8402009-05-04 13:30:43 +000021528# Detect whether system arithmetic is subject to x87-style double
21529# rounding issues. The result of this test has little meaning on non
21530# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21531# mode is round-to-nearest and double rounding issues are present, and
21532# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21533{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21534echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21535if test "${ac_cv_x87_double_rounding+set}" = set; then
21536 echo $ECHO_N "(cached) $ECHO_C" >&6
21537else
21538
21539if test "$cross_compiling" = yes; then
21540 ac_cv_x87_double_rounding=no
21541else
21542 cat >conftest.$ac_ext <<_ACEOF
21543/* confdefs.h. */
21544_ACEOF
21545cat confdefs.h >>conftest.$ac_ext
21546cat >>conftest.$ac_ext <<_ACEOF
21547/* end confdefs.h. */
21548
21549#include <stdlib.h>
21550#include <math.h>
21551int main() {
21552 volatile double x, y, z;
21553 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21554 x = 0.99999999999999989; /* 1-2**-53 */
21555 y = 1./x;
21556 if (y != 1.)
21557 exit(0);
21558 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21559 x = 1e16;
21560 y = 2.99999;
21561 z = x + y;
21562 if (z != 1e16+4.)
21563 exit(0);
21564 /* both tests show evidence of double rounding */
21565 exit(1);
21566}
21567
21568_ACEOF
21569rm -f conftest$ac_exeext
21570if { (ac_try="$ac_link"
21571case "(($ac_try" in
21572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21573 *) ac_try_echo=$ac_try;;
21574esac
21575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21576 (eval "$ac_link") 2>&5
21577 ac_status=$?
21578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21580 { (case "(($ac_try" in
21581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21582 *) ac_try_echo=$ac_try;;
21583esac
21584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21585 (eval "$ac_try") 2>&5
21586 ac_status=$?
21587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21588 (exit $ac_status); }; }; then
21589 ac_cv_x87_double_rounding=no
21590else
21591 echo "$as_me: program exited with status $ac_status" >&5
21592echo "$as_me: failed program was:" >&5
21593sed 's/^/| /' conftest.$ac_ext >&5
21594
21595( exit $ac_status )
21596ac_cv_x87_double_rounding=yes
21597fi
21598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21599fi
21600
21601
21602fi
21603
21604{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21605echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21606if test "$ac_cv_x87_double_rounding" = yes
21607then
21608
21609cat >>confdefs.h <<\_ACEOF
21610#define X87_DOUBLE_ROUNDING 1
21611_ACEOF
21612
21613fi
21614
21615
Mark Dickinson265d7382008-04-21 22:32:24 +000021616# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21617# -0. on some architectures.
21618{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21619echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21620if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21621 echo $ECHO_N "(cached) $ECHO_C" >&6
21622else
21623
21624if test "$cross_compiling" = yes; then
21625 ac_cv_tanh_preserves_zero_sign=no
21626else
21627 cat >conftest.$ac_ext <<_ACEOF
21628/* confdefs.h. */
21629_ACEOF
21630cat confdefs.h >>conftest.$ac_ext
21631cat >>conftest.$ac_ext <<_ACEOF
21632/* end confdefs.h. */
21633
21634#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021635#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021636int main() {
21637 /* return 0 if either negative zeros don't exist
21638 on this platform or if negative zeros exist
21639 and tanh(-0.) == -0. */
21640 if (atan2(0., -1.) == atan2(-0., -1.) ||
21641 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21642 else exit(1);
21643}
21644
21645_ACEOF
21646rm -f conftest$ac_exeext
21647if { (ac_try="$ac_link"
21648case "(($ac_try" in
21649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21650 *) ac_try_echo=$ac_try;;
21651esac
21652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21653 (eval "$ac_link") 2>&5
21654 ac_status=$?
21655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21656 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21657 { (case "(($ac_try" in
21658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21659 *) ac_try_echo=$ac_try;;
21660esac
21661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21662 (eval "$ac_try") 2>&5
21663 ac_status=$?
21664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21665 (exit $ac_status); }; }; then
21666 ac_cv_tanh_preserves_zero_sign=yes
21667else
21668 echo "$as_me: program exited with status $ac_status" >&5
21669echo "$as_me: failed program was:" >&5
21670sed 's/^/| /' conftest.$ac_ext >&5
21671
21672( exit $ac_status )
21673ac_cv_tanh_preserves_zero_sign=no
21674fi
21675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21676fi
21677
21678
21679fi
21680
21681{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21682echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21683if test "$ac_cv_tanh_preserves_zero_sign" = yes
21684then
21685
21686cat >>confdefs.h <<\_ACEOF
21687#define TANH_PRESERVES_ZERO_SIGN 1
21688_ACEOF
21689
21690fi
21691
Martin v. Löwis11437992002-04-12 09:54:03 +000021692
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021693
Michael W. Hudson54241132001-12-07 15:38:26 +000021694
Christian Heimes0a8143f2007-12-18 23:22:54 +000021695
21696
21697
21698
21699
Mark Dickinsone05e8402009-05-04 13:30:43 +000021700for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021701do
21702as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21703{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21704echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21705if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21706 echo $ECHO_N "(cached) $ECHO_C" >&6
21707else
21708 cat >conftest.$ac_ext <<_ACEOF
21709/* confdefs.h. */
21710_ACEOF
21711cat confdefs.h >>conftest.$ac_ext
21712cat >>conftest.$ac_ext <<_ACEOF
21713/* end confdefs.h. */
21714/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21715 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21716#define $ac_func innocuous_$ac_func
21717
21718/* System header to define __stub macros and hopefully few prototypes,
21719 which can conflict with char $ac_func (); below.
21720 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21721 <limits.h> exists even on freestanding compilers. */
21722
21723#ifdef __STDC__
21724# include <limits.h>
21725#else
21726# include <assert.h>
21727#endif
21728
21729#undef $ac_func
21730
21731/* Override any GCC internal prototype to avoid an error.
21732 Use char because int might match the return type of a GCC
21733 builtin and then its argument prototype would still apply. */
21734#ifdef __cplusplus
21735extern "C"
21736#endif
21737char $ac_func ();
21738/* The GNU C library defines this for functions which it implements
21739 to always fail with ENOSYS. Some functions are actually named
21740 something starting with __ and the normal name is an alias. */
21741#if defined __stub_$ac_func || defined __stub___$ac_func
21742choke me
21743#endif
21744
21745int
21746main ()
21747{
21748return $ac_func ();
21749 ;
21750 return 0;
21751}
21752_ACEOF
21753rm -f conftest.$ac_objext conftest$ac_exeext
21754if { (ac_try="$ac_link"
21755case "(($ac_try" in
21756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21757 *) ac_try_echo=$ac_try;;
21758esac
21759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21760 (eval "$ac_link") 2>conftest.er1
21761 ac_status=$?
21762 grep -v '^ *+' conftest.er1 >conftest.err
21763 rm -f conftest.er1
21764 cat conftest.err >&5
21765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21766 (exit $ac_status); } && {
21767 test -z "$ac_c_werror_flag" ||
21768 test ! -s conftest.err
21769 } && test -s conftest$ac_exeext &&
21770 $as_test_x conftest$ac_exeext; then
21771 eval "$as_ac_var=yes"
21772else
21773 echo "$as_me: failed program was:" >&5
21774sed 's/^/| /' conftest.$ac_ext >&5
21775
21776 eval "$as_ac_var=no"
21777fi
21778
21779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21780 conftest$ac_exeext conftest.$ac_ext
21781fi
21782ac_res=`eval echo '${'$as_ac_var'}'`
21783 { echo "$as_me:$LINENO: result: $ac_res" >&5
21784echo "${ECHO_T}$ac_res" >&6; }
21785if test `eval echo '${'$as_ac_var'}'` = yes; then
21786 cat >>confdefs.h <<_ACEOF
21787#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21788_ACEOF
21789
21790fi
21791done
21792
Mark Dickinsone05e8402009-05-04 13:30:43 +000021793{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
21794echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
21795if test "${ac_cv_have_decl_isinf+set}" = set; then
21796 echo $ECHO_N "(cached) $ECHO_C" >&6
21797else
21798 cat >conftest.$ac_ext <<_ACEOF
21799/* confdefs.h. */
21800_ACEOF
21801cat confdefs.h >>conftest.$ac_ext
21802cat >>conftest.$ac_ext <<_ACEOF
21803/* end confdefs.h. */
21804#include <math.h>
21805
21806int
21807main ()
21808{
21809#ifndef isinf
21810 (void) isinf;
21811#endif
21812
21813 ;
21814 return 0;
21815}
21816_ACEOF
21817rm -f conftest.$ac_objext
21818if { (ac_try="$ac_compile"
21819case "(($ac_try" in
21820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21821 *) ac_try_echo=$ac_try;;
21822esac
21823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21824 (eval "$ac_compile") 2>conftest.er1
21825 ac_status=$?
21826 grep -v '^ *+' conftest.er1 >conftest.err
21827 rm -f conftest.er1
21828 cat conftest.err >&5
21829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21830 (exit $ac_status); } && {
21831 test -z "$ac_c_werror_flag" ||
21832 test ! -s conftest.err
21833 } && test -s conftest.$ac_objext; then
21834 ac_cv_have_decl_isinf=yes
21835else
21836 echo "$as_me: failed program was:" >&5
21837sed 's/^/| /' conftest.$ac_ext >&5
21838
21839 ac_cv_have_decl_isinf=no
21840fi
21841
21842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21843fi
21844{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
21845echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
21846if test $ac_cv_have_decl_isinf = yes; then
21847
21848cat >>confdefs.h <<_ACEOF
21849#define HAVE_DECL_ISINF 1
21850_ACEOF
21851
21852
21853else
21854 cat >>confdefs.h <<_ACEOF
21855#define HAVE_DECL_ISINF 0
21856_ACEOF
21857
21858
21859fi
21860{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
21861echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
21862if test "${ac_cv_have_decl_isnan+set}" = set; then
21863 echo $ECHO_N "(cached) $ECHO_C" >&6
21864else
21865 cat >conftest.$ac_ext <<_ACEOF
21866/* confdefs.h. */
21867_ACEOF
21868cat confdefs.h >>conftest.$ac_ext
21869cat >>conftest.$ac_ext <<_ACEOF
21870/* end confdefs.h. */
21871#include <math.h>
21872
21873int
21874main ()
21875{
21876#ifndef isnan
21877 (void) isnan;
21878#endif
21879
21880 ;
21881 return 0;
21882}
21883_ACEOF
21884rm -f conftest.$ac_objext
21885if { (ac_try="$ac_compile"
21886case "(($ac_try" in
21887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21888 *) ac_try_echo=$ac_try;;
21889esac
21890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21891 (eval "$ac_compile") 2>conftest.er1
21892 ac_status=$?
21893 grep -v '^ *+' conftest.er1 >conftest.err
21894 rm -f conftest.er1
21895 cat conftest.err >&5
21896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21897 (exit $ac_status); } && {
21898 test -z "$ac_c_werror_flag" ||
21899 test ! -s conftest.err
21900 } && test -s conftest.$ac_objext; then
21901 ac_cv_have_decl_isnan=yes
21902else
21903 echo "$as_me: failed program was:" >&5
21904sed 's/^/| /' conftest.$ac_ext >&5
21905
21906 ac_cv_have_decl_isnan=no
21907fi
21908
21909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21910fi
21911{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
21912echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
21913if test $ac_cv_have_decl_isnan = yes; then
21914
21915cat >>confdefs.h <<_ACEOF
21916#define HAVE_DECL_ISNAN 1
21917_ACEOF
21918
21919
21920else
21921 cat >>confdefs.h <<_ACEOF
21922#define HAVE_DECL_ISNAN 0
21923_ACEOF
21924
21925
21926fi
21927{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
21928echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
21929if test "${ac_cv_have_decl_isfinite+set}" = set; then
21930 echo $ECHO_N "(cached) $ECHO_C" >&6
21931else
21932 cat >conftest.$ac_ext <<_ACEOF
21933/* confdefs.h. */
21934_ACEOF
21935cat confdefs.h >>conftest.$ac_ext
21936cat >>conftest.$ac_ext <<_ACEOF
21937/* end confdefs.h. */
21938#include <math.h>
21939
21940int
21941main ()
21942{
21943#ifndef isfinite
21944 (void) isfinite;
21945#endif
21946
21947 ;
21948 return 0;
21949}
21950_ACEOF
21951rm -f conftest.$ac_objext
21952if { (ac_try="$ac_compile"
21953case "(($ac_try" in
21954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21955 *) ac_try_echo=$ac_try;;
21956esac
21957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21958 (eval "$ac_compile") 2>conftest.er1
21959 ac_status=$?
21960 grep -v '^ *+' conftest.er1 >conftest.err
21961 rm -f conftest.er1
21962 cat conftest.err >&5
21963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21964 (exit $ac_status); } && {
21965 test -z "$ac_c_werror_flag" ||
21966 test ! -s conftest.err
21967 } && test -s conftest.$ac_objext; then
21968 ac_cv_have_decl_isfinite=yes
21969else
21970 echo "$as_me: failed program was:" >&5
21971sed 's/^/| /' conftest.$ac_ext >&5
21972
21973 ac_cv_have_decl_isfinite=no
21974fi
21975
21976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21977fi
21978{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
21979echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
21980if test $ac_cv_have_decl_isfinite = yes; then
21981
21982cat >>confdefs.h <<_ACEOF
21983#define HAVE_DECL_ISFINITE 1
21984_ACEOF
21985
21986
21987else
21988 cat >>confdefs.h <<_ACEOF
21989#define HAVE_DECL_ISFINITE 0
21990_ACEOF
21991
21992
21993fi
21994
21995
Christian Heimes0a8143f2007-12-18 23:22:54 +000021996
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021997LIBS=$LIBS_SAVE
21998
Guido van Rossumef2255b2000-03-10 22:30:29 +000021999# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022000if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22002echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022003if test "${ac_cv_header_wchar_h+set}" = set; then
22004 echo $ECHO_N "(cached) $ECHO_C" >&6
22005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22007echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022008else
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022010{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22011echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022013/* confdefs.h. */
22014_ACEOF
22015cat confdefs.h >>conftest.$ac_ext
22016cat >>conftest.$ac_ext <<_ACEOF
22017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022018$ac_includes_default
22019#include <wchar.h>
22020_ACEOF
22021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022022if { (ac_try="$ac_compile"
22023case "(($ac_try" in
22024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22025 *) ac_try_echo=$ac_try;;
22026esac
22027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022030 grep -v '^ *+' conftest.er1 >conftest.err
22031 rm -f conftest.er1
22032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022034 (exit $ac_status); } && {
22035 test -z "$ac_c_werror_flag" ||
22036 test ! -s conftest.err
22037 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022038 ac_header_compiler=yes
22039else
22040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022041sed 's/^/| /' conftest.$ac_ext >&5
22042
Martin v. Löwiseba40652007-08-30 20:10:57 +000022043 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022045
22046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22047{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22048echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022049
22050# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22052echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022054/* confdefs.h. */
22055_ACEOF
22056cat confdefs.h >>conftest.$ac_ext
22057cat >>conftest.$ac_ext <<_ACEOF
22058/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022059#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022060_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061if { (ac_try="$ac_cpp conftest.$ac_ext"
22062case "(($ac_try" in
22063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22064 *) ac_try_echo=$ac_try;;
22065esac
22066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22067 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022068 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022069 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 rm -f conftest.er1
22071 cat conftest.err >&5
22072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022073 (exit $ac_status); } >/dev/null && {
22074 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22075 test ! -s conftest.err
22076 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022077 ac_header_preproc=yes
22078else
22079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022080sed 's/^/| /' conftest.$ac_ext >&5
22081
Martin v. Löwis11437992002-04-12 09:54:03 +000022082 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022084
Martin v. Löwis11437992002-04-12 09:54:03 +000022085rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022086{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22087echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022088
22089# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022090case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22091 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022092 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22093echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022094 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22095echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22096 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022097 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022098 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022099 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22100echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022101 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22102echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22103 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22104echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22105 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22106echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022107 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22108echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022109 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22110echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022111 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022112## ------------------------------------------------ ##
22113## Report this to http://www.python.org/python-bugs ##
22114## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022115_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022116 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022117 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022118esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022119{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22120echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022121if test "${ac_cv_header_wchar_h+set}" = set; then
22122 echo $ECHO_N "(cached) $ECHO_C" >&6
22123else
22124 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22127echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022128
22129fi
22130if test $ac_cv_header_wchar_h = yes; then
22131
22132
22133cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022134#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022135_ACEOF
22136
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022137 wchar_h="yes"
22138
Guido van Rossumef2255b2000-03-10 22:30:29 +000022139else
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022141
22142fi
22143
Michael W. Hudson54241132001-12-07 15:38:26 +000022144
Martin v. Löwis11437992002-04-12 09:54:03 +000022145
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022146# determine wchar_t size
22147if test "$wchar_h" = yes
22148then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022149 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22150echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022151if test "${ac_cv_type_wchar_t+set}" = set; then
22152 echo $ECHO_N "(cached) $ECHO_C" >&6
22153else
22154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022155/* confdefs.h. */
22156_ACEOF
22157cat confdefs.h >>conftest.$ac_ext
22158cat >>conftest.$ac_ext <<_ACEOF
22159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022160#include <wchar.h>
22161
Martin v. Löwiseba40652007-08-30 20:10:57 +000022162typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022163int
22164main ()
22165{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022167 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022168if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 return 0;
22170 ;
22171 return 0;
22172}
22173_ACEOF
22174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022175if { (ac_try="$ac_compile"
22176case "(($ac_try" in
22177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22178 *) ac_try_echo=$ac_try;;
22179esac
22180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022183 grep -v '^ *+' conftest.er1 >conftest.err
22184 rm -f conftest.er1
22185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022187 (exit $ac_status); } && {
22188 test -z "$ac_c_werror_flag" ||
22189 test ! -s conftest.err
22190 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 ac_cv_type_wchar_t=yes
22192else
22193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022194sed 's/^/| /' conftest.$ac_ext >&5
22195
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022197fi
Brett Cannon19fab762007-06-02 03:02:29 +000022198
Martin v. Löwiseba40652007-08-30 20:10:57 +000022199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22200fi
22201{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22202echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22203
22204# The cast to long int works around a bug in the HP C Compiler
22205# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22206# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22207# This bug is HP SR number 8606223364.
22208{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22209echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022210if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22211 echo $ECHO_N "(cached) $ECHO_C" >&6
22212else
Martin v. Löwis11437992002-04-12 09:54:03 +000022213 if test "$cross_compiling" = yes; then
22214 # Depending upon the size, compute the lo and hi bounds.
22215cat >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_))) >= 0)];
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_lo=0 ac_mid=0
22252 while :; do
22253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022254/* confdefs.h. */
22255_ACEOF
22256cat confdefs.h >>conftest.$ac_ext
22257cat >>conftest.$ac_ext <<_ACEOF
22258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022259#include <wchar.h>
22260
Martin v. Löwiseba40652007-08-30 20:10:57 +000022261 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022262int
22263main ()
22264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022266test_array [0] = 0
22267
22268 ;
22269 return 0;
22270}
22271_ACEOF
22272rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022273if { (ac_try="$ac_compile"
22274case "(($ac_try" in
22275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22276 *) ac_try_echo=$ac_try;;
22277esac
22278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022281 grep -v '^ *+' conftest.er1 >conftest.err
22282 rm -f conftest.er1
22283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022285 (exit $ac_status); } && {
22286 test -z "$ac_c_werror_flag" ||
22287 test ! -s conftest.err
22288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022289 ac_hi=$ac_mid; break
22290else
22291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022292sed 's/^/| /' conftest.$ac_ext >&5
22293
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294 ac_lo=`expr $ac_mid + 1`
22295 if test $ac_lo -le $ac_mid; then
22296 ac_lo= ac_hi=
22297 break
22298 fi
22299 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022301
22302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022303 done
22304else
22305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022306sed 's/^/| /' conftest.$ac_ext >&5
22307
Martin v. Löwiseba40652007-08-30 20:10:57 +000022308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022309/* confdefs.h. */
22310_ACEOF
22311cat confdefs.h >>conftest.$ac_ext
22312cat >>conftest.$ac_ext <<_ACEOF
22313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022314#include <wchar.h>
22315
Martin v. Löwiseba40652007-08-30 20:10:57 +000022316 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022317int
22318main ()
22319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022321test_array [0] = 0
22322
22323 ;
22324 return 0;
22325}
22326_ACEOF
22327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022328if { (ac_try="$ac_compile"
22329case "(($ac_try" in
22330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22331 *) ac_try_echo=$ac_try;;
22332esac
22333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022336 grep -v '^ *+' conftest.er1 >conftest.err
22337 rm -f conftest.er1
22338 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022340 (exit $ac_status); } && {
22341 test -z "$ac_c_werror_flag" ||
22342 test ! -s conftest.err
22343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022344 ac_hi=-1 ac_mid=-1
22345 while :; do
22346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022347/* confdefs.h. */
22348_ACEOF
22349cat confdefs.h >>conftest.$ac_ext
22350cat >>conftest.$ac_ext <<_ACEOF
22351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022352#include <wchar.h>
22353
Martin v. Löwiseba40652007-08-30 20:10:57 +000022354 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022355int
22356main ()
22357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022358static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022359test_array [0] = 0
22360
22361 ;
22362 return 0;
22363}
22364_ACEOF
22365rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022366if { (ac_try="$ac_compile"
22367case "(($ac_try" in
22368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22369 *) ac_try_echo=$ac_try;;
22370esac
22371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022374 grep -v '^ *+' conftest.er1 >conftest.err
22375 rm -f conftest.er1
22376 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378 (exit $ac_status); } && {
22379 test -z "$ac_c_werror_flag" ||
22380 test ! -s conftest.err
22381 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022382 ac_lo=$ac_mid; break
22383else
22384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022385sed 's/^/| /' conftest.$ac_ext >&5
22386
Martin v. Löwiseba40652007-08-30 20:10:57 +000022387 ac_hi=`expr '(' $ac_mid ')' - 1`
22388 if test $ac_mid -le $ac_hi; then
22389 ac_lo= ac_hi=
22390 break
22391 fi
22392 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394
22395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022396 done
22397else
22398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022399sed 's/^/| /' conftest.$ac_ext >&5
22400
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022403
22404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406
22407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022408# Binary search between lo and hi bounds.
22409while test "x$ac_lo" != "x$ac_hi"; do
22410 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022412/* confdefs.h. */
22413_ACEOF
22414cat confdefs.h >>conftest.$ac_ext
22415cat >>conftest.$ac_ext <<_ACEOF
22416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022417#include <wchar.h>
22418
Martin v. Löwiseba40652007-08-30 20:10:57 +000022419 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022420int
22421main ()
22422{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022424test_array [0] = 0
22425
22426 ;
22427 return 0;
22428}
22429_ACEOF
22430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022431if { (ac_try="$ac_compile"
22432case "(($ac_try" in
22433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22434 *) ac_try_echo=$ac_try;;
22435esac
22436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022439 grep -v '^ *+' conftest.er1 >conftest.err
22440 rm -f conftest.er1
22441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022443 (exit $ac_status); } && {
22444 test -z "$ac_c_werror_flag" ||
22445 test ! -s conftest.err
22446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022447 ac_hi=$ac_mid
22448else
22449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022450sed 's/^/| /' conftest.$ac_ext >&5
22451
Martin v. Löwiseba40652007-08-30 20:10:57 +000022452 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454
22455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022456done
22457case $ac_lo in
22458?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022459'') if test "$ac_cv_type_wchar_t" = yes; then
22460 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022461See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022463See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464 { (exit 77); exit 77; }; }
22465 else
22466 ac_cv_sizeof_wchar_t=0
22467 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022468esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022469else
Martin v. Löwis11437992002-04-12 09:54:03 +000022470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022471/* confdefs.h. */
22472_ACEOF
22473cat confdefs.h >>conftest.$ac_ext
22474cat >>conftest.$ac_ext <<_ACEOF
22475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022476#include <wchar.h>
22477
Martin v. Löwiseba40652007-08-30 20:10:57 +000022478 typedef wchar_t ac__type_sizeof_;
22479static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22480static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022481#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022482#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022483int
22484main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022485{
Martin v. Löwis11437992002-04-12 09:54:03 +000022486
22487 FILE *f = fopen ("conftest.val", "w");
22488 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022489 return 1;
22490 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022491 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022492 long int i = longval ();
22493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22494 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 fprintf (f, "%ld\n", i);
22496 }
22497 else
22498 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499 unsigned long int i = ulongval ();
22500 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22501 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022502 fprintf (f, "%lu\n", i);
22503 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022504 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022505
22506 ;
22507 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022508}
Martin v. Löwis11437992002-04-12 09:54:03 +000022509_ACEOF
22510rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511if { (ac_try="$ac_link"
22512case "(($ac_try" in
22513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22514 *) ac_try_echo=$ac_try;;
22515esac
22516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22517 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022518 ac_status=$?
22519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022521 { (case "(($ac_try" in
22522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22523 *) ac_try_echo=$ac_try;;
22524esac
22525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22526 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022527 ac_status=$?
22528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22529 (exit $ac_status); }; }; then
22530 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022531else
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 echo "$as_me: program exited with status $ac_status" >&5
22533echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022534sed 's/^/| /' conftest.$ac_ext >&5
22535
Martin v. Löwis11437992002-04-12 09:54:03 +000022536( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537if test "$ac_cv_type_wchar_t" = yes; then
22538 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022539See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022541See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022542 { (exit 77); exit 77; }; }
22543 else
22544 ac_cv_sizeof_wchar_t=0
22545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547rm -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 +000022548fi
22549rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022551{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22552echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22553
22554
22555
Martin v. Löwis11437992002-04-12 09:54:03 +000022556cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022557#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022558_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022559
Michael W. Hudson54241132001-12-07 15:38:26 +000022560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022561fi
22562
Martin v. Löwiseba40652007-08-30 20:10:57 +000022563{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22564echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022565have_ucs4_tcl=no
22566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022567/* confdefs.h. */
22568_ACEOF
22569cat confdefs.h >>conftest.$ac_ext
22570cat >>conftest.$ac_ext <<_ACEOF
22571/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022572
22573#include <tcl.h>
22574#if TCL_UTF_MAX != 6
22575# error "NOT UCS4_TCL"
22576#endif
22577int
22578main ()
22579{
22580
22581 ;
22582 return 0;
22583}
22584_ACEOF
22585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586if { (ac_try="$ac_compile"
22587case "(($ac_try" in
22588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22589 *) ac_try_echo=$ac_try;;
22590esac
22591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022594 grep -v '^ *+' conftest.er1 >conftest.err
22595 rm -f conftest.er1
22596 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022598 (exit $ac_status); } && {
22599 test -z "$ac_c_werror_flag" ||
22600 test ! -s conftest.err
22601 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022602
22603
22604cat >>confdefs.h <<\_ACEOF
22605#define HAVE_UCS4_TCL 1
22606_ACEOF
22607
22608 have_ucs4_tcl=yes
22609
22610else
22611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022612sed 's/^/| /' conftest.$ac_ext >&5
22613
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616
22617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22618{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22619echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022620
Skip Montanaro6dead952003-09-25 14:50:04 +000022621# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022622if test "$wchar_h" = yes
22623then
22624 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022625 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22626echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022627 if test "${ac_cv_wchar_t_signed+set}" = set; then
22628 echo $ECHO_N "(cached) $ECHO_C" >&6
22629else
22630
22631 if test "$cross_compiling" = yes; then
22632 ac_cv_wchar_t_signed=yes
22633else
22634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022635/* confdefs.h. */
22636_ACEOF
22637cat confdefs.h >>conftest.$ac_ext
22638cat >>conftest.$ac_ext <<_ACEOF
22639/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022640
22641 #include <wchar.h>
22642 int main()
22643 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022644 /* Success: exit code 0 */
22645 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022646 }
22647
22648_ACEOF
22649rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022650if { (ac_try="$ac_link"
22651case "(($ac_try" in
22652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22653 *) ac_try_echo=$ac_try;;
22654esac
22655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22656 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022657 ac_status=$?
22658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022660 { (case "(($ac_try" in
22661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22662 *) ac_try_echo=$ac_try;;
22663esac
22664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22665 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022666 ac_status=$?
22667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22668 (exit $ac_status); }; }; then
22669 ac_cv_wchar_t_signed=yes
22670else
22671 echo "$as_me: program exited with status $ac_status" >&5
22672echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022673sed 's/^/| /' conftest.$ac_ext >&5
22674
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022675( exit $ac_status )
22676ac_cv_wchar_t_signed=no
22677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678rm -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 +000022679fi
22680
Martin v. Löwiseba40652007-08-30 20:10:57 +000022681
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022682fi
22683
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22685echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22686fi
22687
22688{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22689echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22690# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022691if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022693else
22694 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022695fi
22696
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022697
22698if test $enable_unicode = yes
22699then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022700 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022701 case "$have_ucs4_tcl" in
22702 yes) enable_unicode="ucs4"
22703 ;;
22704 *) enable_unicode="ucs2"
22705 ;;
22706 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022707fi
22708
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022709
22710
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022711case "$enable_unicode" in
22712ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022713 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022714#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022715_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022716
22717 ;;
22718ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022719 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022720#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022721_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022722
22723 ;;
22724esac
22725
Michael W. Hudson54241132001-12-07 15:38:26 +000022726
Martin v. Löwis11437992002-04-12 09:54:03 +000022727
22728
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022729
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022730if test "$enable_unicode" = "no"
22731then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022732 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022733 { echo "$as_me:$LINENO: result: not used" >&5
22734echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022735else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022736 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022737
22738cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022739#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022740_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022741
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022742
22743 # wchar_t is only usable if it maps to an unsigned type
22744 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022745 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022746 then
22747 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022748
Martin v. Löwis11437992002-04-12 09:54:03 +000022749cat >>confdefs.h <<\_ACEOF
22750#define HAVE_USABLE_WCHAR_T 1
22751_ACEOF
22752
22753 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022754#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022755_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022756
22757 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22758 then
22759 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022760 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022761#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022762_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022763
22764 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22765 then
22766 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022767 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022768#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022769_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022770
22771 else
22772 PY_UNICODE_TYPE="no type found"
22773 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022774 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22775echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022776fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022777
22778# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022779{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22780echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022781if test "${ac_cv_c_bigendian+set}" = set; then
22782 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022783else
Martin v. Löwis11437992002-04-12 09:54:03 +000022784 # See if sys/param.h defines the BYTE_ORDER macro.
22785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022786/* confdefs.h. */
22787_ACEOF
22788cat confdefs.h >>conftest.$ac_ext
22789cat >>conftest.$ac_ext <<_ACEOF
22790/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022791#include <sys/types.h>
22792#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022793
Martin v. Löwis11437992002-04-12 09:54:03 +000022794int
22795main ()
22796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022797#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22798 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022799 bogus endian macros
22800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022801
22802 ;
22803 return 0;
22804}
22805_ACEOF
22806rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022807if { (ac_try="$ac_compile"
22808case "(($ac_try" in
22809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22810 *) ac_try_echo=$ac_try;;
22811esac
22812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022815 grep -v '^ *+' conftest.er1 >conftest.err
22816 rm -f conftest.er1
22817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819 (exit $ac_status); } && {
22820 test -z "$ac_c_werror_flag" ||
22821 test ! -s conftest.err
22822 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022823 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022825/* confdefs.h. */
22826_ACEOF
22827cat confdefs.h >>conftest.$ac_ext
22828cat >>conftest.$ac_ext <<_ACEOF
22829/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022830#include <sys/types.h>
22831#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022832
Martin v. Löwis11437992002-04-12 09:54:03 +000022833int
22834main ()
22835{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022836#if BYTE_ORDER != BIG_ENDIAN
22837 not big endian
22838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022839
22840 ;
22841 return 0;
22842}
22843_ACEOF
22844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022853 grep -v '^ *+' conftest.er1 >conftest.err
22854 rm -f conftest.er1
22855 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022857 (exit $ac_status); } && {
22858 test -z "$ac_c_werror_flag" ||
22859 test ! -s conftest.err
22860 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022861 ac_cv_c_bigendian=yes
22862else
Martin v. Löwis11437992002-04-12 09:54:03 +000022863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022864sed 's/^/| /' conftest.$ac_ext >&5
22865
Martin v. Löwiseba40652007-08-30 20:10:57 +000022866 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022868
22869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022870else
Martin v. Löwis11437992002-04-12 09:54:03 +000022871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022872sed 's/^/| /' conftest.$ac_ext >&5
22873
Martin v. Löwiseba40652007-08-30 20:10:57 +000022874 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022875if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022876 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022877 ac_cv_c_bigendian=unknown
22878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022879/* confdefs.h. */
22880_ACEOF
22881cat confdefs.h >>conftest.$ac_ext
22882cat >>conftest.$ac_ext <<_ACEOF
22883/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022884short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22885short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022886void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022887short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22888short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022889void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022890int
22891main ()
22892{
22893 _ascii (); _ebcdic ();
22894 ;
22895 return 0;
22896}
22897_ACEOF
22898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022899if { (ac_try="$ac_compile"
22900case "(($ac_try" in
22901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22902 *) ac_try_echo=$ac_try;;
22903esac
22904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022907 grep -v '^ *+' conftest.er1 >conftest.err
22908 rm -f conftest.er1
22909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022911 (exit $ac_status); } && {
22912 test -z "$ac_c_werror_flag" ||
22913 test ! -s conftest.err
22914 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022915 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022916 ac_cv_c_bigendian=yes
22917fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022918if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022919 if test "$ac_cv_c_bigendian" = unknown; then
22920 ac_cv_c_bigendian=no
22921 else
22922 # finding both strings is unlikely to happen, but who knows?
22923 ac_cv_c_bigendian=unknown
22924 fi
22925fi
22926else
22927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022928sed 's/^/| /' conftest.$ac_ext >&5
22929
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930
Martin v. Löwis11437992002-04-12 09:54:03 +000022931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022932
22933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022934else
22935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022936/* confdefs.h. */
22937_ACEOF
22938cat confdefs.h >>conftest.$ac_ext
22939cat >>conftest.$ac_ext <<_ACEOF
22940/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022942int
22943main ()
22944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022945
Guido van Rossumef2255b2000-03-10 22:30:29 +000022946 /* Are we little or big endian? From Harbison&Steele. */
22947 union
22948 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022949 long int l;
22950 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022951 } u;
22952 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953 return u.c[sizeof (long int) - 1] == 1;
22954
22955 ;
22956 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022957}
Martin v. Löwis11437992002-04-12 09:54:03 +000022958_ACEOF
22959rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960if { (ac_try="$ac_link"
22961case "(($ac_try" in
22962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22963 *) ac_try_echo=$ac_try;;
22964esac
22965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22966 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022967 ac_status=$?
22968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22969 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022970 { (case "(($ac_try" in
22971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22972 *) ac_try_echo=$ac_try;;
22973esac
22974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22975 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022976 ac_status=$?
22977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22978 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022979 ac_cv_c_bigendian=no
22980else
Martin v. Löwis11437992002-04-12 09:54:03 +000022981 echo "$as_me: program exited with status $ac_status" >&5
22982echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022983sed 's/^/| /' conftest.$ac_ext >&5
22984
Martin v. Löwis11437992002-04-12 09:54:03 +000022985( exit $ac_status )
22986ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022988rm -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 +000022989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022990
22991
Martin v. Löwis11437992002-04-12 09:54:03 +000022992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022993
22994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22997echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022998case $ac_cv_c_bigendian in
22999 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023000
Martin v. Löwis11437992002-04-12 09:54:03 +000023001cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023002#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023003_ACEOF
23004 ;;
23005 no)
23006 ;;
23007 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023008 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023009presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023010echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023011presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23012 { (exit 1); exit 1; }; } ;;
23013esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023014
Michael W. Hudson54241132001-12-07 15:38:26 +000023015
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023016# Check whether right shifting a negative integer extends the sign bit
23017# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23019echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023020if test "${ac_cv_rshift_extends_sign+set}" = set; then
23021 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023022else
Martin v. Löwis11437992002-04-12 09:54:03 +000023023
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023024if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023025 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023026else
Martin v. Löwis11437992002-04-12 09:54:03 +000023027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023028/* confdefs.h. */
23029_ACEOF
23030cat confdefs.h >>conftest.$ac_ext
23031cat >>conftest.$ac_ext <<_ACEOF
23032/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023033
23034int main()
23035{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023036 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023037}
23038
Martin v. Löwis11437992002-04-12 09:54:03 +000023039_ACEOF
23040rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023041if { (ac_try="$ac_link"
23042case "(($ac_try" in
23043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23044 *) ac_try_echo=$ac_try;;
23045esac
23046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23047 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023048 ac_status=$?
23049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023051 { (case "(($ac_try" in
23052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23053 *) ac_try_echo=$ac_try;;
23054esac
23055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23056 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023057 ac_status=$?
23058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23059 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023060 ac_cv_rshift_extends_sign=yes
23061else
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 echo "$as_me: program exited with status $ac_status" >&5
23063echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023064sed 's/^/| /' conftest.$ac_ext >&5
23065
Martin v. Löwis11437992002-04-12 09:54:03 +000023066( exit $ac_status )
23067ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069rm -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 +000023070fi
23071
Martin v. Löwiseba40652007-08-30 20:10:57 +000023072
23073fi
23074
23075{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23076echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023077if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023078then
Martin v. Löwis11437992002-04-12 09:54:03 +000023079
23080cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023081#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023082_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023083
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023084fi
23085
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023086# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023087{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23088echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023089if test "${ac_cv_have_getc_unlocked+set}" = set; then
23090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023091else
Martin v. Löwis11437992002-04-12 09:54:03 +000023092
23093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023094/* confdefs.h. */
23095_ACEOF
23096cat confdefs.h >>conftest.$ac_ext
23097cat >>conftest.$ac_ext <<_ACEOF
23098/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023099#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023100int
23101main ()
23102{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023103
23104 FILE *f = fopen("/dev/null", "r");
23105 flockfile(f);
23106 getc_unlocked(f);
23107 funlockfile(f);
23108
Martin v. Löwis11437992002-04-12 09:54:03 +000023109 ;
23110 return 0;
23111}
23112_ACEOF
23113rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023114if { (ac_try="$ac_link"
23115case "(($ac_try" in
23116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23117 *) ac_try_echo=$ac_try;;
23118esac
23119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23120 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023122 grep -v '^ *+' conftest.er1 >conftest.err
23123 rm -f conftest.er1
23124 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023126 (exit $ac_status); } && {
23127 test -z "$ac_c_werror_flag" ||
23128 test ! -s conftest.err
23129 } && test -s conftest$ac_exeext &&
23130 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023131 ac_cv_have_getc_unlocked=yes
23132else
Martin v. Löwis11437992002-04-12 09:54:03 +000023133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023134sed 's/^/| /' conftest.$ac_ext >&5
23135
Martin v. Löwiseba40652007-08-30 20:10:57 +000023136 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023138
23139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023140 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023141fi
23142
Martin v. Löwiseba40652007-08-30 20:10:57 +000023143{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23144echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023145if test "$ac_cv_have_getc_unlocked" = yes
23146then
Martin v. Löwis11437992002-04-12 09:54:03 +000023147
23148cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023149#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023150_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023151
23152fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023153
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023154# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023155# save the value of LIBS so we don't actually link Python with readline
23156LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023157
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023158# On some systems we need to link readline to a termcap compatible
23159# library. NOTE: Keep the precedence of listed libraries synchronised
23160# with setup.py.
23161py_cv_lib_readline=no
23162{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23163echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23164for py_libtermcap in "" ncursesw ncurses curses termcap; do
23165 if test -z "$py_libtermcap"; then
23166 READLINE_LIBS="-lreadline"
23167 else
23168 READLINE_LIBS="-lreadline -l$py_libtermcap"
23169 fi
23170 LIBS="$READLINE_LIBS $LIBS_no_readline"
23171 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023172/* confdefs.h. */
23173_ACEOF
23174cat confdefs.h >>conftest.$ac_ext
23175cat >>conftest.$ac_ext <<_ACEOF
23176/* end confdefs.h. */
23177
Martin v. Löwiseba40652007-08-30 20:10:57 +000023178/* Override any GCC internal prototype to avoid an error.
23179 Use char because int might match the return type of a GCC
23180 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023181#ifdef __cplusplus
23182extern "C"
23183#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023184char readline ();
23185int
23186main ()
23187{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023188return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023189 ;
23190 return 0;
23191}
23192_ACEOF
23193rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023194if { (ac_try="$ac_link"
23195case "(($ac_try" in
23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23197 *) ac_try_echo=$ac_try;;
23198esac
23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23200 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023201 ac_status=$?
23202 grep -v '^ *+' conftest.er1 >conftest.err
23203 rm -f conftest.er1
23204 cat conftest.err >&5
23205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023206 (exit $ac_status); } && {
23207 test -z "$ac_c_werror_flag" ||
23208 test ! -s conftest.err
23209 } && test -s conftest$ac_exeext &&
23210 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023211 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023212else
23213 echo "$as_me: failed program was:" >&5
23214sed 's/^/| /' conftest.$ac_ext >&5
23215
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023216
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023218
23219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023220 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023221 if test $py_cv_lib_readline = yes; then
23222 break
23223 fi
23224done
23225# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23226#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023227if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023228 { echo "$as_me:$LINENO: result: none" >&5
23229echo "${ECHO_T}none" >&6; }
23230else
23231 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23232echo "${ECHO_T}$READLINE_LIBS" >&6; }
23233
23234cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023235#define HAVE_LIBREADLINE 1
23236_ACEOF
23237
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023238fi
23239
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023240# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023241{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23242echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023243if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23244 echo $ECHO_N "(cached) $ECHO_C" >&6
23245else
23246 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023247LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023248cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023249/* confdefs.h. */
23250_ACEOF
23251cat confdefs.h >>conftest.$ac_ext
23252cat >>conftest.$ac_ext <<_ACEOF
23253/* end confdefs.h. */
23254
Martin v. Löwiseba40652007-08-30 20:10:57 +000023255/* Override any GCC internal prototype to avoid an error.
23256 Use char because int might match the return type of a GCC
23257 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023258#ifdef __cplusplus
23259extern "C"
23260#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023261char rl_callback_handler_install ();
23262int
23263main ()
23264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023265return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023266 ;
23267 return 0;
23268}
23269_ACEOF
23270rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023271if { (ac_try="$ac_link"
23272case "(($ac_try" in
23273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23274 *) ac_try_echo=$ac_try;;
23275esac
23276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23277 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023279 grep -v '^ *+' conftest.er1 >conftest.err
23280 rm -f conftest.er1
23281 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023283 (exit $ac_status); } && {
23284 test -z "$ac_c_werror_flag" ||
23285 test ! -s conftest.err
23286 } && test -s conftest$ac_exeext &&
23287 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023288 ac_cv_lib_readline_rl_callback_handler_install=yes
23289else
23290 echo "$as_me: failed program was:" >&5
23291sed 's/^/| /' conftest.$ac_ext >&5
23292
Martin v. Löwiseba40652007-08-30 20:10:57 +000023293 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023295
23296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023297 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023298LIBS=$ac_check_lib_save_LIBS
23299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023300{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23301echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023302if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23303
23304cat >>confdefs.h <<\_ACEOF
23305#define HAVE_RL_CALLBACK 1
23306_ACEOF
23307
23308fi
23309
23310
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023311# check for readline 2.2
23312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023313/* confdefs.h. */
23314_ACEOF
23315cat confdefs.h >>conftest.$ac_ext
23316cat >>conftest.$ac_ext <<_ACEOF
23317/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023318#include <readline/readline.h>
23319_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023320if { (ac_try="$ac_cpp conftest.$ac_ext"
23321case "(($ac_try" in
23322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23323 *) ac_try_echo=$ac_try;;
23324esac
23325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23326 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023327 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023328 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023329 rm -f conftest.er1
23330 cat conftest.err >&5
23331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023332 (exit $ac_status); } >/dev/null && {
23333 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23334 test ! -s conftest.err
23335 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023336 have_readline=yes
23337else
23338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023339sed 's/^/| /' conftest.$ac_ext >&5
23340
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023341 have_readline=no
23342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023344rm -f conftest.err conftest.$ac_ext
23345if test $have_readline = yes
23346then
23347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023348/* confdefs.h. */
23349_ACEOF
23350cat confdefs.h >>conftest.$ac_ext
23351cat >>conftest.$ac_ext <<_ACEOF
23352/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023353#include <readline/readline.h>
23354
23355_ACEOF
23356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023357 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023358
23359cat >>confdefs.h <<\_ACEOF
23360#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23361_ACEOF
23362
23363fi
23364rm -f conftest*
23365
23366fi
23367
Martin v. Löwis0daad592001-09-30 21:09:59 +000023368# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023369{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23370echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023371if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23372 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023373else
Martin v. Löwis11437992002-04-12 09:54:03 +000023374 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023375LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023377/* confdefs.h. */
23378_ACEOF
23379cat confdefs.h >>conftest.$ac_ext
23380cat >>conftest.$ac_ext <<_ACEOF
23381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023382
Martin v. Löwiseba40652007-08-30 20:10:57 +000023383/* Override any GCC internal prototype to avoid an error.
23384 Use char because int might match the return type of a GCC
23385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023386#ifdef __cplusplus
23387extern "C"
23388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023389char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023390int
23391main ()
23392{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023393return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023394 ;
23395 return 0;
23396}
23397_ACEOF
23398rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399if { (ac_try="$ac_link"
23400case "(($ac_try" in
23401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23402 *) ac_try_echo=$ac_try;;
23403esac
23404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23405 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023407 grep -v '^ *+' conftest.er1 >conftest.err
23408 rm -f conftest.er1
23409 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023411 (exit $ac_status); } && {
23412 test -z "$ac_c_werror_flag" ||
23413 test ! -s conftest.err
23414 } && test -s conftest$ac_exeext &&
23415 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023416 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023417else
Martin v. Löwis11437992002-04-12 09:54:03 +000023418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023419sed 's/^/| /' conftest.$ac_ext >&5
23420
Martin v. Löwiseba40652007-08-30 20:10:57 +000023421 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023423
23424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023426LIBS=$ac_check_lib_save_LIBS
23427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023428{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23429echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023430if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023431
Martin v. Löwis11437992002-04-12 09:54:03 +000023432cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023433#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023434_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023435
Martin v. Löwis0daad592001-09-30 21:09:59 +000023436fi
23437
Michael W. Hudson54241132001-12-07 15:38:26 +000023438
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023439# also in 4.0
23440{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23441echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23442if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23443 echo $ECHO_N "(cached) $ECHO_C" >&6
23444else
23445 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023446LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023447cat >conftest.$ac_ext <<_ACEOF
23448/* confdefs.h. */
23449_ACEOF
23450cat confdefs.h >>conftest.$ac_ext
23451cat >>conftest.$ac_ext <<_ACEOF
23452/* end confdefs.h. */
23453
23454/* Override any GCC internal prototype to avoid an error.
23455 Use char because int might match the return type of a GCC
23456 builtin and then its argument prototype would still apply. */
23457#ifdef __cplusplus
23458extern "C"
23459#endif
23460char rl_completion_display_matches_hook ();
23461int
23462main ()
23463{
23464return rl_completion_display_matches_hook ();
23465 ;
23466 return 0;
23467}
23468_ACEOF
23469rm -f conftest.$ac_objext conftest$ac_exeext
23470if { (ac_try="$ac_link"
23471case "(($ac_try" in
23472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23473 *) ac_try_echo=$ac_try;;
23474esac
23475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23476 (eval "$ac_link") 2>conftest.er1
23477 ac_status=$?
23478 grep -v '^ *+' conftest.er1 >conftest.err
23479 rm -f conftest.er1
23480 cat conftest.err >&5
23481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23482 (exit $ac_status); } && {
23483 test -z "$ac_c_werror_flag" ||
23484 test ! -s conftest.err
23485 } && test -s conftest$ac_exeext &&
23486 $as_test_x conftest$ac_exeext; then
23487 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23488else
23489 echo "$as_me: failed program was:" >&5
23490sed 's/^/| /' conftest.$ac_ext >&5
23491
23492 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23493fi
23494
23495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23496 conftest$ac_exeext conftest.$ac_ext
23497LIBS=$ac_check_lib_save_LIBS
23498fi
23499{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23500echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23501if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23502
23503cat >>confdefs.h <<\_ACEOF
23504#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23505_ACEOF
23506
23507fi
23508
23509
Martin v. Löwis0daad592001-09-30 21:09:59 +000023510# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023511{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23512echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023513if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23514 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023515else
Martin v. Löwis11437992002-04-12 09:54:03 +000023516 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023517LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023519/* confdefs.h. */
23520_ACEOF
23521cat confdefs.h >>conftest.$ac_ext
23522cat >>conftest.$ac_ext <<_ACEOF
23523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023524
Martin v. Löwiseba40652007-08-30 20:10:57 +000023525/* Override any GCC internal prototype to avoid an error.
23526 Use char because int might match the return type of a GCC
23527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023528#ifdef __cplusplus
23529extern "C"
23530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023531char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023532int
23533main ()
23534{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023535return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023536 ;
23537 return 0;
23538}
23539_ACEOF
23540rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023541if { (ac_try="$ac_link"
23542case "(($ac_try" in
23543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23544 *) ac_try_echo=$ac_try;;
23545esac
23546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23547 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023549 grep -v '^ *+' conftest.er1 >conftest.err
23550 rm -f conftest.er1
23551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023553 (exit $ac_status); } && {
23554 test -z "$ac_c_werror_flag" ||
23555 test ! -s conftest.err
23556 } && test -s conftest$ac_exeext &&
23557 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023558 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023559else
Martin v. Löwis11437992002-04-12 09:54:03 +000023560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023561sed 's/^/| /' conftest.$ac_ext >&5
23562
Martin v. Löwiseba40652007-08-30 20:10:57 +000023563 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023565
23566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023568LIBS=$ac_check_lib_save_LIBS
23569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023570{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23571echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023572if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023573
Martin v. Löwis11437992002-04-12 09:54:03 +000023574cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023575#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023576_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023577
Guido van Rossum353ae582001-07-10 16:45:32 +000023578fi
23579
Jack Jansendd19cf82001-12-06 22:36:17 +000023580
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023581# also in readline 4.2
23582cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023583/* confdefs.h. */
23584_ACEOF
23585cat confdefs.h >>conftest.$ac_ext
23586cat >>conftest.$ac_ext <<_ACEOF
23587/* end confdefs.h. */
23588#include <readline/readline.h>
23589_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023590if { (ac_try="$ac_cpp conftest.$ac_ext"
23591case "(($ac_try" in
23592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23593 *) ac_try_echo=$ac_try;;
23594esac
23595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23596 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023597 ac_status=$?
23598 grep -v '^ *+' conftest.er1 >conftest.err
23599 rm -f conftest.er1
23600 cat conftest.err >&5
23601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023602 (exit $ac_status); } >/dev/null && {
23603 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23604 test ! -s conftest.err
23605 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023606 have_readline=yes
23607else
23608 echo "$as_me: failed program was:" >&5
23609sed 's/^/| /' conftest.$ac_ext >&5
23610
23611 have_readline=no
23612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023614rm -f conftest.err conftest.$ac_ext
23615if test $have_readline = yes
23616then
23617 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023618/* confdefs.h. */
23619_ACEOF
23620cat confdefs.h >>conftest.$ac_ext
23621cat >>conftest.$ac_ext <<_ACEOF
23622/* end confdefs.h. */
23623#include <readline/readline.h>
23624
23625_ACEOF
23626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23627 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23628
23629cat >>confdefs.h <<\_ACEOF
23630#define HAVE_RL_CATCH_SIGNAL 1
23631_ACEOF
23632
23633fi
23634rm -f conftest*
23635
23636fi
23637
Martin v. Löwis82bca632006-02-10 20:49:30 +000023638# End of readline checks: restore LIBS
23639LIBS=$LIBS_no_readline
23640
Martin v. Löwiseba40652007-08-30 20:10:57 +000023641{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23642echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023643if test "${ac_cv_broken_nice+set}" = set; then
23644 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023645else
Martin v. Löwis11437992002-04-12 09:54:03 +000023646
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023647if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023648 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023649else
Martin v. Löwis11437992002-04-12 09:54:03 +000023650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023651/* confdefs.h. */
23652_ACEOF
23653cat confdefs.h >>conftest.$ac_ext
23654cat >>conftest.$ac_ext <<_ACEOF
23655/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023656
23657int main()
23658{
23659 int val1 = nice(1);
23660 if (val1 != -1 && val1 == nice(2))
23661 exit(0);
23662 exit(1);
23663}
23664
Martin v. Löwis11437992002-04-12 09:54:03 +000023665_ACEOF
23666rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023667if { (ac_try="$ac_link"
23668case "(($ac_try" in
23669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23670 *) ac_try_echo=$ac_try;;
23671esac
23672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23673 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023674 ac_status=$?
23675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023677 { (case "(($ac_try" in
23678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23679 *) ac_try_echo=$ac_try;;
23680esac
23681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23682 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023683 ac_status=$?
23684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23685 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023686 ac_cv_broken_nice=yes
23687else
Martin v. Löwis11437992002-04-12 09:54:03 +000023688 echo "$as_me: program exited with status $ac_status" >&5
23689echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023690sed 's/^/| /' conftest.$ac_ext >&5
23691
Martin v. Löwis11437992002-04-12 09:54:03 +000023692( exit $ac_status )
23693ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023695rm -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 +000023696fi
23697
Martin v. Löwiseba40652007-08-30 20:10:57 +000023698
23699fi
23700
23701{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23702echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023703if test "$ac_cv_broken_nice" = yes
23704then
Martin v. Löwis11437992002-04-12 09:54:03 +000023705
23706cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023707#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023708_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023709
23710fi
23711
Martin v. Löwiseba40652007-08-30 20:10:57 +000023712{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23713echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023714if test "$cross_compiling" = yes; then
23715 ac_cv_broken_poll=no
23716else
23717 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023718/* confdefs.h. */
23719_ACEOF
23720cat confdefs.h >>conftest.$ac_ext
23721cat >>conftest.$ac_ext <<_ACEOF
23722/* end confdefs.h. */
23723
23724#include <poll.h>
23725
23726int main (void)
23727 {
23728 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23729
23730 close (42);
23731
23732 int poll_test = poll (&poll_struct, 1, 0);
23733
23734 if (poll_test < 0)
23735 {
23736 exit(0);
23737 }
23738 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23739 {
23740 exit(0);
23741 }
23742 else
23743 {
23744 exit(1);
23745 }
23746 }
23747
23748_ACEOF
23749rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023750if { (ac_try="$ac_link"
23751case "(($ac_try" in
23752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23753 *) ac_try_echo=$ac_try;;
23754esac
23755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23756 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023757 ac_status=$?
23758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023760 { (case "(($ac_try" in
23761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23762 *) ac_try_echo=$ac_try;;
23763esac
23764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23765 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023766 ac_status=$?
23767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23768 (exit $ac_status); }; }; then
23769 ac_cv_broken_poll=yes
23770else
23771 echo "$as_me: program exited with status $ac_status" >&5
23772echo "$as_me: failed program was:" >&5
23773sed 's/^/| /' conftest.$ac_ext >&5
23774
23775( exit $ac_status )
23776ac_cv_broken_poll=no
23777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778rm -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 +000023779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023780
23781
23782{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23783echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023784if test "$ac_cv_broken_poll" = yes
23785then
23786
23787cat >>confdefs.h <<\_ACEOF
23788#define HAVE_BROKEN_POLL 1
23789_ACEOF
23790
23791fi
23792
Brett Cannon43802422005-02-10 20:48:03 +000023793# 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 +000023794# (which is not required by ISO C or UNIX spec) and/or if we support
23795# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23797echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023798if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23799 echo $ECHO_N "(cached) $ECHO_C" >&6
23800else
23801 cat >conftest.$ac_ext <<_ACEOF
23802/* confdefs.h. */
23803_ACEOF
23804cat confdefs.h >>conftest.$ac_ext
23805cat >>conftest.$ac_ext <<_ACEOF
23806/* end confdefs.h. */
23807#include <sys/types.h>
23808#include <$ac_cv_struct_tm>
23809
23810
23811int
23812main ()
23813{
23814static struct tm ac_aggr;
23815if (ac_aggr.tm_zone)
23816return 0;
23817 ;
23818 return 0;
23819}
23820_ACEOF
23821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822if { (ac_try="$ac_compile"
23823case "(($ac_try" in
23824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23825 *) ac_try_echo=$ac_try;;
23826esac
23827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23828 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023829 ac_status=$?
23830 grep -v '^ *+' conftest.er1 >conftest.err
23831 rm -f conftest.er1
23832 cat conftest.err >&5
23833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023834 (exit $ac_status); } && {
23835 test -z "$ac_c_werror_flag" ||
23836 test ! -s conftest.err
23837 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023838 ac_cv_member_struct_tm_tm_zone=yes
23839else
23840 echo "$as_me: failed program was:" >&5
23841sed 's/^/| /' conftest.$ac_ext >&5
23842
Martin v. Löwiseba40652007-08-30 20:10:57 +000023843 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023844/* confdefs.h. */
23845_ACEOF
23846cat confdefs.h >>conftest.$ac_ext
23847cat >>conftest.$ac_ext <<_ACEOF
23848/* end confdefs.h. */
23849#include <sys/types.h>
23850#include <$ac_cv_struct_tm>
23851
23852
23853int
23854main ()
23855{
23856static struct tm ac_aggr;
23857if (sizeof ac_aggr.tm_zone)
23858return 0;
23859 ;
23860 return 0;
23861}
23862_ACEOF
23863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023864if { (ac_try="$ac_compile"
23865case "(($ac_try" in
23866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23867 *) ac_try_echo=$ac_try;;
23868esac
23869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23870 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023871 ac_status=$?
23872 grep -v '^ *+' conftest.er1 >conftest.err
23873 rm -f conftest.er1
23874 cat conftest.err >&5
23875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023876 (exit $ac_status); } && {
23877 test -z "$ac_c_werror_flag" ||
23878 test ! -s conftest.err
23879 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023880 ac_cv_member_struct_tm_tm_zone=yes
23881else
23882 echo "$as_me: failed program was:" >&5
23883sed 's/^/| /' conftest.$ac_ext >&5
23884
Martin v. Löwiseba40652007-08-30 20:10:57 +000023885 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023887
23888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023890
23891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023893{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23894echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023895if test $ac_cv_member_struct_tm_tm_zone = yes; then
23896
23897cat >>confdefs.h <<_ACEOF
23898#define HAVE_STRUCT_TM_TM_ZONE 1
23899_ACEOF
23900
23901
23902fi
23903
23904if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23905
23906cat >>confdefs.h <<\_ACEOF
23907#define HAVE_TM_ZONE 1
23908_ACEOF
23909
23910else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023911 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23912echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23913if test "${ac_cv_have_decl_tzname+set}" = set; then
23914 echo $ECHO_N "(cached) $ECHO_C" >&6
23915else
23916 cat >conftest.$ac_ext <<_ACEOF
23917/* confdefs.h. */
23918_ACEOF
23919cat confdefs.h >>conftest.$ac_ext
23920cat >>conftest.$ac_ext <<_ACEOF
23921/* end confdefs.h. */
23922#include <time.h>
23923
23924int
23925main ()
23926{
23927#ifndef tzname
23928 (void) tzname;
23929#endif
23930
23931 ;
23932 return 0;
23933}
23934_ACEOF
23935rm -f conftest.$ac_objext
23936if { (ac_try="$ac_compile"
23937case "(($ac_try" in
23938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23939 *) ac_try_echo=$ac_try;;
23940esac
23941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23942 (eval "$ac_compile") 2>conftest.er1
23943 ac_status=$?
23944 grep -v '^ *+' conftest.er1 >conftest.err
23945 rm -f conftest.er1
23946 cat conftest.err >&5
23947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23948 (exit $ac_status); } && {
23949 test -z "$ac_c_werror_flag" ||
23950 test ! -s conftest.err
23951 } && test -s conftest.$ac_objext; then
23952 ac_cv_have_decl_tzname=yes
23953else
23954 echo "$as_me: failed program was:" >&5
23955sed 's/^/| /' conftest.$ac_ext >&5
23956
23957 ac_cv_have_decl_tzname=no
23958fi
23959
23960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23961fi
23962{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23963echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23964if test $ac_cv_have_decl_tzname = yes; then
23965
23966cat >>confdefs.h <<_ACEOF
23967#define HAVE_DECL_TZNAME 1
23968_ACEOF
23969
23970
23971else
23972 cat >>confdefs.h <<_ACEOF
23973#define HAVE_DECL_TZNAME 0
23974_ACEOF
23975
23976
23977fi
23978
23979
23980 { echo "$as_me:$LINENO: checking for tzname" >&5
23981echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023982if test "${ac_cv_var_tzname+set}" = set; then
23983 echo $ECHO_N "(cached) $ECHO_C" >&6
23984else
23985 cat >conftest.$ac_ext <<_ACEOF
23986/* confdefs.h. */
23987_ACEOF
23988cat confdefs.h >>conftest.$ac_ext
23989cat >>conftest.$ac_ext <<_ACEOF
23990/* end confdefs.h. */
23991#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023992#if !HAVE_DECL_TZNAME
23993extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023994#endif
23995
23996int
23997main ()
23998{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023999return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024000 ;
24001 return 0;
24002}
24003_ACEOF
24004rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024005if { (ac_try="$ac_link"
24006case "(($ac_try" in
24007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24008 *) ac_try_echo=$ac_try;;
24009esac
24010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24011 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024012 ac_status=$?
24013 grep -v '^ *+' conftest.er1 >conftest.err
24014 rm -f conftest.er1
24015 cat conftest.err >&5
24016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024017 (exit $ac_status); } && {
24018 test -z "$ac_c_werror_flag" ||
24019 test ! -s conftest.err
24020 } && test -s conftest$ac_exeext &&
24021 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024022 ac_cv_var_tzname=yes
24023else
24024 echo "$as_me: failed program was:" >&5
24025sed 's/^/| /' conftest.$ac_ext >&5
24026
Martin v. Löwiseba40652007-08-30 20:10:57 +000024027 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024029
24030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024031 conftest$ac_exeext conftest.$ac_ext
24032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024033{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24034echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024035 if test $ac_cv_var_tzname = yes; then
24036
24037cat >>confdefs.h <<\_ACEOF
24038#define HAVE_TZNAME 1
24039_ACEOF
24040
24041 fi
24042fi
24043
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024044
Martin v. Löwis1d459062005-03-14 21:23:33 +000024045# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24047echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024048if test "${ac_cv_working_tzset+set}" = set; then
24049 echo $ECHO_N "(cached) $ECHO_C" >&6
24050else
24051
24052if test "$cross_compiling" = yes; then
24053 ac_cv_working_tzset=no
24054else
24055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024056/* confdefs.h. */
24057_ACEOF
24058cat confdefs.h >>conftest.$ac_ext
24059cat >>conftest.$ac_ext <<_ACEOF
24060/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024061
24062#include <stdlib.h>
24063#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024064#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024065
24066#if HAVE_TZNAME
24067extern char *tzname[];
24068#endif
24069
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024070int main()
24071{
Brett Cannon18367812003-09-19 00:59:16 +000024072 /* Note that we need to ensure that not only does tzset(3)
24073 do 'something' with localtime, but it works as documented
24074 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024075 This includes making sure that tzname is set properly if
24076 tm->tm_zone does not exist since it is the alternative way
24077 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024078
24079 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024080 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024081 */
24082
Martin v. Löwis1d459062005-03-14 21:23:33 +000024083 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024084 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24085
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024086 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024087 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024088 if (localtime(&groundhogday)->tm_hour != 0)
24089 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024090#if HAVE_TZNAME
24091 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24092 if (strcmp(tzname[0], "UTC") ||
24093 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24094 exit(1);
24095#endif
Brett Cannon18367812003-09-19 00:59:16 +000024096
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024097 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024098 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024099 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024100 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024101#if HAVE_TZNAME
24102 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24103 exit(1);
24104#endif
Brett Cannon18367812003-09-19 00:59:16 +000024105
24106 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24107 tzset();
24108 if (localtime(&groundhogday)->tm_hour != 11)
24109 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024110#if HAVE_TZNAME
24111 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24112 exit(1);
24113#endif
24114
24115#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024116 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24117 exit(1);
24118 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24119 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024120#endif
Brett Cannon18367812003-09-19 00:59:16 +000024121
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024122 exit(0);
24123}
24124
24125_ACEOF
24126rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024127if { (ac_try="$ac_link"
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_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024134 ac_status=$?
24135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024137 { (case "(($ac_try" in
24138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24139 *) ac_try_echo=$ac_try;;
24140esac
24141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24142 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024143 ac_status=$?
24144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24145 (exit $ac_status); }; }; then
24146 ac_cv_working_tzset=yes
24147else
24148 echo "$as_me: program exited with status $ac_status" >&5
24149echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024150sed 's/^/| /' conftest.$ac_ext >&5
24151
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024152( exit $ac_status )
24153ac_cv_working_tzset=no
24154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024155rm -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 +000024156fi
24157
Martin v. Löwiseba40652007-08-30 20:10:57 +000024158
24159fi
24160
24161{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24162echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024163if test "$ac_cv_working_tzset" = yes
24164then
24165
24166cat >>confdefs.h <<\_ACEOF
24167#define HAVE_WORKING_TZSET 1
24168_ACEOF
24169
24170fi
24171
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024172# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024173{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24174echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024175if test "${ac_cv_stat_tv_nsec+set}" = set; then
24176 echo $ECHO_N "(cached) $ECHO_C" >&6
24177else
24178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024179/* confdefs.h. */
24180_ACEOF
24181cat confdefs.h >>conftest.$ac_ext
24182cat >>conftest.$ac_ext <<_ACEOF
24183/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024184#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024185int
24186main ()
24187{
24188
24189struct stat st;
24190st.st_mtim.tv_nsec = 1;
24191
24192 ;
24193 return 0;
24194}
24195_ACEOF
24196rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024197if { (ac_try="$ac_compile"
24198case "(($ac_try" in
24199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24200 *) ac_try_echo=$ac_try;;
24201esac
24202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024205 grep -v '^ *+' conftest.er1 >conftest.err
24206 rm -f conftest.er1
24207 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024209 (exit $ac_status); } && {
24210 test -z "$ac_c_werror_flag" ||
24211 test ! -s conftest.err
24212 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024213 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024214else
24215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024216sed 's/^/| /' conftest.$ac_ext >&5
24217
Martin v. Löwiseba40652007-08-30 20:10:57 +000024218 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024219fi
24220
Martin v. Löwiseba40652007-08-30 20:10:57 +000024221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24222fi
24223
24224{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24225echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024226if test "$ac_cv_stat_tv_nsec" = yes
24227then
24228
24229cat >>confdefs.h <<\_ACEOF
24230#define HAVE_STAT_TV_NSEC 1
24231_ACEOF
24232
24233fi
24234
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024235# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024236{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24237echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024238if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24239 echo $ECHO_N "(cached) $ECHO_C" >&6
24240else
24241 cat >conftest.$ac_ext <<_ACEOF
24242/* confdefs.h. */
24243_ACEOF
24244cat confdefs.h >>conftest.$ac_ext
24245cat >>conftest.$ac_ext <<_ACEOF
24246/* end confdefs.h. */
24247#include <sys/stat.h>
24248int
24249main ()
24250{
24251
24252struct stat st;
24253st.st_mtimespec.tv_nsec = 1;
24254
24255 ;
24256 return 0;
24257}
24258_ACEOF
24259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024260if { (ac_try="$ac_compile"
24261case "(($ac_try" in
24262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24263 *) ac_try_echo=$ac_try;;
24264esac
24265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024267 ac_status=$?
24268 grep -v '^ *+' conftest.er1 >conftest.err
24269 rm -f conftest.er1
24270 cat conftest.err >&5
24271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024272 (exit $ac_status); } && {
24273 test -z "$ac_c_werror_flag" ||
24274 test ! -s conftest.err
24275 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024276 ac_cv_stat_tv_nsec2=yes
24277else
24278 echo "$as_me: failed program was:" >&5
24279sed 's/^/| /' conftest.$ac_ext >&5
24280
Martin v. Löwiseba40652007-08-30 20:10:57 +000024281 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024282fi
24283
Martin v. Löwiseba40652007-08-30 20:10:57 +000024284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24285fi
24286
24287{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24288echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024289if test "$ac_cv_stat_tv_nsec2" = yes
24290then
24291
24292cat >>confdefs.h <<\_ACEOF
24293#define HAVE_STAT_TV_NSEC2 1
24294_ACEOF
24295
24296fi
24297
Jack Jansen666b1e72001-10-31 12:11:48 +000024298# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024299{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24300echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024301if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24302 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024303else
Martin v. Löwis11437992002-04-12 09:54:03 +000024304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024305/* confdefs.h. */
24306_ACEOF
24307cat confdefs.h >>conftest.$ac_ext
24308cat >>conftest.$ac_ext <<_ACEOF
24309/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024310#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024311int
24312main ()
24313{
Jack Jansen666b1e72001-10-31 12:11:48 +000024314
24315 int rtn;
24316 rtn = mvwdelch(0,0,0);
24317
Martin v. Löwis11437992002-04-12 09:54:03 +000024318 ;
24319 return 0;
24320}
24321_ACEOF
24322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323if { (ac_try="$ac_compile"
24324case "(($ac_try" in
24325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24326 *) ac_try_echo=$ac_try;;
24327esac
24328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024331 grep -v '^ *+' conftest.er1 >conftest.err
24332 rm -f conftest.er1
24333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024335 (exit $ac_status); } && {
24336 test -z "$ac_c_werror_flag" ||
24337 test ! -s conftest.err
24338 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024339 ac_cv_mvwdelch_is_expression=yes
24340else
Martin v. Löwis11437992002-04-12 09:54:03 +000024341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024342sed 's/^/| /' conftest.$ac_ext >&5
24343
Martin v. Löwiseba40652007-08-30 20:10:57 +000024344 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024345fi
24346
Martin v. Löwiseba40652007-08-30 20:10:57 +000024347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24348fi
24349
24350{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24351echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024352
24353if test "$ac_cv_mvwdelch_is_expression" = yes
24354then
Martin v. Löwis11437992002-04-12 09:54:03 +000024355
24356cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024357#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024358_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024359
24360fi
24361
Martin v. Löwiseba40652007-08-30 20:10:57 +000024362{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24363echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024364if test "${ac_cv_window_has_flags+set}" = set; then
24365 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024366else
Martin v. Löwis11437992002-04-12 09:54:03 +000024367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024368/* confdefs.h. */
24369_ACEOF
24370cat confdefs.h >>conftest.$ac_ext
24371cat >>conftest.$ac_ext <<_ACEOF
24372/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024373#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024374int
24375main ()
24376{
Jack Jansen666b1e72001-10-31 12:11:48 +000024377
24378 WINDOW *w;
24379 w->_flags = 0;
24380
Martin v. Löwis11437992002-04-12 09:54:03 +000024381 ;
24382 return 0;
24383}
24384_ACEOF
24385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024386if { (ac_try="$ac_compile"
24387case "(($ac_try" in
24388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24389 *) ac_try_echo=$ac_try;;
24390esac
24391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024394 grep -v '^ *+' conftest.er1 >conftest.err
24395 rm -f conftest.er1
24396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024398 (exit $ac_status); } && {
24399 test -z "$ac_c_werror_flag" ||
24400 test ! -s conftest.err
24401 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024402 ac_cv_window_has_flags=yes
24403else
Martin v. Löwis11437992002-04-12 09:54:03 +000024404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024405sed 's/^/| /' conftest.$ac_ext >&5
24406
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024408fi
24409
Martin v. Löwiseba40652007-08-30 20:10:57 +000024410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24411fi
24412
24413{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24414echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024415
Jack Jansen666b1e72001-10-31 12:11:48 +000024416
24417if test "$ac_cv_window_has_flags" = yes
24418then
Martin v. Löwis11437992002-04-12 09:54:03 +000024419
24420cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024421#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024422_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024423
24424fi
24425
Martin v. Löwiseba40652007-08-30 20:10:57 +000024426{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24427echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024428cat >conftest.$ac_ext <<_ACEOF
24429/* confdefs.h. */
24430_ACEOF
24431cat confdefs.h >>conftest.$ac_ext
24432cat >>conftest.$ac_ext <<_ACEOF
24433/* end confdefs.h. */
24434#include <curses.h>
24435int
24436main ()
24437{
24438void *x=is_term_resized
24439 ;
24440 return 0;
24441}
24442_ACEOF
24443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024444if { (ac_try="$ac_compile"
24445case "(($ac_try" in
24446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24447 *) ac_try_echo=$ac_try;;
24448esac
24449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24450 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024451 ac_status=$?
24452 grep -v '^ *+' conftest.er1 >conftest.err
24453 rm -f conftest.er1
24454 cat conftest.err >&5
24455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024456 (exit $ac_status); } && {
24457 test -z "$ac_c_werror_flag" ||
24458 test ! -s conftest.err
24459 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024460
24461cat >>confdefs.h <<\_ACEOF
24462#define HAVE_CURSES_IS_TERM_RESIZED 1
24463_ACEOF
24464
Martin v. Löwiseba40652007-08-30 20:10:57 +000024465 { echo "$as_me:$LINENO: result: yes" >&5
24466echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024467else
24468 echo "$as_me: failed program was:" >&5
24469sed 's/^/| /' conftest.$ac_ext >&5
24470
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471 { echo "$as_me:$LINENO: result: no" >&5
24472echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024473
24474fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024475
Martin v. Löwiseba40652007-08-30 20:10:57 +000024476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24477
24478{ echo "$as_me:$LINENO: checking for resize_term" >&5
24479echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024480cat >conftest.$ac_ext <<_ACEOF
24481/* confdefs.h. */
24482_ACEOF
24483cat confdefs.h >>conftest.$ac_ext
24484cat >>conftest.$ac_ext <<_ACEOF
24485/* end confdefs.h. */
24486#include <curses.h>
24487int
24488main ()
24489{
24490void *x=resize_term
24491 ;
24492 return 0;
24493}
24494_ACEOF
24495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024496if { (ac_try="$ac_compile"
24497case "(($ac_try" in
24498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24499 *) ac_try_echo=$ac_try;;
24500esac
24501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24502 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024503 ac_status=$?
24504 grep -v '^ *+' conftest.er1 >conftest.err
24505 rm -f conftest.er1
24506 cat conftest.err >&5
24507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024508 (exit $ac_status); } && {
24509 test -z "$ac_c_werror_flag" ||
24510 test ! -s conftest.err
24511 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024512
24513cat >>confdefs.h <<\_ACEOF
24514#define HAVE_CURSES_RESIZE_TERM 1
24515_ACEOF
24516
Martin v. Löwiseba40652007-08-30 20:10:57 +000024517 { echo "$as_me:$LINENO: result: yes" >&5
24518echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024519else
24520 echo "$as_me: failed program was:" >&5
24521sed 's/^/| /' conftest.$ac_ext >&5
24522
Martin v. Löwiseba40652007-08-30 20:10:57 +000024523 { echo "$as_me:$LINENO: result: no" >&5
24524echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024525
24526fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024527
Martin v. Löwiseba40652007-08-30 20:10:57 +000024528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24529
24530{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24531echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024532cat >conftest.$ac_ext <<_ACEOF
24533/* confdefs.h. */
24534_ACEOF
24535cat confdefs.h >>conftest.$ac_ext
24536cat >>conftest.$ac_ext <<_ACEOF
24537/* end confdefs.h. */
24538#include <curses.h>
24539int
24540main ()
24541{
24542void *x=resizeterm
24543 ;
24544 return 0;
24545}
24546_ACEOF
24547rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024548if { (ac_try="$ac_compile"
24549case "(($ac_try" in
24550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24551 *) ac_try_echo=$ac_try;;
24552esac
24553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24554 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024555 ac_status=$?
24556 grep -v '^ *+' conftest.er1 >conftest.err
24557 rm -f conftest.er1
24558 cat conftest.err >&5
24559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024560 (exit $ac_status); } && {
24561 test -z "$ac_c_werror_flag" ||
24562 test ! -s conftest.err
24563 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024564
24565cat >>confdefs.h <<\_ACEOF
24566#define HAVE_CURSES_RESIZETERM 1
24567_ACEOF
24568
Martin v. Löwiseba40652007-08-30 20:10:57 +000024569 { echo "$as_me:$LINENO: result: yes" >&5
24570echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024571else
24572 echo "$as_me: failed program was:" >&5
24573sed 's/^/| /' conftest.$ac_ext >&5
24574
Martin v. Löwiseba40652007-08-30 20:10:57 +000024575 { echo "$as_me:$LINENO: result: no" >&5
24576echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024577
24578fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024579
Martin v. Löwiseba40652007-08-30 20:10:57 +000024580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24581
24582{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24583echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024584
24585if test -r /dev/ptmx
24586then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024587 { echo "$as_me:$LINENO: result: yes" >&5
24588echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024589
24590cat >>confdefs.h <<\_ACEOF
24591#define HAVE_DEV_PTMX 1
24592_ACEOF
24593
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024594else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024595 { echo "$as_me:$LINENO: result: no" >&5
24596echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024597fi
24598
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24600echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024601
24602if test -r /dev/ptc
24603then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604 { echo "$as_me:$LINENO: result: yes" >&5
24605echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024606
24607cat >>confdefs.h <<\_ACEOF
24608#define HAVE_DEV_PTC 1
24609_ACEOF
24610
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024611else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024612 { echo "$as_me:$LINENO: result: no" >&5
24613echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024614fi
24615
Martin v. Löwiseba40652007-08-30 20:10:57 +000024616{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24617echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024618if test "$cross_compiling" = yes; then
24619 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24620See \`config.log' for more details." >&5
24621echo "$as_me: error: cannot run test program while cross compiling
24622See \`config.log' for more details." >&2;}
24623 { (exit 1); exit 1; }; }
24624else
24625 cat >conftest.$ac_ext <<_ACEOF
24626/* confdefs.h. */
24627_ACEOF
24628cat confdefs.h >>conftest.$ac_ext
24629cat >>conftest.$ac_ext <<_ACEOF
24630/* end confdefs.h. */
24631#include <stdio.h>
24632#include <stddef.h>
24633#include <string.h>
24634
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024635#ifdef HAVE_SYS_TYPES_H
24636#include <sys/types.h>
24637#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024638
24639#ifdef HAVE_SSIZE_T
24640typedef ssize_t Py_ssize_t;
24641#elif SIZEOF_VOID_P == SIZEOF_LONG
24642typedef long Py_ssize_t;
24643#else
24644typedef int Py_ssize_t;
24645#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024646
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024647int main()
24648{
24649 char buffer[256];
24650
Brett Cannon09d12362006-05-11 05:11:33 +000024651 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24652 return 1;
24653
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024654 if (strcmp(buffer, "123"))
24655 return 1;
24656
24657 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24658 return 1;
24659
24660 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024661 return 1;
24662
24663 return 0;
24664}
24665_ACEOF
24666rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024667if { (ac_try="$ac_link"
24668case "(($ac_try" in
24669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24670 *) ac_try_echo=$ac_try;;
24671esac
24672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24673 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024674 ac_status=$?
24675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024677 { (case "(($ac_try" in
24678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24679 *) ac_try_echo=$ac_try;;
24680esac
24681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24682 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024683 ac_status=$?
24684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24685 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024686 { echo "$as_me:$LINENO: result: yes" >&5
24687echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024688
24689cat >>confdefs.h <<\_ACEOF
24690#define PY_FORMAT_SIZE_T "z"
24691_ACEOF
24692
24693else
24694 echo "$as_me: program exited with status $ac_status" >&5
24695echo "$as_me: failed program was:" >&5
24696sed 's/^/| /' conftest.$ac_ext >&5
24697
24698( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024699{ echo "$as_me:$LINENO: result: no" >&5
24700echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702rm -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 +000024703fi
24704
Martin v. Löwiseba40652007-08-30 20:10:57 +000024705
24706
24707{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24708echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024709if test "${ac_cv_type_socklen_t+set}" = set; then
24710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024711else
Martin v. Löwis11437992002-04-12 09:54:03 +000024712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024713/* confdefs.h. */
24714_ACEOF
24715cat confdefs.h >>conftest.$ac_ext
24716cat >>conftest.$ac_ext <<_ACEOF
24717/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024718
24719#ifdef HAVE_SYS_TYPES_H
24720#include <sys/types.h>
24721#endif
24722#ifdef HAVE_SYS_SOCKET_H
24723#include <sys/socket.h>
24724#endif
24725
24726
Martin v. Löwiseba40652007-08-30 20:10:57 +000024727typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024728int
24729main ()
24730{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024731if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024732 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024733if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024734 return 0;
24735 ;
24736 return 0;
24737}
24738_ACEOF
24739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024740if { (ac_try="$ac_compile"
24741case "(($ac_try" in
24742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24743 *) ac_try_echo=$ac_try;;
24744esac
24745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024748 grep -v '^ *+' conftest.er1 >conftest.err
24749 rm -f conftest.er1
24750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024752 (exit $ac_status); } && {
24753 test -z "$ac_c_werror_flag" ||
24754 test ! -s conftest.err
24755 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024756 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024757else
Martin v. Löwis11437992002-04-12 09:54:03 +000024758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024759sed 's/^/| /' conftest.$ac_ext >&5
24760
Martin v. Löwiseba40652007-08-30 20:10:57 +000024761 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024763
24764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024766{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24767echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024768if test $ac_cv_type_socklen_t = yes; then
24769 :
24770else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024771
Martin v. Löwis01c04012002-11-11 14:58:44 +000024772cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024773#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024774_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024775
24776fi
24777
Michael W. Hudson54241132001-12-07 15:38:26 +000024778
Michael W. Hudson54241132001-12-07 15:38:26 +000024779
24780
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024781for h in `(cd $srcdir;echo Python/thread_*.h)`
24782do
24783 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24784done
24785
Michael W. Hudson54241132001-12-07 15:38:26 +000024786
Neal Norwitzd24499d2005-12-18 21:36:39 +000024787SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024788{ echo "$as_me:$LINENO: checking for build directories" >&5
24789echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024790for dir in $SRCDIRS; do
24791 if test ! -d $dir; then
24792 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024793 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024794done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024795{ echo "$as_me:$LINENO: result: done" >&5
24796echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024797
Guido van Rossum627b2d71993-12-24 10:39:16 +000024798# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024799ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024800
Martin v. Löwis11437992002-04-12 09:54:03 +000024801cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024802# This file is a shell script that caches the results of configure
24803# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024804# scripts and configure runs, see configure's option --config-cache.
24805# It is not useful on other systems. If it contains results you don't
24806# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024807#
Martin v. Löwis11437992002-04-12 09:54:03 +000024808# config.status only pays attention to the cache file if you give it
24809# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024810#
Skip Montanaro6dead952003-09-25 14:50:04 +000024811# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024812# loading this file, other *unset* `ac_cv_foo' will be assigned the
24813# following values.
24814
24815_ACEOF
24816
Guido van Rossumf78abae1997-01-21 22:02:36 +000024817# The following way of writing the cache mishandles newlines in values,
24818# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024819# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024820# Ultrix sh set writes to stderr and can't be redirected directly,
24821# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024822(
24823 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24824 eval ac_val=\$$ac_var
24825 case $ac_val in #(
24826 *${as_nl}*)
24827 case $ac_var in #(
24828 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24829echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24830 esac
24831 case $ac_var in #(
24832 _ | IFS | as_nl) ;; #(
24833 *) $as_unset $ac_var ;;
24834 esac ;;
24835 esac
24836 done
24837
Martin v. Löwis11437992002-04-12 09:54:03 +000024838 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024839 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24840 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024841 # `set' does not quote correctly, so add quotes (double-quote
24842 # substitution turns \\\\ into \\, and sed turns \\ into \).
24843 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024844 "s/'/'\\\\''/g;
24845 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024846 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024847 *)
24848 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024849 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024850 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024851 esac |
24852 sort
24853) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024854 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024855 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024856 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024858 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24859 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24861 :end' >>confcache
24862if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24863 if test -w "$cache_file"; then
24864 test "x$cache_file" != "x/dev/null" &&
24865 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24866echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024867 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024868 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024869 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24870echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024871 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024872fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024873rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024875test "x$prefix" = xNONE && prefix=$ac_default_prefix
24876# Let make expand exec_prefix.
24877test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024878
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024879DEFS=-DHAVE_CONFIG_H
24880
Skip Montanaro6dead952003-09-25 14:50:04 +000024881ac_libobjs=
24882ac_ltlibobjs=
24883for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24884 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024885 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24886 ac_i=`echo "$ac_i" | sed "$ac_script"`
24887 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24888 # will be set to the directory where LIBOBJS objects are built.
24889 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24890 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024891done
24892LIBOBJS=$ac_libobjs
24893
24894LTLIBOBJS=$ac_ltlibobjs
24895
24896
Martin v. Löwis11437992002-04-12 09:54:03 +000024897
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024898: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024899ac_clean_files_save=$ac_clean_files
24900ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24901{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24902echo "$as_me: creating $CONFIG_STATUS" >&6;}
24903cat >$CONFIG_STATUS <<_ACEOF
24904#! $SHELL
24905# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024906# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024907# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024908# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024909
Martin v. Löwis11437992002-04-12 09:54:03 +000024910debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024911ac_cs_recheck=false
24912ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024913SHELL=\${CONFIG_SHELL-$SHELL}
24914_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024915
Martin v. Löwis11437992002-04-12 09:54:03 +000024916cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024917## --------------------- ##
24918## M4sh Initialization. ##
24919## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024920
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921# Be more Bourne compatible
24922DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024923if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24924 emulate sh
24925 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024926 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24927 # is contrary to our usage. Disable this feature.
24928 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024930else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024931 case `(set -o) 2>/dev/null` in
24932 *posix*) set -o posix ;;
24933esac
24934
Martin v. Löwis11437992002-04-12 09:54:03 +000024935fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024936
Skip Montanaro6dead952003-09-25 14:50:04 +000024937
Martin v. Löwis11437992002-04-12 09:54:03 +000024938
24939
Martin v. Löwiseba40652007-08-30 20:10:57 +000024940# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024941# Avoid depending upon Character Ranges.
24942as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24943as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24944as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24945as_cr_digits='0123456789'
24946as_cr_alnum=$as_cr_Letters$as_cr_digits
24947
24948# The user is always right.
24949if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024950 echo "#! /bin/sh" >conf$$.sh
24951 echo "exit 0" >>conf$$.sh
24952 chmod +x conf$$.sh
24953 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024954 PATH_SEPARATOR=';'
24955 else
24956 PATH_SEPARATOR=:
24957 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024958 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024959fi
24960
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961# Support unset when possible.
24962if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24963 as_unset=unset
24964else
24965 as_unset=false
24966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024967
Martin v. Löwiseba40652007-08-30 20:10:57 +000024968
24969# IFS
24970# We need space, tab and new line, in precisely that order. Quoting is
24971# there to prevent editors from complaining about space-tab.
24972# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24973# splitting by setting IFS to empty value.)
24974as_nl='
24975'
24976IFS=" "" $as_nl"
24977
24978# Find who we are. Look in the path if we contain no directory separator.
24979case $0 in
24980 *[\\/]* ) as_myself=$0 ;;
24981 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024982for as_dir in $PATH
24983do
24984 IFS=$as_save_IFS
24985 test -z "$as_dir" && as_dir=.
24986 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24987done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024988IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024989
Martin v. Löwiseba40652007-08-30 20:10:57 +000024990 ;;
24991esac
24992# We did not find ourselves, most probably we were run as `sh COMMAND'
24993# in which case we are not to be found in the path.
24994if test "x$as_myself" = x; then
24995 as_myself=$0
24996fi
24997if test ! -f "$as_myself"; then
24998 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24999 { (exit 1); exit 1; }
25000fi
25001
25002# Work around bugs in pre-3.0 UWIN ksh.
25003for as_var in ENV MAIL MAILPATH
25004do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25005done
25006PS1='$ '
25007PS2='> '
25008PS4='+ '
25009
25010# NLS nuisances.
25011for as_var in \
25012 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25013 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25014 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025015do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025016 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25017 eval $as_var=C; export $as_var
25018 else
25019 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25020 fi
25021done
25022
25023# Required to use basename.
25024if expr a : '\(a\)' >/dev/null 2>&1 &&
25025 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25026 as_expr=expr
25027else
25028 as_expr=false
25029fi
25030
25031if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25032 as_basename=basename
25033else
25034 as_basename=false
25035fi
25036
25037
25038# Name of the executable.
25039as_me=`$as_basename -- "$0" ||
25040$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25041 X"$0" : 'X\(//\)$' \| \
25042 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25043echo X/"$0" |
25044 sed '/^.*\/\([^/][^/]*\)\/*$/{
25045 s//\1/
25046 q
25047 }
25048 /^X\/\(\/\/\)$/{
25049 s//\1/
25050 q
25051 }
25052 /^X\/\(\/\).*/{
25053 s//\1/
25054 q
25055 }
25056 s/.*/./; q'`
25057
25058# CDPATH.
25059$as_unset CDPATH
25060
25061
25062
Martin v. Löwis11437992002-04-12 09:54:03 +000025063 as_lineno_1=$LINENO
25064 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025065 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025066 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025067
Martin v. Löwis11437992002-04-12 09:54:03 +000025068 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25069 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025070 # line-number line after each line using $LINENO; the second 'sed'
25071 # does the real work. The second script uses 'N' to pair each
25072 # line-number line with the line containing $LINENO, and appends
25073 # trailing '-' during substitution so that $LINENO is not a special
25074 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025075 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025076 # scripts with optimization help from Paolo Bonzini. Blame Lee
25077 # E. McMahon (1931-1989) for sed's syntax. :-)
25078 sed -n '
25079 p
25080 /[$]LINENO/=
25081 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025082 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083 s/[$]LINENO.*/&-/
25084 t lineno
25085 b
25086 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025087 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025088 :loop
25089 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025090 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025091 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025092 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093 chmod +x "$as_me.lineno" ||
25094 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025095 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025096
Martin v. Löwis11437992002-04-12 09:54:03 +000025097 # Don't try to exec as it changes $[0], causing all sort of problems
25098 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099 # original and so on. Autoconf is especially sensitive to this).
25100 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025101 # Exit status is that of the last command.
25102 exit
25103}
25104
25105
Martin v. Löwiseba40652007-08-30 20:10:57 +000025106if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25107 as_dirname=dirname
25108else
25109 as_dirname=false
25110fi
25111
25112ECHO_C= ECHO_N= ECHO_T=
25113case `echo -n x` in
25114-n*)
25115 case `echo 'x\c'` in
25116 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25117 *) ECHO_C='\c';;
25118 esac;;
25119*)
25120 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025121esac
25122
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123if expr a : '\(a\)' >/dev/null 2>&1 &&
25124 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025125 as_expr=expr
25126else
25127 as_expr=false
25128fi
25129
25130rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025131if test -d conf$$.dir; then
25132 rm -f conf$$.dir/conf$$.file
25133else
25134 rm -f conf$$.dir
25135 mkdir conf$$.dir
25136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025137echo >conf$$.file
25138if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025139 as_ln_s='ln -s'
25140 # ... but there are two gotchas:
25141 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25142 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25143 # In both cases, we have to default to `cp -p'.
25144 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025145 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025146elif ln conf$$.file conf$$ 2>/dev/null; then
25147 as_ln_s=ln
25148else
25149 as_ln_s='cp -p'
25150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25152rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025153
Skip Montanaro6dead952003-09-25 14:50:04 +000025154if mkdir -p . 2>/dev/null; then
25155 as_mkdir_p=:
25156else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025157 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025158 as_mkdir_p=false
25159fi
25160
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161if test -x / >/dev/null 2>&1; then
25162 as_test_x='test -x'
25163else
25164 if ls -dL / >/dev/null 2>&1; then
25165 as_ls_L_option=L
25166 else
25167 as_ls_L_option=
25168 fi
25169 as_test_x='
25170 eval sh -c '\''
25171 if test -d "$1"; then
25172 test -d "$1/.";
25173 else
25174 case $1 in
25175 -*)set "./$1";;
25176 esac;
25177 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25178 ???[sx]*):;;*)false;;esac;fi
25179 '\'' sh
25180 '
25181fi
25182as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025183
25184# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025185as_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 +000025186
25187# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025188as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025189
25190
Martin v. Löwis11437992002-04-12 09:54:03 +000025191exec 6>&1
25192
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025194# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025195# values after options handling.
25196ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025197This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025199
25200 CONFIG_FILES = $CONFIG_FILES
25201 CONFIG_HEADERS = $CONFIG_HEADERS
25202 CONFIG_LINKS = $CONFIG_LINKS
25203 CONFIG_COMMANDS = $CONFIG_COMMANDS
25204 $ $0 $@
25205
Martin v. Löwiseba40652007-08-30 20:10:57 +000025206on `(hostname || uname -n) 2>/dev/null | sed 1q`
25207"
25208
Martin v. Löwis11437992002-04-12 09:54:03 +000025209_ACEOF
25210
Martin v. Löwiseba40652007-08-30 20:10:57 +000025211cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025212# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213config_files="$ac_config_files"
25214config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025215
Martin v. Löwiseba40652007-08-30 20:10:57 +000025216_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025217
25218cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025219ac_cs_usage="\
25220\`$as_me' instantiates files from templates according to the
25221current configuration.
25222
25223Usage: $0 [OPTIONS] [FILE]...
25224
25225 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025226 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025227 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025228 -d, --debug don't remove temporary files
25229 --recheck update $as_me by reconfiguring in the same conditions
25230 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025231 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025232 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025233 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025234
25235Configuration files:
25236$config_files
25237
25238Configuration headers:
25239$config_headers
25240
25241Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025242
Martin v. Löwiseba40652007-08-30 20:10:57 +000025243_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025244cat >>$CONFIG_STATUS <<_ACEOF
25245ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025246python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025247configured by $0, generated by GNU Autoconf 2.61,
25248 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025249
Martin v. Löwiseba40652007-08-30 20:10:57 +000025250Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025251This config.status script is free software; the Free Software Foundation
25252gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253
25254ac_pwd='$ac_pwd'
25255srcdir='$srcdir'
25256INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025257_ACEOF
25258
25259cat >>$CONFIG_STATUS <<\_ACEOF
25260# If no file are specified by the user, then we need to provide default
25261# value. By we need to know if files were specified by the user.
25262ac_need_defaults=:
25263while test $# != 0
25264do
25265 case $1 in
25266 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25268 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025269 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025272 ac_option=$1
25273 ac_optarg=$2
25274 ac_shift=shift
25275 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025276 esac
25277
Skip Montanaro6dead952003-09-25 14:50:04 +000025278 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025279 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025280 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25281 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025282 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25283 echo "$ac_cs_version"; exit ;;
25284 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025285 debug=: ;;
25286 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025287 $ac_shift
25288 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025289 ac_need_defaults=false;;
25290 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025291 $ac_shift
25292 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025293 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025294 --he | --h)
25295 # Conflict between --help and --header
25296 { echo "$as_me: error: ambiguous option: $1
25297Try \`$0 --help' for more information." >&2
25298 { (exit 1); exit 1; }; };;
25299 --help | --hel | -h )
25300 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25302 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25303 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025304
25305 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306 -*) { echo "$as_me: error: unrecognized option: $1
25307Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025308 { (exit 1); exit 1; }; } ;;
25309
Martin v. Löwiseba40652007-08-30 20:10:57 +000025310 *) ac_config_targets="$ac_config_targets $1"
25311 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025312
25313 esac
25314 shift
25315done
25316
Skip Montanaro6dead952003-09-25 14:50:04 +000025317ac_configure_extra_args=
25318
25319if $ac_cs_silent; then
25320 exec 6>/dev/null
25321 ac_configure_extra_args="$ac_configure_extra_args --silent"
25322fi
25323
25324_ACEOF
25325cat >>$CONFIG_STATUS <<_ACEOF
25326if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25328 CONFIG_SHELL=$SHELL
25329 export CONFIG_SHELL
25330 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025331fi
25332
Martin v. Löwis11437992002-04-12 09:54:03 +000025333_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334cat >>$CONFIG_STATUS <<\_ACEOF
25335exec 5>>config.log
25336{
25337 echo
25338 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25339## Running $as_me. ##
25340_ASBOX
25341 echo "$ac_log"
25342} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025343
Martin v. Löwiseba40652007-08-30 20:10:57 +000025344_ACEOF
25345cat >>$CONFIG_STATUS <<_ACEOF
25346_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025347
25348cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349
25350# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025351for ac_config_target in $ac_config_targets
25352do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353 case $ac_config_target in
25354 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25355 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25356 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25357 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025358 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25359 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25361 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25362
Martin v. Löwis11437992002-04-12 09:54:03 +000025363 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25364echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25365 { (exit 1); exit 1; }; };;
25366 esac
25367done
25368
Martin v. Löwiseba40652007-08-30 20:10:57 +000025369
Martin v. Löwis11437992002-04-12 09:54:03 +000025370# If the user did not use the arguments to specify the items to instantiate,
25371# then the envvar interface is used. Set only those that are not.
25372# We use the long form for the default assignment because of an extremely
25373# bizarre bug on SunOS 4.1.3.
25374if $ac_need_defaults; then
25375 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25376 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25377fi
25378
Skip Montanaro6dead952003-09-25 14:50:04 +000025379# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025380# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025381# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025382# Hook for its removal unless debugging.
25383# Note that there is a small window in which the directory will not be cleaned:
25384# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025385$debug ||
25386{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025387 tmp=
25388 trap 'exit_status=$?
25389 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25390' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025391 trap '{ (exit 1); exit 1; }' 1 2 13 15
25392}
Martin v. Löwis11437992002-04-12 09:54:03 +000025393# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025394
Martin v. Löwis11437992002-04-12 09:54:03 +000025395{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025396 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 test -n "$tmp" && test -d "$tmp"
25398} ||
25399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025400 tmp=./conf$$-$RANDOM
25401 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025402} ||
25403{
Skip Montanaro6dead952003-09-25 14:50:04 +000025404 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025405 { (exit 1); exit 1; }
25406}
25407
Martin v. Löwis11437992002-04-12 09:54:03 +000025408#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025409# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025410#
25411
25412# No need to generate the scripts if there are no CONFIG_FILES.
25413# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025414if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025415
25416_ACEOF
25417
Martin v. Löwiseba40652007-08-30 20:10:57 +000025418
25419
25420ac_delim='%!_!# '
25421for ac_last_try in false false false false false :; do
25422 cat >conf$$subs.sed <<_ACEOF
25423SHELL!$SHELL$ac_delim
25424PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25425PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25426PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25427PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25428PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25429PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25430exec_prefix!$exec_prefix$ac_delim
25431prefix!$prefix$ac_delim
25432program_transform_name!$program_transform_name$ac_delim
25433bindir!$bindir$ac_delim
25434sbindir!$sbindir$ac_delim
25435libexecdir!$libexecdir$ac_delim
25436datarootdir!$datarootdir$ac_delim
25437datadir!$datadir$ac_delim
25438sysconfdir!$sysconfdir$ac_delim
25439sharedstatedir!$sharedstatedir$ac_delim
25440localstatedir!$localstatedir$ac_delim
25441includedir!$includedir$ac_delim
25442oldincludedir!$oldincludedir$ac_delim
25443docdir!$docdir$ac_delim
25444infodir!$infodir$ac_delim
25445htmldir!$htmldir$ac_delim
25446dvidir!$dvidir$ac_delim
25447pdfdir!$pdfdir$ac_delim
25448psdir!$psdir$ac_delim
25449libdir!$libdir$ac_delim
25450localedir!$localedir$ac_delim
25451mandir!$mandir$ac_delim
25452DEFS!$DEFS$ac_delim
25453ECHO_C!$ECHO_C$ac_delim
25454ECHO_N!$ECHO_N$ac_delim
25455ECHO_T!$ECHO_T$ac_delim
25456LIBS!$LIBS$ac_delim
25457build_alias!$build_alias$ac_delim
25458host_alias!$host_alias$ac_delim
25459target_alias!$target_alias$ac_delim
25460VERSION!$VERSION$ac_delim
25461SOVERSION!$SOVERSION$ac_delim
25462CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25463UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025464ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025465PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025466PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025467PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25468PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25469PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25470FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25471FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25472FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25473FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25474FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25475MACHDEP!$MACHDEP$ac_delim
25476SGI_ABI!$SGI_ABI$ac_delim
25477EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25478EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25479CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25480EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25481CC!$CC$ac_delim
25482CFLAGS!$CFLAGS$ac_delim
25483LDFLAGS!$LDFLAGS$ac_delim
25484CPPFLAGS!$CPPFLAGS$ac_delim
25485ac_ct_CC!$ac_ct_CC$ac_delim
25486EXEEXT!$EXEEXT$ac_delim
25487OBJEXT!$OBJEXT$ac_delim
25488CXX!$CXX$ac_delim
25489MAINCC!$MAINCC$ac_delim
25490CPP!$CPP$ac_delim
25491GREP!$GREP$ac_delim
25492EGREP!$EGREP$ac_delim
25493BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25494LIBRARY!$LIBRARY$ac_delim
25495LDLIBRARY!$LDLIBRARY$ac_delim
25496DLLLIBRARY!$DLLLIBRARY$ac_delim
25497BLDLIBRARY!$BLDLIBRARY$ac_delim
25498LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25499INSTSONAME!$INSTSONAME$ac_delim
25500RUNSHARED!$RUNSHARED$ac_delim
25501LINKCC!$LINKCC$ac_delim
25502RANLIB!$RANLIB$ac_delim
25503AR!$AR$ac_delim
25504SVNVERSION!$SVNVERSION$ac_delim
25505INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25506INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25507INSTALL_DATA!$INSTALL_DATA$ac_delim
25508LN!$LN$ac_delim
25509OPT!$OPT$ac_delim
25510BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025511UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025512OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25513LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25514SO!$SO$ac_delim
25515LDSHARED!$LDSHARED$ac_delim
25516BLDSHARED!$BLDSHARED$ac_delim
25517CCSHARED!$CCSHARED$ac_delim
25518LINKFORSHARED!$LINKFORSHARED$ac_delim
25519CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025520_ACEOF
25521
25522 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25523 break
25524 elif $ac_last_try; then
25525 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25526echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25527 { (exit 1); exit 1; }; }
25528 else
25529 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025530 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025531done
25532
25533ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25534if test -n "$ac_eof"; then
25535 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25536 ac_eof=`expr $ac_eof + 1`
25537fi
25538
25539cat >>$CONFIG_STATUS <<_ACEOF
25540cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25541/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25542_ACEOF
25543sed '
25544s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25545s/^/s,@/; s/!/@,|#_!!_#|/
25546:n
25547t n
25548s/'"$ac_delim"'$/,g/; t
25549s/$/\\/; p
25550N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25551' >>$CONFIG_STATUS <conf$$subs.sed
25552rm -f conf$$subs.sed
25553cat >>$CONFIG_STATUS <<_ACEOF
25554CEOF$ac_eof
25555_ACEOF
25556
25557
25558ac_delim='%!_!# '
25559for ac_last_try in false false false false false :; do
25560 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025561SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025562USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025563SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025564USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25565LDLAST!$LDLAST$ac_delim
25566THREADOBJ!$THREADOBJ$ac_delim
25567DLINCLDIR!$DLINCLDIR$ac_delim
25568DYNLOADFILE!$DYNLOADFILE$ac_delim
25569MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25570TRUE!$TRUE$ac_delim
25571LIBOBJS!$LIBOBJS$ac_delim
25572HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25573HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25574HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25575HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25576HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25577LIBM!$LIBM$ac_delim
25578LIBC!$LIBC$ac_delim
25579UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25580THREADHEADERS!$THREADHEADERS$ac_delim
25581SRCDIRS!$SRCDIRS$ac_delim
25582LTLIBOBJS!$LTLIBOBJS$ac_delim
25583_ACEOF
25584
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025585 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 +000025586 break
25587 elif $ac_last_try; then
25588 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25589echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25590 { (exit 1); exit 1; }; }
25591 else
25592 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25593 fi
25594done
25595
25596ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25597if test -n "$ac_eof"; then
25598 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25599 ac_eof=`expr $ac_eof + 1`
25600fi
25601
25602cat >>$CONFIG_STATUS <<_ACEOF
25603cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25604/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25605_ACEOF
25606sed '
25607s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25608s/^/s,@/; s/!/@,|#_!!_#|/
25609:n
25610t n
25611s/'"$ac_delim"'$/,g/; t
25612s/$/\\/; p
25613N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25614' >>$CONFIG_STATUS <conf$$subs.sed
25615rm -f conf$$subs.sed
25616cat >>$CONFIG_STATUS <<_ACEOF
25617:end
25618s/|#_!!_#|//g
25619CEOF$ac_eof
25620_ACEOF
25621
25622
25623# VPATH may cause trouble with some makes, so we remove $(srcdir),
25624# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25625# trailing colons and then remove the whole line if VPATH becomes empty
25626# (actually we leave an empty line to preserve line numbers).
25627if test "x$srcdir" = x.; then
25628 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25629s/:*\$(srcdir):*/:/
25630s/:*\${srcdir}:*/:/
25631s/:*@srcdir@:*/:/
25632s/^\([^=]*=[ ]*\):*/\1/
25633s/:*$//
25634s/^[^=]*=[ ]*$//
25635}'
25636fi
25637
25638cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025639fi # test -n "$CONFIG_FILES"
25640
Martin v. Löwiseba40652007-08-30 20:10:57 +000025641
25642for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25643do
25644 case $ac_tag in
25645 :[FHLC]) ac_mode=$ac_tag; continue;;
25646 esac
25647 case $ac_mode$ac_tag in
25648 :[FHL]*:*);;
25649 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25650echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25651 { (exit 1); exit 1; }; };;
25652 :[FH]-) ac_tag=-:-;;
25653 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25654 esac
25655 ac_save_IFS=$IFS
25656 IFS=:
25657 set x $ac_tag
25658 IFS=$ac_save_IFS
25659 shift
25660 ac_file=$1
25661 shift
25662
25663 case $ac_mode in
25664 :L) ac_source=$1;;
25665 :[FH])
25666 ac_file_inputs=
25667 for ac_f
25668 do
25669 case $ac_f in
25670 -) ac_f="$tmp/stdin";;
25671 *) # Look for the file first in the build tree, then in the source tree
25672 # (if the path is not absolute). The absolute path cannot be DOS-style,
25673 # because $ac_f cannot contain `:'.
25674 test -f "$ac_f" ||
25675 case $ac_f in
25676 [\\/$]*) false;;
25677 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25678 esac ||
25679 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25680echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25681 { (exit 1); exit 1; }; };;
25682 esac
25683 ac_file_inputs="$ac_file_inputs $ac_f"
25684 done
25685
25686 # Let's still pretend it is `configure' which instantiates (i.e., don't
25687 # use $as_me), people would be surprised to read:
25688 # /* config.h. Generated by config.status. */
25689 configure_input="Generated from "`IFS=:
25690 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25691 if test x"$ac_file" != x-; then
25692 configure_input="$ac_file. $configure_input"
25693 { echo "$as_me:$LINENO: creating $ac_file" >&5
25694echo "$as_me: creating $ac_file" >&6;}
25695 fi
25696
25697 case $ac_tag in
25698 *:-:* | *:-) cat >"$tmp/stdin";;
25699 esac
25700 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025701 esac
25702
Martin v. Löwiseba40652007-08-30 20:10:57 +000025703 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025704$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025705 X"$ac_file" : 'X\(//\)[^/]' \| \
25706 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025707 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025708echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025709 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25710 s//\1/
25711 q
25712 }
25713 /^X\(\/\/\)[^/].*/{
25714 s//\1/
25715 q
25716 }
25717 /^X\(\/\/\)$/{
25718 s//\1/
25719 q
25720 }
25721 /^X\(\/\).*/{
25722 s//\1/
25723 q
25724 }
25725 s/.*/./; q'`
25726 { as_dir="$ac_dir"
25727 case $as_dir in #(
25728 -*) as_dir=./$as_dir;;
25729 esac
25730 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025731 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025732 while :; do
25733 case $as_dir in #(
25734 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25735 *) as_qdir=$as_dir;;
25736 esac
25737 as_dirs="'$as_qdir' $as_dirs"
25738 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025739$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025740 X"$as_dir" : 'X\(//\)[^/]' \| \
25741 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025742 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025743echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025744 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25745 s//\1/
25746 q
25747 }
25748 /^X\(\/\/\)[^/].*/{
25749 s//\1/
25750 q
25751 }
25752 /^X\(\/\/\)$/{
25753 s//\1/
25754 q
25755 }
25756 /^X\(\/\).*/{
25757 s//\1/
25758 q
25759 }
25760 s/.*/./; q'`
25761 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025762 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025763 test -z "$as_dirs" || eval "mkdir $as_dirs"
25764 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25765echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025766 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025767 ac_builddir=.
25768
Martin v. Löwiseba40652007-08-30 20:10:57 +000025769case "$ac_dir" in
25770.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25771*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025772 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025773 # A ".." for each directory in $ac_dir_suffix.
25774 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25775 case $ac_top_builddir_sub in
25776 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25777 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25778 esac ;;
25779esac
25780ac_abs_top_builddir=$ac_pwd
25781ac_abs_builddir=$ac_pwd$ac_dir_suffix
25782# for backward compatibility:
25783ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025784
25785case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025786 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025787 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788 ac_top_srcdir=$ac_top_builddir_sub
25789 ac_abs_top_srcdir=$ac_pwd ;;
25790 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025791 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025792 ac_top_srcdir=$srcdir
25793 ac_abs_top_srcdir=$srcdir ;;
25794 *) # Relative name.
25795 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25796 ac_top_srcdir=$ac_top_build_prefix$srcdir
25797 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025798esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025799ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025800
Martin v. Löwis11437992002-04-12 09:54:03 +000025801
Martin v. Löwiseba40652007-08-30 20:10:57 +000025802 case $ac_mode in
25803 :F)
25804 #
25805 # CONFIG_FILE
25806 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025807
25808 case $INSTALL in
25809 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025810 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025811 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025812_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025813
25814cat >>$CONFIG_STATUS <<\_ACEOF
25815# If the template does not know about datarootdir, expand it.
25816# FIXME: This hack should be removed a few years after 2.60.
25817ac_datarootdir_hack=; ac_datarootdir_seen=
25818
25819case `sed -n '/datarootdir/ {
25820 p
25821 q
25822}
25823/@datadir@/p
25824/@docdir@/p
25825/@infodir@/p
25826/@localedir@/p
25827/@mandir@/p
25828' $ac_file_inputs` in
25829*datarootdir*) ac_datarootdir_seen=yes;;
25830*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25831 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25832echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25833_ACEOF
25834cat >>$CONFIG_STATUS <<_ACEOF
25835 ac_datarootdir_hack='
25836 s&@datadir@&$datadir&g
25837 s&@docdir@&$docdir&g
25838 s&@infodir@&$infodir&g
25839 s&@localedir@&$localedir&g
25840 s&@mandir@&$mandir&g
25841 s&\\\${datarootdir}&$datarootdir&g' ;;
25842esac
25843_ACEOF
25844
25845# Neutralize VPATH when `$srcdir' = `.'.
25846# Shell code in configure.ac might set extrasub.
25847# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025848cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025849 sed "$ac_vpsub
25850$extrasub
25851_ACEOF
25852cat >>$CONFIG_STATUS <<\_ACEOF
25853:t
25854/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025855s&@configure_input@&$configure_input&;t t
25856s&@top_builddir@&$ac_top_builddir_sub&;t t
25857s&@srcdir@&$ac_srcdir&;t t
25858s&@abs_srcdir@&$ac_abs_srcdir&;t t
25859s&@top_srcdir@&$ac_top_srcdir&;t t
25860s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25861s&@builddir@&$ac_builddir&;t t
25862s&@abs_builddir@&$ac_abs_builddir&;t t
25863s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25864s&@INSTALL@&$ac_INSTALL&;t t
25865$ac_datarootdir_hack
25866" $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 +000025867
Martin v. Löwiseba40652007-08-30 20:10:57 +000025868test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25869 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25870 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25871 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25872which seems to be undefined. Please make sure it is defined." >&5
25873echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25874which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025875
Martin v. Löwiseba40652007-08-30 20:10:57 +000025876 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025877 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025878 -) cat "$tmp/out"; rm -f "$tmp/out";;
25879 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025880 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025881 ;;
25882 :H)
25883 #
25884 # CONFIG_HEADER
25885 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025886_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025887
Martin v. Löwiseba40652007-08-30 20:10:57 +000025888# Transform confdefs.h into a sed script `conftest.defines', that
25889# substitutes the proper values into config.h.in to produce config.h.
25890rm -f conftest.defines conftest.tail
25891# First, append a space to every undef/define line, to ease matching.
25892echo 's/$/ /' >conftest.defines
25893# Then, protect against being on the right side of a sed subst, or in
25894# an unquoted here document, in config.status. If some macros were
25895# called several times there might be several #defines for the same
25896# symbol, which is useless. But do not sort them, since the last
25897# AC_DEFINE must be honored.
25898ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25899# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25900# NAME is the cpp macro being defined, VALUE is the value it is being given.
25901# PARAMS is the parameter list in the macro definition--in most cases, it's
25902# just an empty string.
25903ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25904ac_dB='\\)[ (].*,\\1define\\2'
25905ac_dC=' '
25906ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025907
Martin v. Löwiseba40652007-08-30 20:10:57 +000025908uniq confdefs.h |
25909 sed -n '
25910 t rset
25911 :rset
25912 s/^[ ]*#[ ]*define[ ][ ]*//
25913 t ok
25914 d
25915 :ok
25916 s/[\\&,]/\\&/g
25917 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25918 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25919 ' >>conftest.defines
25920
25921# Remove the space that was appended to ease matching.
25922# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025923# example, in the case of _POSIX_SOURCE, which is predefined and required
25924# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925# (The regexp can be short, since the line contains either #define or #undef.)
25926echo 's/ $//
25927s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025928
Martin v. Löwiseba40652007-08-30 20:10:57 +000025929# Break up conftest.defines:
25930ac_max_sed_lines=50
25931
25932# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25933# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25934# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25935# et cetera.
25936ac_in='$ac_file_inputs'
25937ac_out='"$tmp/out1"'
25938ac_nxt='"$tmp/out2"'
25939
25940while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025941do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025942 # Write a here document:
25943 cat >>$CONFIG_STATUS <<_ACEOF
25944 # First, check the format of the line:
25945 cat >"\$tmp/defines.sed" <<\\CEOF
25946/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25947/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25948b
25949:def
25950_ACEOF
25951 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025952 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025953 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25954 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25955 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25956 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025957 rm -f conftest.defines
25958 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025959done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025960rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025961
Martin v. Löwiseba40652007-08-30 20:10:57 +000025962echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025963cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025964 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025965 echo "/* $configure_input */" >"$tmp/config.h"
25966 cat "$ac_result" >>"$tmp/config.h"
25967 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025968 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25969echo "$as_me: $ac_file is unchanged" >&6;}
25970 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025971 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025972 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025973 fi
25974 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025975 echo "/* $configure_input */"
25976 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025977 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025978 rm -f "$tmp/out12"
25979 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025980
Martin v. Löwiseba40652007-08-30 20:10:57 +000025981
25982 esac
25983
25984done # for ac_tag
25985
Guido van Rossum627b2d71993-12-24 10:39:16 +000025986
Martin v. Löwis11437992002-04-12 09:54:03 +000025987{ (exit 0); exit 0; }
25988_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025989chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025990ac_clean_files=$ac_clean_files_save
25991
25992
25993# configure is writing to config.log, and then calls config.status.
25994# config.status does its own redirection, appending to config.log.
25995# Unfortunately, on DOS this fails, as config.log is still kept open
25996# by configure, so config.status won't be able to write to it; its
25997# output is simply discarded. So we exec the FD to /dev/null,
25998# effectively closing config.log, so it can be properly (re)opened and
25999# appended to by config.status. When coming back to configure, we
26000# need to make the FD available again.
26001if test "$no_create" != yes; then
26002 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026003 ac_config_status_args=
26004 test "$silent" = yes &&
26005 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026006 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026007 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026008 exec 5>>config.log
26009 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26010 # would make configure fail if this is the last instruction.
26011 $ac_cs_success || { (exit 1); exit 1; }
26012fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026013
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026014
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026015echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026016if test ! -f Modules/Setup
26017then
26018 cp $srcdir/Modules/Setup.dist Modules/Setup
26019fi
26020
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026021echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026022if test ! -f Modules/Setup.local
26023then
26024 echo "# Edit this file for local setup changes" >Modules/Setup.local
26025fi
26026
26027echo "creating Makefile"
26028$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26029 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026030 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026031
26032case $ac_sys_system in
26033BeOS)
26034 { echo "$as_me:$LINENO: WARNING:
26035
26036 Support for BeOS is deprecated as of Python 2.6.
26037 See PEP 11 for the gory details.
26038 " >&5
26039echo "$as_me: WARNING:
26040
26041 Support for BeOS is deprecated as of Python 2.6.
26042 See PEP 11 for the gory details.
26043 " >&2;}
26044 ;;
26045*) ;;
26046esac
26047
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026048mv config.c Modules