blob: 8195c4d7cf853043522a5b752784e177ad3dd20b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorene6e62672009-06-08 21:19:36 +00002# From configure.in Revision: 72873 .
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; }
Ronald Oussorene6e62672009-06-08 21:19:36 +000012954 if test $enable_shared = "yes"
12955 then
12956 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
12957echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
12958 { (exit 1); exit 1; }; }
12959 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012960else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 { echo "$as_me:$LINENO: result: no" >&5
12962echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012963fi
12964
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965{ echo "$as_me:$LINENO: checking for dyld" >&5
12966echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012967case $ac_sys_system/$ac_sys_release in
12968 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012969
Martin v. Löwis11437992002-04-12 09:54:03 +000012970cat >>confdefs.h <<\_ACEOF
12971#define WITH_DYLD 1
12972_ACEOF
12973
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12975echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012976 ;;
12977 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 { echo "$as_me:$LINENO: result: no" >&5
12979echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012980 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012981esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012982
Guido van Rossum0a516c91994-09-12 10:58:40 +000012983# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012984
Michael W. Hudson54241132001-12-07 15:38:26 +000012985
12986
12987
12988
Guido van Rossum0a516c91994-09-12 10:58:40 +000012989# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012990# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012991{ echo "$as_me:$LINENO: checking SO" >&5
12992echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012993if test -z "$SO"
12994then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012996 hp*|HP*)
12997 case `uname -m` in
12998 ia64) SO=.so;;
12999 *) SO=.sl;;
13000 esac
13001 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013002 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013003 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013004 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013005else
13006 # this might also be a termcap variable, see #610332
13007 echo
13008 echo '====================================================================='
13009 echo '+ +'
13010 echo '+ WARNING: You have set SO in your environment. +'
13011 echo '+ Do you really mean to change the extension for shared libraries? +'
13012 echo '+ Continuing in 10 seconds to let you to ponder. +'
13013 echo '+ +'
13014 echo '====================================================================='
13015 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013017{ echo "$as_me:$LINENO: result: $SO" >&5
13018echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013019
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013020
Neal Norwitz58e28882006-05-19 07:00:58 +000013021cat >>confdefs.h <<_ACEOF
13022#define SHLIB_EXT "$SO"
13023_ACEOF
13024
Guido van Rossum0a516c91994-09-12 10:58:40 +000013025# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013026# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013027# (Shared libraries in this instance are shared modules to be loaded into
13028# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013029{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13030echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013031if test -z "$LDSHARED"
13032then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013034 AIX*)
13035 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013036 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013037 ;;
13038 BeOS*)
13039 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013040 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013041 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013042 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013043 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013045 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013046 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013047 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013048 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013049 hp*|HP*)
13050 if test "$GCC" = "yes"
13051 then LDSHARED='$(CC) -shared'
13052 else LDSHARED='ld -b';
13053 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013054 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013055 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013056 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13057 if test "$enable_framework" ; then
13058 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013059 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13060 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013061 else
13062 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013063 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013064 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013065 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013066 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13067 if test "$enable_framework" ; then
13068 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013069 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13070 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013071 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013072 # No framework, use the Python app as bundle-loader
13073 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013074 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013075 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013076 Darwin/*)
13077 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13078 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013079
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013080 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013081 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013082 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013083 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013084 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013085 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13086 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013087 else
13088 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13089 if test "$enable_framework" ; then
13090 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013091 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13092 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013093 else
13094 # No framework, use the Python app as bundle-loader
13095 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13096 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13097 fi
13098 fi
13099 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013100 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013101 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013102 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013103 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013104 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013105 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013106 else
13107 LDSHARED="ld -Bshareable ${LDFLAGS}"
13108 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013109 OpenBSD*)
13110 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13111 then
13112 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13113 else
13114 case `uname -r` in
13115 [01].* | 2.[0-7] | 2.[0-7].*)
13116 LDSHARED="ld -Bshareable ${LDFLAGS}"
13117 ;;
13118 *)
13119 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13120 ;;
13121 esac
13122 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013123 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013124 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013125 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013126 then LDSHARED='$(CC) -shared'
13127 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013128 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013129 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013130 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013131 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013132 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013133 *) LDSHARED="ld";;
13134 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013136{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13137echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013138BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013139# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013140# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013141{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13142echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013143if test -z "$CCSHARED"
13144then
Guido van Rossum07397971997-04-29 21:49:50 +000013145 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013146 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013147 then CCSHARED="-fPIC";
13148 elif test `uname -p` = sparc;
13149 then CCSHARED="-xcode=pic32";
13150 else CCSHARED="-Kpic";
13151 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013152 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013153 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013154 else CCSHARED="+z";
13155 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013156 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013157 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013158 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013159 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013160 if test "$GCC" = "yes"
13161 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013162 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013163 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013164 SCO_SV*)
13165 if test "$GCC" = "yes"
13166 then CCSHARED="-fPIC"
13167 else CCSHARED="-Kpic -belf"
13168 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013169 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013170 IRIX*/6*) case $CC in
13171 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013172 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013173 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013174 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013175 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013177{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13178echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013179# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013180# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013181{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13182echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013183if test -z "$LINKFORSHARED"
13184then
Guido van Rossum07397971997-04-29 21:49:50 +000013185 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013186 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013187 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013188 LINKFORSHARED="-Wl,-E -Wl,+s";;
13189# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013190 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013191 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013192 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013194 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13195 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013196 # not used by the core itself but which needs to be in the core so
13197 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013198 # -prebind is no longer used, because it actually seems to give a
13199 # slowdown in stead of a speedup, maybe due to the large number of
13200 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013201
13202 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013203 if test "$enable_framework"
13204 then
Jack Jansenda49e192005-01-07 13:08:22 +000013205 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013206 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013207 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013208 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013209 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013210 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013211 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013212 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13213 then
13214 LINKFORSHARED="-Wl,--export-dynamic"
13215 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013216 SunOS/5*) case $CC in
13217 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013218 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013219 then
13220 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013221 fi;;
13222 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013223 CYGWIN*)
13224 if test $enable_shared = "no"
13225 then
13226 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13227 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013228 QNX*)
13229 # -Wl,-E causes the symbols to be added to the dynamic
13230 # symbol table so that they can be found when a module
13231 # is loaded. -N 2048K causes the stack size to be set
13232 # to 2048 kilobytes so that the stack doesn't overflow
13233 # when running test_compile.py.
13234 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013235 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013237{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13238echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013239
Michael W. Hudson54241132001-12-07 15:38:26 +000013240
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013241
Martin v. Löwiseba40652007-08-30 20:10:57 +000013242{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13243echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013244if test ! "$LIBRARY" = "$LDLIBRARY"
13245then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013246 case $ac_sys_system in
13247 CYGWIN*)
13248 # Cygwin needs CCSHARED when building extension DLLs
13249 # but not when building the interpreter DLL.
13250 CFLAGSFORSHARED='';;
13251 *)
13252 CFLAGSFORSHARED='$(CCSHARED)'
13253 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013255{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13256echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013257
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013258# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13259# library (with --enable-shared).
13260# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013261# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13262# if it is not required, since it creates a dependency of the shared library
13263# to LIBS. This, in turn, means that applications linking the shared libpython
13264# don't need to link LIBS explicitly. The default should be only changed
13265# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013266
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13268echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013269case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013270 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013271 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013272esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13274echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013275
13276
Guido van Rossum627b2d71993-12-24 10:39:16 +000013277# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Martin v. Löwiseba40652007-08-30 20:10:57 +000013279{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13280echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013281if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283else
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013285LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013287/* confdefs.h. */
13288_ACEOF
13289cat confdefs.h >>conftest.$ac_ext
13290cat >>conftest.$ac_ext <<_ACEOF
13291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293/* Override any GCC internal prototype to avoid an error.
13294 Use char because int might match the return type of a GCC
13295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013296#ifdef __cplusplus
13297extern "C"
13298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013299char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013300int
13301main ()
13302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013304 ;
13305 return 0;
13306}
13307_ACEOF
13308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013309if { (ac_try="$ac_link"
13310case "(($ac_try" in
13311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13312 *) ac_try_echo=$ac_try;;
13313esac
13314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013317 grep -v '^ *+' conftest.er1 >conftest.err
13318 rm -f conftest.er1
13319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013321 (exit $ac_status); } && {
13322 test -z "$ac_c_werror_flag" ||
13323 test ! -s conftest.err
13324 } && test -s conftest$ac_exeext &&
13325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327else
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013329sed 's/^/| /' conftest.$ac_ext >&5
13330
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013333
13334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013336LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013338{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13339echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013340if test $ac_cv_lib_dl_dlopen = yes; then
13341 cat >>confdefs.h <<_ACEOF
13342#define HAVE_LIBDL 1
13343_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013344
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013345 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013346
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347fi
13348 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Martin v. Löwiseba40652007-08-30 20:10:57 +000013350{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13351echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013352if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354else
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013356LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* confdefs.h. */
13359_ACEOF
13360cat confdefs.h >>conftest.$ac_ext
13361cat >>conftest.$ac_ext <<_ACEOF
13362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013363
Martin v. Löwiseba40652007-08-30 20:10:57 +000013364/* Override any GCC internal prototype to avoid an error.
13365 Use char because int might match the return type of a GCC
13366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013367#ifdef __cplusplus
13368extern "C"
13369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013370char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013371int
13372main ()
13373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013374return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 ;
13376 return 0;
13377}
13378_ACEOF
13379rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013380if { (ac_try="$ac_link"
13381case "(($ac_try" in
13382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13383 *) ac_try_echo=$ac_try;;
13384esac
13385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13386 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013388 grep -v '^ *+' conftest.er1 >conftest.err
13389 rm -f conftest.er1
13390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013392 (exit $ac_status); } && {
13393 test -z "$ac_c_werror_flag" ||
13394 test ! -s conftest.err
13395 } && test -s conftest$ac_exeext &&
13396 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398else
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013400sed 's/^/| /' conftest.$ac_ext >&5
13401
Martin v. Löwiseba40652007-08-30 20:10:57 +000013402 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013404
13405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013407LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13410echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013411if test $ac_cv_lib_dld_shl_load = yes; then
13412 cat >>confdefs.h <<_ACEOF
13413#define HAVE_LIBDLD 1
13414_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013415
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013416 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418fi
13419 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013420
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013421# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013422if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13424echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013425if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013427else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013428 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013429cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013430/* confdefs.h. */
13431_ACEOF
13432cat confdefs.h >>conftest.$ac_ext
13433cat >>conftest.$ac_ext <<_ACEOF
13434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Martin v. Löwiseba40652007-08-30 20:10:57 +000013436/* Override any GCC internal prototype to avoid an error.
13437 Use char because int might match the return type of a GCC
13438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439#ifdef __cplusplus
13440extern "C"
13441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013442char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013443int
13444main ()
13445{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013446return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 ;
13448 return 0;
13449}
13450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451for ac_lib in '' pthread rt posix4; do
13452 if test -z "$ac_lib"; then
13453 ac_res="none required"
13454 else
13455 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013456 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457 fi
13458 rm -f conftest.$ac_objext conftest$ac_exeext
13459if { (ac_try="$ac_link"
13460case "(($ac_try" in
13461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13462 *) ac_try_echo=$ac_try;;
13463esac
13464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13465 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013466 ac_status=$?
13467 grep -v '^ *+' conftest.er1 >conftest.err
13468 rm -f conftest.er1
13469 cat conftest.err >&5
13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013471 (exit $ac_status); } && {
13472 test -z "$ac_c_werror_flag" ||
13473 test ! -s conftest.err
13474 } && test -s conftest$ac_exeext &&
13475 $as_test_x conftest$ac_exeext; then
13476 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013477else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013478 echo "$as_me: failed program was:" >&5
13479sed 's/^/| /' conftest.$ac_ext >&5
13480
Martin v. Löwiseba40652007-08-30 20:10:57 +000013481
Brett Cannon19fab762007-06-02 03:02:29 +000013482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013483
13484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13485 conftest$ac_exeext
13486 if test "${ac_cv_search_sem_init+set}" = set; then
13487 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013489done
13490if test "${ac_cv_search_sem_init+set}" = set; then
13491 :
13492else
13493 ac_cv_search_sem_init=no
13494fi
13495rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013496LIBS=$ac_func_search_save_LIBS
13497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13499echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13500ac_res=$ac_cv_search_sem_init
13501if test "$ac_res" != no; then
13502 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013503
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013504fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013505 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013506 # posix4 on Solaris 2.6
13507 # pthread (first!) on Linux
13508fi
13509
Martin v. Löwis19d17342003-06-14 21:03:05 +000013510# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13512echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013513if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13514 echo $ECHO_N "(cached) $ECHO_C" >&6
13515else
13516 ac_check_lib_save_LIBS=$LIBS
13517LIBS="-lintl $LIBS"
13518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013519/* confdefs.h. */
13520_ACEOF
13521cat confdefs.h >>conftest.$ac_ext
13522cat >>conftest.$ac_ext <<_ACEOF
13523/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013524
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525/* Override any GCC internal prototype to avoid an error.
13526 Use char because int might match the return type of a GCC
13527 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013528#ifdef __cplusplus
13529extern "C"
13530#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013531char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013532int
13533main ()
13534{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013535return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013536 ;
13537 return 0;
13538}
13539_ACEOF
13540rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013541if { (ac_try="$ac_link"
13542case "(($ac_try" in
13543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13544 *) ac_try_echo=$ac_try;;
13545esac
13546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13547 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013549 grep -v '^ *+' conftest.er1 >conftest.err
13550 rm -f conftest.er1
13551 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013553 (exit $ac_status); } && {
13554 test -z "$ac_c_werror_flag" ||
13555 test ! -s conftest.err
13556 } && test -s conftest$ac_exeext &&
13557 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013558 ac_cv_lib_intl_textdomain=yes
13559else
13560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013561sed 's/^/| /' conftest.$ac_ext >&5
13562
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565
13566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013568LIBS=$ac_check_lib_save_LIBS
13569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13571echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013572if test $ac_cv_lib_intl_textdomain = yes; then
13573
13574cat >>confdefs.h <<\_ACEOF
13575#define WITH_LIBINTL 1
13576_ACEOF
13577
13578fi
13579
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013580
13581# checks for system dependent C++ extensions support
13582case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013583 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13584echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013586/* confdefs.h. */
13587_ACEOF
13588cat confdefs.h >>conftest.$ac_ext
13589cat >>conftest.$ac_ext <<_ACEOF
13590/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013591#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013592int
13593main ()
13594{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013595loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 ;
13597 return 0;
13598}
13599_ACEOF
13600rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013601if { (ac_try="$ac_link"
13602case "(($ac_try" in
13603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13604 *) ac_try_echo=$ac_try;;
13605esac
13606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13607 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013609 grep -v '^ *+' conftest.er1 >conftest.err
13610 rm -f conftest.er1
13611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013613 (exit $ac_status); } && {
13614 test -z "$ac_c_werror_flag" ||
13615 test ! -s conftest.err
13616 } && test -s conftest$ac_exeext &&
13617 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013618
Martin v. Löwis11437992002-04-12 09:54:03 +000013619cat >>confdefs.h <<\_ACEOF
13620#define AIX_GENUINE_CPLUSPLUS 1
13621_ACEOF
13622
Martin v. Löwiseba40652007-08-30 20:10:57 +000013623 { echo "$as_me:$LINENO: result: yes" >&5
13624echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013625else
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013627sed 's/^/| /' conftest.$ac_ext >&5
13628
Martin v. Löwiseba40652007-08-30 20:10:57 +000013629 { echo "$as_me:$LINENO: result: no" >&5
13630echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013632
13633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013634 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013635 *) ;;
13636esac
13637
Guido van Rossum70c7f481998-03-26 18:44:10 +000013638# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013639# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13641echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013642if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013644else
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013646LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013648/* confdefs.h. */
13649_ACEOF
13650cat confdefs.h >>conftest.$ac_ext
13651cat >>conftest.$ac_ext <<_ACEOF
13652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Martin v. Löwiseba40652007-08-30 20:10:57 +000013654/* Override any GCC internal prototype to avoid an error.
13655 Use char because int might match the return type of a GCC
13656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013657#ifdef __cplusplus
13658extern "C"
13659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013660char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013661int
13662main ()
13663{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ;
13666 return 0;
13667}
13668_ACEOF
13669rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670if { (ac_try="$ac_link"
13671case "(($ac_try" in
13672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13673 *) ac_try_echo=$ac_try;;
13674esac
13675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13676 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013678 grep -v '^ *+' conftest.er1 >conftest.err
13679 rm -f conftest.er1
13680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013682 (exit $ac_status); } && {
13683 test -z "$ac_c_werror_flag" ||
13684 test ! -s conftest.err
13685 } && test -s conftest$ac_exeext &&
13686 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013688else
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013690sed 's/^/| /' conftest.$ac_ext >&5
13691
Martin v. Löwiseba40652007-08-30 20:10:57 +000013692 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013694
13695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013697LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013699{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13700echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013701if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013702 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013703fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013704 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013705{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13706echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013707if test "${ac_cv_lib_socket_socket+set}" = set; then
13708 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013709else
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013711LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013713/* confdefs.h. */
13714_ACEOF
13715cat confdefs.h >>conftest.$ac_ext
13716cat >>conftest.$ac_ext <<_ACEOF
13717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Martin v. Löwiseba40652007-08-30 20:10:57 +000013719/* Override any GCC internal prototype to avoid an error.
13720 Use char because int might match the return type of a GCC
13721 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013722#ifdef __cplusplus
13723extern "C"
13724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013725char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013726int
13727main ()
13728{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013729return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 ;
13731 return 0;
13732}
13733_ACEOF
13734rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735if { (ac_try="$ac_link"
13736case "(($ac_try" in
13737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13738 *) ac_try_echo=$ac_try;;
13739esac
13740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13741 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013743 grep -v '^ *+' conftest.er1 >conftest.err
13744 rm -f conftest.er1
13745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013747 (exit $ac_status); } && {
13748 test -z "$ac_c_werror_flag" ||
13749 test ! -s conftest.err
13750 } && test -s conftest$ac_exeext &&
13751 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013753else
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013755sed 's/^/| /' conftest.$ac_ext >&5
13756
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013759
13760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013762LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013764{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13765echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013766if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013767 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013768fi
13769 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013770
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013771case "$ac_sys_system" in
13772BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13774echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013775if test "${ac_cv_lib_net_socket+set}" = set; then
13776 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013777else
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013779LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* confdefs.h. */
13782_ACEOF
13783cat confdefs.h >>conftest.$ac_ext
13784cat >>conftest.$ac_ext <<_ACEOF
13785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
Martin v. Löwiseba40652007-08-30 20:10:57 +000013787/* Override any GCC internal prototype to avoid an error.
13788 Use char because int might match the return type of a GCC
13789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013790#ifdef __cplusplus
13791extern "C"
13792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013793char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013794int
13795main ()
13796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
13802rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013803if { (ac_try="$ac_link"
13804case "(($ac_try" in
13805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13806 *) ac_try_echo=$ac_try;;
13807esac
13808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811 grep -v '^ *+' conftest.er1 >conftest.err
13812 rm -f conftest.er1
13813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815 (exit $ac_status); } && {
13816 test -z "$ac_c_werror_flag" ||
13817 test ! -s conftest.err
13818 } && test -s conftest$ac_exeext &&
13819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013821else
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013823sed 's/^/| /' conftest.$ac_ext >&5
13824
Martin v. Löwiseba40652007-08-30 20:10:57 +000013825 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013827
13828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013830LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13833echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013834if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013835 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013836fi
13837 # BeOS
13838;;
13839esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013840
Martin v. Löwiseba40652007-08-30 20:10:57 +000013841{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13842echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013843
Martin v. Löwiseba40652007-08-30 20:10:57 +000013844# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013845if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013846 withval=$with_libs;
13847{ echo "$as_me:$LINENO: result: $withval" >&5
13848echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013849LIBS="$withval $LIBS"
13850
13851else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 { echo "$as_me:$LINENO: result: no" >&5
13853echo "${ECHO_T}no" >&6; }
13854fi
13855
Guido van Rossum7f43da71994-08-01 12:15:30 +000013856
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013857# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013858{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13859echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013860
Martin v. Löwiseba40652007-08-30 20:10:57 +000013861# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013862if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863 withval=$with_system_ffi;
13864fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013865
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013866
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13868echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013869
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013870# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013871
13872
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13874echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013875
Martin v. Löwiseba40652007-08-30 20:10:57 +000013876# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013877if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013878 withval=$with_signal_module;
13879fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013880
13881
13882if test -z "$with_signal_module"
13883then with_signal_module="yes"
13884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13886echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013887
13888if test "${with_signal_module}" = "yes"; then
13889 USE_SIGNAL_MODULE=""
13890 SIGNAL_OBJS=""
13891else
13892 USE_SIGNAL_MODULE="#"
13893 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13894fi
13895
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013896# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013897
Barry Warsawc0d24d82000-06-29 16:12:00 +000013898USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013899
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13901echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Guido van Rossumec2f0731997-01-22 20:54:01 +000013903
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013905if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013906 withval=$with_dec_threads;
13907{ echo "$as_me:$LINENO: result: $withval" >&5
13908echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013909LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013910if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013911 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013912fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013913else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914 { echo "$as_me:$LINENO: result: no" >&5
13915echo "${ECHO_T}no" >&6; }
13916fi
13917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
13919# Templates for things AC_DEFINEd more than once.
13920# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013921
13922
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
13924
13925
13926
13927
Martin v. Löwiseba40652007-08-30 20:10:57 +000013928{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13929echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013932if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933 withval=$with_threads;
13934fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013935
13936
Barry Warsawc0d24d82000-06-29 16:12:00 +000013937# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Martin v. Löwiseba40652007-08-30 20:10:57 +000013939# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013940if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941 withval=$with_thread; with_threads=$with_thread
13942fi
13943
Barry Warsawc0d24d82000-06-29 16:12:00 +000013944
13945if test -z "$with_threads"
13946then with_threads="yes"
13947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013948{ echo "$as_me:$LINENO: result: $with_threads" >&5
13949echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013950
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013951
Barry Warsawc0d24d82000-06-29 16:12:00 +000013952if test "$with_threads" = "no"
13953then
13954 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013955elif test "$ac_cv_pthread_is_default" = yes
13956then
Martin v. Löwis11437992002-04-12 09:54:03 +000013957 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013958#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013959_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013960
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013961 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013962 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013963#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013964_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013965
13966 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013968elif test "$ac_cv_kpthread" = "yes"
13969then
13970 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013971 if test "$ac_cv_cxx_thread" = "yes"; then
13972 CXX="$CXX -Kpthread"
13973 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013975#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013976_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013977
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013978 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013979 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013980elif test "$ac_cv_kthread" = "yes"
13981then
13982 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013983 if test "$ac_cv_cxx_thread" = "yes"; then
13984 CXX="$CXX -Kthread"
13985 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013986 cat >>confdefs.h <<\_ACEOF
13987#define WITH_THREAD 1
13988_ACEOF
13989
13990 posix_threads=yes
13991 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013992elif test "$ac_cv_pthread" = "yes"
13993then
13994 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013995 if test "$ac_cv_cxx_thread" = "yes"; then
13996 CXX="$CXX -pthread"
13997 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013998 cat >>confdefs.h <<\_ACEOF
13999#define WITH_THREAD 1
14000_ACEOF
14001
14002 posix_threads=yes
14003 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014004else
14005 if test ! -z "$with_threads" -a -d "$with_threads"
14006 then LDFLAGS="$LDFLAGS -L$with_threads"
14007 fi
14008 if test ! -z "$withval" -a -d "$withval"
14009 then LDFLAGS="$LDFLAGS -L$withval"
14010 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014011
14012 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014013 # define _POSIX_THREADS in unistd.h. Some apparently don't
14014 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14016echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014018/* confdefs.h. */
14019_ACEOF
14020cat confdefs.h >>conftest.$ac_ext
14021cat >>conftest.$ac_ext <<_ACEOF
14022/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014023
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014024#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014025#ifdef _POSIX_THREADS
14026yes
14027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
14029_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014031 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014032 unistd_defines_pthreads=yes
14033else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014034 unistd_defines_pthreads=no
14035fi
14036rm -f conftest*
14037
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14039echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014042#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014043_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14047echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014048if test "${ac_cv_header_cthreads_h+set}" = set; then
14049 echo $ECHO_N "(cached) $ECHO_C" >&6
14050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14052echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014053else
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14056echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014058/* confdefs.h. */
14059_ACEOF
14060cat confdefs.h >>conftest.$ac_ext
14061cat >>conftest.$ac_ext <<_ACEOF
14062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014063$ac_includes_default
14064#include <cthreads.h>
14065_ACEOF
14066rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067if { (ac_try="$ac_compile"
14068case "(($ac_try" in
14069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14070 *) ac_try_echo=$ac_try;;
14071esac
14072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014075 grep -v '^ *+' conftest.er1 >conftest.err
14076 rm -f conftest.er1
14077 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079 (exit $ac_status); } && {
14080 test -z "$ac_c_werror_flag" ||
14081 test ! -s conftest.err
14082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 ac_header_compiler=yes
14084else
14085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014086sed 's/^/| /' conftest.$ac_ext >&5
14087
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090
14091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14092{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14093echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
14095# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14097echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014099/* confdefs.h. */
14100_ACEOF
14101cat confdefs.h >>conftest.$ac_ext
14102cat >>conftest.$ac_ext <<_ACEOF
14103/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014104#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014105_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106if { (ac_try="$ac_cpp conftest.$ac_ext"
14107case "(($ac_try" in
14108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14109 *) ac_try_echo=$ac_try;;
14110esac
14111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14112 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014114 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 rm -f conftest.er1
14116 cat conftest.err >&5
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014118 (exit $ac_status); } >/dev/null && {
14119 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14120 test ! -s conftest.err
14121 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_header_preproc=yes
14123else
14124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014125sed 's/^/| /' conftest.$ac_ext >&5
14126
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014129
Martin v. Löwis11437992002-04-12 09:54:03 +000014130rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14132echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
14134# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014135case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14136 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14138echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014139 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14140echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14141 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014142 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014143 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014144 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14145echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014146 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14147echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14148 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14149echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14150 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14151echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014152 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14153echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14155echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014156 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014157## ------------------------------------------------ ##
14158## Report this to http://www.python.org/python-bugs ##
14159## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014160_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014162 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014163esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014164{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14165echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014166if test "${ac_cv_header_cthreads_h+set}" = set; then
14167 echo $ECHO_N "(cached) $ECHO_C" >&6
14168else
14169 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14172echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
14174fi
14175if test $ac_cv_header_cthreads_h = yes; then
14176 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014177#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014178_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014179
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014181#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014182_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014183
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
14185cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014186#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014187_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014188
14189 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014190 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014191else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014192
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14195echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014196if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14197 echo $ECHO_N "(cached) $ECHO_C" >&6
14198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14200echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014201else
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14204echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014206/* confdefs.h. */
14207_ACEOF
14208cat confdefs.h >>conftest.$ac_ext
14209cat >>conftest.$ac_ext <<_ACEOF
14210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014211$ac_includes_default
14212#include <mach/cthreads.h>
14213_ACEOF
14214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215if { (ac_try="$ac_compile"
14216case "(($ac_try" in
14217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14218 *) ac_try_echo=$ac_try;;
14219esac
14220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014223 grep -v '^ *+' conftest.er1 >conftest.err
14224 rm -f conftest.er1
14225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014227 (exit $ac_status); } && {
14228 test -z "$ac_c_werror_flag" ||
14229 test ! -s conftest.err
14230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 ac_header_compiler=yes
14232else
14233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014234sed 's/^/| /' conftest.$ac_ext >&5
14235
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238
14239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14240{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14241echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014242
14243# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14245echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014247/* confdefs.h. */
14248_ACEOF
14249cat confdefs.h >>conftest.$ac_ext
14250cat >>conftest.$ac_ext <<_ACEOF
14251/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014252#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014253_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254if { (ac_try="$ac_cpp conftest.$ac_ext"
14255case "(($ac_try" in
14256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14257 *) ac_try_echo=$ac_try;;
14258esac
14259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14260 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014262 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 rm -f conftest.er1
14264 cat conftest.err >&5
14265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266 (exit $ac_status); } >/dev/null && {
14267 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14268 test ! -s conftest.err
14269 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 ac_header_preproc=yes
14271else
14272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014273sed 's/^/| /' conftest.$ac_ext >&5
14274
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014277
Martin v. Löwis11437992002-04-12 09:54:03 +000014278rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014279{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14280echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
14282# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014283case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14284 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14286echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014287 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14288echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14289 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014290 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014291 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014292 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14293echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014294 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14295echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14296 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14297echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14298 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14299echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014300 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14301echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014302 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14303echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014304 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014305## ------------------------------------------------ ##
14306## Report this to http://www.python.org/python-bugs ##
14307## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014308_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014309 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014310 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014311esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14313echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014314if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14315 echo $ECHO_N "(cached) $ECHO_C" >&6
14316else
14317 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014319{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14320echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
14322fi
14323if test $ac_cv_header_mach_cthreads_h = yes; then
14324 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014325#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014326_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014327
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014329#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014330_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014331
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
14333cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014334#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014335_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014336
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014337 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014338else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014339
Martin v. Löwiseba40652007-08-30 20:10:57 +000014340 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14341echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Martin v. Löwiseba40652007-08-30 20:10:57 +000014343# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014344if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14346echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014347 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014348#define WITH_THREAD 1
14349_ACEOF
14350
14351
14352cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014353#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014354_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014355
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014356 LIBS="-lpth $LIBS"
14357 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014358else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359 { echo "$as_me:$LINENO: result: no" >&5
14360echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014361
14362 # Just looking for pthread_create in libpthread is not enough:
14363 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14364 # So we really have to include pthread.h, and then link.
14365 _libs=$LIBS
14366 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014367 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14368echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014370/* confdefs.h. */
14371_ACEOF
14372cat confdefs.h >>conftest.$ac_ext
14373cat >>conftest.$ac_ext <<_ACEOF
14374/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014375#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014376
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014377void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014378int
14379main ()
14380{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014381
14382pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 ;
14384 return 0;
14385}
14386_ACEOF
14387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014388if { (ac_try="$ac_link"
14389case "(($ac_try" in
14390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14391 *) ac_try_echo=$ac_try;;
14392esac
14393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014396 grep -v '^ *+' conftest.er1 >conftest.err
14397 rm -f conftest.er1
14398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400 (exit $ac_status); } && {
14401 test -z "$ac_c_werror_flag" ||
14402 test ! -s conftest.err
14403 } && test -s conftest$ac_exeext &&
14404 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406 { echo "$as_me:$LINENO: result: yes" >&5
14407echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014409#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014410_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014411
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014412 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014413 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014414else
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014416sed 's/^/| /' conftest.$ac_ext >&5
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014419 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014420 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14421echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014422if test "${ac_cv_func_pthread_detach+set}" = set; then
14423 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014426/* confdefs.h. */
14427_ACEOF
14428cat confdefs.h >>conftest.$ac_ext
14429cat >>conftest.$ac_ext <<_ACEOF
14430/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014431/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14432 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14433#define pthread_detach innocuous_pthread_detach
14434
Guido van Rossumad678af1998-10-02 14:42:15 +000014435/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014436 which can conflict with char pthread_detach (); below.
14437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014438 <limits.h> exists even on freestanding compilers. */
14439
14440#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014441# include <limits.h>
14442#else
14443# include <assert.h>
14444#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014445
14446#undef pthread_detach
14447
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448/* Override any GCC internal prototype to avoid an error.
14449 Use char because int might match the return type of a GCC
14450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014451#ifdef __cplusplus
14452extern "C"
14453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014454char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014455/* The GNU C library defines this for functions which it implements
14456 to always fail with ENOSYS. Some functions are actually named
14457 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014459choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014460#endif
14461
Skip Montanaro6dead952003-09-25 14:50:04 +000014462int
14463main ()
14464{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014465return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 ;
14467 return 0;
14468}
14469_ACEOF
14470rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471if { (ac_try="$ac_link"
14472case "(($ac_try" in
14473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14474 *) ac_try_echo=$ac_try;;
14475esac
14476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014479 grep -v '^ *+' conftest.er1 >conftest.err
14480 rm -f conftest.er1
14481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483 (exit $ac_status); } && {
14484 test -z "$ac_c_werror_flag" ||
14485 test ! -s conftest.err
14486 } && test -s conftest$ac_exeext &&
14487 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014491sed 's/^/| /' conftest.$ac_ext >&5
14492
Martin v. Löwiseba40652007-08-30 20:10:57 +000014493 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014495
14496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014497 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14500echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014501if test $ac_cv_func_pthread_detach = yes; then
14502 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014503#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014504_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014505
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014506 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014507 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014508else
Guido van Rossumad678af1998-10-02 14:42:15 +000014509
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014510 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14512echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014513if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14514 echo $ECHO_N "(cached) $ECHO_C" >&6
14515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14517echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014518else
14519 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014520{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14521echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014523/* confdefs.h. */
14524_ACEOF
14525cat confdefs.h >>conftest.$ac_ext
14526cat >>conftest.$ac_ext <<_ACEOF
14527/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014528$ac_includes_default
14529#include <atheos/threads.h>
14530_ACEOF
14531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532if { (ac_try="$ac_compile"
14533case "(($ac_try" in
14534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14535 *) ac_try_echo=$ac_try;;
14536esac
14537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014540 grep -v '^ *+' conftest.er1 >conftest.err
14541 rm -f conftest.er1
14542 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014544 (exit $ac_status); } && {
14545 test -z "$ac_c_werror_flag" ||
14546 test ! -s conftest.err
14547 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014548 ac_header_compiler=yes
14549else
14550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014551sed 's/^/| /' conftest.$ac_ext >&5
14552
Martin v. Löwiseba40652007-08-30 20:10:57 +000014553 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555
14556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14557{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14558echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014559
14560# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014561{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14562echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014564/* confdefs.h. */
14565_ACEOF
14566cat confdefs.h >>conftest.$ac_ext
14567cat >>conftest.$ac_ext <<_ACEOF
14568/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014569#include <atheos/threads.h>
14570_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571if { (ac_try="$ac_cpp conftest.$ac_ext"
14572case "(($ac_try" in
14573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14574 *) ac_try_echo=$ac_try;;
14575esac
14576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14577 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014578 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014579 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014580 rm -f conftest.er1
14581 cat conftest.err >&5
14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583 (exit $ac_status); } >/dev/null && {
14584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14585 test ! -s conftest.err
14586 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014587 ac_header_preproc=yes
14588else
14589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014590sed 's/^/| /' conftest.$ac_ext >&5
14591
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014592 ac_header_preproc=no
14593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014594
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014595rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14597echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014598
14599# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014600case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14601 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014602 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14603echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014604 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14605echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14606 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014607 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014608 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014609 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14610echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014611 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14612echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14613 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14614echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14615 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14616echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014617 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14618echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014619 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14620echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014622## ------------------------------------------------ ##
14623## Report this to http://www.python.org/python-bugs ##
14624## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014625_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014626 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014627 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014628esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14630echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014631if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14632 echo $ECHO_N "(cached) $ECHO_C" >&6
14633else
14634 ac_cv_header_atheos_threads_h=$ac_header_preproc
14635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14637echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014638
14639fi
14640if test $ac_cv_header_atheos_threads_h = yes; then
14641 cat >>confdefs.h <<\_ACEOF
14642#define WITH_THREAD 1
14643_ACEOF
14644
14645
14646cat >>confdefs.h <<\_ACEOF
14647#define ATHEOS_THREADS 1
14648_ACEOF
14649
14650 THREADOBJ="Python/thread.o"
14651else
14652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014654 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14655echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014656if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14657 echo $ECHO_N "(cached) $ECHO_C" >&6
14658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014659{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14660echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014661else
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14664echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014666/* confdefs.h. */
14667_ACEOF
14668cat confdefs.h >>conftest.$ac_ext
14669cat >>conftest.$ac_ext <<_ACEOF
14670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014671$ac_includes_default
14672#include <kernel/OS.h>
14673_ACEOF
14674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675if { (ac_try="$ac_compile"
14676case "(($ac_try" in
14677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14678 *) ac_try_echo=$ac_try;;
14679esac
14680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014683 grep -v '^ *+' conftest.er1 >conftest.err
14684 rm -f conftest.er1
14685 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014687 (exit $ac_status); } && {
14688 test -z "$ac_c_werror_flag" ||
14689 test ! -s conftest.err
14690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 ac_header_compiler=yes
14692else
14693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014694sed 's/^/| /' conftest.$ac_ext >&5
14695
Martin v. Löwiseba40652007-08-30 20:10:57 +000014696 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014698
14699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14700{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14701echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014702
14703# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014704{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14705echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014707/* confdefs.h. */
14708_ACEOF
14709cat confdefs.h >>conftest.$ac_ext
14710cat >>conftest.$ac_ext <<_ACEOF
14711/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014712#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014713_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014714if { (ac_try="$ac_cpp conftest.$ac_ext"
14715case "(($ac_try" in
14716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14717 *) ac_try_echo=$ac_try;;
14718esac
14719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14720 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014722 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 rm -f conftest.er1
14724 cat conftest.err >&5
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726 (exit $ac_status); } >/dev/null && {
14727 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14728 test ! -s conftest.err
14729 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 ac_header_preproc=yes
14731else
14732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014733sed 's/^/| /' conftest.$ac_ext >&5
14734
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014737
Martin v. Löwis11437992002-04-12 09:54:03 +000014738rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14740echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014741
Martin v. Löwis11437992002-04-12 09:54:03 +000014742# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014743case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14744 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14746echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014747 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14748echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14749 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014750 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014751 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014752 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14753echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014754 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14755echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14756 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14757echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14758 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14759echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014760 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14761echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014762 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14763echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014764 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014765## ------------------------------------------------ ##
14766## Report this to http://www.python.org/python-bugs ##
14767## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014768_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014770 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014771esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14773echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014774if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14775 echo $ECHO_N "(cached) $ECHO_C" >&6
14776else
14777 ac_cv_header_kernel_OS_h=$ac_header_preproc
14778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14780echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014781
14782fi
14783if test $ac_cv_header_kernel_OS_h = yes; then
14784 cat >>confdefs.h <<\_ACEOF
14785#define WITH_THREAD 1
14786_ACEOF
14787
14788
14789cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014790#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014791_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014792
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014793 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014794else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014795
Martin v. Löwiseba40652007-08-30 20:10:57 +000014796 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14797echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014798if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014800else
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014802LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* confdefs.h. */
14805_ACEOF
14806cat confdefs.h >>conftest.$ac_ext
14807cat >>conftest.$ac_ext <<_ACEOF
14808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014809
Martin v. Löwiseba40652007-08-30 20:10:57 +000014810/* Override any GCC internal prototype to avoid an error.
14811 Use char because int might match the return type of a GCC
14812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014813#ifdef __cplusplus
14814extern "C"
14815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014816char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014817int
14818main ()
14819{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ;
14822 return 0;
14823}
14824_ACEOF
14825rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826if { (ac_try="$ac_link"
14827case "(($ac_try" in
14828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14829 *) ac_try_echo=$ac_try;;
14830esac
14831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14832 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014834 grep -v '^ *+' conftest.er1 >conftest.err
14835 rm -f conftest.er1
14836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014838 (exit $ac_status); } && {
14839 test -z "$ac_c_werror_flag" ||
14840 test ! -s conftest.err
14841 } && test -s conftest$ac_exeext &&
14842 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014844else
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014846sed 's/^/| /' conftest.$ac_ext >&5
14847
Martin v. Löwiseba40652007-08-30 20:10:57 +000014848 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014850
14851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014853LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14856echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014857if test $ac_cv_lib_pthreads_pthread_create = yes; then
14858 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014859#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014860_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014861
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014862 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014863 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014864 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014865else
Greg Steinadf63d62000-07-05 10:38:09 +000014866
Martin v. Löwiseba40652007-08-30 20:10:57 +000014867 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14868echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014869if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14870 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014871else
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014873LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014880
Martin v. Löwiseba40652007-08-30 20:10:57 +000014881/* Override any GCC internal prototype to avoid an error.
14882 Use char because int might match the return type of a GCC
14883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014884#ifdef __cplusplus
14885extern "C"
14886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014887char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014888int
14889main ()
14890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014891return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ;
14893 return 0;
14894}
14895_ACEOF
14896rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014897if { (ac_try="$ac_link"
14898case "(($ac_try" in
14899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14900 *) ac_try_echo=$ac_try;;
14901esac
14902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14903 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014905 grep -v '^ *+' conftest.er1 >conftest.err
14906 rm -f conftest.er1
14907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909 (exit $ac_status); } && {
14910 test -z "$ac_c_werror_flag" ||
14911 test ! -s conftest.err
14912 } && test -s conftest$ac_exeext &&
14913 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014915else
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014917sed 's/^/| /' conftest.$ac_ext >&5
14918
Martin v. Löwiseba40652007-08-30 20:10:57 +000014919 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921
14922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014924LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14927echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014928if test $ac_cv_lib_c_r_pthread_create = yes; then
14929 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014930#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014931_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014932
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014933 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014934 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014935 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014936else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014937
Martin v. Löwiseba40652007-08-30 20:10:57 +000014938 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14939echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014940if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014944LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014945cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014946/* confdefs.h. */
14947_ACEOF
14948cat confdefs.h >>conftest.$ac_ext
14949cat >>conftest.$ac_ext <<_ACEOF
14950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014951
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952/* Override any GCC internal prototype to avoid an error.
14953 Use char because int might match the return type of a GCC
14954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014955#ifdef __cplusplus
14956extern "C"
14957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014958char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014959int
14960main ()
14961{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ;
14964 return 0;
14965}
14966_ACEOF
14967rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968if { (ac_try="$ac_link"
14969case "(($ac_try" in
14970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14971 *) ac_try_echo=$ac_try;;
14972esac
14973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14974 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014976 grep -v '^ *+' conftest.er1 >conftest.err
14977 rm -f conftest.er1
14978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980 (exit $ac_status); } && {
14981 test -z "$ac_c_werror_flag" ||
14982 test ! -s conftest.err
14983 } && test -s conftest$ac_exeext &&
14984 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014986else
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014988sed 's/^/| /' conftest.$ac_ext >&5
14989
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992
14993rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14998echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014999if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15000 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015001#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015003
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015004 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015005 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015006 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015007else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015008
Martin v. Löwiseba40652007-08-30 20:10:57 +000015009 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15010echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015011if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015013else
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015015LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015017/* confdefs.h. */
15018_ACEOF
15019cat confdefs.h >>conftest.$ac_ext
15020cat >>conftest.$ac_ext <<_ACEOF
15021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023/* Override any GCC internal prototype to avoid an error.
15024 Use char because int might match the return type of a GCC
15025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015026#ifdef __cplusplus
15027extern "C"
15028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015029char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015030int
15031main ()
15032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 ;
15035 return 0;
15036}
15037_ACEOF
15038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039if { (ac_try="$ac_link"
15040case "(($ac_try" in
15041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15042 *) ac_try_echo=$ac_try;;
15043esac
15044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015047 grep -v '^ *+' conftest.er1 >conftest.err
15048 rm -f conftest.er1
15049 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051 (exit $ac_status); } && {
15052 test -z "$ac_c_werror_flag" ||
15053 test ! -s conftest.err
15054 } && test -s conftest$ac_exeext &&
15055 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015057else
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015059sed 's/^/| /' conftest.$ac_ext >&5
15060
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063
15064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015066LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15069echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015070if test $ac_cv_lib_cma_pthread_create = yes; then
15071 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015072#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015073_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015075 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015076 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015077 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015078else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015079
Martin v. Löwis130fb172001-07-19 11:00:41 +000015080 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015081fi
15082
Guido van Rossum627b2d71993-12-24 10:39:16 +000015083
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015084fi
15085
Guido van Rossum0be3e491997-05-22 20:33:33 +000015086fi
15087
Guido van Rossum49545951997-12-02 19:28:29 +000015088fi
15089
Guido van Rossumb93a8621998-05-07 13:27:32 +000015090fi
15091
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015092
Michael W. Hudson54241132001-12-07 15:38:26 +000015093fi
15094
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015095
15096fi
15097
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099
15100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102fi
15103
Martin v. Löwis11437992002-04-12 09:54:03 +000015104fi
15105
15106
15107fi
15108
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015109
Michael W. Hudson54241132001-12-07 15:38:26 +000015110
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15112echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015113if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15114 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015115else
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015117LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* confdefs.h. */
15120_ACEOF
15121cat confdefs.h >>conftest.$ac_ext
15122cat >>conftest.$ac_ext <<_ACEOF
15123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125/* Override any GCC internal prototype to avoid an error.
15126 Use char because int might match the return type of a GCC
15127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015128#ifdef __cplusplus
15129extern "C"
15130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015131char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015132int
15133main ()
15134{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015135return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015141if { (ac_try="$ac_link"
15142case "(($ac_try" in
15143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15144 *) ac_try_echo=$ac_try;;
15145esac
15146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15147 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 grep -v '^ *+' conftest.er1 >conftest.err
15150 rm -f conftest.er1
15151 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153 (exit $ac_status); } && {
15154 test -z "$ac_c_werror_flag" ||
15155 test ! -s conftest.err
15156 } && test -s conftest$ac_exeext &&
15157 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159else
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015161sed 's/^/| /' conftest.$ac_ext >&5
15162
Martin v. Löwiseba40652007-08-30 20:10:57 +000015163 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015165
15166rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015167 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015168LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015170{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15171echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015172if test $ac_cv_lib_mpc_usconfig = yes; then
15173 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015174#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015175_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015176
Martin v. Löwis130fb172001-07-19 11:00:41 +000015177 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015178 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015179 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015180fi
15181
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015182
Neal Norwitza978ab02002-11-02 16:58:05 +000015183 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15185echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015186if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15187 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015188else
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015190LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015197
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198/* Override any GCC internal prototype to avoid an error.
15199 Use char because int might match the return type of a GCC
15200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015201#ifdef __cplusplus
15202extern "C"
15203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015204char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015205int
15206main ()
15207{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 ;
15210 return 0;
15211}
15212_ACEOF
15213rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214if { (ac_try="$ac_link"
15215case "(($ac_try" in
15216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15217 *) ac_try_echo=$ac_try;;
15218esac
15219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15220 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015222 grep -v '^ *+' conftest.er1 >conftest.err
15223 rm -f conftest.er1
15224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226 (exit $ac_status); } && {
15227 test -z "$ac_c_werror_flag" ||
15228 test ! -s conftest.err
15229 } && test -s conftest$ac_exeext &&
15230 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015232else
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015234sed 's/^/| /' conftest.$ac_ext >&5
15235
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015238
15239rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015241LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15244echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015245if test $ac_cv_lib_thread_thr_create = yes; then
15246 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015249
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015250 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015251 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015252 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015253fi
15254
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015255 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015256
Martin v. Löwis130fb172001-07-19 11:00:41 +000015257 if test "$USE_THREAD_MODULE" != "#"
15258 then
15259 # If the above checks didn't disable threads, (at least) OSF1
15260 # needs this '-threads' argument during linking.
15261 case $ac_sys_system in
15262 OSF1) LDLAST=-threads;;
15263 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015264 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015265fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015266
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015267if test "$posix_threads" = "yes"; then
15268 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015269
15270cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015271#define _POSIX_THREADS 1
15272_ACEOF
15273
15274 fi
15275
15276 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15277 case $ac_sys_system/$ac_sys_release in
15278 SunOS/5.6)
15279cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015280#define HAVE_PTHREAD_DESTRUCTOR 1
15281_ACEOF
15282
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015283 ;;
15284 SunOS/5.8)
15285cat >>confdefs.h <<\_ACEOF
15286#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15287_ACEOF
15288
15289 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015290 AIX/5)
15291cat >>confdefs.h <<\_ACEOF
15292#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15293_ACEOF
15294
15295 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015296 esac
15297
Martin v. Löwiseba40652007-08-30 20:10:57 +000015298 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15299echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015300 if test "${ac_cv_pthread_system_supported+set}" = set; then
15301 echo $ECHO_N "(cached) $ECHO_C" >&6
15302else
15303 if test "$cross_compiling" = yes; then
15304 ac_cv_pthread_system_supported=no
15305else
15306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015307/* confdefs.h. */
15308_ACEOF
15309cat confdefs.h >>conftest.$ac_ext
15310cat >>conftest.$ac_ext <<_ACEOF
15311/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015312#include <pthread.h>
15313 void *foo(void *parm) {
15314 return NULL;
15315 }
15316 main() {
15317 pthread_attr_t attr;
15318 pthread_t id;
15319 if (pthread_attr_init(&attr)) exit(-1);
15320 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15321 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15322 exit(0);
15323 }
15324_ACEOF
15325rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326if { (ac_try="$ac_link"
15327case "(($ac_try" in
15328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15329 *) ac_try_echo=$ac_try;;
15330esac
15331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15332 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336 { (case "(($ac_try" in
15337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15338 *) ac_try_echo=$ac_try;;
15339esac
15340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15341 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015342 ac_status=$?
15343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15344 (exit $ac_status); }; }; then
15345 ac_cv_pthread_system_supported=yes
15346else
15347 echo "$as_me: program exited with status $ac_status" >&5
15348echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015349sed 's/^/| /' conftest.$ac_ext >&5
15350
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015351( exit $ac_status )
15352ac_cv_pthread_system_supported=no
15353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354rm -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 +000015355fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015356
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357
15358
Guido van Rossum627b2d71993-12-24 10:39:16 +000015359fi
15360
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15362echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015363 if test "$ac_cv_pthread_system_supported" = "yes"; then
15364
15365cat >>confdefs.h <<\_ACEOF
15366#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15367_ACEOF
15368
15369 fi
15370
15371for ac_func in pthread_sigmask
15372do
15373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15376if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015377 echo $ECHO_N "(cached) $ECHO_C" >&6
15378else
15379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015380/* confdefs.h. */
15381_ACEOF
15382cat confdefs.h >>conftest.$ac_ext
15383cat >>conftest.$ac_ext <<_ACEOF
15384/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15387#define $ac_func innocuous_$ac_func
15388
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015389/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015390 which can conflict with char $ac_func (); below.
15391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015392 <limits.h> exists even on freestanding compilers. */
15393
15394#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015395# include <limits.h>
15396#else
15397# include <assert.h>
15398#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015399
15400#undef $ac_func
15401
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402/* Override any GCC internal prototype to avoid an error.
15403 Use char because int might match the return type of a GCC
15404 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015405#ifdef __cplusplus
15406extern "C"
15407#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015408char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015409/* The GNU C library defines this for functions which it implements
15410 to always fail with ENOSYS. Some functions are actually named
15411 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015413choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015414#endif
15415
Skip Montanaro6dead952003-09-25 14:50:04 +000015416int
15417main ()
15418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015420 ;
15421 return 0;
15422}
15423_ACEOF
15424rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425if { (ac_try="$ac_link"
15426case "(($ac_try" in
15427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15428 *) ac_try_echo=$ac_try;;
15429esac
15430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015433 grep -v '^ *+' conftest.er1 >conftest.err
15434 rm -f conftest.er1
15435 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015437 (exit $ac_status); } && {
15438 test -z "$ac_c_werror_flag" ||
15439 test ! -s conftest.err
15440 } && test -s conftest$ac_exeext &&
15441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015442 eval "$as_ac_var=yes"
15443else
15444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015445sed 's/^/| /' conftest.$ac_ext >&5
15446
Martin v. Löwiseba40652007-08-30 20:10:57 +000015447 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449
15450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453ac_res=`eval echo '${'$as_ac_var'}'`
15454 { echo "$as_me:$LINENO: result: $ac_res" >&5
15455echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015456if test `eval echo '${'$as_ac_var'}'` = yes; then
15457 cat >>confdefs.h <<_ACEOF
15458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15459_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015460 case $ac_sys_system in
15461 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015462
Jason Tishlerfac083d2003-07-22 15:20:49 +000015463cat >>confdefs.h <<\_ACEOF
15464#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15465_ACEOF
15466
15467 ;;
15468 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015469fi
15470done
15471
15472fi
15473
15474
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015475# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015476
15477
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15479echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15480# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015481if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015482 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015483 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484 { echo "$as_me:$LINENO: result: no" >&5
15485echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015486 ipv6=no
15487 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488 *) { echo "$as_me:$LINENO: result: yes" >&5
15489echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015491#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015492_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015493
15494 ipv6=yes
15495 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015497else
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015499 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500 { echo "$as_me:$LINENO: result: no" >&5
15501echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015502 ipv6=no
15503
15504else
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015506/* confdefs.h. */
15507_ACEOF
15508cat confdefs.h >>conftest.$ac_ext
15509cat >>conftest.$ac_ext <<_ACEOF
15510/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015511 /* AF_INET6 available check */
15512#include <sys/types.h>
15513#include <sys/socket.h>
15514main()
15515{
15516 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15517 exit(1);
15518 else
15519 exit(0);
15520}
15521
Martin v. Löwis11437992002-04-12 09:54:03 +000015522_ACEOF
15523rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015524if { (ac_try="$ac_link"
15525case "(($ac_try" in
15526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15527 *) ac_try_echo=$ac_try;;
15528esac
15529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15530 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015531 ac_status=$?
15532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 { (case "(($ac_try" in
15535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15536 *) ac_try_echo=$ac_try;;
15537esac
15538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15539 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015543 { echo "$as_me:$LINENO: result: yes" >&5
15544echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015545 ipv6=yes
15546else
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 echo "$as_me: program exited with status $ac_status" >&5
15548echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015549sed 's/^/| /' conftest.$ac_ext >&5
15550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015552{ echo "$as_me:$LINENO: result: no" >&5
15553echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015554 ipv6=no
15555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015556rm -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 +000015557fi
15558
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559
15560
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015561if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015562 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15563echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015565/* confdefs.h. */
15566_ACEOF
15567cat confdefs.h >>conftest.$ac_ext
15568cat >>conftest.$ac_ext <<_ACEOF
15569/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015570#include <sys/types.h>
15571#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015572int
15573main ()
15574{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015575struct sockaddr_in6 x;
15576x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015577 ;
15578 return 0;
15579}
15580_ACEOF
15581rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582if { (ac_try="$ac_compile"
15583case "(($ac_try" in
15584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15585 *) ac_try_echo=$ac_try;;
15586esac
15587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015590 grep -v '^ *+' conftest.er1 >conftest.err
15591 rm -f conftest.er1
15592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594 (exit $ac_status); } && {
15595 test -z "$ac_c_werror_flag" ||
15596 test ! -s conftest.err
15597 } && test -s conftest.$ac_objext; then
15598 { echo "$as_me:$LINENO: result: yes" >&5
15599echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015600 ipv6=yes
15601else
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015603sed 's/^/| /' conftest.$ac_ext >&5
15604
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605 { echo "$as_me:$LINENO: result: no" >&5
15606echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015607 ipv6=no
15608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015609
15610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015611fi
15612
15613if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015615#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015616_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015617
15618fi
15619
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620fi
15621
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015622
15623ipv6type=unknown
15624ipv6lib=none
15625ipv6trylibc=no
15626
15627if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15629echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015630 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15631 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015632 case $i in
15633 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015635/* confdefs.h. */
15636_ACEOF
15637cat confdefs.h >>conftest.$ac_ext
15638cat >>conftest.$ac_ext <<_ACEOF
15639/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015641#include <netinet/in.h>
15642#ifdef IPV6_INRIA_VERSION
15643yes
15644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015645_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015647 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015648 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015649fi
15650rm -f conftest*
15651
15652 ;;
15653 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015655/* confdefs.h. */
15656_ACEOF
15657cat confdefs.h >>conftest.$ac_ext
15658cat >>conftest.$ac_ext <<_ACEOF
15659/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015660
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015661#include <netinet/in.h>
15662#ifdef __KAME__
15663yes
15664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015667 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015668 ipv6type=$i;
15669 ipv6lib=inet6
15670 ipv6libdir=/usr/local/v6/lib
15671 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015672fi
15673rm -f conftest*
15674
15675 ;;
15676 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015678/* confdefs.h. */
15679_ACEOF
15680cat confdefs.h >>conftest.$ac_ext
15681cat >>conftest.$ac_ext <<_ACEOF
15682/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015684#include <features.h>
15685#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15686yes
15687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015688_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015690 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015691 ipv6type=$i;
15692 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015693fi
15694rm -f conftest*
15695
15696 ;;
15697 linux-inet6)
15698 if test -d /usr/inet6; then
15699 ipv6type=$i
15700 ipv6lib=inet6
15701 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015702 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015703 fi
15704 ;;
15705 solaris)
15706 if test -f /etc/netconfig; then
15707 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15708 ipv6type=$i
15709 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015710 fi
15711 fi
15712 ;;
15713 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015715/* confdefs.h. */
15716_ACEOF
15717cat confdefs.h >>conftest.$ac_ext
15718cat >>conftest.$ac_ext <<_ACEOF
15719/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015720
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015721#include <sys/param.h>
15722#ifdef _TOSHIBA_INET6
15723yes
15724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015725_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015727 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015728 ipv6type=$i;
15729 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015730 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015731fi
15732rm -f conftest*
15733
15734 ;;
15735 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015737/* confdefs.h. */
15738_ACEOF
15739cat confdefs.h >>conftest.$ac_ext
15740cat >>conftest.$ac_ext <<_ACEOF
15741/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015743#include </usr/local/v6/include/sys/v6config.h>
15744#ifdef __V6D__
15745yes
15746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015747_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015749 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015750 ipv6type=$i;
15751 ipv6lib=v6;
15752 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015753 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015754fi
15755rm -f conftest*
15756
15757 ;;
15758 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015760/* confdefs.h. */
15761_ACEOF
15762cat confdefs.h >>conftest.$ac_ext
15763cat >>conftest.$ac_ext <<_ACEOF
15764/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015765
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015766#include <sys/param.h>
15767#ifdef _ZETA_MINAMI_INET6
15768yes
15769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015770_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015772 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015773 ipv6type=$i;
15774 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015775 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015776fi
15777rm -f conftest*
15778
15779 ;;
15780 esac
15781 if test "$ipv6type" != "unknown"; then
15782 break
15783 fi
15784 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015785 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15786echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015787fi
15788
15789if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15790 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15791 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15792 echo "using lib$ipv6lib"
15793 else
15794 if test $ipv6trylibc = "yes"; then
15795 echo "using libc"
15796 else
15797 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15798 echo "You need to fetch lib$ipv6lib.a from appropriate"
15799 echo 'ipv6 kit and compile beforehand.'
15800 exit 1
15801 fi
15802 fi
15803fi
15804
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015805{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15806echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15807cat >conftest.$ac_ext <<_ACEOF
15808/* confdefs.h. */
15809_ACEOF
15810cat confdefs.h >>conftest.$ac_ext
15811cat >>conftest.$ac_ext <<_ACEOF
15812/* end confdefs.h. */
15813#include <Carbon/Carbon.h>
15814int
15815main ()
15816{
15817FSIORefNum fRef = 0
15818 ;
15819 return 0;
15820}
15821_ACEOF
15822rm -f conftest.$ac_objext
15823if { (ac_try="$ac_compile"
15824case "(($ac_try" in
15825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15826 *) ac_try_echo=$ac_try;;
15827esac
15828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15829 (eval "$ac_compile") 2>conftest.er1
15830 ac_status=$?
15831 grep -v '^ *+' conftest.er1 >conftest.err
15832 rm -f conftest.er1
15833 cat conftest.err >&5
15834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835 (exit $ac_status); } && {
15836 test -z "$ac_c_werror_flag" ||
15837 test ! -s conftest.err
15838 } && test -s conftest.$ac_objext; then
15839
15840cat >>confdefs.h <<\_ACEOF
15841#define HAVE_OSX105_SDK 1
15842_ACEOF
15843
15844 { echo "$as_me:$LINENO: result: yes" >&5
15845echo "${ECHO_T}yes" >&6; }
15846else
15847 echo "$as_me: failed program was:" >&5
15848sed 's/^/| /' conftest.$ac_ext >&5
15849
15850 { echo "$as_me:$LINENO: result: no" >&5
15851echo "${ECHO_T}no" >&6; }
15852
15853fi
15854
15855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15856
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015857# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15859echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015860
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015862if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863 withval=$with_doc_strings;
15864fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015865
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015866
15867if test -z "$with_doc_strings"
15868then with_doc_strings="yes"
15869fi
15870if test "$with_doc_strings" != "no"
15871then
15872
15873cat >>confdefs.h <<\_ACEOF
15874#define WITH_DOC_STRINGS 1
15875_ACEOF
15876
15877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15879echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015880
Neil Schemenauera35c6882001-02-27 04:45:05 +000015881# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015882{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15883echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015884
Martin v. Löwiseba40652007-08-30 20:10:57 +000015885# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015886if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015887 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015888if test "$withval" != no
15889then
15890
15891cat >>confdefs.h <<\_ACEOF
15892#define WITH_TSC 1
15893_ACEOF
15894
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895 { echo "$as_me:$LINENO: result: yes" >&5
15896echo "${ECHO_T}yes" >&6; }
15897else { echo "$as_me:$LINENO: result: no" >&5
15898echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015899fi
15900else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901 { echo "$as_me:$LINENO: result: no" >&5
15902echo "${ECHO_T}no" >&6; }
15903fi
15904
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015905
15906# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15908echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015909
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015911if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912 withval=$with_pymalloc;
15913fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015914
Neil Schemenauera35c6882001-02-27 04:45:05 +000015915
Neil Schemenauer16c22972002-03-22 15:34:49 +000015916if test -z "$with_pymalloc"
15917then with_pymalloc="yes"
15918fi
15919if test "$with_pymalloc" != "no"
15920then
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
15922cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015923#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015924_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015925
15926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15928echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015929
Barry Warsawef82cd72000-06-30 16:21:01 +000015930# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015931{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15932echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
Martin v. Löwiseba40652007-08-30 20:10:57 +000015934# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015935if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015937if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015938then
15939
15940cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015941#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
15943
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944 { echo "$as_me:$LINENO: result: yes" >&5
15945echo "${ECHO_T}yes" >&6; }
15946else { echo "$as_me:$LINENO: result: no" >&5
15947echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015948fi
15949else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015950 { echo "$as_me:$LINENO: result: no" >&5
15951echo "${ECHO_T}no" >&6; }
15952fi
15953
Barry Warsawef82cd72000-06-30 16:21:01 +000015954
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015955# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015956
Guido van Rossum98935bf2001-09-05 19:13:16 +000015957DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015958
Guido van Rossume97ee181999-12-20 21:27:22 +000015959# the dlopen() function means we might want to use dynload_shlib.o. some
15960# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015961
Thomas Wouters3a584202000-08-05 23:28:51 +000015962for ac_func in dlopen
15963do
Martin v. Löwis11437992002-04-12 09:54:03 +000015964as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015965{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15966echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15967if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015969else
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015971/* confdefs.h. */
15972_ACEOF
15973cat confdefs.h >>conftest.$ac_ext
15974cat >>conftest.$ac_ext <<_ACEOF
15975/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015976/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15977 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15978#define $ac_func innocuous_$ac_func
15979
Guido van Rossume97ee181999-12-20 21:27:22 +000015980/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015981 which can conflict with char $ac_func (); below.
15982 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015983 <limits.h> exists even on freestanding compilers. */
15984
15985#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015986# include <limits.h>
15987#else
15988# include <assert.h>
15989#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015990
15991#undef $ac_func
15992
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993/* Override any GCC internal prototype to avoid an error.
15994 Use char because int might match the return type of a GCC
15995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015996#ifdef __cplusplus
15997extern "C"
15998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015999char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016000/* The GNU C library defines this for functions which it implements
16001 to always fail with ENOSYS. Some functions are actually named
16002 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016004choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016005#endif
16006
Skip Montanaro6dead952003-09-25 14:50:04 +000016007int
16008main ()
16009{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016010return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016011 ;
16012 return 0;
16013}
16014_ACEOF
16015rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016016if { (ac_try="$ac_link"
16017case "(($ac_try" in
16018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16019 *) ac_try_echo=$ac_try;;
16020esac
16021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16022 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016024 grep -v '^ *+' conftest.er1 >conftest.err
16025 rm -f conftest.er1
16026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016028 (exit $ac_status); } && {
16029 test -z "$ac_c_werror_flag" ||
16030 test ! -s conftest.err
16031 } && test -s conftest$ac_exeext &&
16032 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016034else
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016036sed 's/^/| /' conftest.$ac_ext >&5
16037
Martin v. Löwiseba40652007-08-30 20:10:57 +000016038 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040
16041rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016042 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016044ac_res=`eval echo '${'$as_ac_var'}'`
16045 { echo "$as_me:$LINENO: result: $ac_res" >&5
16046echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016047if test `eval echo '${'$as_ac_var'}'` = yes; then
16048 cat >>confdefs.h <<_ACEOF
16049#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16050_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016051
Guido van Rossume97ee181999-12-20 21:27:22 +000016052fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016053done
Guido van Rossume97ee181999-12-20 21:27:22 +000016054
Michael W. Hudson54241132001-12-07 15:38:26 +000016055
Guido van Rossume97ee181999-12-20 21:27:22 +000016056# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16057# loading of modules.
16058
Martin v. Löwiseba40652007-08-30 20:10:57 +000016059{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16060echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016061if test -z "$DYNLOADFILE"
16062then
16063 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016064 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16065 if test "$ac_cv_func_dlopen" = yes
16066 then DYNLOADFILE="dynload_shlib.o"
16067 else DYNLOADFILE="dynload_aix.o"
16068 fi
16069 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016070 BeOS*) DYNLOADFILE="dynload_beos.o";;
16071 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016072 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16073 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016074 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016075 *)
16076 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16077 # out any dynamic loading
16078 if test "$ac_cv_func_dlopen" = yes
16079 then DYNLOADFILE="dynload_shlib.o"
16080 else DYNLOADFILE="dynload_stub.o"
16081 fi
16082 ;;
16083 esac
16084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016085{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16086echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016087if test "$DYNLOADFILE" != "dynload_stub.o"
16088then
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
16090cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016091#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016093
16094fi
16095
Neil Schemenauer4e425612001-06-19 15:44:15 +000016096# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16097
Michael W. Hudson54241132001-12-07 15:38:26 +000016098
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16100echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016101if test -z "$MACHDEP_OBJS"
16102then
Jack Jansene578a632001-08-15 01:27:14 +000016103 MACHDEP_OBJS=$extra_machdep_objs
16104else
16105 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016107{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16108echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016109
Guido van Rossum627b2d71993-12-24 10:39:16 +000016110# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016111
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
16176
16177
16178
16179
16180
16181
Martin v. Löwisd6320502004-08-12 13:45:08 +000016182
Martin v. Löwisc3001752005-01-23 09:27:24 +000016183
16184
Neal Norwitz05a45592006-03-20 06:30:08 +000016185
16186
Martin v. Löwis382abef2007-02-19 10:55:19 +000016187
16188
Christian Heimes36281872007-11-30 21:11:28 +000016189
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016190
16191
16192for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16193 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016194 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016195 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016196 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016197 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016198 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016199 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016200 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016201 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016202 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016203 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016204do
Martin v. Löwis11437992002-04-12 09:54:03 +000016205as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016206{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16207echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16208if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016210else
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016212/* confdefs.h. */
16213_ACEOF
16214cat confdefs.h >>conftest.$ac_ext
16215cat >>conftest.$ac_ext <<_ACEOF
16216/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016217/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16218 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16219#define $ac_func innocuous_$ac_func
16220
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016221/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016222 which can conflict with char $ac_func (); below.
16223 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016224 <limits.h> exists even on freestanding compilers. */
16225
16226#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016227# include <limits.h>
16228#else
16229# include <assert.h>
16230#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016231
16232#undef $ac_func
16233
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234/* Override any GCC internal prototype to avoid an error.
16235 Use char because int might match the return type of a GCC
16236 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016237#ifdef __cplusplus
16238extern "C"
16239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016240char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016241/* The GNU C library defines this for functions which it implements
16242 to always fail with ENOSYS. Some functions are actually named
16243 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016245choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016246#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016247
Skip Montanaro6dead952003-09-25 14:50:04 +000016248int
16249main ()
16250{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016252 ;
16253 return 0;
16254}
16255_ACEOF
16256rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257if { (ac_try="$ac_link"
16258case "(($ac_try" in
16259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16260 *) ac_try_echo=$ac_try;;
16261esac
16262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16263 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016265 grep -v '^ *+' conftest.er1 >conftest.err
16266 rm -f conftest.er1
16267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269 (exit $ac_status); } && {
16270 test -z "$ac_c_werror_flag" ||
16271 test ! -s conftest.err
16272 } && test -s conftest$ac_exeext &&
16273 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016275else
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016277sed 's/^/| /' conftest.$ac_ext >&5
16278
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281
16282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016285ac_res=`eval echo '${'$as_ac_var'}'`
16286 { echo "$as_me:$LINENO: result: $ac_res" >&5
16287echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016288if test `eval echo '${'$as_ac_var'}'` = yes; then
16289 cat >>confdefs.h <<_ACEOF
16290#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16291_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016293fi
16294done
16295
Michael W. Hudson54241132001-12-07 15:38:26 +000016296
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016297# For some functions, having a definition is not sufficient, since
16298# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299{ echo "$as_me:$LINENO: checking for chroot" >&5
16300echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016302/* confdefs.h. */
16303_ACEOF
16304cat confdefs.h >>conftest.$ac_ext
16305cat >>conftest.$ac_ext <<_ACEOF
16306/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016307#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016308int
16309main ()
16310{
16311void *x=chroot
16312 ;
16313 return 0;
16314}
16315_ACEOF
16316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016317if { (ac_try="$ac_compile"
16318case "(($ac_try" in
16319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16320 *) ac_try_echo=$ac_try;;
16321esac
16322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016325 grep -v '^ *+' conftest.er1 >conftest.err
16326 rm -f conftest.er1
16327 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016329 (exit $ac_status); } && {
16330 test -z "$ac_c_werror_flag" ||
16331 test ! -s conftest.err
16332 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016333
16334cat >>confdefs.h <<\_ACEOF
16335#define HAVE_CHROOT 1
16336_ACEOF
16337
Martin v. Löwiseba40652007-08-30 20:10:57 +000016338 { echo "$as_me:$LINENO: result: yes" >&5
16339echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016340else
16341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016342sed 's/^/| /' conftest.$ac_ext >&5
16343
Martin v. Löwiseba40652007-08-30 20:10:57 +000016344 { echo "$as_me:$LINENO: result: no" >&5
16345echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016346
16347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016348
16349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16350{ echo "$as_me:$LINENO: checking for link" >&5
16351echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016352cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016353/* confdefs.h. */
16354_ACEOF
16355cat confdefs.h >>conftest.$ac_ext
16356cat >>conftest.$ac_ext <<_ACEOF
16357/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016358#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016359int
16360main ()
16361{
16362void *x=link
16363 ;
16364 return 0;
16365}
16366_ACEOF
16367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368if { (ac_try="$ac_compile"
16369case "(($ac_try" in
16370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16371 *) ac_try_echo=$ac_try;;
16372esac
16373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016376 grep -v '^ *+' conftest.er1 >conftest.err
16377 rm -f conftest.er1
16378 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 (exit $ac_status); } && {
16381 test -z "$ac_c_werror_flag" ||
16382 test ! -s conftest.err
16383 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016384
16385cat >>confdefs.h <<\_ACEOF
16386#define HAVE_LINK 1
16387_ACEOF
16388
Martin v. Löwiseba40652007-08-30 20:10:57 +000016389 { echo "$as_me:$LINENO: result: yes" >&5
16390echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016391else
16392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016393sed 's/^/| /' conftest.$ac_ext >&5
16394
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395 { echo "$as_me:$LINENO: result: no" >&5
16396echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016397
16398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016399
16400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16401{ echo "$as_me:$LINENO: checking for symlink" >&5
16402echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016404/* confdefs.h. */
16405_ACEOF
16406cat confdefs.h >>conftest.$ac_ext
16407cat >>conftest.$ac_ext <<_ACEOF
16408/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016409#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016410int
16411main ()
16412{
16413void *x=symlink
16414 ;
16415 return 0;
16416}
16417_ACEOF
16418rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016419if { (ac_try="$ac_compile"
16420case "(($ac_try" in
16421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16422 *) ac_try_echo=$ac_try;;
16423esac
16424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16425 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016427 grep -v '^ *+' conftest.er1 >conftest.err
16428 rm -f conftest.er1
16429 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016431 (exit $ac_status); } && {
16432 test -z "$ac_c_werror_flag" ||
16433 test ! -s conftest.err
16434 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016435
16436cat >>confdefs.h <<\_ACEOF
16437#define HAVE_SYMLINK 1
16438_ACEOF
16439
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440 { echo "$as_me:$LINENO: result: yes" >&5
16441echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016442else
16443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016444sed 's/^/| /' conftest.$ac_ext >&5
16445
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446 { echo "$as_me:$LINENO: result: no" >&5
16447echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016448
16449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016450
16451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16452{ echo "$as_me:$LINENO: checking for fchdir" >&5
16453echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016455/* confdefs.h. */
16456_ACEOF
16457cat confdefs.h >>conftest.$ac_ext
16458cat >>conftest.$ac_ext <<_ACEOF
16459/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016460#include <unistd.h>
16461int
16462main ()
16463{
16464void *x=fchdir
16465 ;
16466 return 0;
16467}
16468_ACEOF
16469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016470if { (ac_try="$ac_compile"
16471case "(($ac_try" in
16472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16473 *) ac_try_echo=$ac_try;;
16474esac
16475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016478 grep -v '^ *+' conftest.er1 >conftest.err
16479 rm -f conftest.er1
16480 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016482 (exit $ac_status); } && {
16483 test -z "$ac_c_werror_flag" ||
16484 test ! -s conftest.err
16485 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016486
16487cat >>confdefs.h <<\_ACEOF
16488#define HAVE_FCHDIR 1
16489_ACEOF
16490
Martin v. Löwiseba40652007-08-30 20:10:57 +000016491 { echo "$as_me:$LINENO: result: yes" >&5
16492echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016493else
16494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016495sed 's/^/| /' conftest.$ac_ext >&5
16496
Martin v. Löwiseba40652007-08-30 20:10:57 +000016497 { echo "$as_me:$LINENO: result: no" >&5
16498echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016499
16500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016501
16502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16503{ echo "$as_me:$LINENO: checking for fsync" >&5
16504echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016506/* confdefs.h. */
16507_ACEOF
16508cat confdefs.h >>conftest.$ac_ext
16509cat >>conftest.$ac_ext <<_ACEOF
16510/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016511#include <unistd.h>
16512int
16513main ()
16514{
16515void *x=fsync
16516 ;
16517 return 0;
16518}
16519_ACEOF
16520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016521if { (ac_try="$ac_compile"
16522case "(($ac_try" in
16523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16524 *) ac_try_echo=$ac_try;;
16525esac
16526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016529 grep -v '^ *+' conftest.er1 >conftest.err
16530 rm -f conftest.er1
16531 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016533 (exit $ac_status); } && {
16534 test -z "$ac_c_werror_flag" ||
16535 test ! -s conftest.err
16536 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016537
16538cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016539#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016540_ACEOF
16541
Martin v. Löwiseba40652007-08-30 20:10:57 +000016542 { echo "$as_me:$LINENO: result: yes" >&5
16543echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016544else
16545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016546sed 's/^/| /' conftest.$ac_ext >&5
16547
Martin v. Löwiseba40652007-08-30 20:10:57 +000016548 { echo "$as_me:$LINENO: result: no" >&5
16549echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016550
16551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016552
16553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16554{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16555echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016557/* confdefs.h. */
16558_ACEOF
16559cat confdefs.h >>conftest.$ac_ext
16560cat >>conftest.$ac_ext <<_ACEOF
16561/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016562#include <unistd.h>
16563int
16564main ()
16565{
16566void *x=fdatasync
16567 ;
16568 return 0;
16569}
16570_ACEOF
16571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016572if { (ac_try="$ac_compile"
16573case "(($ac_try" in
16574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16575 *) ac_try_echo=$ac_try;;
16576esac
16577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016580 grep -v '^ *+' conftest.er1 >conftest.err
16581 rm -f conftest.er1
16582 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584 (exit $ac_status); } && {
16585 test -z "$ac_c_werror_flag" ||
16586 test ! -s conftest.err
16587 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016588
16589cat >>confdefs.h <<\_ACEOF
16590#define HAVE_FDATASYNC 1
16591_ACEOF
16592
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 { echo "$as_me:$LINENO: result: yes" >&5
16594echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016595else
16596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016597sed 's/^/| /' conftest.$ac_ext >&5
16598
Martin v. Löwiseba40652007-08-30 20:10:57 +000016599 { echo "$as_me:$LINENO: result: no" >&5
16600echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016601
16602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016603
16604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016605{ echo "$as_me:$LINENO: checking for epoll" >&5
16606echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16607cat >conftest.$ac_ext <<_ACEOF
16608/* confdefs.h. */
16609_ACEOF
16610cat confdefs.h >>conftest.$ac_ext
16611cat >>conftest.$ac_ext <<_ACEOF
16612/* end confdefs.h. */
16613#include <sys/epoll.h>
16614int
16615main ()
16616{
16617void *x=epoll_create
16618 ;
16619 return 0;
16620}
16621_ACEOF
16622rm -f conftest.$ac_objext
16623if { (ac_try="$ac_compile"
16624case "(($ac_try" in
16625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16626 *) ac_try_echo=$ac_try;;
16627esac
16628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16629 (eval "$ac_compile") 2>conftest.er1
16630 ac_status=$?
16631 grep -v '^ *+' conftest.er1 >conftest.err
16632 rm -f conftest.er1
16633 cat conftest.err >&5
16634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16635 (exit $ac_status); } && {
16636 test -z "$ac_c_werror_flag" ||
16637 test ! -s conftest.err
16638 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016639
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016640cat >>confdefs.h <<\_ACEOF
16641#define HAVE_EPOLL 1
16642_ACEOF
16643
16644 { echo "$as_me:$LINENO: result: yes" >&5
16645echo "${ECHO_T}yes" >&6; }
16646else
16647 echo "$as_me: failed program was:" >&5
16648sed 's/^/| /' conftest.$ac_ext >&5
16649
16650 { echo "$as_me:$LINENO: result: no" >&5
16651echo "${ECHO_T}no" >&6; }
16652
16653fi
16654
16655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16656{ echo "$as_me:$LINENO: checking for kqueue" >&5
16657echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16658cat >conftest.$ac_ext <<_ACEOF
16659/* confdefs.h. */
16660_ACEOF
16661cat confdefs.h >>conftest.$ac_ext
16662cat >>conftest.$ac_ext <<_ACEOF
16663/* end confdefs.h. */
16664
16665#include <sys/types.h>
16666#include <sys/event.h>
16667
16668int
16669main ()
16670{
16671int x=kqueue()
16672 ;
16673 return 0;
16674}
16675_ACEOF
16676rm -f conftest.$ac_objext
16677if { (ac_try="$ac_compile"
16678case "(($ac_try" in
16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16680 *) ac_try_echo=$ac_try;;
16681esac
16682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16683 (eval "$ac_compile") 2>conftest.er1
16684 ac_status=$?
16685 grep -v '^ *+' conftest.er1 >conftest.err
16686 rm -f conftest.er1
16687 cat conftest.err >&5
16688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16689 (exit $ac_status); } && {
16690 test -z "$ac_c_werror_flag" ||
16691 test ! -s conftest.err
16692 } && test -s conftest.$ac_objext; then
16693
16694cat >>confdefs.h <<\_ACEOF
16695#define HAVE_KQUEUE 1
16696_ACEOF
16697
16698 { echo "$as_me:$LINENO: result: yes" >&5
16699echo "${ECHO_T}yes" >&6; }
16700else
16701 echo "$as_me: failed program was:" >&5
16702sed 's/^/| /' conftest.$ac_ext >&5
16703
16704 { echo "$as_me:$LINENO: result: no" >&5
16705echo "${ECHO_T}no" >&6; }
16706
16707fi
16708
16709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016710# On some systems (eg. FreeBSD 5), we would find a definition of the
16711# functions ctermid_r, setgroups in the library, but no prototype
16712# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16713# address to avoid compiler warnings and potential miscompilations
16714# because of the missing prototypes.
16715
Martin v. Löwiseba40652007-08-30 20:10:57 +000016716{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16717echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016719/* confdefs.h. */
16720_ACEOF
16721cat confdefs.h >>conftest.$ac_ext
16722cat >>conftest.$ac_ext <<_ACEOF
16723/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016724
16725#include "confdefs.h"
16726#include <stdio.h>
16727
Martin v. Löwisd5843682002-11-21 20:41:28 +000016728int
16729main ()
16730{
16731void* p = ctermid_r
16732 ;
16733 return 0;
16734}
16735_ACEOF
16736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016737if { (ac_try="$ac_compile"
16738case "(($ac_try" in
16739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16740 *) ac_try_echo=$ac_try;;
16741esac
16742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016745 grep -v '^ *+' conftest.er1 >conftest.err
16746 rm -f conftest.er1
16747 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749 (exit $ac_status); } && {
16750 test -z "$ac_c_werror_flag" ||
16751 test ! -s conftest.err
16752 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016753
16754cat >>confdefs.h <<\_ACEOF
16755#define HAVE_CTERMID_R 1
16756_ACEOF
16757
Martin v. Löwiseba40652007-08-30 20:10:57 +000016758 { echo "$as_me:$LINENO: result: yes" >&5
16759echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016760else
16761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016762sed 's/^/| /' conftest.$ac_ext >&5
16763
Martin v. Löwiseba40652007-08-30 20:10:57 +000016764 { echo "$as_me:$LINENO: result: no" >&5
16765echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016766
16767fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016768
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16770
16771{ echo "$as_me:$LINENO: checking for flock" >&5
16772echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016774/* confdefs.h. */
16775_ACEOF
16776cat confdefs.h >>conftest.$ac_ext
16777cat >>conftest.$ac_ext <<_ACEOF
16778/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016779
16780#include "confdefs.h"
16781#include <sys/file.h>
16782
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016783int
16784main ()
16785{
16786void* p = flock
16787 ;
16788 return 0;
16789}
16790_ACEOF
16791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792if { (ac_try="$ac_compile"
16793case "(($ac_try" in
16794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16795 *) ac_try_echo=$ac_try;;
16796esac
16797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016800 grep -v '^ *+' conftest.er1 >conftest.err
16801 rm -f conftest.er1
16802 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016804 (exit $ac_status); } && {
16805 test -z "$ac_c_werror_flag" ||
16806 test ! -s conftest.err
16807 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016808
16809cat >>confdefs.h <<\_ACEOF
16810#define HAVE_FLOCK 1
16811_ACEOF
16812
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813 { echo "$as_me:$LINENO: result: yes" >&5
16814echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016815else
16816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016817sed 's/^/| /' conftest.$ac_ext >&5
16818
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819 { echo "$as_me:$LINENO: result: no" >&5
16820echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016821
16822fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016823
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16825
16826{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16827echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016829/* confdefs.h. */
16830_ACEOF
16831cat confdefs.h >>conftest.$ac_ext
16832cat >>conftest.$ac_ext <<_ACEOF
16833/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016834
16835#include "confdefs.h"
16836#include <unistd.h>
16837
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016838int
16839main ()
16840{
16841void* p = getpagesize
16842 ;
16843 return 0;
16844}
16845_ACEOF
16846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016847if { (ac_try="$ac_compile"
16848case "(($ac_try" in
16849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16850 *) ac_try_echo=$ac_try;;
16851esac
16852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016855 grep -v '^ *+' conftest.er1 >conftest.err
16856 rm -f conftest.er1
16857 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016859 (exit $ac_status); } && {
16860 test -z "$ac_c_werror_flag" ||
16861 test ! -s conftest.err
16862 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016863
16864cat >>confdefs.h <<\_ACEOF
16865#define HAVE_GETPAGESIZE 1
16866_ACEOF
16867
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868 { echo "$as_me:$LINENO: result: yes" >&5
16869echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016870else
16871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016872sed 's/^/| /' conftest.$ac_ext >&5
16873
Martin v. Löwiseba40652007-08-30 20:10:57 +000016874 { echo "$as_me:$LINENO: result: no" >&5
16875echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016876
16877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016878
16879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016880
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016881for ac_prog in true
16882do
16883 # Extract the first word of "$ac_prog", so it can be a program name with args.
16884set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016885{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16886echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016887if test "${ac_cv_prog_TRUE+set}" = set; then
16888 echo $ECHO_N "(cached) $ECHO_C" >&6
16889else
16890 if test -n "$TRUE"; then
16891 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16892else
16893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16894for as_dir in $PATH
16895do
16896 IFS=$as_save_IFS
16897 test -z "$as_dir" && as_dir=.
16898 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899 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 +000016900 ac_cv_prog_TRUE="$ac_prog"
16901 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16902 break 2
16903 fi
16904done
16905done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016907
16908fi
16909fi
16910TRUE=$ac_cv_prog_TRUE
16911if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016912 { echo "$as_me:$LINENO: result: $TRUE" >&5
16913echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016914else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915 { echo "$as_me:$LINENO: result: no" >&5
16916echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016917fi
16918
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016920 test -n "$TRUE" && break
16921done
16922test -n "$TRUE" || TRUE="/bin/true"
16923
16924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16926echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016927if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16928 echo $ECHO_N "(cached) $ECHO_C" >&6
16929else
16930 ac_check_lib_save_LIBS=$LIBS
16931LIBS="-lc $LIBS"
16932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016933/* confdefs.h. */
16934_ACEOF
16935cat confdefs.h >>conftest.$ac_ext
16936cat >>conftest.$ac_ext <<_ACEOF
16937/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016938
Martin v. Löwiseba40652007-08-30 20:10:57 +000016939/* Override any GCC internal prototype to avoid an error.
16940 Use char because int might match the return type of a GCC
16941 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016942#ifdef __cplusplus
16943extern "C"
16944#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016945char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016946int
16947main ()
16948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016949return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016950 ;
16951 return 0;
16952}
16953_ACEOF
16954rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016955if { (ac_try="$ac_link"
16956case "(($ac_try" in
16957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16958 *) ac_try_echo=$ac_try;;
16959esac
16960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16961 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016963 grep -v '^ *+' conftest.er1 >conftest.err
16964 rm -f conftest.er1
16965 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016967 (exit $ac_status); } && {
16968 test -z "$ac_c_werror_flag" ||
16969 test ! -s conftest.err
16970 } && test -s conftest$ac_exeext &&
16971 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016972 ac_cv_lib_c_inet_aton=yes
16973else
16974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016975sed 's/^/| /' conftest.$ac_ext >&5
16976
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016979
16980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016982LIBS=$ac_check_lib_save_LIBS
16983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016984{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16985echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016986if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016987 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016988else
16989
Martin v. Löwiseba40652007-08-30 20:10:57 +000016990{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16991echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016992if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16993 echo $ECHO_N "(cached) $ECHO_C" >&6
16994else
16995 ac_check_lib_save_LIBS=$LIBS
16996LIBS="-lresolv $LIBS"
16997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016998/* confdefs.h. */
16999_ACEOF
17000cat confdefs.h >>conftest.$ac_ext
17001cat >>conftest.$ac_ext <<_ACEOF
17002/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017003
Martin v. Löwiseba40652007-08-30 20:10:57 +000017004/* Override any GCC internal prototype to avoid an error.
17005 Use char because int might match the return type of a GCC
17006 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017007#ifdef __cplusplus
17008extern "C"
17009#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017010char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017011int
17012main ()
17013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017014return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017015 ;
17016 return 0;
17017}
17018_ACEOF
17019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020if { (ac_try="$ac_link"
17021case "(($ac_try" in
17022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17023 *) ac_try_echo=$ac_try;;
17024esac
17025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017028 grep -v '^ *+' conftest.er1 >conftest.err
17029 rm -f conftest.er1
17030 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017032 (exit $ac_status); } && {
17033 test -z "$ac_c_werror_flag" ||
17034 test ! -s conftest.err
17035 } && test -s conftest$ac_exeext &&
17036 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017037 ac_cv_lib_resolv_inet_aton=yes
17038else
17039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017040sed 's/^/| /' conftest.$ac_ext >&5
17041
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044
17045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017047LIBS=$ac_check_lib_save_LIBS
17048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017049{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17050echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017051if test $ac_cv_lib_resolv_inet_aton = yes; then
17052 cat >>confdefs.h <<_ACEOF
17053#define HAVE_LIBRESOLV 1
17054_ACEOF
17055
17056 LIBS="-lresolv $LIBS"
17057
17058fi
17059
17060
17061fi
17062
17063
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017064# On Tru64, chflags seems to be present, but calling it will
17065# exit Python
17066{ echo "$as_me:$LINENO: checking for chflags" >&5
17067echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17068if test "$cross_compiling" = yes; then
17069 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17070See \`config.log' for more details." >&5
17071echo "$as_me: error: cannot run test program while cross compiling
17072See \`config.log' for more details." >&2;}
17073 { (exit 1); exit 1; }; }
17074else
17075 cat >conftest.$ac_ext <<_ACEOF
17076/* confdefs.h. */
17077_ACEOF
17078cat confdefs.h >>conftest.$ac_ext
17079cat >>conftest.$ac_ext <<_ACEOF
17080/* end confdefs.h. */
17081
17082#include <sys/stat.h>
17083#include <unistd.h>
17084int main(int argc, char*argv[])
17085{
17086 if(chflags(argv[0], 0) != 0)
17087 return 1;
17088 return 0;
17089}
17090
17091_ACEOF
17092rm -f conftest$ac_exeext
17093if { (ac_try="$ac_link"
17094case "(($ac_try" in
17095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17096 *) ac_try_echo=$ac_try;;
17097esac
17098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17099 (eval "$ac_link") 2>&5
17100 ac_status=$?
17101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17103 { (case "(($ac_try" in
17104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17105 *) ac_try_echo=$ac_try;;
17106esac
17107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17108 (eval "$ac_try") 2>&5
17109 ac_status=$?
17110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17111 (exit $ac_status); }; }; then
17112
17113cat >>confdefs.h <<\_ACEOF
17114#define HAVE_CHFLAGS 1
17115_ACEOF
17116
17117 { echo "$as_me:$LINENO: result: yes" >&5
17118echo "${ECHO_T}yes" >&6; }
17119else
17120 echo "$as_me: program exited with status $ac_status" >&5
17121echo "$as_me: failed program was:" >&5
17122sed 's/^/| /' conftest.$ac_ext >&5
17123
17124( exit $ac_status )
17125{ echo "$as_me:$LINENO: result: no" >&5
17126echo "${ECHO_T}no" >&6; }
17127
17128fi
17129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17130fi
17131
17132
17133
17134{ echo "$as_me:$LINENO: checking for lchflags" >&5
17135echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17136if test "$cross_compiling" = yes; then
17137 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17138See \`config.log' for more details." >&5
17139echo "$as_me: error: cannot run test program while cross compiling
17140See \`config.log' for more details." >&2;}
17141 { (exit 1); exit 1; }; }
17142else
17143 cat >conftest.$ac_ext <<_ACEOF
17144/* confdefs.h. */
17145_ACEOF
17146cat confdefs.h >>conftest.$ac_ext
17147cat >>conftest.$ac_ext <<_ACEOF
17148/* end confdefs.h. */
17149
17150#include <sys/stat.h>
17151#include <unistd.h>
17152int main(int argc, char*argv[])
17153{
17154 if(lchflags(argv[0], 0) != 0)
17155 return 1;
17156 return 0;
17157}
17158
17159_ACEOF
17160rm -f conftest$ac_exeext
17161if { (ac_try="$ac_link"
17162case "(($ac_try" in
17163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17164 *) ac_try_echo=$ac_try;;
17165esac
17166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17167 (eval "$ac_link") 2>&5
17168 ac_status=$?
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17171 { (case "(($ac_try" in
17172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17173 *) ac_try_echo=$ac_try;;
17174esac
17175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17176 (eval "$ac_try") 2>&5
17177 ac_status=$?
17178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17179 (exit $ac_status); }; }; then
17180
17181cat >>confdefs.h <<\_ACEOF
17182#define HAVE_LCHFLAGS 1
17183_ACEOF
17184
17185 { echo "$as_me:$LINENO: result: yes" >&5
17186echo "${ECHO_T}yes" >&6; }
17187else
17188 echo "$as_me: program exited with status $ac_status" >&5
17189echo "$as_me: failed program was:" >&5
17190sed 's/^/| /' conftest.$ac_ext >&5
17191
17192( exit $ac_status )
17193{ echo "$as_me:$LINENO: result: no" >&5
17194echo "${ECHO_T}no" >&6; }
17195
17196fi
17197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17198fi
17199
17200
17201
Ronald Oussorenf8752642006-07-06 10:13:35 +000017202case $ac_sys_system/$ac_sys_release in
17203Darwin/*)
17204 _CUR_CFLAGS="${CFLAGS}"
17205 _CUR_LDFLAGS="${LDFLAGS}"
17206 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17207 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17208 ;;
17209esac
17210
Martin v. Löwiseba40652007-08-30 20:10:57 +000017211{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17212echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017213if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17214 echo $ECHO_N "(cached) $ECHO_C" >&6
17215else
17216 ac_check_lib_save_LIBS=$LIBS
17217LIBS="-lz $LIBS"
17218cat >conftest.$ac_ext <<_ACEOF
17219/* confdefs.h. */
17220_ACEOF
17221cat confdefs.h >>conftest.$ac_ext
17222cat >>conftest.$ac_ext <<_ACEOF
17223/* end confdefs.h. */
17224
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225/* Override any GCC internal prototype to avoid an error.
17226 Use char because int might match the return type of a GCC
17227 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017228#ifdef __cplusplus
17229extern "C"
17230#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017231char inflateCopy ();
17232int
17233main ()
17234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017235return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017236 ;
17237 return 0;
17238}
17239_ACEOF
17240rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241if { (ac_try="$ac_link"
17242case "(($ac_try" in
17243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17244 *) ac_try_echo=$ac_try;;
17245esac
17246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17247 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017248 ac_status=$?
17249 grep -v '^ *+' conftest.er1 >conftest.err
17250 rm -f conftest.er1
17251 cat conftest.err >&5
17252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017253 (exit $ac_status); } && {
17254 test -z "$ac_c_werror_flag" ||
17255 test ! -s conftest.err
17256 } && test -s conftest$ac_exeext &&
17257 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017258 ac_cv_lib_z_inflateCopy=yes
17259else
17260 echo "$as_me: failed program was:" >&5
17261sed 's/^/| /' conftest.$ac_ext >&5
17262
Martin v. Löwiseba40652007-08-30 20:10:57 +000017263 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265
17266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017267 conftest$ac_exeext conftest.$ac_ext
17268LIBS=$ac_check_lib_save_LIBS
17269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017270{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17271echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017272if test $ac_cv_lib_z_inflateCopy = yes; then
17273
17274cat >>confdefs.h <<\_ACEOF
17275#define HAVE_ZLIB_COPY 1
17276_ACEOF
17277
17278fi
17279
17280
Ronald Oussorenf8752642006-07-06 10:13:35 +000017281case $ac_sys_system/$ac_sys_release in
17282Darwin/*)
17283 CFLAGS="${_CUR_CFLAGS}"
17284 LDFLAGS="${_CUR_LDFLAGS}"
17285 ;;
17286esac
17287
Martin v. Löwiseba40652007-08-30 20:10:57 +000017288{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17289echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017291/* confdefs.h. */
17292_ACEOF
17293cat confdefs.h >>conftest.$ac_ext
17294cat >>conftest.$ac_ext <<_ACEOF
17295/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017296
17297#include "confdefs.h"
17298#include <netdb.h>
17299
Martin v. Löwise9416172003-05-03 10:12:45 +000017300int
17301main ()
17302{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017303void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017304 ;
17305 return 0;
17306}
17307_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017309if { (ac_try="$ac_link"
17310case "(($ac_try" in
17311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17312 *) ac_try_echo=$ac_try;;
17313esac
17314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017317 grep -v '^ *+' conftest.er1 >conftest.err
17318 rm -f conftest.er1
17319 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321 (exit $ac_status); } && {
17322 test -z "$ac_c_werror_flag" ||
17323 test ! -s conftest.err
17324 } && test -s conftest$ac_exeext &&
17325 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017326
17327cat >>confdefs.h <<\_ACEOF
17328#define HAVE_HSTRERROR 1
17329_ACEOF
17330
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331 { echo "$as_me:$LINENO: result: yes" >&5
17332echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017333else
17334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017335sed 's/^/| /' conftest.$ac_ext >&5
17336
Martin v. Löwiseba40652007-08-30 20:10:57 +000017337 { echo "$as_me:$LINENO: result: no" >&5
17338echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017339
17340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341
17342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017344
Martin v. Löwiseba40652007-08-30 20:10:57 +000017345{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17346echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017347cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017348/* confdefs.h. */
17349_ACEOF
17350cat confdefs.h >>conftest.$ac_ext
17351cat >>conftest.$ac_ext <<_ACEOF
17352/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017353
17354#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017355#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017356#include <sys/socket.h>
17357#include <netinet/in.h>
17358#include <arpa/inet.h>
17359
Martin v. Löwise9416172003-05-03 10:12:45 +000017360int
17361main ()
17362{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017363void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017364 ;
17365 return 0;
17366}
17367_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017368rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017369if { (ac_try="$ac_link"
17370case "(($ac_try" in
17371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17372 *) ac_try_echo=$ac_try;;
17373esac
17374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17375 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017377 grep -v '^ *+' conftest.er1 >conftest.err
17378 rm -f conftest.er1
17379 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017381 (exit $ac_status); } && {
17382 test -z "$ac_c_werror_flag" ||
17383 test ! -s conftest.err
17384 } && test -s conftest$ac_exeext &&
17385 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017386
17387cat >>confdefs.h <<\_ACEOF
17388#define HAVE_INET_ATON 1
17389_ACEOF
17390
Martin v. Löwiseba40652007-08-30 20:10:57 +000017391 { echo "$as_me:$LINENO: result: yes" >&5
17392echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017393else
17394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017395sed 's/^/| /' conftest.$ac_ext >&5
17396
Martin v. Löwiseba40652007-08-30 20:10:57 +000017397 { echo "$as_me:$LINENO: result: no" >&5
17398echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017399
17400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017401
17402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017404
Martin v. Löwiseba40652007-08-30 20:10:57 +000017405{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17406echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017407cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017408/* confdefs.h. */
17409_ACEOF
17410cat confdefs.h >>conftest.$ac_ext
17411cat >>conftest.$ac_ext <<_ACEOF
17412/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017413
17414#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017415#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017416#include <sys/socket.h>
17417#include <netinet/in.h>
17418#include <arpa/inet.h>
17419
Martin v. Löwise9416172003-05-03 10:12:45 +000017420int
17421main ()
17422{
17423void* p = inet_pton
17424 ;
17425 return 0;
17426}
17427_ACEOF
17428rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017429if { (ac_try="$ac_compile"
17430case "(($ac_try" in
17431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17432 *) ac_try_echo=$ac_try;;
17433esac
17434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017437 grep -v '^ *+' conftest.er1 >conftest.err
17438 rm -f conftest.er1
17439 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017441 (exit $ac_status); } && {
17442 test -z "$ac_c_werror_flag" ||
17443 test ! -s conftest.err
17444 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017445
17446cat >>confdefs.h <<\_ACEOF
17447#define HAVE_INET_PTON 1
17448_ACEOF
17449
Martin v. Löwiseba40652007-08-30 20:10:57 +000017450 { echo "$as_me:$LINENO: result: yes" >&5
17451echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017452else
17453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017454sed 's/^/| /' conftest.$ac_ext >&5
17455
Martin v. Löwiseba40652007-08-30 20:10:57 +000017456 { echo "$as_me:$LINENO: result: no" >&5
17457echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017458
17459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017460
17461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017462
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017463# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017464{ echo "$as_me:$LINENO: checking for setgroups" >&5
17465echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017467/* confdefs.h. */
17468_ACEOF
17469cat confdefs.h >>conftest.$ac_ext
17470cat >>conftest.$ac_ext <<_ACEOF
17471/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017472
17473#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017474#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017475#ifdef HAVE_GRP_H
17476#include <grp.h>
17477#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017478
Martin v. Löwisd5843682002-11-21 20:41:28 +000017479int
17480main ()
17481{
17482void* p = setgroups
17483 ;
17484 return 0;
17485}
17486_ACEOF
17487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017488if { (ac_try="$ac_compile"
17489case "(($ac_try" in
17490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17491 *) ac_try_echo=$ac_try;;
17492esac
17493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017496 grep -v '^ *+' conftest.er1 >conftest.err
17497 rm -f conftest.er1
17498 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017500 (exit $ac_status); } && {
17501 test -z "$ac_c_werror_flag" ||
17502 test ! -s conftest.err
17503 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017504
17505cat >>confdefs.h <<\_ACEOF
17506#define HAVE_SETGROUPS 1
17507_ACEOF
17508
Martin v. Löwiseba40652007-08-30 20:10:57 +000017509 { echo "$as_me:$LINENO: result: yes" >&5
17510echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017511else
17512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017513sed 's/^/| /' conftest.$ac_ext >&5
17514
Martin v. Löwiseba40652007-08-30 20:10:57 +000017515 { echo "$as_me:$LINENO: result: no" >&5
17516echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017517
17518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017519
17520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017521
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017522# check for openpty and forkpty
17523
Martin v. Löwis11437992002-04-12 09:54:03 +000017524
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017525for ac_func in openpty
17526do
Martin v. Löwis11437992002-04-12 09:54:03 +000017527as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017528{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17529echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17530if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017532else
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017534/* confdefs.h. */
17535_ACEOF
17536cat confdefs.h >>conftest.$ac_ext
17537cat >>conftest.$ac_ext <<_ACEOF
17538/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017539/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17540 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17541#define $ac_func innocuous_$ac_func
17542
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017543/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017544 which can conflict with char $ac_func (); below.
17545 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017546 <limits.h> exists even on freestanding compilers. */
17547
17548#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017549# include <limits.h>
17550#else
17551# include <assert.h>
17552#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017553
17554#undef $ac_func
17555
Martin v. Löwiseba40652007-08-30 20:10:57 +000017556/* Override any GCC internal prototype to avoid an error.
17557 Use char because int might match the return type of a GCC
17558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017559#ifdef __cplusplus
17560extern "C"
17561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017562char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017563/* The GNU C library defines this for functions which it implements
17564 to always fail with ENOSYS. Some functions are actually named
17565 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017566#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017567choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017568#endif
17569
Skip Montanaro6dead952003-09-25 14:50:04 +000017570int
17571main ()
17572{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017573return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017574 ;
17575 return 0;
17576}
17577_ACEOF
17578rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017579if { (ac_try="$ac_link"
17580case "(($ac_try" in
17581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17582 *) ac_try_echo=$ac_try;;
17583esac
17584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17585 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017587 grep -v '^ *+' conftest.er1 >conftest.err
17588 rm -f conftest.er1
17589 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017591 (exit $ac_status); } && {
17592 test -z "$ac_c_werror_flag" ||
17593 test ! -s conftest.err
17594 } && test -s conftest$ac_exeext &&
17595 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017597else
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017599sed 's/^/| /' conftest.$ac_ext >&5
17600
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017603
17604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017605 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017607ac_res=`eval echo '${'$as_ac_var'}'`
17608 { echo "$as_me:$LINENO: result: $ac_res" >&5
17609echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017610if test `eval echo '${'$as_ac_var'}'` = yes; then
17611 cat >>confdefs.h <<_ACEOF
17612#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17613_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017614
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017615else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017616 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17617echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017618if test "${ac_cv_lib_util_openpty+set}" = set; then
17619 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017620else
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017622LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017624/* confdefs.h. */
17625_ACEOF
17626cat confdefs.h >>conftest.$ac_ext
17627cat >>conftest.$ac_ext <<_ACEOF
17628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017629
Martin v. Löwiseba40652007-08-30 20:10:57 +000017630/* Override any GCC internal prototype to avoid an error.
17631 Use char because int might match the return type of a GCC
17632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017633#ifdef __cplusplus
17634extern "C"
17635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017636char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017637int
17638main ()
17639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017640return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 ;
17642 return 0;
17643}
17644_ACEOF
17645rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017646if { (ac_try="$ac_link"
17647case "(($ac_try" in
17648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17649 *) ac_try_echo=$ac_try;;
17650esac
17651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17652 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017654 grep -v '^ *+' conftest.er1 >conftest.err
17655 rm -f conftest.er1
17656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017658 (exit $ac_status); } && {
17659 test -z "$ac_c_werror_flag" ||
17660 test ! -s conftest.err
17661 } && test -s conftest$ac_exeext &&
17662 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017664else
Martin v. Löwis11437992002-04-12 09:54:03 +000017665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017666sed 's/^/| /' conftest.$ac_ext >&5
17667
Martin v. Löwiseba40652007-08-30 20:10:57 +000017668 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017670
17671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017673LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017675{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17676echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017677if test $ac_cv_lib_util_openpty = yes; then
17678 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017679#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017680_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017681 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017682else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017683 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17684echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017685if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17686 echo $ECHO_N "(cached) $ECHO_C" >&6
17687else
17688 ac_check_lib_save_LIBS=$LIBS
17689LIBS="-lbsd $LIBS"
17690cat >conftest.$ac_ext <<_ACEOF
17691/* confdefs.h. */
17692_ACEOF
17693cat confdefs.h >>conftest.$ac_ext
17694cat >>conftest.$ac_ext <<_ACEOF
17695/* end confdefs.h. */
17696
Martin v. Löwiseba40652007-08-30 20:10:57 +000017697/* Override any GCC internal prototype to avoid an error.
17698 Use char because int might match the return type of a GCC
17699 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017700#ifdef __cplusplus
17701extern "C"
17702#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017703char openpty ();
17704int
17705main ()
17706{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017707return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017708 ;
17709 return 0;
17710}
17711_ACEOF
17712rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017713if { (ac_try="$ac_link"
17714case "(($ac_try" in
17715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17716 *) ac_try_echo=$ac_try;;
17717esac
17718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17719 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017720 ac_status=$?
17721 grep -v '^ *+' conftest.er1 >conftest.err
17722 rm -f conftest.er1
17723 cat conftest.err >&5
17724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017725 (exit $ac_status); } && {
17726 test -z "$ac_c_werror_flag" ||
17727 test ! -s conftest.err
17728 } && test -s conftest$ac_exeext &&
17729 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017730 ac_cv_lib_bsd_openpty=yes
17731else
17732 echo "$as_me: failed program was:" >&5
17733sed 's/^/| /' conftest.$ac_ext >&5
17734
Martin v. Löwiseba40652007-08-30 20:10:57 +000017735 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017737
17738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017739 conftest$ac_exeext conftest.$ac_ext
17740LIBS=$ac_check_lib_save_LIBS
17741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017742{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17743echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017744if test $ac_cv_lib_bsd_openpty = yes; then
17745 cat >>confdefs.h <<\_ACEOF
17746#define HAVE_OPENPTY 1
17747_ACEOF
17748 LIBS="$LIBS -lbsd"
17749fi
17750
17751
17752fi
17753
Fred Drake8cef4cf2000-06-28 16:40:38 +000017754
17755fi
17756done
17757
Martin v. Löwis11437992002-04-12 09:54:03 +000017758
Fred Drake8cef4cf2000-06-28 16:40:38 +000017759for ac_func in forkpty
17760do
Martin v. Löwis11437992002-04-12 09:54:03 +000017761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17764if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017766else
Martin v. Löwis11437992002-04-12 09:54:03 +000017767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017768/* confdefs.h. */
17769_ACEOF
17770cat confdefs.h >>conftest.$ac_ext
17771cat >>conftest.$ac_ext <<_ACEOF
17772/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017773/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17774 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17775#define $ac_func innocuous_$ac_func
17776
Fred Drake8cef4cf2000-06-28 16:40:38 +000017777/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017778 which can conflict with char $ac_func (); below.
17779 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017780 <limits.h> exists even on freestanding compilers. */
17781
17782#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017783# include <limits.h>
17784#else
17785# include <assert.h>
17786#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017787
17788#undef $ac_func
17789
Martin v. Löwiseba40652007-08-30 20:10:57 +000017790/* Override any GCC internal prototype to avoid an error.
17791 Use char because int might match the return type of a GCC
17792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017793#ifdef __cplusplus
17794extern "C"
17795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017796char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017797/* The GNU C library defines this for functions which it implements
17798 to always fail with ENOSYS. Some functions are actually named
17799 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017801choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017802#endif
17803
Skip Montanaro6dead952003-09-25 14:50:04 +000017804int
17805main ()
17806{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017807return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017808 ;
17809 return 0;
17810}
17811_ACEOF
17812rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813if { (ac_try="$ac_link"
17814case "(($ac_try" in
17815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17816 *) ac_try_echo=$ac_try;;
17817esac
17818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17819 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017821 grep -v '^ *+' conftest.er1 >conftest.err
17822 rm -f conftest.er1
17823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017825 (exit $ac_status); } && {
17826 test -z "$ac_c_werror_flag" ||
17827 test ! -s conftest.err
17828 } && test -s conftest$ac_exeext &&
17829 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017830 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017831else
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017833sed 's/^/| /' conftest.$ac_ext >&5
17834
Martin v. Löwiseba40652007-08-30 20:10:57 +000017835 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837
17838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017839 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017841ac_res=`eval echo '${'$as_ac_var'}'`
17842 { echo "$as_me:$LINENO: result: $ac_res" >&5
17843echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017844if test `eval echo '${'$as_ac_var'}'` = yes; then
17845 cat >>confdefs.h <<_ACEOF
17846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17847_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017848
Fred Drake8cef4cf2000-06-28 16:40:38 +000017849else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017850 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17851echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017852if test "${ac_cv_lib_util_forkpty+set}" = set; then
17853 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017854else
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017856LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017858/* confdefs.h. */
17859_ACEOF
17860cat confdefs.h >>conftest.$ac_ext
17861cat >>conftest.$ac_ext <<_ACEOF
17862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017863
Martin v. Löwiseba40652007-08-30 20:10:57 +000017864/* Override any GCC internal prototype to avoid an error.
17865 Use char because int might match the return type of a GCC
17866 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017867#ifdef __cplusplus
17868extern "C"
17869#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017870char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017871int
17872main ()
17873{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017875 ;
17876 return 0;
17877}
17878_ACEOF
17879rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017880if { (ac_try="$ac_link"
17881case "(($ac_try" in
17882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17883 *) ac_try_echo=$ac_try;;
17884esac
17885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017888 grep -v '^ *+' conftest.er1 >conftest.err
17889 rm -f conftest.er1
17890 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017892 (exit $ac_status); } && {
17893 test -z "$ac_c_werror_flag" ||
17894 test ! -s conftest.err
17895 } && test -s conftest$ac_exeext &&
17896 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017898else
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017900sed 's/^/| /' conftest.$ac_ext >&5
17901
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017904
17905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017907LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017909{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17910echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017911if test $ac_cv_lib_util_forkpty = yes; then
17912 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017913#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017914_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017915 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017916else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017917 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17918echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017919if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17920 echo $ECHO_N "(cached) $ECHO_C" >&6
17921else
17922 ac_check_lib_save_LIBS=$LIBS
17923LIBS="-lbsd $LIBS"
17924cat >conftest.$ac_ext <<_ACEOF
17925/* confdefs.h. */
17926_ACEOF
17927cat confdefs.h >>conftest.$ac_ext
17928cat >>conftest.$ac_ext <<_ACEOF
17929/* end confdefs.h. */
17930
Martin v. Löwiseba40652007-08-30 20:10:57 +000017931/* Override any GCC internal prototype to avoid an error.
17932 Use char because int might match the return type of a GCC
17933 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017934#ifdef __cplusplus
17935extern "C"
17936#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017937char forkpty ();
17938int
17939main ()
17940{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017941return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017942 ;
17943 return 0;
17944}
17945_ACEOF
17946rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947if { (ac_try="$ac_link"
17948case "(($ac_try" in
17949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17950 *) ac_try_echo=$ac_try;;
17951esac
17952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17953 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017954 ac_status=$?
17955 grep -v '^ *+' conftest.er1 >conftest.err
17956 rm -f conftest.er1
17957 cat conftest.err >&5
17958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017959 (exit $ac_status); } && {
17960 test -z "$ac_c_werror_flag" ||
17961 test ! -s conftest.err
17962 } && test -s conftest$ac_exeext &&
17963 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017964 ac_cv_lib_bsd_forkpty=yes
17965else
17966 echo "$as_me: failed program was:" >&5
17967sed 's/^/| /' conftest.$ac_ext >&5
17968
Martin v. Löwiseba40652007-08-30 20:10:57 +000017969 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017971
17972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017973 conftest$ac_exeext conftest.$ac_ext
17974LIBS=$ac_check_lib_save_LIBS
17975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017976{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17977echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017978if test $ac_cv_lib_bsd_forkpty = yes; then
17979 cat >>confdefs.h <<\_ACEOF
17980#define HAVE_FORKPTY 1
17981_ACEOF
17982 LIBS="$LIBS -lbsd"
17983fi
17984
17985
17986fi
17987
Fred Drake8cef4cf2000-06-28 16:40:38 +000017988
17989fi
17990done
17991
Jack Jansendd19cf82001-12-06 22:36:17 +000017992
Brett Cannonaa5778d2008-03-18 04:09:00 +000017993# Stuff for expat.
17994
17995for ac_func in memmove
17996do
17997as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17998{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17999echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18000if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18001 echo $ECHO_N "(cached) $ECHO_C" >&6
18002else
18003 cat >conftest.$ac_ext <<_ACEOF
18004/* confdefs.h. */
18005_ACEOF
18006cat confdefs.h >>conftest.$ac_ext
18007cat >>conftest.$ac_ext <<_ACEOF
18008/* end confdefs.h. */
18009/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18010 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18011#define $ac_func innocuous_$ac_func
18012
18013/* System header to define __stub macros and hopefully few prototypes,
18014 which can conflict with char $ac_func (); below.
18015 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18016 <limits.h> exists even on freestanding compilers. */
18017
18018#ifdef __STDC__
18019# include <limits.h>
18020#else
18021# include <assert.h>
18022#endif
18023
18024#undef $ac_func
18025
18026/* Override any GCC internal prototype to avoid an error.
18027 Use char because int might match the return type of a GCC
18028 builtin and then its argument prototype would still apply. */
18029#ifdef __cplusplus
18030extern "C"
18031#endif
18032char $ac_func ();
18033/* The GNU C library defines this for functions which it implements
18034 to always fail with ENOSYS. Some functions are actually named
18035 something starting with __ and the normal name is an alias. */
18036#if defined __stub_$ac_func || defined __stub___$ac_func
18037choke me
18038#endif
18039
18040int
18041main ()
18042{
18043return $ac_func ();
18044 ;
18045 return 0;
18046}
18047_ACEOF
18048rm -f conftest.$ac_objext conftest$ac_exeext
18049if { (ac_try="$ac_link"
18050case "(($ac_try" in
18051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18052 *) ac_try_echo=$ac_try;;
18053esac
18054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18055 (eval "$ac_link") 2>conftest.er1
18056 ac_status=$?
18057 grep -v '^ *+' conftest.er1 >conftest.err
18058 rm -f conftest.er1
18059 cat conftest.err >&5
18060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061 (exit $ac_status); } && {
18062 test -z "$ac_c_werror_flag" ||
18063 test ! -s conftest.err
18064 } && test -s conftest$ac_exeext &&
18065 $as_test_x conftest$ac_exeext; then
18066 eval "$as_ac_var=yes"
18067else
18068 echo "$as_me: failed program was:" >&5
18069sed 's/^/| /' conftest.$ac_ext >&5
18070
18071 eval "$as_ac_var=no"
18072fi
18073
18074rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18075 conftest$ac_exeext conftest.$ac_ext
18076fi
18077ac_res=`eval echo '${'$as_ac_var'}'`
18078 { echo "$as_me:$LINENO: result: $ac_res" >&5
18079echo "${ECHO_T}$ac_res" >&6; }
18080if test `eval echo '${'$as_ac_var'}'` = yes; then
18081 cat >>confdefs.h <<_ACEOF
18082#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18083_ACEOF
18084
18085fi
18086done
18087
18088
Michael W. Hudson54241132001-12-07 15:38:26 +000018089# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018090
18091
18092
18093
18094
18095
Fred Drake8cef4cf2000-06-28 16:40:38 +000018096for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18097do
Martin v. Löwis11437992002-04-12 09:54:03 +000018098as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018099{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18100echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18101if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018103else
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018105/* confdefs.h. */
18106_ACEOF
18107cat confdefs.h >>conftest.$ac_ext
18108cat >>conftest.$ac_ext <<_ACEOF
18109/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018110/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18111 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18112#define $ac_func innocuous_$ac_func
18113
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018114/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018115 which can conflict with char $ac_func (); below.
18116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018117 <limits.h> exists even on freestanding compilers. */
18118
18119#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018120# include <limits.h>
18121#else
18122# include <assert.h>
18123#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018124
18125#undef $ac_func
18126
Martin v. Löwiseba40652007-08-30 20:10:57 +000018127/* Override any GCC internal prototype to avoid an error.
18128 Use char because int might match the return type of a GCC
18129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018130#ifdef __cplusplus
18131extern "C"
18132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018133char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018134/* The GNU C library defines this for functions which it implements
18135 to always fail with ENOSYS. Some functions are actually named
18136 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018137#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018138choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018139#endif
18140
Skip Montanaro6dead952003-09-25 14:50:04 +000018141int
18142main ()
18143{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018145 ;
18146 return 0;
18147}
18148_ACEOF
18149rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018150if { (ac_try="$ac_link"
18151case "(($ac_try" in
18152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18153 *) ac_try_echo=$ac_try;;
18154esac
18155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18156 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018158 grep -v '^ *+' conftest.er1 >conftest.err
18159 rm -f conftest.er1
18160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018162 (exit $ac_status); } && {
18163 test -z "$ac_c_werror_flag" ||
18164 test ! -s conftest.err
18165 } && test -s conftest$ac_exeext &&
18166 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018167 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018168else
Martin v. Löwis11437992002-04-12 09:54:03 +000018169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018170sed 's/^/| /' conftest.$ac_ext >&5
18171
Martin v. Löwiseba40652007-08-30 20:10:57 +000018172 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018174
18175rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018176 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018178ac_res=`eval echo '${'$as_ac_var'}'`
18179 { echo "$as_me:$LINENO: result: $ac_res" >&5
18180echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018181if test `eval echo '${'$as_ac_var'}'` = yes; then
18182 cat >>confdefs.h <<_ACEOF
18183#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18184_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018185
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018186fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018187done
18188
Michael W. Hudson54241132001-12-07 15:38:26 +000018189
Martin v. Löwis11437992002-04-12 09:54:03 +000018190
18191
18192
Brett Cannonaa5778d2008-03-18 04:09:00 +000018193for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018194do
Martin v. Löwis11437992002-04-12 09:54:03 +000018195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018196{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18198if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018199 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018200else
Martin v. Löwis11437992002-04-12 09:54:03 +000018201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018202/* confdefs.h. */
18203_ACEOF
18204cat confdefs.h >>conftest.$ac_ext
18205cat >>conftest.$ac_ext <<_ACEOF
18206/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018207/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18209#define $ac_func innocuous_$ac_func
18210
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018211/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018212 which can conflict with char $ac_func (); below.
18213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018214 <limits.h> exists even on freestanding compilers. */
18215
18216#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018217# include <limits.h>
18218#else
18219# include <assert.h>
18220#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018221
18222#undef $ac_func
18223
Martin v. Löwiseba40652007-08-30 20:10:57 +000018224/* Override any GCC internal prototype to avoid an error.
18225 Use char because int might match the return type of a GCC
18226 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018227#ifdef __cplusplus
18228extern "C"
18229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018230char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018231/* The GNU C library defines this for functions which it implements
18232 to always fail with ENOSYS. Some functions are actually named
18233 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018234#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018235choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018236#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018237
Skip Montanaro6dead952003-09-25 14:50:04 +000018238int
18239main ()
18240{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018241return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018242 ;
18243 return 0;
18244}
18245_ACEOF
18246rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018247if { (ac_try="$ac_link"
18248case "(($ac_try" in
18249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18250 *) ac_try_echo=$ac_try;;
18251esac
18252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18253 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018255 grep -v '^ *+' conftest.er1 >conftest.err
18256 rm -f conftest.er1
18257 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018259 (exit $ac_status); } && {
18260 test -z "$ac_c_werror_flag" ||
18261 test ! -s conftest.err
18262 } && test -s conftest$ac_exeext &&
18263 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018265else
Martin v. Löwis11437992002-04-12 09:54:03 +000018266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018267sed 's/^/| /' conftest.$ac_ext >&5
18268
Martin v. Löwiseba40652007-08-30 20:10:57 +000018269 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018271
18272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018275ac_res=`eval echo '${'$as_ac_var'}'`
18276 { echo "$as_me:$LINENO: result: $ac_res" >&5
18277echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018278if test `eval echo '${'$as_ac_var'}'` = yes; then
18279 cat >>confdefs.h <<_ACEOF
18280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18281_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018282
Martin v. Löwis1142de32002-03-29 16:28:31 +000018283else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018284 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018285 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018286 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18287 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018288esac
18289
Martin v. Löwis1142de32002-03-29 16:28:31 +000018290fi
18291done
18292
18293
Martin v. Löwis11437992002-04-12 09:54:03 +000018294
Martin v. Löwis1142de32002-03-29 16:28:31 +000018295for ac_func in getpgrp
18296do
Martin v. Löwis11437992002-04-12 09:54:03 +000018297as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018298{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18299echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18300if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018301 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018302else
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018309/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18310 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18311#define $ac_func innocuous_$ac_func
18312
Martin v. Löwis1142de32002-03-29 16:28:31 +000018313/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018314 which can conflict with char $ac_func (); below.
18315 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018316 <limits.h> exists even on freestanding compilers. */
18317
18318#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018319# include <limits.h>
18320#else
18321# include <assert.h>
18322#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018323
18324#undef $ac_func
18325
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326/* Override any GCC internal prototype to avoid an error.
18327 Use char because int might match the return type of a GCC
18328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018329#ifdef __cplusplus
18330extern "C"
18331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018332char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018333/* The GNU C library defines this for functions which it implements
18334 to always fail with ENOSYS. Some functions are actually named
18335 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018336#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018337choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018338#endif
18339
Skip Montanaro6dead952003-09-25 14:50:04 +000018340int
18341main ()
18342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 ;
18345 return 0;
18346}
18347_ACEOF
18348rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018349if { (ac_try="$ac_link"
18350case "(($ac_try" in
18351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18352 *) ac_try_echo=$ac_try;;
18353esac
18354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18355 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018357 grep -v '^ *+' conftest.er1 >conftest.err
18358 rm -f conftest.er1
18359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018361 (exit $ac_status); } && {
18362 test -z "$ac_c_werror_flag" ||
18363 test ! -s conftest.err
18364 } && test -s conftest$ac_exeext &&
18365 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018366 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018367else
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018369sed 's/^/| /' conftest.$ac_ext >&5
18370
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018373
18374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018375 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018377ac_res=`eval echo '${'$as_ac_var'}'`
18378 { echo "$as_me:$LINENO: result: $ac_res" >&5
18379echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018380if test `eval echo '${'$as_ac_var'}'` = yes; then
18381 cat >>confdefs.h <<_ACEOF
18382#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18383_ACEOF
18384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018385/* confdefs.h. */
18386_ACEOF
18387cat confdefs.h >>conftest.$ac_ext
18388cat >>conftest.$ac_ext <<_ACEOF
18389/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018390#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018391int
18392main ()
18393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018394getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018395 ;
18396 return 0;
18397}
18398_ACEOF
18399rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018400if { (ac_try="$ac_compile"
18401case "(($ac_try" in
18402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18403 *) ac_try_echo=$ac_try;;
18404esac
18405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018408 grep -v '^ *+' conftest.er1 >conftest.err
18409 rm -f conftest.er1
18410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018412 (exit $ac_status); } && {
18413 test -z "$ac_c_werror_flag" ||
18414 test ! -s conftest.err
18415 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018416
18417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018418#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018419_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018420
Martin v. Löwis11437992002-04-12 09:54:03 +000018421
Guido van Rossumf78abae1997-01-21 22:02:36 +000018422else
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018424sed 's/^/| /' conftest.$ac_ext >&5
18425
Martin v. Löwiseba40652007-08-30 20:10:57 +000018426
Guido van Rossum627b2d71993-12-24 10:39:16 +000018427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018428
18429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018430
Guido van Rossum627b2d71993-12-24 10:39:16 +000018431fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018432done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018433
Jack Jansen150753c2003-03-29 22:07:47 +000018434
18435for ac_func in setpgrp
18436do
18437as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018438{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18439echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18440if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018442else
Martin v. Löwis11437992002-04-12 09:54:03 +000018443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018444/* confdefs.h. */
18445_ACEOF
18446cat confdefs.h >>conftest.$ac_ext
18447cat >>conftest.$ac_ext <<_ACEOF
18448/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018449/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18450 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18451#define $ac_func innocuous_$ac_func
18452
Jack Jansen150753c2003-03-29 22:07:47 +000018453/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018454 which can conflict with char $ac_func (); below.
18455 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018456 <limits.h> exists even on freestanding compilers. */
18457
18458#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018459# include <limits.h>
18460#else
18461# include <assert.h>
18462#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018463
18464#undef $ac_func
18465
Martin v. Löwiseba40652007-08-30 20:10:57 +000018466/* Override any GCC internal prototype to avoid an error.
18467 Use char because int might match the return type of a GCC
18468 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018469#ifdef __cplusplus
18470extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018471#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018472char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018473/* The GNU C library defines this for functions which it implements
18474 to always fail with ENOSYS. Some functions are actually named
18475 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018476#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018477choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018478#endif
18479
Skip Montanaro6dead952003-09-25 14:50:04 +000018480int
18481main ()
18482{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018483return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018484 ;
18485 return 0;
18486}
18487_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018488rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018489if { (ac_try="$ac_link"
18490case "(($ac_try" in
18491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18492 *) ac_try_echo=$ac_try;;
18493esac
18494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18495 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018497 grep -v '^ *+' conftest.er1 >conftest.err
18498 rm -f conftest.er1
18499 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501 (exit $ac_status); } && {
18502 test -z "$ac_c_werror_flag" ||
18503 test ! -s conftest.err
18504 } && test -s conftest$ac_exeext &&
18505 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018506 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018507else
Jack Jansen150753c2003-03-29 22:07:47 +000018508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018509sed 's/^/| /' conftest.$ac_ext >&5
18510
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018513
18514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018515 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018517ac_res=`eval echo '${'$as_ac_var'}'`
18518 { echo "$as_me:$LINENO: result: $ac_res" >&5
18519echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018520if test `eval echo '${'$as_ac_var'}'` = yes; then
18521 cat >>confdefs.h <<_ACEOF
18522#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18523_ACEOF
18524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018525/* confdefs.h. */
18526_ACEOF
18527cat confdefs.h >>conftest.$ac_ext
18528cat >>conftest.$ac_ext <<_ACEOF
18529/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018530#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018531int
18532main ()
18533{
18534setpgrp(0,0);
18535 ;
18536 return 0;
18537}
18538_ACEOF
18539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018540if { (ac_try="$ac_compile"
18541case "(($ac_try" in
18542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18543 *) ac_try_echo=$ac_try;;
18544esac
18545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18546 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018548 grep -v '^ *+' conftest.er1 >conftest.err
18549 rm -f conftest.er1
18550 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018552 (exit $ac_status); } && {
18553 test -z "$ac_c_werror_flag" ||
18554 test ! -s conftest.err
18555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018556
18557cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018558#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018559_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018560
Jack Jansen150753c2003-03-29 22:07:47 +000018561
18562else
18563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018564sed 's/^/| /' conftest.$ac_ext >&5
18565
Martin v. Löwiseba40652007-08-30 20:10:57 +000018566
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018568
18569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018570
18571fi
18572done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018573
Martin v. Löwis11437992002-04-12 09:54:03 +000018574
Thomas Wouters3a584202000-08-05 23:28:51 +000018575for ac_func in gettimeofday
18576do
Martin v. Löwis11437992002-04-12 09:54:03 +000018577as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018578{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18579echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18580if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018582else
Martin v. Löwis11437992002-04-12 09:54:03 +000018583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018584/* confdefs.h. */
18585_ACEOF
18586cat confdefs.h >>conftest.$ac_ext
18587cat >>conftest.$ac_ext <<_ACEOF
18588/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018589/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18590 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18591#define $ac_func innocuous_$ac_func
18592
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018593/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018594 which can conflict with char $ac_func (); below.
18595 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018596 <limits.h> exists even on freestanding compilers. */
18597
18598#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018599# include <limits.h>
18600#else
18601# include <assert.h>
18602#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018603
18604#undef $ac_func
18605
Martin v. Löwiseba40652007-08-30 20:10:57 +000018606/* Override any GCC internal prototype to avoid an error.
18607 Use char because int might match the return type of a GCC
18608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018609#ifdef __cplusplus
18610extern "C"
18611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018612char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018613/* The GNU C library defines this for functions which it implements
18614 to always fail with ENOSYS. Some functions are actually named
18615 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018616#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018617choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018618#endif
18619
Skip Montanaro6dead952003-09-25 14:50:04 +000018620int
18621main ()
18622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018623return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 ;
18625 return 0;
18626}
18627_ACEOF
18628rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018629if { (ac_try="$ac_link"
18630case "(($ac_try" in
18631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18632 *) ac_try_echo=$ac_try;;
18633esac
18634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18635 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018637 grep -v '^ *+' conftest.er1 >conftest.err
18638 rm -f conftest.er1
18639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641 (exit $ac_status); } && {
18642 test -z "$ac_c_werror_flag" ||
18643 test ! -s conftest.err
18644 } && test -s conftest$ac_exeext &&
18645 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018647else
Martin v. Löwis11437992002-04-12 09:54:03 +000018648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018649sed 's/^/| /' conftest.$ac_ext >&5
18650
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018653
18654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018655 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018657ac_res=`eval echo '${'$as_ac_var'}'`
18658 { echo "$as_me:$LINENO: result: $ac_res" >&5
18659echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018660if test `eval echo '${'$as_ac_var'}'` = yes; then
18661 cat >>confdefs.h <<_ACEOF
18662#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18663_ACEOF
18664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018665/* confdefs.h. */
18666_ACEOF
18667cat confdefs.h >>conftest.$ac_ext
18668cat >>conftest.$ac_ext <<_ACEOF
18669/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018670#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018671int
18672main ()
18673{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018674gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 ;
18676 return 0;
18677}
18678_ACEOF
18679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018680if { (ac_try="$ac_compile"
18681case "(($ac_try" in
18682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18683 *) ac_try_echo=$ac_try;;
18684esac
18685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018688 grep -v '^ *+' conftest.er1 >conftest.err
18689 rm -f conftest.er1
18690 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692 (exit $ac_status); } && {
18693 test -z "$ac_c_werror_flag" ||
18694 test ! -s conftest.err
18695 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018696 :
18697else
Martin v. Löwis11437992002-04-12 09:54:03 +000018698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018699sed 's/^/| /' conftest.$ac_ext >&5
18700
Martin v. Löwis11437992002-04-12 09:54:03 +000018701
18702cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018703#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018704_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018705
Martin v. Löwis11437992002-04-12 09:54:03 +000018706
Guido van Rossum627b2d71993-12-24 10:39:16 +000018707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018708
18709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018711fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018712done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018713
Michael W. Hudson54241132001-12-07 15:38:26 +000018714
Martin v. Löwiseba40652007-08-30 20:10:57 +000018715{ echo "$as_me:$LINENO: checking for major" >&5
18716echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018718/* confdefs.h. */
18719_ACEOF
18720cat confdefs.h >>conftest.$ac_ext
18721cat >>conftest.$ac_ext <<_ACEOF
18722/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018723
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018724#if defined(MAJOR_IN_MKDEV)
18725#include <sys/mkdev.h>
18726#elif defined(MAJOR_IN_SYSMACROS)
18727#include <sys/sysmacros.h>
18728#else
18729#include <sys/types.h>
18730#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018731
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018732int
18733main ()
18734{
18735
18736 makedev(major(0),minor(0));
18737
18738 ;
18739 return 0;
18740}
18741_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018742rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018743if { (ac_try="$ac_link"
18744case "(($ac_try" in
18745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18746 *) ac_try_echo=$ac_try;;
18747esac
18748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18749 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018751 grep -v '^ *+' conftest.er1 >conftest.err
18752 rm -f conftest.er1
18753 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018755 (exit $ac_status); } && {
18756 test -z "$ac_c_werror_flag" ||
18757 test ! -s conftest.err
18758 } && test -s conftest$ac_exeext &&
18759 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018760
18761
18762cat >>confdefs.h <<\_ACEOF
18763#define HAVE_DEVICE_MACROS 1
18764_ACEOF
18765
Martin v. Löwiseba40652007-08-30 20:10:57 +000018766 { echo "$as_me:$LINENO: result: yes" >&5
18767echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018768
18769else
18770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018771sed 's/^/| /' conftest.$ac_ext >&5
18772
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018773
Martin v. Löwiseba40652007-08-30 20:10:57 +000018774 { echo "$as_me:$LINENO: result: no" >&5
18775echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018776
18777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018778
18779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018780 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018781
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018782# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018783# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018784{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18785echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018787/* confdefs.h. */
18788_ACEOF
18789cat confdefs.h >>conftest.$ac_ext
18790cat >>conftest.$ac_ext <<_ACEOF
18791/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018792
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018793#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018794#include <sys/socket.h>
18795#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018796#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018797
Martin v. Löwis11437992002-04-12 09:54:03 +000018798int
18799main ()
18800{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018801
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018802getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018803
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 ;
18805 return 0;
18806}
18807_ACEOF
18808rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018809if { (ac_try="$ac_link"
18810case "(($ac_try" in
18811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18812 *) ac_try_echo=$ac_try;;
18813esac
18814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18815 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018817 grep -v '^ *+' conftest.er1 >conftest.err
18818 rm -f conftest.er1
18819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018821 (exit $ac_status); } && {
18822 test -z "$ac_c_werror_flag" ||
18823 test ! -s conftest.err
18824 } && test -s conftest$ac_exeext &&
18825 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018826
Martin v. Löwiseba40652007-08-30 20:10:57 +000018827{ echo "$as_me:$LINENO: result: yes" >&5
18828echo "${ECHO_T}yes" >&6; }
18829{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18830echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018831if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018832 { echo "$as_me:$LINENO: result: buggy" >&5
18833echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018834buggygetaddrinfo=yes
18835else
Martin v. Löwis11437992002-04-12 09:54:03 +000018836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018837/* confdefs.h. */
18838_ACEOF
18839cat confdefs.h >>conftest.$ac_ext
18840cat >>conftest.$ac_ext <<_ACEOF
18841/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018842
18843#include <sys/types.h>
18844#include <netdb.h>
18845#include <string.h>
18846#include <sys/socket.h>
18847#include <netinet/in.h>
18848
18849main()
18850{
18851 int passive, gaierr, inet4 = 0, inet6 = 0;
18852 struct addrinfo hints, *ai, *aitop;
18853 char straddr[INET6_ADDRSTRLEN], strport[16];
18854
18855 for (passive = 0; passive <= 1; passive++) {
18856 memset(&hints, 0, sizeof(hints));
18857 hints.ai_family = AF_UNSPEC;
18858 hints.ai_flags = passive ? AI_PASSIVE : 0;
18859 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018860 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018861 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18862 (void)gai_strerror(gaierr);
18863 goto bad;
18864 }
18865 for (ai = aitop; ai; ai = ai->ai_next) {
18866 if (ai->ai_addr == NULL ||
18867 ai->ai_addrlen == 0 ||
18868 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18869 straddr, sizeof(straddr), strport, sizeof(strport),
18870 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18871 goto bad;
18872 }
18873 switch (ai->ai_family) {
18874 case AF_INET:
18875 if (strcmp(strport, "54321") != 0) {
18876 goto bad;
18877 }
18878 if (passive) {
18879 if (strcmp(straddr, "0.0.0.0") != 0) {
18880 goto bad;
18881 }
18882 } else {
18883 if (strcmp(straddr, "127.0.0.1") != 0) {
18884 goto bad;
18885 }
18886 }
18887 inet4++;
18888 break;
18889 case AF_INET6:
18890 if (strcmp(strport, "54321") != 0) {
18891 goto bad;
18892 }
18893 if (passive) {
18894 if (strcmp(straddr, "::") != 0) {
18895 goto bad;
18896 }
18897 } else {
18898 if (strcmp(straddr, "::1") != 0) {
18899 goto bad;
18900 }
18901 }
18902 inet6++;
18903 break;
18904 case AF_UNSPEC:
18905 goto bad;
18906 break;
18907 default:
18908 /* another family support? */
18909 break;
18910 }
18911 }
18912 }
18913
18914 if (!(inet4 == 0 || inet4 == 2))
18915 goto bad;
18916 if (!(inet6 == 0 || inet6 == 2))
18917 goto bad;
18918
18919 if (aitop)
18920 freeaddrinfo(aitop);
18921 exit(0);
18922
18923 bad:
18924 if (aitop)
18925 freeaddrinfo(aitop);
18926 exit(1);
18927}
18928
Martin v. Löwis11437992002-04-12 09:54:03 +000018929_ACEOF
18930rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931if { (ac_try="$ac_link"
18932case "(($ac_try" in
18933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18934 *) ac_try_echo=$ac_try;;
18935esac
18936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18937 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018938 ac_status=$?
18939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018941 { (case "(($ac_try" in
18942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18943 *) ac_try_echo=$ac_try;;
18944esac
18945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18946 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018947 ac_status=$?
18948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018950 { echo "$as_me:$LINENO: result: good" >&5
18951echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018952buggygetaddrinfo=no
18953else
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 echo "$as_me: program exited with status $ac_status" >&5
18955echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018956sed 's/^/| /' conftest.$ac_ext >&5
18957
Martin v. Löwis11437992002-04-12 09:54:03 +000018958( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959{ echo "$as_me:$LINENO: result: buggy" >&5
18960echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018961buggygetaddrinfo=yes
18962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018963rm -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 +000018964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965
18966
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018967else
Martin v. Löwis11437992002-04-12 09:54:03 +000018968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018969sed 's/^/| /' conftest.$ac_ext >&5
18970
Martin v. Löwis11437992002-04-12 09:54:03 +000018971
Martin v. Löwiseba40652007-08-30 20:10:57 +000018972{ echo "$as_me:$LINENO: result: no" >&5
18973echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018974buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018975
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977
18978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018980
18981if test "$buggygetaddrinfo" = "yes"; then
18982 if test "$ipv6" = "yes"; then
18983 echo 'Fatal: You must get working getaddrinfo() function.'
18984 echo ' or you can specify "--disable-ipv6"'.
18985 exit 1
18986 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018987else
Martin v. Löwis11437992002-04-12 09:54:03 +000018988
18989cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018990#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018991_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018992
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018994
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018995for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018996do
Martin v. Löwis11437992002-04-12 09:54:03 +000018997as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018998{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18999echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19000if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019001 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019002else
Martin v. Löwis11437992002-04-12 09:54:03 +000019003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019004/* confdefs.h. */
19005_ACEOF
19006cat confdefs.h >>conftest.$ac_ext
19007cat >>conftest.$ac_ext <<_ACEOF
19008/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019009/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19010 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19011#define $ac_func innocuous_$ac_func
19012
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019013/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019014 which can conflict with char $ac_func (); below.
19015 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019016 <limits.h> exists even on freestanding compilers. */
19017
19018#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019019# include <limits.h>
19020#else
19021# include <assert.h>
19022#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019023
19024#undef $ac_func
19025
Martin v. Löwiseba40652007-08-30 20:10:57 +000019026/* Override any GCC internal prototype to avoid an error.
19027 Use char because int might match the return type of a GCC
19028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019029#ifdef __cplusplus
19030extern "C"
19031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019032char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019033/* The GNU C library defines this for functions which it implements
19034 to always fail with ENOSYS. Some functions are actually named
19035 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019036#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019037choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019038#endif
19039
Skip Montanaro6dead952003-09-25 14:50:04 +000019040int
19041main ()
19042{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019043return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019044 ;
19045 return 0;
19046}
19047_ACEOF
19048rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019049if { (ac_try="$ac_link"
19050case "(($ac_try" in
19051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19052 *) ac_try_echo=$ac_try;;
19053esac
19054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19055 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019057 grep -v '^ *+' conftest.er1 >conftest.err
19058 rm -f conftest.er1
19059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061 (exit $ac_status); } && {
19062 test -z "$ac_c_werror_flag" ||
19063 test ! -s conftest.err
19064 } && test -s conftest$ac_exeext &&
19065 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019066 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019067else
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019069sed 's/^/| /' conftest.$ac_ext >&5
19070
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019073
19074rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019075 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019077ac_res=`eval echo '${'$as_ac_var'}'`
19078 { echo "$as_me:$LINENO: result: $ac_res" >&5
19079echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019080if test `eval echo '${'$as_ac_var'}'` = yes; then
19081 cat >>confdefs.h <<_ACEOF
19082#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19083_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019084
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019085fi
19086done
19087
Michael W. Hudson54241132001-12-07 15:38:26 +000019088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019089# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019090{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19091echo $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 +000019092if test "${ac_cv_header_time+set}" = set; then
19093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019094else
Martin v. Löwis11437992002-04-12 09:54:03 +000019095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019096/* confdefs.h. */
19097_ACEOF
19098cat confdefs.h >>conftest.$ac_ext
19099cat >>conftest.$ac_ext <<_ACEOF
19100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019101#include <sys/types.h>
19102#include <sys/time.h>
19103#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019104
Martin v. Löwis11437992002-04-12 09:54:03 +000019105int
19106main ()
19107{
19108if ((struct tm *) 0)
19109return 0;
19110 ;
19111 return 0;
19112}
19113_ACEOF
19114rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019115if { (ac_try="$ac_compile"
19116case "(($ac_try" in
19117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19118 *) ac_try_echo=$ac_try;;
19119esac
19120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019123 grep -v '^ *+' conftest.er1 >conftest.err
19124 rm -f conftest.er1
19125 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019127 (exit $ac_status); } && {
19128 test -z "$ac_c_werror_flag" ||
19129 test ! -s conftest.err
19130 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019131 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019132else
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019134sed 's/^/| /' conftest.$ac_ext >&5
19135
Martin v. Löwiseba40652007-08-30 20:10:57 +000019136 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019138
19139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019141{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19142echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019143if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019144
19145cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019146#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019148
19149fi
19150
Martin v. Löwiseba40652007-08-30 20:10:57 +000019151{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19152echo $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 +000019153if test "${ac_cv_struct_tm+set}" = set; then
19154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019155else
Martin v. Löwis11437992002-04-12 09:54:03 +000019156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019157/* confdefs.h. */
19158_ACEOF
19159cat confdefs.h >>conftest.$ac_ext
19160cat >>conftest.$ac_ext <<_ACEOF
19161/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019162#include <sys/types.h>
19163#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019164
Martin v. Löwis11437992002-04-12 09:54:03 +000019165int
19166main ()
19167{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168struct tm tm;
19169 int *p = &tm.tm_sec;
19170 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019171 ;
19172 return 0;
19173}
19174_ACEOF
19175rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019176if { (ac_try="$ac_compile"
19177case "(($ac_try" in
19178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19179 *) ac_try_echo=$ac_try;;
19180esac
19181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019184 grep -v '^ *+' conftest.er1 >conftest.err
19185 rm -f conftest.er1
19186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019188 (exit $ac_status); } && {
19189 test -z "$ac_c_werror_flag" ||
19190 test ! -s conftest.err
19191 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019192 ac_cv_struct_tm=time.h
19193else
Martin v. Löwis11437992002-04-12 09:54:03 +000019194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019195sed 's/^/| /' conftest.$ac_ext >&5
19196
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019199
19200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019202{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19203echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019204if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019205
19206cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019207#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019208_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019209
19210fi
19211
Martin v. Löwiseba40652007-08-30 20:10:57 +000019212{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19213echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019214if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019216else
Martin v. Löwis11437992002-04-12 09:54:03 +000019217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019218/* confdefs.h. */
19219_ACEOF
19220cat confdefs.h >>conftest.$ac_ext
19221cat >>conftest.$ac_ext <<_ACEOF
19222/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019223#include <sys/types.h>
19224#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019225
19226
Martin v. Löwis11437992002-04-12 09:54:03 +000019227int
19228main ()
19229{
19230static struct tm ac_aggr;
19231if (ac_aggr.tm_zone)
19232return 0;
19233 ;
19234 return 0;
19235}
19236_ACEOF
19237rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019238if { (ac_try="$ac_compile"
19239case "(($ac_try" in
19240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19241 *) ac_try_echo=$ac_try;;
19242esac
19243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019246 grep -v '^ *+' conftest.er1 >conftest.err
19247 rm -f conftest.er1
19248 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019250 (exit $ac_status); } && {
19251 test -z "$ac_c_werror_flag" ||
19252 test ! -s conftest.err
19253 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019254 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019255else
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019257sed 's/^/| /' conftest.$ac_ext >&5
19258
Martin v. Löwiseba40652007-08-30 20:10:57 +000019259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019260/* confdefs.h. */
19261_ACEOF
19262cat confdefs.h >>conftest.$ac_ext
19263cat >>conftest.$ac_ext <<_ACEOF
19264/* end confdefs.h. */
19265#include <sys/types.h>
19266#include <$ac_cv_struct_tm>
19267
19268
19269int
19270main ()
19271{
19272static struct tm ac_aggr;
19273if (sizeof ac_aggr.tm_zone)
19274return 0;
19275 ;
19276 return 0;
19277}
19278_ACEOF
19279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019280if { (ac_try="$ac_compile"
19281case "(($ac_try" in
19282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19283 *) ac_try_echo=$ac_try;;
19284esac
19285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19286 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019288 grep -v '^ *+' conftest.er1 >conftest.err
19289 rm -f conftest.er1
19290 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019292 (exit $ac_status); } && {
19293 test -z "$ac_c_werror_flag" ||
19294 test ! -s conftest.err
19295 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019296 ac_cv_member_struct_tm_tm_zone=yes
19297else
19298 echo "$as_me: failed program was:" >&5
19299sed 's/^/| /' conftest.$ac_ext >&5
19300
Martin v. Löwiseba40652007-08-30 20:10:57 +000019301 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019303
19304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019306
19307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019309{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19310echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019311if test $ac_cv_member_struct_tm_tm_zone = yes; then
19312
19313cat >>confdefs.h <<_ACEOF
19314#define HAVE_STRUCT_TM_TM_ZONE 1
19315_ACEOF
19316
19317
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019318fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019319
Martin v. Löwis11437992002-04-12 09:54:03 +000019320if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19321
19322cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019323#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019325
19326else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19328echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19329if test "${ac_cv_have_decl_tzname+set}" = set; then
19330 echo $ECHO_N "(cached) $ECHO_C" >&6
19331else
19332 cat >conftest.$ac_ext <<_ACEOF
19333/* confdefs.h. */
19334_ACEOF
19335cat confdefs.h >>conftest.$ac_ext
19336cat >>conftest.$ac_ext <<_ACEOF
19337/* end confdefs.h. */
19338#include <time.h>
19339
19340int
19341main ()
19342{
19343#ifndef tzname
19344 (void) tzname;
19345#endif
19346
19347 ;
19348 return 0;
19349}
19350_ACEOF
19351rm -f conftest.$ac_objext
19352if { (ac_try="$ac_compile"
19353case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
19357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19358 (eval "$ac_compile") 2>conftest.er1
19359 ac_status=$?
19360 grep -v '^ *+' conftest.er1 >conftest.err
19361 rm -f conftest.er1
19362 cat conftest.err >&5
19363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19364 (exit $ac_status); } && {
19365 test -z "$ac_c_werror_flag" ||
19366 test ! -s conftest.err
19367 } && test -s conftest.$ac_objext; then
19368 ac_cv_have_decl_tzname=yes
19369else
19370 echo "$as_me: failed program was:" >&5
19371sed 's/^/| /' conftest.$ac_ext >&5
19372
19373 ac_cv_have_decl_tzname=no
19374fi
19375
19376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19377fi
19378{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19379echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19380if test $ac_cv_have_decl_tzname = yes; then
19381
19382cat >>confdefs.h <<_ACEOF
19383#define HAVE_DECL_TZNAME 1
19384_ACEOF
19385
19386
19387else
19388 cat >>confdefs.h <<_ACEOF
19389#define HAVE_DECL_TZNAME 0
19390_ACEOF
19391
19392
19393fi
19394
19395
19396 { echo "$as_me:$LINENO: checking for tzname" >&5
19397echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019398if test "${ac_cv_var_tzname+set}" = set; then
19399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019400else
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019402/* confdefs.h. */
19403_ACEOF
19404cat confdefs.h >>conftest.$ac_ext
19405cat >>conftest.$ac_ext <<_ACEOF
19406/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019407#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019408#if !HAVE_DECL_TZNAME
19409extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019411
Martin v. Löwis11437992002-04-12 09:54:03 +000019412int
19413main ()
19414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019416 ;
19417 return 0;
19418}
19419_ACEOF
19420rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019421if { (ac_try="$ac_link"
19422case "(($ac_try" in
19423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19424 *) ac_try_echo=$ac_try;;
19425esac
19426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19427 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019429 grep -v '^ *+' conftest.er1 >conftest.err
19430 rm -f conftest.er1
19431 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433 (exit $ac_status); } && {
19434 test -z "$ac_c_werror_flag" ||
19435 test ! -s conftest.err
19436 } && test -s conftest$ac_exeext &&
19437 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019438 ac_cv_var_tzname=yes
19439else
Martin v. Löwis11437992002-04-12 09:54:03 +000019440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019441sed 's/^/| /' conftest.$ac_ext >&5
19442
Martin v. Löwiseba40652007-08-30 20:10:57 +000019443 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445
19446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019447 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019449{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19450echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019451 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019452
19453cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019454#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019455_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019456
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019457 fi
19458fi
19459
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19461echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019462if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19463 echo $ECHO_N "(cached) $ECHO_C" >&6
19464else
19465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019466/* confdefs.h. */
19467_ACEOF
19468cat confdefs.h >>conftest.$ac_ext
19469cat >>conftest.$ac_ext <<_ACEOF
19470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019471$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019472int
19473main ()
19474{
19475static struct stat ac_aggr;
19476if (ac_aggr.st_rdev)
19477return 0;
19478 ;
19479 return 0;
19480}
19481_ACEOF
19482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019483if { (ac_try="$ac_compile"
19484case "(($ac_try" in
19485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19486 *) ac_try_echo=$ac_try;;
19487esac
19488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019491 grep -v '^ *+' conftest.er1 >conftest.err
19492 rm -f conftest.er1
19493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019495 (exit $ac_status); } && {
19496 test -z "$ac_c_werror_flag" ||
19497 test ! -s conftest.err
19498 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019499 ac_cv_member_struct_stat_st_rdev=yes
19500else
19501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019502sed 's/^/| /' conftest.$ac_ext >&5
19503
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019505/* confdefs.h. */
19506_ACEOF
19507cat confdefs.h >>conftest.$ac_ext
19508cat >>conftest.$ac_ext <<_ACEOF
19509/* end confdefs.h. */
19510$ac_includes_default
19511int
19512main ()
19513{
19514static struct stat ac_aggr;
19515if (sizeof ac_aggr.st_rdev)
19516return 0;
19517 ;
19518 return 0;
19519}
19520_ACEOF
19521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522if { (ac_try="$ac_compile"
19523case "(($ac_try" in
19524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19525 *) ac_try_echo=$ac_try;;
19526esac
19527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19528 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019530 grep -v '^ *+' conftest.er1 >conftest.err
19531 rm -f conftest.er1
19532 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534 (exit $ac_status); } && {
19535 test -z "$ac_c_werror_flag" ||
19536 test ! -s conftest.err
19537 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019538 ac_cv_member_struct_stat_st_rdev=yes
19539else
19540 echo "$as_me: failed program was:" >&5
19541sed 's/^/| /' conftest.$ac_ext >&5
19542
Martin v. Löwiseba40652007-08-30 20:10:57 +000019543 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019545
19546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019548
19549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019551{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19552echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019553if test $ac_cv_member_struct_stat_st_rdev = yes; then
19554
19555cat >>confdefs.h <<_ACEOF
19556#define HAVE_STRUCT_STAT_ST_RDEV 1
19557_ACEOF
19558
19559
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019560fi
19561
Martin v. Löwiseba40652007-08-30 20:10:57 +000019562{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19563echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019564if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019566else
Martin v. Löwis11437992002-04-12 09:54:03 +000019567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019568/* confdefs.h. */
19569_ACEOF
19570cat confdefs.h >>conftest.$ac_ext
19571cat >>conftest.$ac_ext <<_ACEOF
19572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019573$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019574int
19575main ()
19576{
19577static struct stat ac_aggr;
19578if (ac_aggr.st_blksize)
19579return 0;
19580 ;
19581 return 0;
19582}
19583_ACEOF
19584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585if { (ac_try="$ac_compile"
19586case "(($ac_try" in
19587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19588 *) ac_try_echo=$ac_try;;
19589esac
19590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019593 grep -v '^ *+' conftest.er1 >conftest.err
19594 rm -f conftest.er1
19595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019597 (exit $ac_status); } && {
19598 test -z "$ac_c_werror_flag" ||
19599 test ! -s conftest.err
19600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019601 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019602else
Martin v. Löwis11437992002-04-12 09:54:03 +000019603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019604sed 's/^/| /' conftest.$ac_ext >&5
19605
Martin v. Löwiseba40652007-08-30 20:10:57 +000019606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019607/* confdefs.h. */
19608_ACEOF
19609cat confdefs.h >>conftest.$ac_ext
19610cat >>conftest.$ac_ext <<_ACEOF
19611/* end confdefs.h. */
19612$ac_includes_default
19613int
19614main ()
19615{
19616static struct stat ac_aggr;
19617if (sizeof ac_aggr.st_blksize)
19618return 0;
19619 ;
19620 return 0;
19621}
19622_ACEOF
19623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624if { (ac_try="$ac_compile"
19625case "(($ac_try" in
19626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19627 *) ac_try_echo=$ac_try;;
19628esac
19629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19630 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019632 grep -v '^ *+' conftest.er1 >conftest.err
19633 rm -f conftest.er1
19634 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019636 (exit $ac_status); } && {
19637 test -z "$ac_c_werror_flag" ||
19638 test ! -s conftest.err
19639 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019640 ac_cv_member_struct_stat_st_blksize=yes
19641else
19642 echo "$as_me: failed program was:" >&5
19643sed 's/^/| /' conftest.$ac_ext >&5
19644
Martin v. Löwiseba40652007-08-30 20:10:57 +000019645 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019647
19648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650
19651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019653{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19654echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019655if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019656
Martin v. Löwis11437992002-04-12 09:54:03 +000019657cat >>confdefs.h <<_ACEOF
19658#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19659_ACEOF
19660
19661
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019662fi
19663
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19665echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019666if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19667 echo $ECHO_N "(cached) $ECHO_C" >&6
19668else
19669 cat >conftest.$ac_ext <<_ACEOF
19670/* confdefs.h. */
19671_ACEOF
19672cat confdefs.h >>conftest.$ac_ext
19673cat >>conftest.$ac_ext <<_ACEOF
19674/* end confdefs.h. */
19675$ac_includes_default
19676int
19677main ()
19678{
19679static struct stat ac_aggr;
19680if (ac_aggr.st_flags)
19681return 0;
19682 ;
19683 return 0;
19684}
19685_ACEOF
19686rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019687if { (ac_try="$ac_compile"
19688case "(($ac_try" in
19689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19690 *) ac_try_echo=$ac_try;;
19691esac
19692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19693 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019694 ac_status=$?
19695 grep -v '^ *+' conftest.er1 >conftest.err
19696 rm -f conftest.er1
19697 cat conftest.err >&5
19698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019699 (exit $ac_status); } && {
19700 test -z "$ac_c_werror_flag" ||
19701 test ! -s conftest.err
19702 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019703 ac_cv_member_struct_stat_st_flags=yes
19704else
19705 echo "$as_me: failed program was:" >&5
19706sed 's/^/| /' conftest.$ac_ext >&5
19707
Martin v. Löwiseba40652007-08-30 20:10:57 +000019708 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019709/* confdefs.h. */
19710_ACEOF
19711cat confdefs.h >>conftest.$ac_ext
19712cat >>conftest.$ac_ext <<_ACEOF
19713/* end confdefs.h. */
19714$ac_includes_default
19715int
19716main ()
19717{
19718static struct stat ac_aggr;
19719if (sizeof ac_aggr.st_flags)
19720return 0;
19721 ;
19722 return 0;
19723}
19724_ACEOF
19725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726if { (ac_try="$ac_compile"
19727case "(($ac_try" in
19728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19729 *) ac_try_echo=$ac_try;;
19730esac
19731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19732 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019733 ac_status=$?
19734 grep -v '^ *+' conftest.er1 >conftest.err
19735 rm -f conftest.er1
19736 cat conftest.err >&5
19737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019738 (exit $ac_status); } && {
19739 test -z "$ac_c_werror_flag" ||
19740 test ! -s conftest.err
19741 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019742 ac_cv_member_struct_stat_st_flags=yes
19743else
19744 echo "$as_me: failed program was:" >&5
19745sed 's/^/| /' conftest.$ac_ext >&5
19746
Martin v. Löwiseba40652007-08-30 20:10:57 +000019747 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019749
19750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019752
19753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019755{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19756echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019757if test $ac_cv_member_struct_stat_st_flags = yes; then
19758
19759cat >>confdefs.h <<_ACEOF
19760#define HAVE_STRUCT_STAT_ST_FLAGS 1
19761_ACEOF
19762
19763
19764fi
19765
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19767echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019768if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19769 echo $ECHO_N "(cached) $ECHO_C" >&6
19770else
19771 cat >conftest.$ac_ext <<_ACEOF
19772/* confdefs.h. */
19773_ACEOF
19774cat confdefs.h >>conftest.$ac_ext
19775cat >>conftest.$ac_ext <<_ACEOF
19776/* end confdefs.h. */
19777$ac_includes_default
19778int
19779main ()
19780{
19781static struct stat ac_aggr;
19782if (ac_aggr.st_gen)
19783return 0;
19784 ;
19785 return 0;
19786}
19787_ACEOF
19788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019789if { (ac_try="$ac_compile"
19790case "(($ac_try" in
19791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19792 *) ac_try_echo=$ac_try;;
19793esac
19794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019796 ac_status=$?
19797 grep -v '^ *+' conftest.er1 >conftest.err
19798 rm -f conftest.er1
19799 cat conftest.err >&5
19800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801 (exit $ac_status); } && {
19802 test -z "$ac_c_werror_flag" ||
19803 test ! -s conftest.err
19804 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019805 ac_cv_member_struct_stat_st_gen=yes
19806else
19807 echo "$as_me: failed program was:" >&5
19808sed 's/^/| /' conftest.$ac_ext >&5
19809
Martin v. Löwiseba40652007-08-30 20:10:57 +000019810 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019811/* confdefs.h. */
19812_ACEOF
19813cat confdefs.h >>conftest.$ac_ext
19814cat >>conftest.$ac_ext <<_ACEOF
19815/* end confdefs.h. */
19816$ac_includes_default
19817int
19818main ()
19819{
19820static struct stat ac_aggr;
19821if (sizeof ac_aggr.st_gen)
19822return 0;
19823 ;
19824 return 0;
19825}
19826_ACEOF
19827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828if { (ac_try="$ac_compile"
19829case "(($ac_try" in
19830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19831 *) ac_try_echo=$ac_try;;
19832esac
19833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019835 ac_status=$?
19836 grep -v '^ *+' conftest.er1 >conftest.err
19837 rm -f conftest.er1
19838 cat conftest.err >&5
19839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840 (exit $ac_status); } && {
19841 test -z "$ac_c_werror_flag" ||
19842 test ! -s conftest.err
19843 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019844 ac_cv_member_struct_stat_st_gen=yes
19845else
19846 echo "$as_me: failed program was:" >&5
19847sed 's/^/| /' conftest.$ac_ext >&5
19848
Martin v. Löwiseba40652007-08-30 20:10:57 +000019849 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019851
19852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854
19855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019857{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19858echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019859if test $ac_cv_member_struct_stat_st_gen = yes; then
19860
19861cat >>confdefs.h <<_ACEOF
19862#define HAVE_STRUCT_STAT_ST_GEN 1
19863_ACEOF
19864
19865
19866fi
19867
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19869echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019870if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19871 echo $ECHO_N "(cached) $ECHO_C" >&6
19872else
19873 cat >conftest.$ac_ext <<_ACEOF
19874/* confdefs.h. */
19875_ACEOF
19876cat confdefs.h >>conftest.$ac_ext
19877cat >>conftest.$ac_ext <<_ACEOF
19878/* end confdefs.h. */
19879$ac_includes_default
19880int
19881main ()
19882{
19883static struct stat ac_aggr;
19884if (ac_aggr.st_birthtime)
19885return 0;
19886 ;
19887 return 0;
19888}
19889_ACEOF
19890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019891if { (ac_try="$ac_compile"
19892case "(($ac_try" in
19893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19894 *) ac_try_echo=$ac_try;;
19895esac
19896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019898 ac_status=$?
19899 grep -v '^ *+' conftest.er1 >conftest.err
19900 rm -f conftest.er1
19901 cat conftest.err >&5
19902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019903 (exit $ac_status); } && {
19904 test -z "$ac_c_werror_flag" ||
19905 test ! -s conftest.err
19906 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019907 ac_cv_member_struct_stat_st_birthtime=yes
19908else
19909 echo "$as_me: failed program was:" >&5
19910sed 's/^/| /' conftest.$ac_ext >&5
19911
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019913/* confdefs.h. */
19914_ACEOF
19915cat confdefs.h >>conftest.$ac_ext
19916cat >>conftest.$ac_ext <<_ACEOF
19917/* end confdefs.h. */
19918$ac_includes_default
19919int
19920main ()
19921{
19922static struct stat ac_aggr;
19923if (sizeof ac_aggr.st_birthtime)
19924return 0;
19925 ;
19926 return 0;
19927}
19928_ACEOF
19929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019930if { (ac_try="$ac_compile"
19931case "(($ac_try" in
19932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19933 *) ac_try_echo=$ac_try;;
19934esac
19935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019937 ac_status=$?
19938 grep -v '^ *+' conftest.er1 >conftest.err
19939 rm -f conftest.er1
19940 cat conftest.err >&5
19941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019942 (exit $ac_status); } && {
19943 test -z "$ac_c_werror_flag" ||
19944 test ! -s conftest.err
19945 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019946 ac_cv_member_struct_stat_st_birthtime=yes
19947else
19948 echo "$as_me: failed program was:" >&5
19949sed 's/^/| /' conftest.$ac_ext >&5
19950
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019953
19954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956
19957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019959{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19960echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019961if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19962
19963cat >>confdefs.h <<_ACEOF
19964#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19965_ACEOF
19966
19967
19968fi
19969
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19971echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019972if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019974else
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019976/* confdefs.h. */
19977_ACEOF
19978cat confdefs.h >>conftest.$ac_ext
19979cat >>conftest.$ac_ext <<_ACEOF
19980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019981$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019982int
19983main ()
19984{
19985static struct stat ac_aggr;
19986if (ac_aggr.st_blocks)
19987return 0;
19988 ;
19989 return 0;
19990}
19991_ACEOF
19992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993if { (ac_try="$ac_compile"
19994case "(($ac_try" in
19995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19996 *) ac_try_echo=$ac_try;;
19997esac
19998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020001 grep -v '^ *+' conftest.er1 >conftest.err
20002 rm -f conftest.er1
20003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005 (exit $ac_status); } && {
20006 test -z "$ac_c_werror_flag" ||
20007 test ! -s conftest.err
20008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020010else
Martin v. Löwis11437992002-04-12 09:54:03 +000020011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020012sed 's/^/| /' conftest.$ac_ext >&5
20013
Martin v. Löwiseba40652007-08-30 20:10:57 +000020014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020015/* confdefs.h. */
20016_ACEOF
20017cat confdefs.h >>conftest.$ac_ext
20018cat >>conftest.$ac_ext <<_ACEOF
20019/* end confdefs.h. */
20020$ac_includes_default
20021int
20022main ()
20023{
20024static struct stat ac_aggr;
20025if (sizeof ac_aggr.st_blocks)
20026return 0;
20027 ;
20028 return 0;
20029}
20030_ACEOF
20031rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032if { (ac_try="$ac_compile"
20033case "(($ac_try" in
20034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20035 *) ac_try_echo=$ac_try;;
20036esac
20037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20038 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020040 grep -v '^ *+' conftest.er1 >conftest.err
20041 rm -f conftest.er1
20042 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020044 (exit $ac_status); } && {
20045 test -z "$ac_c_werror_flag" ||
20046 test ! -s conftest.err
20047 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020048 ac_cv_member_struct_stat_st_blocks=yes
20049else
20050 echo "$as_me: failed program was:" >&5
20051sed 's/^/| /' conftest.$ac_ext >&5
20052
Martin v. Löwiseba40652007-08-30 20:10:57 +000020053 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020055
20056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020058
20059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020061{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20062echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020063if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020064
Martin v. Löwis11437992002-04-12 09:54:03 +000020065cat >>confdefs.h <<_ACEOF
20066#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20067_ACEOF
20068
20069
20070cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020071#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020072_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020073
20074else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020076 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20078 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020079esac
20080
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020081fi
20082
Michael W. Hudson54241132001-12-07 15:38:26 +000020083
Martin v. Löwis11437992002-04-12 09:54:03 +000020084
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20086echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020087if test "${ac_cv_header_time_altzone+set}" = set; then
20088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020089else
Martin v. Löwis11437992002-04-12 09:54:03 +000020090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020091/* confdefs.h. */
20092_ACEOF
20093cat confdefs.h >>conftest.$ac_ext
20094cat >>conftest.$ac_ext <<_ACEOF
20095/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020096#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020097int
20098main ()
20099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020100return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020101 ;
20102 return 0;
20103}
20104_ACEOF
20105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020106if { (ac_try="$ac_compile"
20107case "(($ac_try" in
20108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20109 *) ac_try_echo=$ac_try;;
20110esac
20111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020114 grep -v '^ *+' conftest.er1 >conftest.err
20115 rm -f conftest.er1
20116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020118 (exit $ac_status); } && {
20119 test -z "$ac_c_werror_flag" ||
20120 test ! -s conftest.err
20121 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020122 ac_cv_header_time_altzone=yes
20123else
Martin v. Löwis11437992002-04-12 09:54:03 +000020124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020125sed 's/^/| /' conftest.$ac_ext >&5
20126
Martin v. Löwiseba40652007-08-30 20:10:57 +000020127 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020128fi
20129
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20131fi
20132
20133{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20134echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020135if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020136
20137cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020138#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020139_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020140
20141fi
20142
Guido van Rossumda88dad1995-01-26 00:46:29 +000020143was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020144{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20145echo $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 +000020146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020147/* confdefs.h. */
20148_ACEOF
20149cat confdefs.h >>conftest.$ac_ext
20150cat >>conftest.$ac_ext <<_ACEOF
20151/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020152
20153#include <sys/types.h>
20154#include <sys/select.h>
20155#include <sys/time.h>
20156
Martin v. Löwis11437992002-04-12 09:54:03 +000020157int
20158main ()
20159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020160;
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 ;
20162 return 0;
20163}
20164_ACEOF
20165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166if { (ac_try="$ac_compile"
20167case "(($ac_try" in
20168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20169 *) ac_try_echo=$ac_try;;
20170esac
20171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020174 grep -v '^ *+' conftest.er1 >conftest.err
20175 rm -f conftest.er1
20176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020178 (exit $ac_status); } && {
20179 test -z "$ac_c_werror_flag" ||
20180 test ! -s conftest.err
20181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020182
20183
20184cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020185#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020186_ACEOF
20187
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020188 was_it_defined=yes
20189
Guido van Rossumf78abae1997-01-21 22:02:36 +000020190else
Martin v. Löwis11437992002-04-12 09:54:03 +000020191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020192sed 's/^/| /' conftest.$ac_ext >&5
20193
Brett Cannon19fab762007-06-02 03:02:29 +000020194
Martin v. Löwiseba40652007-08-30 20:10:57 +000020195fi
20196
20197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20198{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20199echo "${ECHO_T}$was_it_defined" >&6; }
20200
20201{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20202echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020203if test "${ac_cv_struct_addrinfo+set}" = set; then
20204 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020205else
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020212
20213# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020214int
20215main ()
20216{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020217struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020218 ;
20219 return 0;
20220}
20221_ACEOF
20222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223if { (ac_try="$ac_compile"
20224case "(($ac_try" in
20225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20226 *) ac_try_echo=$ac_try;;
20227esac
20228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020231 grep -v '^ *+' conftest.er1 >conftest.err
20232 rm -f conftest.er1
20233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235 (exit $ac_status); } && {
20236 test -z "$ac_c_werror_flag" ||
20237 test ! -s conftest.err
20238 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020239 ac_cv_struct_addrinfo=yes
20240else
Martin v. Löwis11437992002-04-12 09:54:03 +000020241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020242sed 's/^/| /' conftest.$ac_ext >&5
20243
Martin v. Löwiseba40652007-08-30 20:10:57 +000020244 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020245fi
20246
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20248fi
20249
20250{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20251echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020252if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020253
20254cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020255#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020256_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020257
20258fi
20259
Martin v. Löwiseba40652007-08-30 20:10:57 +000020260{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20261echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020262if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20263 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020264else
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020266/* confdefs.h. */
20267_ACEOF
20268cat confdefs.h >>conftest.$ac_ext
20269cat >>conftest.$ac_ext <<_ACEOF
20270/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020271
20272# include <sys/types.h>
20273# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020274int
20275main ()
20276{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020277struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020278 ;
20279 return 0;
20280}
20281_ACEOF
20282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020283if { (ac_try="$ac_compile"
20284case "(($ac_try" in
20285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20286 *) ac_try_echo=$ac_try;;
20287esac
20288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020291 grep -v '^ *+' conftest.er1 >conftest.err
20292 rm -f conftest.er1
20293 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020295 (exit $ac_status); } && {
20296 test -z "$ac_c_werror_flag" ||
20297 test ! -s conftest.err
20298 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020299 ac_cv_struct_sockaddr_storage=yes
20300else
Martin v. Löwis11437992002-04-12 09:54:03 +000020301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020302sed 's/^/| /' conftest.$ac_ext >&5
20303
Martin v. Löwiseba40652007-08-30 20:10:57 +000020304 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020305fi
20306
Martin v. Löwiseba40652007-08-30 20:10:57 +000020307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20308fi
20309
20310{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20311echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020312if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020313
20314cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020315#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020316_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020317
20318fi
20319
Guido van Rossum627b2d71993-12-24 10:39:16 +000020320# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020321
Michael W. Hudson54241132001-12-07 15:38:26 +000020322
Martin v. Löwiseba40652007-08-30 20:10:57 +000020323{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20324echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020325if test "${ac_cv_c_char_unsigned+set}" = set; then
20326 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020327else
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020329/* confdefs.h. */
20330_ACEOF
20331cat confdefs.h >>conftest.$ac_ext
20332cat >>conftest.$ac_ext <<_ACEOF
20333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020334$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020335int
20336main ()
20337{
20338static int test_array [1 - 2 * !(((char) -1) < 0)];
20339test_array [0] = 0
20340
20341 ;
20342 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020343}
Martin v. Löwis11437992002-04-12 09:54:03 +000020344_ACEOF
20345rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020346if { (ac_try="$ac_compile"
20347case "(($ac_try" in
20348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20349 *) ac_try_echo=$ac_try;;
20350esac
20351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020354 grep -v '^ *+' conftest.er1 >conftest.err
20355 rm -f conftest.er1
20356 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020358 (exit $ac_status); } && {
20359 test -z "$ac_c_werror_flag" ||
20360 test ! -s conftest.err
20361 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020362 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020363else
20364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020365sed 's/^/| /' conftest.$ac_ext >&5
20366
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020369
20370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020372{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20373echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020374if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020375 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020376#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020377_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020378
20379fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020380
Martin v. Löwiseba40652007-08-30 20:10:57 +000020381{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20382echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020383if test "${ac_cv_c_const+set}" = set; then
20384 echo $ECHO_N "(cached) $ECHO_C" >&6
20385else
20386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020387/* confdefs.h. */
20388_ACEOF
20389cat confdefs.h >>conftest.$ac_ext
20390cat >>conftest.$ac_ext <<_ACEOF
20391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020392
Martin v. Löwis11437992002-04-12 09:54:03 +000020393int
20394main ()
20395{
20396/* FIXME: Include the comments suggested by Paul. */
20397#ifndef __cplusplus
20398 /* Ultrix mips cc rejects this. */
20399 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020400 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020401 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020402 char const *const *pcpcc;
20403 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020404 /* NEC SVR4.0.2 mips cc rejects this. */
20405 struct point {int x, y;};
20406 static struct point const zero = {0,0};
20407 /* AIX XL C 1.02.0.0 rejects this.
20408 It does not let you subtract one const X* pointer from another in
20409 an arm of an if-expression whose if-part is not a constant
20410 expression */
20411 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020414 ++pcpcc;
20415 ppc = (char**) pcpcc;
20416 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 { /* SCO 3.2v4 cc rejects this. */
20418 char *t;
20419 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020420
Martin v. Löwis11437992002-04-12 09:54:03 +000020421 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 }
20424 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20425 int x[] = {25, 17};
20426 const int *foo = &x[0];
20427 ++foo;
20428 }
20429 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20430 typedef const int *iptr;
20431 iptr p = 0;
20432 ++p;
20433 }
20434 { /* AIX XL C 1.02.0.0 rejects this saying
20435 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20436 struct s { int j; const int *ap[3]; };
20437 struct s *b; b->j = 5;
20438 }
20439 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20440 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020441 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020442 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020443 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020444#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020445
Martin v. Löwis11437992002-04-12 09:54:03 +000020446 ;
20447 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020448}
Martin v. Löwis11437992002-04-12 09:54:03 +000020449_ACEOF
20450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451if { (ac_try="$ac_compile"
20452case "(($ac_try" in
20453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20454 *) ac_try_echo=$ac_try;;
20455esac
20456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020459 grep -v '^ *+' conftest.er1 >conftest.err
20460 rm -f conftest.er1
20461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020463 (exit $ac_status); } && {
20464 test -z "$ac_c_werror_flag" ||
20465 test ! -s conftest.err
20466 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020467 ac_cv_c_const=yes
20468else
Martin v. Löwis11437992002-04-12 09:54:03 +000020469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020470sed 's/^/| /' conftest.$ac_ext >&5
20471
Martin v. Löwiseba40652007-08-30 20:10:57 +000020472 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020474
20475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020477{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20478echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020479if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020480
20481cat >>confdefs.h <<\_ACEOF
20482#define const
20483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020484
20485fi
20486
Michael W. Hudson54241132001-12-07 15:38:26 +000020487
Guido van Rossumda88dad1995-01-26 00:46:29 +000020488works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020489{ echo "$as_me:$LINENO: checking for working volatile" >&5
20490echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020492/* confdefs.h. */
20493_ACEOF
20494cat confdefs.h >>conftest.$ac_ext
20495cat >>conftest.$ac_ext <<_ACEOF
20496/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020497
Martin v. Löwis11437992002-04-12 09:54:03 +000020498int
20499main ()
20500{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020501volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020502 ;
20503 return 0;
20504}
20505_ACEOF
20506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020507if { (ac_try="$ac_compile"
20508case "(($ac_try" in
20509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20510 *) ac_try_echo=$ac_try;;
20511esac
20512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020515 grep -v '^ *+' conftest.er1 >conftest.err
20516 rm -f conftest.er1
20517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519 (exit $ac_status); } && {
20520 test -z "$ac_c_werror_flag" ||
20521 test ! -s conftest.err
20522 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020523 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020524else
Martin v. Löwis11437992002-04-12 09:54:03 +000020525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020526sed 's/^/| /' conftest.$ac_ext >&5
20527
Martin v. Löwis11437992002-04-12 09:54:03 +000020528
20529cat >>confdefs.h <<\_ACEOF
20530#define volatile
20531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020532
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020533
Guido van Rossum627b2d71993-12-24 10:39:16 +000020534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535
20536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20537{ echo "$as_me:$LINENO: result: $works" >&5
20538echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020539
Guido van Rossumda88dad1995-01-26 00:46:29 +000020540works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020541{ echo "$as_me:$LINENO: checking for working signed char" >&5
20542echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020544/* confdefs.h. */
20545_ACEOF
20546cat confdefs.h >>conftest.$ac_ext
20547cat >>conftest.$ac_ext <<_ACEOF
20548/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020549
Martin v. Löwis11437992002-04-12 09:54:03 +000020550int
20551main ()
20552{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020553signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020554 ;
20555 return 0;
20556}
20557_ACEOF
20558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020559if { (ac_try="$ac_compile"
20560case "(($ac_try" in
20561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20562 *) ac_try_echo=$ac_try;;
20563esac
20564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020567 grep -v '^ *+' conftest.er1 >conftest.err
20568 rm -f conftest.er1
20569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571 (exit $ac_status); } && {
20572 test -z "$ac_c_werror_flag" ||
20573 test ! -s conftest.err
20574 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020575 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020576else
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020578sed 's/^/| /' conftest.$ac_ext >&5
20579
Martin v. Löwis11437992002-04-12 09:54:03 +000020580
20581cat >>confdefs.h <<\_ACEOF
20582#define signed
20583_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020584
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020585
Guido van Rossum7f43da71994-08-01 12:15:30 +000020586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020587
20588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20589{ echo "$as_me:$LINENO: result: $works" >&5
20590echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020591
Guido van Rossumda88dad1995-01-26 00:46:29 +000020592have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020593{ echo "$as_me:$LINENO: checking for prototypes" >&5
20594echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020596/* confdefs.h. */
20597_ACEOF
20598cat confdefs.h >>conftest.$ac_ext
20599cat >>conftest.$ac_ext <<_ACEOF
20600/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020601int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020602int
20603main ()
20604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020605return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020606 ;
20607 return 0;
20608}
20609_ACEOF
20610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020611if { (ac_try="$ac_compile"
20612case "(($ac_try" in
20613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20614 *) ac_try_echo=$ac_try;;
20615esac
20616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020619 grep -v '^ *+' conftest.er1 >conftest.err
20620 rm -f conftest.er1
20621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020623 (exit $ac_status); } && {
20624 test -z "$ac_c_werror_flag" ||
20625 test ! -s conftest.err
20626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
20628
20629cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020630#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020631_ACEOF
20632
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020633 have_prototypes=yes
20634
Guido van Rossumf78abae1997-01-21 22:02:36 +000020635else
Martin v. Löwis11437992002-04-12 09:54:03 +000020636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020637sed 's/^/| /' conftest.$ac_ext >&5
20638
Martin v. Löwiseba40652007-08-30 20:10:57 +000020639
Guido van Rossum7f43da71994-08-01 12:15:30 +000020640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641
20642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20643{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20644echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020645
Guido van Rossumda88dad1995-01-26 00:46:29 +000020646works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020647{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20648echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020650/* confdefs.h. */
20651_ACEOF
20652cat confdefs.h >>conftest.$ac_ext
20653cat >>conftest.$ac_ext <<_ACEOF
20654/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020655
20656#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020657int foo(int x, ...) {
20658 va_list va;
20659 va_start(va, x);
20660 va_arg(va, int);
20661 va_arg(va, char *);
20662 va_arg(va, double);
20663 return 0;
20664}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020665
Martin v. Löwis11437992002-04-12 09:54:03 +000020666int
20667main ()
20668{
Guido van Rossum90eea071996-08-30 20:58:57 +000020669return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 ;
20671 return 0;
20672}
20673_ACEOF
20674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675if { (ac_try="$ac_compile"
20676case "(($ac_try" in
20677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20678 *) ac_try_echo=$ac_try;;
20679esac
20680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 grep -v '^ *+' conftest.er1 >conftest.err
20684 rm -f conftest.er1
20685 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687 (exit $ac_status); } && {
20688 test -z "$ac_c_werror_flag" ||
20689 test ! -s conftest.err
20690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020691
20692
20693cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020694#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020695_ACEOF
20696
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020697 works=yes
20698
Guido van Rossumf78abae1997-01-21 22:02:36 +000020699else
Martin v. Löwis11437992002-04-12 09:54:03 +000020700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020701sed 's/^/| /' conftest.$ac_ext >&5
20702
Martin v. Löwiseba40652007-08-30 20:10:57 +000020703
Guido van Rossum627b2d71993-12-24 10:39:16 +000020704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705
20706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20707{ echo "$as_me:$LINENO: result: $works" >&5
20708echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020709
Martin v. Löwisd6320502004-08-12 13:45:08 +000020710# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711{ echo "$as_me:$LINENO: checking for socketpair" >&5
20712echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020713cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020714/* confdefs.h. */
20715_ACEOF
20716cat confdefs.h >>conftest.$ac_ext
20717cat >>conftest.$ac_ext <<_ACEOF
20718/* end confdefs.h. */
20719
20720#include <sys/types.h>
20721#include <sys/socket.h>
20722
20723int
20724main ()
20725{
20726void *x=socketpair
20727 ;
20728 return 0;
20729}
20730_ACEOF
20731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732if { (ac_try="$ac_compile"
20733case "(($ac_try" in
20734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20735 *) ac_try_echo=$ac_try;;
20736esac
20737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020740 grep -v '^ *+' conftest.er1 >conftest.err
20741 rm -f conftest.er1
20742 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744 (exit $ac_status); } && {
20745 test -z "$ac_c_werror_flag" ||
20746 test ! -s conftest.err
20747 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020748
20749cat >>confdefs.h <<\_ACEOF
20750#define HAVE_SOCKETPAIR 1
20751_ACEOF
20752
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753 { echo "$as_me:$LINENO: result: yes" >&5
20754echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020755else
20756 echo "$as_me: failed program was:" >&5
20757sed 's/^/| /' conftest.$ac_ext >&5
20758
Martin v. Löwiseba40652007-08-30 20:10:57 +000020759 { echo "$as_me:$LINENO: result: no" >&5
20760echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020761
20762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763
20764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020765
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020766# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20768echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020770/* confdefs.h. */
20771_ACEOF
20772cat confdefs.h >>conftest.$ac_ext
20773cat >>conftest.$ac_ext <<_ACEOF
20774/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020775#include <sys/types.h>
20776#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020777int
20778main ()
20779{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020780struct sockaddr x;
20781x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 ;
20783 return 0;
20784}
20785_ACEOF
20786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020787if { (ac_try="$ac_compile"
20788case "(($ac_try" in
20789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20790 *) ac_try_echo=$ac_try;;
20791esac
20792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020795 grep -v '^ *+' conftest.er1 >conftest.err
20796 rm -f conftest.er1
20797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799 (exit $ac_status); } && {
20800 test -z "$ac_c_werror_flag" ||
20801 test ! -s conftest.err
20802 } && test -s conftest.$ac_objext; then
20803 { echo "$as_me:$LINENO: result: yes" >&5
20804echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020805
20806cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020807#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020808_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020809
20810else
Martin v. Löwis11437992002-04-12 09:54:03 +000020811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020812sed 's/^/| /' conftest.$ac_ext >&5
20813
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814 { echo "$as_me:$LINENO: result: no" >&5
20815echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817
20818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020819
Guido van Rossumda88dad1995-01-26 00:46:29 +000020820va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20822echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020823cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020824/* confdefs.h. */
20825_ACEOF
20826cat confdefs.h >>conftest.$ac_ext
20827cat >>conftest.$ac_ext <<_ACEOF
20828/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020829
20830#ifdef HAVE_STDARG_PROTOTYPES
20831#include <stdarg.h>
20832#else
20833#include <varargs.h>
20834#endif
20835
Martin v. Löwis11437992002-04-12 09:54:03 +000020836int
20837main ()
20838{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020839va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020840 ;
20841 return 0;
20842}
20843_ACEOF
20844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020845if { (ac_try="$ac_compile"
20846case "(($ac_try" in
20847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20848 *) ac_try_echo=$ac_try;;
20849esac
20850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020853 grep -v '^ *+' conftest.er1 >conftest.err
20854 rm -f conftest.er1
20855 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020857 (exit $ac_status); } && {
20858 test -z "$ac_c_werror_flag" ||
20859 test ! -s conftest.err
20860 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020861 :
20862else
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020864sed 's/^/| /' conftest.$ac_ext >&5
20865
Martin v. Löwis11437992002-04-12 09:54:03 +000020866
20867
20868cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020869#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020870_ACEOF
20871
Guido van Rossumda88dad1995-01-26 00:46:29 +000020872 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020875
20876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20877{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20878echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020879
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020880# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020881
20882
20883
Martin v. Löwiseba40652007-08-30 20:10:57 +000020884{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20885echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020886if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020888else
Martin v. Löwis11437992002-04-12 09:54:03 +000020889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020890/* confdefs.h. */
20891_ACEOF
20892cat confdefs.h >>conftest.$ac_ext
20893cat >>conftest.$ac_ext <<_ACEOF
20894/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020895/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20897#define gethostbyname_r innocuous_gethostbyname_r
20898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020899/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020900 which can conflict with char gethostbyname_r (); below.
20901 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020902 <limits.h> exists even on freestanding compilers. */
20903
20904#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020905# include <limits.h>
20906#else
20907# include <assert.h>
20908#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020909
20910#undef gethostbyname_r
20911
Martin v. Löwiseba40652007-08-30 20:10:57 +000020912/* Override any GCC internal prototype to avoid an error.
20913 Use char because int might match the return type of a GCC
20914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020915#ifdef __cplusplus
20916extern "C"
20917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020918char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020919/* The GNU C library defines this for functions which it implements
20920 to always fail with ENOSYS. Some functions are actually named
20921 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020923choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020924#endif
20925
Skip Montanaro6dead952003-09-25 14:50:04 +000020926int
20927main ()
20928{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020929return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020930 ;
20931 return 0;
20932}
20933_ACEOF
20934rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935if { (ac_try="$ac_link"
20936case "(($ac_try" in
20937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20938 *) ac_try_echo=$ac_try;;
20939esac
20940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20941 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020943 grep -v '^ *+' conftest.er1 >conftest.err
20944 rm -f conftest.er1
20945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020947 (exit $ac_status); } && {
20948 test -z "$ac_c_werror_flag" ||
20949 test ! -s conftest.err
20950 } && test -s conftest$ac_exeext &&
20951 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020952 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020953else
Martin v. Löwis11437992002-04-12 09:54:03 +000020954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020955sed 's/^/| /' conftest.$ac_ext >&5
20956
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020959
20960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020961 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020963{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20964echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020965if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020966
Martin v. Löwis11437992002-04-12 09:54:03 +000020967 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020968#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020969_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020970
Martin v. Löwiseba40652007-08-30 20:10:57 +000020971 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20972echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020973 OLD_CFLAGS=$CFLAGS
20974 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020976/* confdefs.h. */
20977_ACEOF
20978cat confdefs.h >>conftest.$ac_ext
20979cat >>conftest.$ac_ext <<_ACEOF
20980/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020981
20982# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020983
Martin v. Löwis11437992002-04-12 09:54:03 +000020984int
20985main ()
20986{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020987
20988 char *name;
20989 struct hostent *he, *res;
20990 char buffer[2048];
20991 int buflen = 2048;
20992 int h_errnop;
20993
20994 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020995
20996 ;
20997 return 0;
20998}
20999_ACEOF
21000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001if { (ac_try="$ac_compile"
21002case "(($ac_try" in
21003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21004 *) ac_try_echo=$ac_try;;
21005esac
21006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021009 grep -v '^ *+' conftest.er1 >conftest.err
21010 rm -f conftest.er1
21011 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021013 (exit $ac_status); } && {
21014 test -z "$ac_c_werror_flag" ||
21015 test ! -s conftest.err
21016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021017
21018 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021019#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021020_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021021
Martin v. Löwis11437992002-04-12 09:54:03 +000021022
21023cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021024#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021025_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021026
Martin v. Löwiseba40652007-08-30 20:10:57 +000021027 { echo "$as_me:$LINENO: result: yes" >&5
21028echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021030else
Martin v. Löwis11437992002-04-12 09:54:03 +000021031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
Martin v. Löwis11437992002-04-12 09:54:03 +000021034
Martin v. Löwiseba40652007-08-30 20:10:57 +000021035 { echo "$as_me:$LINENO: result: no" >&5
21036echo "${ECHO_T}no" >&6; }
21037 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21038echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021040/* confdefs.h. */
21041_ACEOF
21042cat confdefs.h >>conftest.$ac_ext
21043cat >>conftest.$ac_ext <<_ACEOF
21044/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021045
21046# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021047
Martin v. Löwis11437992002-04-12 09:54:03 +000021048int
21049main ()
21050{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021051
21052 char *name;
21053 struct hostent *he;
21054 char buffer[2048];
21055 int buflen = 2048;
21056 int h_errnop;
21057
21058 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021059
21060 ;
21061 return 0;
21062}
21063_ACEOF
21064rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021065if { (ac_try="$ac_compile"
21066case "(($ac_try" in
21067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21068 *) ac_try_echo=$ac_try;;
21069esac
21070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021073 grep -v '^ *+' conftest.er1 >conftest.err
21074 rm -f conftest.er1
21075 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021077 (exit $ac_status); } && {
21078 test -z "$ac_c_werror_flag" ||
21079 test ! -s conftest.err
21080 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021081
21082 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021083#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021084_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021085
Martin v. Löwis11437992002-04-12 09:54:03 +000021086
21087cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021088#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021089_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021090
Martin v. Löwiseba40652007-08-30 20:10:57 +000021091 { echo "$as_me:$LINENO: result: yes" >&5
21092echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021093
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021094else
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021096sed 's/^/| /' conftest.$ac_ext >&5
21097
Martin v. Löwis11437992002-04-12 09:54:03 +000021098
Martin v. Löwiseba40652007-08-30 20:10:57 +000021099 { echo "$as_me:$LINENO: result: no" >&5
21100echo "${ECHO_T}no" >&6; }
21101 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21102echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021104/* confdefs.h. */
21105_ACEOF
21106cat confdefs.h >>conftest.$ac_ext
21107cat >>conftest.$ac_ext <<_ACEOF
21108/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021109
21110# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021111
Martin v. Löwis11437992002-04-12 09:54:03 +000021112int
21113main ()
21114{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021115
21116 char *name;
21117 struct hostent *he;
21118 struct hostent_data data;
21119
21120 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021121
21122 ;
21123 return 0;
21124}
21125_ACEOF
21126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127if { (ac_try="$ac_compile"
21128case "(($ac_try" in
21129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21130 *) ac_try_echo=$ac_try;;
21131esac
21132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021135 grep -v '^ *+' conftest.er1 >conftest.err
21136 rm -f conftest.er1
21137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139 (exit $ac_status); } && {
21140 test -z "$ac_c_werror_flag" ||
21141 test ! -s conftest.err
21142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021143
21144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021145#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021146_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021147
Martin v. Löwis11437992002-04-12 09:54:03 +000021148
21149cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021150#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021151_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021152
Martin v. Löwiseba40652007-08-30 20:10:57 +000021153 { echo "$as_me:$LINENO: result: yes" >&5
21154echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021155
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021156else
Martin v. Löwis11437992002-04-12 09:54:03 +000021157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021158sed 's/^/| /' conftest.$ac_ext >&5
21159
Martin v. Löwis11437992002-04-12 09:54:03 +000021160
Martin v. Löwiseba40652007-08-30 20:10:57 +000021161 { echo "$as_me:$LINENO: result: no" >&5
21162echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021163
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021165
21166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169
21170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021171
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021173
21174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021175 CFLAGS=$OLD_CFLAGS
21176
21177else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021178
Martin v. Löwis11437992002-04-12 09:54:03 +000021179
21180for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021181do
Martin v. Löwis11437992002-04-12 09:54:03 +000021182as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021183{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21184echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21185if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021186 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021187else
Martin v. Löwis11437992002-04-12 09:54:03 +000021188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021189/* confdefs.h. */
21190_ACEOF
21191cat confdefs.h >>conftest.$ac_ext
21192cat >>conftest.$ac_ext <<_ACEOF
21193/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021194/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21196#define $ac_func innocuous_$ac_func
21197
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021198/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021199 which can conflict with char $ac_func (); below.
21200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021201 <limits.h> exists even on freestanding compilers. */
21202
21203#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021204# include <limits.h>
21205#else
21206# include <assert.h>
21207#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021208
21209#undef $ac_func
21210
Martin v. Löwiseba40652007-08-30 20:10:57 +000021211/* Override any GCC internal prototype to avoid an error.
21212 Use char because int might match the return type of a GCC
21213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021214#ifdef __cplusplus
21215extern "C"
21216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021217char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021218/* The GNU C library defines this for functions which it implements
21219 to always fail with ENOSYS. Some functions are actually named
21220 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021222choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021223#endif
21224
Skip Montanaro6dead952003-09-25 14:50:04 +000021225int
21226main ()
21227{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021228return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021229 ;
21230 return 0;
21231}
21232_ACEOF
21233rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021234if { (ac_try="$ac_link"
21235case "(($ac_try" in
21236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21237 *) ac_try_echo=$ac_try;;
21238esac
21239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021242 grep -v '^ *+' conftest.er1 >conftest.err
21243 rm -f conftest.er1
21244 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021246 (exit $ac_status); } && {
21247 test -z "$ac_c_werror_flag" ||
21248 test ! -s conftest.err
21249 } && test -s conftest$ac_exeext &&
21250 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021251 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021252else
Martin v. Löwis11437992002-04-12 09:54:03 +000021253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021254sed 's/^/| /' conftest.$ac_ext >&5
21255
Martin v. Löwiseba40652007-08-30 20:10:57 +000021256 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021258
21259rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021260 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021262ac_res=`eval echo '${'$as_ac_var'}'`
21263 { echo "$as_me:$LINENO: result: $ac_res" >&5
21264echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021265if test `eval echo '${'$as_ac_var'}'` = yes; then
21266 cat >>confdefs.h <<_ACEOF
21267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21268_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021269
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021270fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021271done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021272
Michael W. Hudson54241132001-12-07 15:38:26 +000021273
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021274fi
21275
Michael W. Hudson54241132001-12-07 15:38:26 +000021276
21277
21278
21279
21280
21281
Guido van Rossum627b2d71993-12-24 10:39:16 +000021282# checks for system services
21283# (none yet)
21284
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021285# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021286{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21287echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021288if test "${ac_cv_func___fpu_control+set}" = set; then
21289 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021290else
Martin v. Löwis11437992002-04-12 09:54:03 +000021291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021292/* confdefs.h. */
21293_ACEOF
21294cat confdefs.h >>conftest.$ac_ext
21295cat >>conftest.$ac_ext <<_ACEOF
21296/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021297/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21298 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21299#define __fpu_control innocuous___fpu_control
21300
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021301/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021302 which can conflict with char __fpu_control (); below.
21303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021304 <limits.h> exists even on freestanding compilers. */
21305
21306#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021307# include <limits.h>
21308#else
21309# include <assert.h>
21310#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021311
21312#undef __fpu_control
21313
Martin v. Löwiseba40652007-08-30 20:10:57 +000021314/* Override any GCC internal prototype to avoid an error.
21315 Use char because int might match the return type of a GCC
21316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021317#ifdef __cplusplus
21318extern "C"
21319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021320char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021321/* The GNU C library defines this for functions which it implements
21322 to always fail with ENOSYS. Some functions are actually named
21323 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021325choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021326#endif
21327
Skip Montanaro6dead952003-09-25 14:50:04 +000021328int
21329main ()
21330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021332 ;
21333 return 0;
21334}
21335_ACEOF
21336rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337if { (ac_try="$ac_link"
21338case "(($ac_try" in
21339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21340 *) ac_try_echo=$ac_try;;
21341esac
21342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021345 grep -v '^ *+' conftest.er1 >conftest.err
21346 rm -f conftest.er1
21347 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021349 (exit $ac_status); } && {
21350 test -z "$ac_c_werror_flag" ||
21351 test ! -s conftest.err
21352 } && test -s conftest$ac_exeext &&
21353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021354 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021355else
Martin v. Löwis11437992002-04-12 09:54:03 +000021356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021357sed 's/^/| /' conftest.$ac_ext >&5
21358
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021361
21362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021363 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021365{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21366echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021367if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021368 :
21369else
Martin v. Löwis11437992002-04-12 09:54:03 +000021370
Martin v. Löwiseba40652007-08-30 20:10:57 +000021371{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21372echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021373if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021375else
Martin v. Löwis11437992002-04-12 09:54:03 +000021376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021377LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021379/* confdefs.h. */
21380_ACEOF
21381cat confdefs.h >>conftest.$ac_ext
21382cat >>conftest.$ac_ext <<_ACEOF
21383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021384
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385/* Override any GCC internal prototype to avoid an error.
21386 Use char because int might match the return type of a GCC
21387 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021388#ifdef __cplusplus
21389extern "C"
21390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021391char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021392int
21393main ()
21394{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021395return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021396 ;
21397 return 0;
21398}
21399_ACEOF
21400rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401if { (ac_try="$ac_link"
21402case "(($ac_try" in
21403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21404 *) ac_try_echo=$ac_try;;
21405esac
21406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21407 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021409 grep -v '^ *+' conftest.er1 >conftest.err
21410 rm -f conftest.er1
21411 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021413 (exit $ac_status); } && {
21414 test -z "$ac_c_werror_flag" ||
21415 test ! -s conftest.err
21416 } && test -s conftest$ac_exeext &&
21417 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021418 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021419else
Martin v. Löwis11437992002-04-12 09:54:03 +000021420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021421sed 's/^/| /' conftest.$ac_ext >&5
21422
Martin v. Löwiseba40652007-08-30 20:10:57 +000021423 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021425
21426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021428LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21431echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021432if test $ac_cv_lib_ieee___fpu_control = yes; then
21433 cat >>confdefs.h <<_ACEOF
21434#define HAVE_LIBIEEE 1
21435_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021437 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021438
Guido van Rossum627b2d71993-12-24 10:39:16 +000021439fi
21440
Michael W. Hudson54241132001-12-07 15:38:26 +000021441
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021442fi
21443
Michael W. Hudson54241132001-12-07 15:38:26 +000021444
Guido van Rossum7f253911997-05-09 02:42:48 +000021445# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21447echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021448
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021450if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021452if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021453then
21454
21455cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021456#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021457_ACEOF
21458
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459 { echo "$as_me:$LINENO: result: yes" >&5
21460echo "${ECHO_T}yes" >&6; }
21461else { echo "$as_me:$LINENO: result: no" >&5
21462echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021463fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021464else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465 { echo "$as_me:$LINENO: result: no" >&5
21466echo "${ECHO_T}no" >&6; }
21467fi
21468
Guido van Rossum7f253911997-05-09 02:42:48 +000021469
Guido van Rossum7f43da71994-08-01 12:15:30 +000021470# check for --with-libm=...
21471
Guido van Rossum563e7081996-09-10 18:20:48 +000021472case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021473Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021474BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021475*) LIBM=-lm
21476esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21478echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021479
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021481if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021482 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021483if test "$withval" = no
21484then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021485 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21486echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021487elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021488then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21490echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021491else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21492echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21493 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021494fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021495else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21497echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21498fi
21499
Guido van Rossum7f43da71994-08-01 12:15:30 +000021500
21501# check for --with-libc=...
21502
Martin v. Löwiseba40652007-08-30 20:10:57 +000021503{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21504echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021505
Martin v. Löwiseba40652007-08-30 20:10:57 +000021506# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021507if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021508 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021509if test "$withval" = no
21510then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21512echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021513elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021514then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21516echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021517else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21518echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21519 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021520fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021521else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021522 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21523echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21524fi
21525
Guido van Rossum7f43da71994-08-01 12:15:30 +000021526
Christian Heimes0a8143f2007-12-18 23:22:54 +000021527# ************************************
21528# * Check for mathematical functions *
21529# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021530
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021531LIBS_SAVE=$LIBS
21532LIBS="$LIBS $LIBM"
21533
Mark Dickinsone05e8402009-05-04 13:30:43 +000021534# Detect whether system arithmetic is subject to x87-style double
21535# rounding issues. The result of this test has little meaning on non
21536# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21537# mode is round-to-nearest and double rounding issues are present, and
21538# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21539{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21540echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21541if test "${ac_cv_x87_double_rounding+set}" = set; then
21542 echo $ECHO_N "(cached) $ECHO_C" >&6
21543else
21544
21545if test "$cross_compiling" = yes; then
21546 ac_cv_x87_double_rounding=no
21547else
21548 cat >conftest.$ac_ext <<_ACEOF
21549/* confdefs.h. */
21550_ACEOF
21551cat confdefs.h >>conftest.$ac_ext
21552cat >>conftest.$ac_ext <<_ACEOF
21553/* end confdefs.h. */
21554
21555#include <stdlib.h>
21556#include <math.h>
21557int main() {
21558 volatile double x, y, z;
21559 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21560 x = 0.99999999999999989; /* 1-2**-53 */
21561 y = 1./x;
21562 if (y != 1.)
21563 exit(0);
21564 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21565 x = 1e16;
21566 y = 2.99999;
21567 z = x + y;
21568 if (z != 1e16+4.)
21569 exit(0);
21570 /* both tests show evidence of double rounding */
21571 exit(1);
21572}
21573
21574_ACEOF
21575rm -f conftest$ac_exeext
21576if { (ac_try="$ac_link"
21577case "(($ac_try" in
21578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21579 *) ac_try_echo=$ac_try;;
21580esac
21581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21582 (eval "$ac_link") 2>&5
21583 ac_status=$?
21584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21585 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21586 { (case "(($ac_try" in
21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21588 *) ac_try_echo=$ac_try;;
21589esac
21590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21591 (eval "$ac_try") 2>&5
21592 ac_status=$?
21593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21594 (exit $ac_status); }; }; then
21595 ac_cv_x87_double_rounding=no
21596else
21597 echo "$as_me: program exited with status $ac_status" >&5
21598echo "$as_me: failed program was:" >&5
21599sed 's/^/| /' conftest.$ac_ext >&5
21600
21601( exit $ac_status )
21602ac_cv_x87_double_rounding=yes
21603fi
21604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21605fi
21606
21607
21608fi
21609
21610{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21611echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21612if test "$ac_cv_x87_double_rounding" = yes
21613then
21614
21615cat >>confdefs.h <<\_ACEOF
21616#define X87_DOUBLE_ROUNDING 1
21617_ACEOF
21618
21619fi
21620
21621
Mark Dickinson265d7382008-04-21 22:32:24 +000021622# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21623# -0. on some architectures.
21624{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21625echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21626if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21627 echo $ECHO_N "(cached) $ECHO_C" >&6
21628else
21629
21630if test "$cross_compiling" = yes; then
21631 ac_cv_tanh_preserves_zero_sign=no
21632else
21633 cat >conftest.$ac_ext <<_ACEOF
21634/* confdefs.h. */
21635_ACEOF
21636cat confdefs.h >>conftest.$ac_ext
21637cat >>conftest.$ac_ext <<_ACEOF
21638/* end confdefs.h. */
21639
21640#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021641#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021642int main() {
21643 /* return 0 if either negative zeros don't exist
21644 on this platform or if negative zeros exist
21645 and tanh(-0.) == -0. */
21646 if (atan2(0., -1.) == atan2(-0., -1.) ||
21647 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21648 else exit(1);
21649}
21650
21651_ACEOF
21652rm -f conftest$ac_exeext
21653if { (ac_try="$ac_link"
21654case "(($ac_try" in
21655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21656 *) ac_try_echo=$ac_try;;
21657esac
21658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21659 (eval "$ac_link") 2>&5
21660 ac_status=$?
21661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21662 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21663 { (case "(($ac_try" in
21664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21665 *) ac_try_echo=$ac_try;;
21666esac
21667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21668 (eval "$ac_try") 2>&5
21669 ac_status=$?
21670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21671 (exit $ac_status); }; }; then
21672 ac_cv_tanh_preserves_zero_sign=yes
21673else
21674 echo "$as_me: program exited with status $ac_status" >&5
21675echo "$as_me: failed program was:" >&5
21676sed 's/^/| /' conftest.$ac_ext >&5
21677
21678( exit $ac_status )
21679ac_cv_tanh_preserves_zero_sign=no
21680fi
21681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21682fi
21683
21684
21685fi
21686
21687{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21688echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21689if test "$ac_cv_tanh_preserves_zero_sign" = yes
21690then
21691
21692cat >>confdefs.h <<\_ACEOF
21693#define TANH_PRESERVES_ZERO_SIGN 1
21694_ACEOF
21695
21696fi
21697
Martin v. Löwis11437992002-04-12 09:54:03 +000021698
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021699
Michael W. Hudson54241132001-12-07 15:38:26 +000021700
Christian Heimes0a8143f2007-12-18 23:22:54 +000021701
21702
21703
21704
21705
Mark Dickinsone05e8402009-05-04 13:30:43 +000021706for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021707do
21708as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21709{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21710echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21711if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21712 echo $ECHO_N "(cached) $ECHO_C" >&6
21713else
21714 cat >conftest.$ac_ext <<_ACEOF
21715/* confdefs.h. */
21716_ACEOF
21717cat confdefs.h >>conftest.$ac_ext
21718cat >>conftest.$ac_ext <<_ACEOF
21719/* end confdefs.h. */
21720/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21721 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21722#define $ac_func innocuous_$ac_func
21723
21724/* System header to define __stub macros and hopefully few prototypes,
21725 which can conflict with char $ac_func (); below.
21726 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21727 <limits.h> exists even on freestanding compilers. */
21728
21729#ifdef __STDC__
21730# include <limits.h>
21731#else
21732# include <assert.h>
21733#endif
21734
21735#undef $ac_func
21736
21737/* Override any GCC internal prototype to avoid an error.
21738 Use char because int might match the return type of a GCC
21739 builtin and then its argument prototype would still apply. */
21740#ifdef __cplusplus
21741extern "C"
21742#endif
21743char $ac_func ();
21744/* The GNU C library defines this for functions which it implements
21745 to always fail with ENOSYS. Some functions are actually named
21746 something starting with __ and the normal name is an alias. */
21747#if defined __stub_$ac_func || defined __stub___$ac_func
21748choke me
21749#endif
21750
21751int
21752main ()
21753{
21754return $ac_func ();
21755 ;
21756 return 0;
21757}
21758_ACEOF
21759rm -f conftest.$ac_objext conftest$ac_exeext
21760if { (ac_try="$ac_link"
21761case "(($ac_try" in
21762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21763 *) ac_try_echo=$ac_try;;
21764esac
21765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21766 (eval "$ac_link") 2>conftest.er1
21767 ac_status=$?
21768 grep -v '^ *+' conftest.er1 >conftest.err
21769 rm -f conftest.er1
21770 cat conftest.err >&5
21771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21772 (exit $ac_status); } && {
21773 test -z "$ac_c_werror_flag" ||
21774 test ! -s conftest.err
21775 } && test -s conftest$ac_exeext &&
21776 $as_test_x conftest$ac_exeext; then
21777 eval "$as_ac_var=yes"
21778else
21779 echo "$as_me: failed program was:" >&5
21780sed 's/^/| /' conftest.$ac_ext >&5
21781
21782 eval "$as_ac_var=no"
21783fi
21784
21785rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21786 conftest$ac_exeext conftest.$ac_ext
21787fi
21788ac_res=`eval echo '${'$as_ac_var'}'`
21789 { echo "$as_me:$LINENO: result: $ac_res" >&5
21790echo "${ECHO_T}$ac_res" >&6; }
21791if test `eval echo '${'$as_ac_var'}'` = yes; then
21792 cat >>confdefs.h <<_ACEOF
21793#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21794_ACEOF
21795
21796fi
21797done
21798
Mark Dickinsone05e8402009-05-04 13:30:43 +000021799{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
21800echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
21801if test "${ac_cv_have_decl_isinf+set}" = set; then
21802 echo $ECHO_N "(cached) $ECHO_C" >&6
21803else
21804 cat >conftest.$ac_ext <<_ACEOF
21805/* confdefs.h. */
21806_ACEOF
21807cat confdefs.h >>conftest.$ac_ext
21808cat >>conftest.$ac_ext <<_ACEOF
21809/* end confdefs.h. */
21810#include <math.h>
21811
21812int
21813main ()
21814{
21815#ifndef isinf
21816 (void) isinf;
21817#endif
21818
21819 ;
21820 return 0;
21821}
21822_ACEOF
21823rm -f conftest.$ac_objext
21824if { (ac_try="$ac_compile"
21825case "(($ac_try" in
21826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21827 *) ac_try_echo=$ac_try;;
21828esac
21829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21830 (eval "$ac_compile") 2>conftest.er1
21831 ac_status=$?
21832 grep -v '^ *+' conftest.er1 >conftest.err
21833 rm -f conftest.er1
21834 cat conftest.err >&5
21835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21836 (exit $ac_status); } && {
21837 test -z "$ac_c_werror_flag" ||
21838 test ! -s conftest.err
21839 } && test -s conftest.$ac_objext; then
21840 ac_cv_have_decl_isinf=yes
21841else
21842 echo "$as_me: failed program was:" >&5
21843sed 's/^/| /' conftest.$ac_ext >&5
21844
21845 ac_cv_have_decl_isinf=no
21846fi
21847
21848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21849fi
21850{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
21851echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
21852if test $ac_cv_have_decl_isinf = yes; then
21853
21854cat >>confdefs.h <<_ACEOF
21855#define HAVE_DECL_ISINF 1
21856_ACEOF
21857
21858
21859else
21860 cat >>confdefs.h <<_ACEOF
21861#define HAVE_DECL_ISINF 0
21862_ACEOF
21863
21864
21865fi
21866{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
21867echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
21868if test "${ac_cv_have_decl_isnan+set}" = set; then
21869 echo $ECHO_N "(cached) $ECHO_C" >&6
21870else
21871 cat >conftest.$ac_ext <<_ACEOF
21872/* confdefs.h. */
21873_ACEOF
21874cat confdefs.h >>conftest.$ac_ext
21875cat >>conftest.$ac_ext <<_ACEOF
21876/* end confdefs.h. */
21877#include <math.h>
21878
21879int
21880main ()
21881{
21882#ifndef isnan
21883 (void) isnan;
21884#endif
21885
21886 ;
21887 return 0;
21888}
21889_ACEOF
21890rm -f conftest.$ac_objext
21891if { (ac_try="$ac_compile"
21892case "(($ac_try" in
21893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21894 *) ac_try_echo=$ac_try;;
21895esac
21896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21897 (eval "$ac_compile") 2>conftest.er1
21898 ac_status=$?
21899 grep -v '^ *+' conftest.er1 >conftest.err
21900 rm -f conftest.er1
21901 cat conftest.err >&5
21902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21903 (exit $ac_status); } && {
21904 test -z "$ac_c_werror_flag" ||
21905 test ! -s conftest.err
21906 } && test -s conftest.$ac_objext; then
21907 ac_cv_have_decl_isnan=yes
21908else
21909 echo "$as_me: failed program was:" >&5
21910sed 's/^/| /' conftest.$ac_ext >&5
21911
21912 ac_cv_have_decl_isnan=no
21913fi
21914
21915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21916fi
21917{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
21918echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
21919if test $ac_cv_have_decl_isnan = yes; then
21920
21921cat >>confdefs.h <<_ACEOF
21922#define HAVE_DECL_ISNAN 1
21923_ACEOF
21924
21925
21926else
21927 cat >>confdefs.h <<_ACEOF
21928#define HAVE_DECL_ISNAN 0
21929_ACEOF
21930
21931
21932fi
21933{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
21934echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
21935if test "${ac_cv_have_decl_isfinite+set}" = set; then
21936 echo $ECHO_N "(cached) $ECHO_C" >&6
21937else
21938 cat >conftest.$ac_ext <<_ACEOF
21939/* confdefs.h. */
21940_ACEOF
21941cat confdefs.h >>conftest.$ac_ext
21942cat >>conftest.$ac_ext <<_ACEOF
21943/* end confdefs.h. */
21944#include <math.h>
21945
21946int
21947main ()
21948{
21949#ifndef isfinite
21950 (void) isfinite;
21951#endif
21952
21953 ;
21954 return 0;
21955}
21956_ACEOF
21957rm -f conftest.$ac_objext
21958if { (ac_try="$ac_compile"
21959case "(($ac_try" in
21960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21961 *) ac_try_echo=$ac_try;;
21962esac
21963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21964 (eval "$ac_compile") 2>conftest.er1
21965 ac_status=$?
21966 grep -v '^ *+' conftest.er1 >conftest.err
21967 rm -f conftest.er1
21968 cat conftest.err >&5
21969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21970 (exit $ac_status); } && {
21971 test -z "$ac_c_werror_flag" ||
21972 test ! -s conftest.err
21973 } && test -s conftest.$ac_objext; then
21974 ac_cv_have_decl_isfinite=yes
21975else
21976 echo "$as_me: failed program was:" >&5
21977sed 's/^/| /' conftest.$ac_ext >&5
21978
21979 ac_cv_have_decl_isfinite=no
21980fi
21981
21982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21983fi
21984{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
21985echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
21986if test $ac_cv_have_decl_isfinite = yes; then
21987
21988cat >>confdefs.h <<_ACEOF
21989#define HAVE_DECL_ISFINITE 1
21990_ACEOF
21991
21992
21993else
21994 cat >>confdefs.h <<_ACEOF
21995#define HAVE_DECL_ISFINITE 0
21996_ACEOF
21997
21998
21999fi
22000
22001
Christian Heimes0a8143f2007-12-18 23:22:54 +000022002
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022003LIBS=$LIBS_SAVE
22004
Guido van Rossumef2255b2000-03-10 22:30:29 +000022005# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022006if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22008echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022009if test "${ac_cv_header_wchar_h+set}" = set; then
22010 echo $ECHO_N "(cached) $ECHO_C" >&6
22011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022012{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22013echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022014else
Martin v. Löwis11437992002-04-12 09:54:03 +000022015 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22017echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022019/* confdefs.h. */
22020_ACEOF
22021cat confdefs.h >>conftest.$ac_ext
22022cat >>conftest.$ac_ext <<_ACEOF
22023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022024$ac_includes_default
22025#include <wchar.h>
22026_ACEOF
22027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022028if { (ac_try="$ac_compile"
22029case "(($ac_try" in
22030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22031 *) ac_try_echo=$ac_try;;
22032esac
22033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022036 grep -v '^ *+' conftest.er1 >conftest.err
22037 rm -f conftest.er1
22038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022040 (exit $ac_status); } && {
22041 test -z "$ac_c_werror_flag" ||
22042 test ! -s conftest.err
22043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022044 ac_header_compiler=yes
22045else
22046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022047sed 's/^/| /' conftest.$ac_ext >&5
22048
Martin v. Löwiseba40652007-08-30 20:10:57 +000022049 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051
22052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22053{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22054echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022055
22056# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022057{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22058echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022060/* confdefs.h. */
22061_ACEOF
22062cat confdefs.h >>conftest.$ac_ext
22063cat >>conftest.$ac_ext <<_ACEOF
22064/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022065#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022066_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067if { (ac_try="$ac_cpp conftest.$ac_ext"
22068case "(($ac_try" in
22069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22070 *) ac_try_echo=$ac_try;;
22071esac
22072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22073 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022075 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 rm -f conftest.er1
22077 cat conftest.err >&5
22078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022079 (exit $ac_status); } >/dev/null && {
22080 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22081 test ! -s conftest.err
22082 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022083 ac_header_preproc=yes
22084else
22085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022086sed 's/^/| /' conftest.$ac_ext >&5
22087
Martin v. Löwis11437992002-04-12 09:54:03 +000022088 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022090
Martin v. Löwis11437992002-04-12 09:54:03 +000022091rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022092{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22093echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022094
22095# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022096case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22097 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022098 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22099echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022100 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22101echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22102 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022103 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022104 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022105 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22106echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022107 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22108echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22109 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22110echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22111 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22112echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022113 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22114echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022115 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22116echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022117 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022118## ------------------------------------------------ ##
22119## Report this to http://www.python.org/python-bugs ##
22120## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022121_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022122 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022123 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022124esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022125{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22126echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022127if test "${ac_cv_header_wchar_h+set}" = set; then
22128 echo $ECHO_N "(cached) $ECHO_C" >&6
22129else
22130 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022132{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22133echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022134
22135fi
22136if test $ac_cv_header_wchar_h = yes; then
22137
22138
22139cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022140#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022141_ACEOF
22142
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022143 wchar_h="yes"
22144
Guido van Rossumef2255b2000-03-10 22:30:29 +000022145else
Martin v. Löwis11437992002-04-12 09:54:03 +000022146 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022147
22148fi
22149
Michael W. Hudson54241132001-12-07 15:38:26 +000022150
Martin v. Löwis11437992002-04-12 09:54:03 +000022151
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022152# determine wchar_t size
22153if test "$wchar_h" = yes
22154then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022155 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22156echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022157if test "${ac_cv_type_wchar_t+set}" = set; then
22158 echo $ECHO_N "(cached) $ECHO_C" >&6
22159else
22160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022161/* confdefs.h. */
22162_ACEOF
22163cat confdefs.h >>conftest.$ac_ext
22164cat >>conftest.$ac_ext <<_ACEOF
22165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022166#include <wchar.h>
22167
Martin v. Löwiseba40652007-08-30 20:10:57 +000022168typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022169int
22170main ()
22171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022173 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022175 return 0;
22176 ;
22177 return 0;
22178}
22179_ACEOF
22180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181if { (ac_try="$ac_compile"
22182case "(($ac_try" in
22183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22184 *) ac_try_echo=$ac_try;;
22185esac
22186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022189 grep -v '^ *+' conftest.er1 >conftest.err
22190 rm -f conftest.er1
22191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022193 (exit $ac_status); } && {
22194 test -z "$ac_c_werror_flag" ||
22195 test ! -s conftest.err
22196 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022197 ac_cv_type_wchar_t=yes
22198else
22199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022200sed 's/^/| /' conftest.$ac_ext >&5
22201
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022203fi
Brett Cannon19fab762007-06-02 03:02:29 +000022204
Martin v. Löwiseba40652007-08-30 20:10:57 +000022205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22206fi
22207{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22208echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22209
22210# The cast to long int works around a bug in the HP C Compiler
22211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22213# This bug is HP SR number 8606223364.
22214{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22215echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022216if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22217 echo $ECHO_N "(cached) $ECHO_C" >&6
22218else
Martin v. Löwis11437992002-04-12 09:54:03 +000022219 if test "$cross_compiling" = yes; then
22220 # Depending upon the size, compute the lo and hi bounds.
22221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022222/* confdefs.h. */
22223_ACEOF
22224cat confdefs.h >>conftest.$ac_ext
22225cat >>conftest.$ac_ext <<_ACEOF
22226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022227#include <wchar.h>
22228
Martin v. Löwiseba40652007-08-30 20:10:57 +000022229 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022230int
22231main ()
22232{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022234test_array [0] = 0
22235
22236 ;
22237 return 0;
22238}
22239_ACEOF
22240rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022241if { (ac_try="$ac_compile"
22242case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
22246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022249 grep -v '^ *+' conftest.er1 >conftest.err
22250 rm -f conftest.er1
22251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022253 (exit $ac_status); } && {
22254 test -z "$ac_c_werror_flag" ||
22255 test ! -s conftest.err
22256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022257 ac_lo=0 ac_mid=0
22258 while :; do
22259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022260/* confdefs.h. */
22261_ACEOF
22262cat confdefs.h >>conftest.$ac_ext
22263cat >>conftest.$ac_ext <<_ACEOF
22264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022265#include <wchar.h>
22266
Martin v. Löwiseba40652007-08-30 20:10:57 +000022267 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022268int
22269main ()
22270{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022272test_array [0] = 0
22273
22274 ;
22275 return 0;
22276}
22277_ACEOF
22278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022279if { (ac_try="$ac_compile"
22280case "(($ac_try" in
22281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22282 *) ac_try_echo=$ac_try;;
22283esac
22284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022287 grep -v '^ *+' conftest.er1 >conftest.err
22288 rm -f conftest.er1
22289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291 (exit $ac_status); } && {
22292 test -z "$ac_c_werror_flag" ||
22293 test ! -s conftest.err
22294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022295 ac_hi=$ac_mid; break
22296else
22297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022298sed 's/^/| /' conftest.$ac_ext >&5
22299
Martin v. Löwiseba40652007-08-30 20:10:57 +000022300 ac_lo=`expr $ac_mid + 1`
22301 if test $ac_lo -le $ac_mid; then
22302 ac_lo= ac_hi=
22303 break
22304 fi
22305 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022307
22308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022309 done
22310else
22311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022312sed 's/^/| /' conftest.$ac_ext >&5
22313
Martin v. Löwiseba40652007-08-30 20:10:57 +000022314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022315/* confdefs.h. */
22316_ACEOF
22317cat confdefs.h >>conftest.$ac_ext
22318cat >>conftest.$ac_ext <<_ACEOF
22319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022320#include <wchar.h>
22321
Martin v. Löwiseba40652007-08-30 20:10:57 +000022322 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022323int
22324main ()
22325{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022326static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022327test_array [0] = 0
22328
22329 ;
22330 return 0;
22331}
22332_ACEOF
22333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022334if { (ac_try="$ac_compile"
22335case "(($ac_try" in
22336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22337 *) ac_try_echo=$ac_try;;
22338esac
22339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022342 grep -v '^ *+' conftest.er1 >conftest.err
22343 rm -f conftest.er1
22344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 (exit $ac_status); } && {
22347 test -z "$ac_c_werror_flag" ||
22348 test ! -s conftest.err
22349 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022350 ac_hi=-1 ac_mid=-1
22351 while :; do
22352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022353/* confdefs.h. */
22354_ACEOF
22355cat confdefs.h >>conftest.$ac_ext
22356cat >>conftest.$ac_ext <<_ACEOF
22357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022358#include <wchar.h>
22359
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022361int
22362main ()
22363{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022365test_array [0] = 0
22366
22367 ;
22368 return 0;
22369}
22370_ACEOF
22371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022372if { (ac_try="$ac_compile"
22373case "(($ac_try" in
22374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22375 *) ac_try_echo=$ac_try;;
22376esac
22377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022380 grep -v '^ *+' conftest.er1 >conftest.err
22381 rm -f conftest.er1
22382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384 (exit $ac_status); } && {
22385 test -z "$ac_c_werror_flag" ||
22386 test ! -s conftest.err
22387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022388 ac_lo=$ac_mid; break
22389else
22390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022391sed 's/^/| /' conftest.$ac_ext >&5
22392
Martin v. Löwiseba40652007-08-30 20:10:57 +000022393 ac_hi=`expr '(' $ac_mid ')' - 1`
22394 if test $ac_mid -le $ac_hi; then
22395 ac_lo= ac_hi=
22396 break
22397 fi
22398 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400
22401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022402 done
22403else
22404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022405sed 's/^/| /' conftest.$ac_ext >&5
22406
Martin v. Löwiseba40652007-08-30 20:10:57 +000022407 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022409
22410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412
22413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022414# Binary search between lo and hi bounds.
22415while test "x$ac_lo" != "x$ac_hi"; do
22416 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022418/* confdefs.h. */
22419_ACEOF
22420cat confdefs.h >>conftest.$ac_ext
22421cat >>conftest.$ac_ext <<_ACEOF
22422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022423#include <wchar.h>
22424
Martin v. Löwiseba40652007-08-30 20:10:57 +000022425 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022426int
22427main ()
22428{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022430test_array [0] = 0
22431
22432 ;
22433 return 0;
22434}
22435_ACEOF
22436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022437if { (ac_try="$ac_compile"
22438case "(($ac_try" in
22439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22440 *) ac_try_echo=$ac_try;;
22441esac
22442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022445 grep -v '^ *+' conftest.er1 >conftest.err
22446 rm -f conftest.er1
22447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022449 (exit $ac_status); } && {
22450 test -z "$ac_c_werror_flag" ||
22451 test ! -s conftest.err
22452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022453 ac_hi=$ac_mid
22454else
22455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022456sed 's/^/| /' conftest.$ac_ext >&5
22457
Martin v. Löwiseba40652007-08-30 20:10:57 +000022458 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022460
22461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022462done
22463case $ac_lo in
22464?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022465'') if test "$ac_cv_type_wchar_t" = yes; then
22466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022467See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022468echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022469See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022470 { (exit 77); exit 77; }; }
22471 else
22472 ac_cv_sizeof_wchar_t=0
22473 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022474esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022475else
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022477/* confdefs.h. */
22478_ACEOF
22479cat confdefs.h >>conftest.$ac_ext
22480cat >>conftest.$ac_ext <<_ACEOF
22481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022482#include <wchar.h>
22483
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484 typedef wchar_t ac__type_sizeof_;
22485static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22486static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022487#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022488#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022489int
22490main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022491{
Martin v. Löwis11437992002-04-12 09:54:03 +000022492
22493 FILE *f = fopen ("conftest.val", "w");
22494 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495 return 1;
22496 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022497 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022498 long int i = longval ();
22499 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22500 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022501 fprintf (f, "%ld\n", i);
22502 }
22503 else
22504 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022505 unsigned long int i = ulongval ();
22506 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22507 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022508 fprintf (f, "%lu\n", i);
22509 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022510 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022511
22512 ;
22513 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022514}
Martin v. Löwis11437992002-04-12 09:54:03 +000022515_ACEOF
22516rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022517if { (ac_try="$ac_link"
22518case "(($ac_try" in
22519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22520 *) ac_try_echo=$ac_try;;
22521esac
22522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22523 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022524 ac_status=$?
22525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022527 { (case "(($ac_try" in
22528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22529 *) ac_try_echo=$ac_try;;
22530esac
22531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22532 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022533 ac_status=$?
22534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22535 (exit $ac_status); }; }; then
22536 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022537else
Martin v. Löwis11437992002-04-12 09:54:03 +000022538 echo "$as_me: program exited with status $ac_status" >&5
22539echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022540sed 's/^/| /' conftest.$ac_ext >&5
22541
Martin v. Löwis11437992002-04-12 09:54:03 +000022542( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022543if test "$ac_cv_type_wchar_t" = yes; then
22544 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022545See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022547See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022548 { (exit 77); exit 77; }; }
22549 else
22550 ac_cv_sizeof_wchar_t=0
22551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553rm -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 +000022554fi
22555rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022557{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22558echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22559
22560
22561
Martin v. Löwis11437992002-04-12 09:54:03 +000022562cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022563#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022564_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022565
Michael W. Hudson54241132001-12-07 15:38:26 +000022566
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022567fi
22568
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22570echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022571have_ucs4_tcl=no
22572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022573/* confdefs.h. */
22574_ACEOF
22575cat confdefs.h >>conftest.$ac_ext
22576cat >>conftest.$ac_ext <<_ACEOF
22577/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022578
22579#include <tcl.h>
22580#if TCL_UTF_MAX != 6
22581# error "NOT UCS4_TCL"
22582#endif
22583int
22584main ()
22585{
22586
22587 ;
22588 return 0;
22589}
22590_ACEOF
22591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022592if { (ac_try="$ac_compile"
22593case "(($ac_try" in
22594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22595 *) ac_try_echo=$ac_try;;
22596esac
22597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022600 grep -v '^ *+' conftest.er1 >conftest.err
22601 rm -f conftest.er1
22602 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022604 (exit $ac_status); } && {
22605 test -z "$ac_c_werror_flag" ||
22606 test ! -s conftest.err
22607 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022608
22609
22610cat >>confdefs.h <<\_ACEOF
22611#define HAVE_UCS4_TCL 1
22612_ACEOF
22613
22614 have_ucs4_tcl=yes
22615
22616else
22617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022618sed 's/^/| /' conftest.$ac_ext >&5
22619
Martin v. Löwiseba40652007-08-30 20:10:57 +000022620
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022622
22623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22624{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22625echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022626
Skip Montanaro6dead952003-09-25 14:50:04 +000022627# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022628if test "$wchar_h" = yes
22629then
22630 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022631 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22632echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022633 if test "${ac_cv_wchar_t_signed+set}" = set; then
22634 echo $ECHO_N "(cached) $ECHO_C" >&6
22635else
22636
22637 if test "$cross_compiling" = yes; then
22638 ac_cv_wchar_t_signed=yes
22639else
22640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022641/* confdefs.h. */
22642_ACEOF
22643cat confdefs.h >>conftest.$ac_ext
22644cat >>conftest.$ac_ext <<_ACEOF
22645/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022646
22647 #include <wchar.h>
22648 int main()
22649 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022650 /* Success: exit code 0 */
22651 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022652 }
22653
22654_ACEOF
22655rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022656if { (ac_try="$ac_link"
22657case "(($ac_try" in
22658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22659 *) ac_try_echo=$ac_try;;
22660esac
22661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22662 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022663 ac_status=$?
22664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022666 { (case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
22670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22671 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022672 ac_status=$?
22673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22674 (exit $ac_status); }; }; then
22675 ac_cv_wchar_t_signed=yes
22676else
22677 echo "$as_me: program exited with status $ac_status" >&5
22678echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022679sed 's/^/| /' conftest.$ac_ext >&5
22680
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022681( exit $ac_status )
22682ac_cv_wchar_t_signed=no
22683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684rm -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 +000022685fi
22686
Martin v. Löwiseba40652007-08-30 20:10:57 +000022687
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022688fi
22689
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22691echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22692fi
22693
22694{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22695echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22696# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022697if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022698 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022699else
22700 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022701fi
22702
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022703
22704if test $enable_unicode = yes
22705then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022706 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022707 case "$have_ucs4_tcl" in
22708 yes) enable_unicode="ucs4"
22709 ;;
22710 *) enable_unicode="ucs2"
22711 ;;
22712 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022713fi
22714
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022715
22716
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022717case "$enable_unicode" in
22718ucs2) unicode_size="2"
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 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022721_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022722
22723 ;;
22724ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022725 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022726#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022727_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022728
22729 ;;
22730esac
22731
Michael W. Hudson54241132001-12-07 15:38:26 +000022732
Martin v. Löwis11437992002-04-12 09:54:03 +000022733
22734
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022735
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022736if test "$enable_unicode" = "no"
22737then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022738 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739 { echo "$as_me:$LINENO: result: not used" >&5
22740echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022741else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022742 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022743
22744cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022745#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022746_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022747
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022748
22749 # wchar_t is only usable if it maps to an unsigned type
22750 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022751 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022752 then
22753 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022754
Martin v. Löwis11437992002-04-12 09:54:03 +000022755cat >>confdefs.h <<\_ACEOF
22756#define HAVE_USABLE_WCHAR_T 1
22757_ACEOF
22758
22759 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022760#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022761_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022762
22763 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22764 then
22765 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022767#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022768_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022769
22770 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22771 then
22772 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022773 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022774#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022775_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022776
22777 else
22778 PY_UNICODE_TYPE="no type found"
22779 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022780 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22781echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022782fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022783
22784# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22786echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022787if test "${ac_cv_c_bigendian+set}" = set; then
22788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022789else
Martin v. Löwis11437992002-04-12 09:54:03 +000022790 # See if sys/param.h defines the BYTE_ORDER macro.
22791cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022792/* confdefs.h. */
22793_ACEOF
22794cat confdefs.h >>conftest.$ac_ext
22795cat >>conftest.$ac_ext <<_ACEOF
22796/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022797#include <sys/types.h>
22798#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022799
Martin v. Löwis11437992002-04-12 09:54:03 +000022800int
22801main ()
22802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022803#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22804 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022805 bogus endian macros
22806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022807
22808 ;
22809 return 0;
22810}
22811_ACEOF
22812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813if { (ac_try="$ac_compile"
22814case "(($ac_try" in
22815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22816 *) ac_try_echo=$ac_try;;
22817esac
22818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022821 grep -v '^ *+' conftest.er1 >conftest.err
22822 rm -f conftest.er1
22823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022825 (exit $ac_status); } && {
22826 test -z "$ac_c_werror_flag" ||
22827 test ! -s conftest.err
22828 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022829 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022830cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022831/* confdefs.h. */
22832_ACEOF
22833cat confdefs.h >>conftest.$ac_ext
22834cat >>conftest.$ac_ext <<_ACEOF
22835/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022836#include <sys/types.h>
22837#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022838
Martin v. Löwis11437992002-04-12 09:54:03 +000022839int
22840main ()
22841{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022842#if BYTE_ORDER != BIG_ENDIAN
22843 not big endian
22844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022845
22846 ;
22847 return 0;
22848}
22849_ACEOF
22850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022851if { (ac_try="$ac_compile"
22852case "(($ac_try" in
22853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22854 *) ac_try_echo=$ac_try;;
22855esac
22856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022859 grep -v '^ *+' conftest.er1 >conftest.err
22860 rm -f conftest.er1
22861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022863 (exit $ac_status); } && {
22864 test -z "$ac_c_werror_flag" ||
22865 test ! -s conftest.err
22866 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022867 ac_cv_c_bigendian=yes
22868else
Martin v. Löwis11437992002-04-12 09:54:03 +000022869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022870sed 's/^/| /' conftest.$ac_ext >&5
22871
Martin v. Löwiseba40652007-08-30 20:10:57 +000022872 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022874
22875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022876else
Martin v. Löwis11437992002-04-12 09:54:03 +000022877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022878sed 's/^/| /' conftest.$ac_ext >&5
22879
Martin v. Löwiseba40652007-08-30 20:10:57 +000022880 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022881if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022882 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022883 ac_cv_c_bigendian=unknown
22884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022885/* confdefs.h. */
22886_ACEOF
22887cat confdefs.h >>conftest.$ac_ext
22888cat >>conftest.$ac_ext <<_ACEOF
22889/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22891short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022892void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022893short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22894short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022895void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022896int
22897main ()
22898{
22899 _ascii (); _ebcdic ();
22900 ;
22901 return 0;
22902}
22903_ACEOF
22904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905if { (ac_try="$ac_compile"
22906case "(($ac_try" in
22907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22908 *) ac_try_echo=$ac_try;;
22909esac
22910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022913 grep -v '^ *+' conftest.er1 >conftest.err
22914 rm -f conftest.er1
22915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022917 (exit $ac_status); } && {
22918 test -z "$ac_c_werror_flag" ||
22919 test ! -s conftest.err
22920 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022921 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022922 ac_cv_c_bigendian=yes
22923fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022924if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022925 if test "$ac_cv_c_bigendian" = unknown; then
22926 ac_cv_c_bigendian=no
22927 else
22928 # finding both strings is unlikely to happen, but who knows?
22929 ac_cv_c_bigendian=unknown
22930 fi
22931fi
22932else
22933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022934sed 's/^/| /' conftest.$ac_ext >&5
22935
Martin v. Löwiseba40652007-08-30 20:10:57 +000022936
Martin v. Löwis11437992002-04-12 09:54:03 +000022937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022938
22939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022940else
22941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022942/* confdefs.h. */
22943_ACEOF
22944cat confdefs.h >>conftest.$ac_ext
22945cat >>conftest.$ac_ext <<_ACEOF
22946/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022948int
22949main ()
22950{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022951
Guido van Rossumef2255b2000-03-10 22:30:29 +000022952 /* Are we little or big endian? From Harbison&Steele. */
22953 union
22954 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955 long int l;
22956 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022957 } u;
22958 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959 return u.c[sizeof (long int) - 1] == 1;
22960
22961 ;
22962 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022963}
Martin v. Löwis11437992002-04-12 09:54:03 +000022964_ACEOF
22965rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022966if { (ac_try="$ac_link"
22967case "(($ac_try" in
22968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22969 *) ac_try_echo=$ac_try;;
22970esac
22971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22972 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022973 ac_status=$?
22974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022976 { (case "(($ac_try" in
22977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22978 *) ac_try_echo=$ac_try;;
22979esac
22980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22981 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 ac_status=$?
22983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22984 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022985 ac_cv_c_bigendian=no
22986else
Martin v. Löwis11437992002-04-12 09:54:03 +000022987 echo "$as_me: program exited with status $ac_status" >&5
22988echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022989sed 's/^/| /' conftest.$ac_ext >&5
22990
Martin v. Löwis11437992002-04-12 09:54:03 +000022991( exit $ac_status )
22992ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994rm -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 +000022995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996
22997
Martin v. Löwis11437992002-04-12 09:54:03 +000022998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022999
23000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23003echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023004case $ac_cv_c_bigendian in
23005 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023006
Martin v. Löwis11437992002-04-12 09:54:03 +000023007cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023008#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023009_ACEOF
23010 ;;
23011 no)
23012 ;;
23013 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023014 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023015presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023016echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023017presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23018 { (exit 1); exit 1; }; } ;;
23019esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023020
Michael W. Hudson54241132001-12-07 15:38:26 +000023021
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023022# Check whether right shifting a negative integer extends the sign bit
23023# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23025echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023026if test "${ac_cv_rshift_extends_sign+set}" = set; then
23027 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023028else
Martin v. Löwis11437992002-04-12 09:54:03 +000023029
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023030if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023031 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023032else
Martin v. Löwis11437992002-04-12 09:54:03 +000023033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023034/* confdefs.h. */
23035_ACEOF
23036cat confdefs.h >>conftest.$ac_ext
23037cat >>conftest.$ac_ext <<_ACEOF
23038/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023039
23040int main()
23041{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023042 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023043}
23044
Martin v. Löwis11437992002-04-12 09:54:03 +000023045_ACEOF
23046rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023047if { (ac_try="$ac_link"
23048case "(($ac_try" in
23049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23050 *) ac_try_echo=$ac_try;;
23051esac
23052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23053 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023054 ac_status=$?
23055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023057 { (case "(($ac_try" in
23058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23059 *) ac_try_echo=$ac_try;;
23060esac
23061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23062 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023063 ac_status=$?
23064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23065 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023066 ac_cv_rshift_extends_sign=yes
23067else
Martin v. Löwis11437992002-04-12 09:54:03 +000023068 echo "$as_me: program exited with status $ac_status" >&5
23069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023070sed 's/^/| /' conftest.$ac_ext >&5
23071
Martin v. Löwis11437992002-04-12 09:54:03 +000023072( exit $ac_status )
23073ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023075rm -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 +000023076fi
23077
Martin v. Löwiseba40652007-08-30 20:10:57 +000023078
23079fi
23080
23081{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23082echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023083if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023084then
Martin v. Löwis11437992002-04-12 09:54:03 +000023085
23086cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023087#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023088_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023089
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023090fi
23091
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023092# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023093{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23094echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023095if test "${ac_cv_have_getc_unlocked+set}" = set; then
23096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023097else
Martin v. Löwis11437992002-04-12 09:54:03 +000023098
23099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023100/* confdefs.h. */
23101_ACEOF
23102cat confdefs.h >>conftest.$ac_ext
23103cat >>conftest.$ac_ext <<_ACEOF
23104/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023105#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023106int
23107main ()
23108{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023109
23110 FILE *f = fopen("/dev/null", "r");
23111 flockfile(f);
23112 getc_unlocked(f);
23113 funlockfile(f);
23114
Martin v. Löwis11437992002-04-12 09:54:03 +000023115 ;
23116 return 0;
23117}
23118_ACEOF
23119rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023120if { (ac_try="$ac_link"
23121case "(($ac_try" in
23122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23123 *) ac_try_echo=$ac_try;;
23124esac
23125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23126 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023128 grep -v '^ *+' conftest.er1 >conftest.err
23129 rm -f conftest.er1
23130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023132 (exit $ac_status); } && {
23133 test -z "$ac_c_werror_flag" ||
23134 test ! -s conftest.err
23135 } && test -s conftest$ac_exeext &&
23136 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023137 ac_cv_have_getc_unlocked=yes
23138else
Martin v. Löwis11437992002-04-12 09:54:03 +000023139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023140sed 's/^/| /' conftest.$ac_ext >&5
23141
Martin v. Löwiseba40652007-08-30 20:10:57 +000023142 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144
23145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023146 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023147fi
23148
Martin v. Löwiseba40652007-08-30 20:10:57 +000023149{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23150echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023151if test "$ac_cv_have_getc_unlocked" = yes
23152then
Martin v. Löwis11437992002-04-12 09:54:03 +000023153
23154cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023155#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023156_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023157
23158fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023159
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023160# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023161# save the value of LIBS so we don't actually link Python with readline
23162LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023163
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023164# On some systems we need to link readline to a termcap compatible
23165# library. NOTE: Keep the precedence of listed libraries synchronised
23166# with setup.py.
23167py_cv_lib_readline=no
23168{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23169echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23170for py_libtermcap in "" ncursesw ncurses curses termcap; do
23171 if test -z "$py_libtermcap"; then
23172 READLINE_LIBS="-lreadline"
23173 else
23174 READLINE_LIBS="-lreadline -l$py_libtermcap"
23175 fi
23176 LIBS="$READLINE_LIBS $LIBS_no_readline"
23177 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023178/* confdefs.h. */
23179_ACEOF
23180cat confdefs.h >>conftest.$ac_ext
23181cat >>conftest.$ac_ext <<_ACEOF
23182/* end confdefs.h. */
23183
Martin v. Löwiseba40652007-08-30 20:10:57 +000023184/* Override any GCC internal prototype to avoid an error.
23185 Use char because int might match the return type of a GCC
23186 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023187#ifdef __cplusplus
23188extern "C"
23189#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023190char readline ();
23191int
23192main ()
23193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023194return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023195 ;
23196 return 0;
23197}
23198_ACEOF
23199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023200if { (ac_try="$ac_link"
23201case "(($ac_try" in
23202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23203 *) ac_try_echo=$ac_try;;
23204esac
23205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23206 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023207 ac_status=$?
23208 grep -v '^ *+' conftest.er1 >conftest.err
23209 rm -f conftest.er1
23210 cat conftest.err >&5
23211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023212 (exit $ac_status); } && {
23213 test -z "$ac_c_werror_flag" ||
23214 test ! -s conftest.err
23215 } && test -s conftest$ac_exeext &&
23216 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023217 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023218else
23219 echo "$as_me: failed program was:" >&5
23220sed 's/^/| /' conftest.$ac_ext >&5
23221
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023222
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023224
23225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023226 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023227 if test $py_cv_lib_readline = yes; then
23228 break
23229 fi
23230done
23231# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23232#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023233if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023234 { echo "$as_me:$LINENO: result: none" >&5
23235echo "${ECHO_T}none" >&6; }
23236else
23237 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23238echo "${ECHO_T}$READLINE_LIBS" >&6; }
23239
23240cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023241#define HAVE_LIBREADLINE 1
23242_ACEOF
23243
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023244fi
23245
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023246# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023247{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23248echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023249if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23250 echo $ECHO_N "(cached) $ECHO_C" >&6
23251else
23252 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023253LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023254cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023255/* confdefs.h. */
23256_ACEOF
23257cat confdefs.h >>conftest.$ac_ext
23258cat >>conftest.$ac_ext <<_ACEOF
23259/* end confdefs.h. */
23260
Martin v. Löwiseba40652007-08-30 20:10:57 +000023261/* Override any GCC internal prototype to avoid an error.
23262 Use char because int might match the return type of a GCC
23263 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023264#ifdef __cplusplus
23265extern "C"
23266#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023267char rl_callback_handler_install ();
23268int
23269main ()
23270{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023271return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023272 ;
23273 return 0;
23274}
23275_ACEOF
23276rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023277if { (ac_try="$ac_link"
23278case "(($ac_try" in
23279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23280 *) ac_try_echo=$ac_try;;
23281esac
23282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23283 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023285 grep -v '^ *+' conftest.er1 >conftest.err
23286 rm -f conftest.er1
23287 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023289 (exit $ac_status); } && {
23290 test -z "$ac_c_werror_flag" ||
23291 test ! -s conftest.err
23292 } && test -s conftest$ac_exeext &&
23293 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023294 ac_cv_lib_readline_rl_callback_handler_install=yes
23295else
23296 echo "$as_me: failed program was:" >&5
23297sed 's/^/| /' conftest.$ac_ext >&5
23298
Martin v. Löwiseba40652007-08-30 20:10:57 +000023299 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023301
23302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023303 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023304LIBS=$ac_check_lib_save_LIBS
23305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023306{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23307echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023308if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23309
23310cat >>confdefs.h <<\_ACEOF
23311#define HAVE_RL_CALLBACK 1
23312_ACEOF
23313
23314fi
23315
23316
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023317# check for readline 2.2
23318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023319/* confdefs.h. */
23320_ACEOF
23321cat confdefs.h >>conftest.$ac_ext
23322cat >>conftest.$ac_ext <<_ACEOF
23323/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023324#include <readline/readline.h>
23325_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023326if { (ac_try="$ac_cpp conftest.$ac_ext"
23327case "(($ac_try" in
23328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23329 *) ac_try_echo=$ac_try;;
23330esac
23331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23332 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023333 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023334 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023335 rm -f conftest.er1
23336 cat conftest.err >&5
23337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023338 (exit $ac_status); } >/dev/null && {
23339 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23340 test ! -s conftest.err
23341 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023342 have_readline=yes
23343else
23344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023345sed 's/^/| /' conftest.$ac_ext >&5
23346
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023347 have_readline=no
23348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023349
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023350rm -f conftest.err conftest.$ac_ext
23351if test $have_readline = yes
23352then
23353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023354/* confdefs.h. */
23355_ACEOF
23356cat confdefs.h >>conftest.$ac_ext
23357cat >>conftest.$ac_ext <<_ACEOF
23358/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023359#include <readline/readline.h>
23360
23361_ACEOF
23362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023363 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023364
23365cat >>confdefs.h <<\_ACEOF
23366#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23367_ACEOF
23368
23369fi
23370rm -f conftest*
23371
23372fi
23373
Martin v. Löwis0daad592001-09-30 21:09:59 +000023374# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023375{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23376echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023377if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23378 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023379else
Martin v. Löwis11437992002-04-12 09:54:03 +000023380 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023381LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023382cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023383/* confdefs.h. */
23384_ACEOF
23385cat confdefs.h >>conftest.$ac_ext
23386cat >>conftest.$ac_ext <<_ACEOF
23387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023388
Martin v. Löwiseba40652007-08-30 20:10:57 +000023389/* Override any GCC internal prototype to avoid an error.
23390 Use char because int might match the return type of a GCC
23391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023392#ifdef __cplusplus
23393extern "C"
23394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023395char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023396int
23397main ()
23398{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023400 ;
23401 return 0;
23402}
23403_ACEOF
23404rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405if { (ac_try="$ac_link"
23406case "(($ac_try" in
23407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23408 *) ac_try_echo=$ac_try;;
23409esac
23410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23411 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023413 grep -v '^ *+' conftest.er1 >conftest.err
23414 rm -f conftest.er1
23415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023417 (exit $ac_status); } && {
23418 test -z "$ac_c_werror_flag" ||
23419 test ! -s conftest.err
23420 } && test -s conftest$ac_exeext &&
23421 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023422 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023423else
Martin v. Löwis11437992002-04-12 09:54:03 +000023424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023425sed 's/^/| /' conftest.$ac_ext >&5
23426
Martin v. Löwiseba40652007-08-30 20:10:57 +000023427 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023429
23430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023432LIBS=$ac_check_lib_save_LIBS
23433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23435echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023436if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023437
Martin v. Löwis11437992002-04-12 09:54:03 +000023438cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023439#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023440_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023441
Martin v. Löwis0daad592001-09-30 21:09:59 +000023442fi
23443
Michael W. Hudson54241132001-12-07 15:38:26 +000023444
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023445# also in 4.0
23446{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23447echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23448if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23449 echo $ECHO_N "(cached) $ECHO_C" >&6
23450else
23451 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023452LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023453cat >conftest.$ac_ext <<_ACEOF
23454/* confdefs.h. */
23455_ACEOF
23456cat confdefs.h >>conftest.$ac_ext
23457cat >>conftest.$ac_ext <<_ACEOF
23458/* end confdefs.h. */
23459
23460/* Override any GCC internal prototype to avoid an error.
23461 Use char because int might match the return type of a GCC
23462 builtin and then its argument prototype would still apply. */
23463#ifdef __cplusplus
23464extern "C"
23465#endif
23466char rl_completion_display_matches_hook ();
23467int
23468main ()
23469{
23470return rl_completion_display_matches_hook ();
23471 ;
23472 return 0;
23473}
23474_ACEOF
23475rm -f conftest.$ac_objext conftest$ac_exeext
23476if { (ac_try="$ac_link"
23477case "(($ac_try" in
23478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23479 *) ac_try_echo=$ac_try;;
23480esac
23481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23482 (eval "$ac_link") 2>conftest.er1
23483 ac_status=$?
23484 grep -v '^ *+' conftest.er1 >conftest.err
23485 rm -f conftest.er1
23486 cat conftest.err >&5
23487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23488 (exit $ac_status); } && {
23489 test -z "$ac_c_werror_flag" ||
23490 test ! -s conftest.err
23491 } && test -s conftest$ac_exeext &&
23492 $as_test_x conftest$ac_exeext; then
23493 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23494else
23495 echo "$as_me: failed program was:" >&5
23496sed 's/^/| /' conftest.$ac_ext >&5
23497
23498 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23499fi
23500
23501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23502 conftest$ac_exeext conftest.$ac_ext
23503LIBS=$ac_check_lib_save_LIBS
23504fi
23505{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23506echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23507if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23508
23509cat >>confdefs.h <<\_ACEOF
23510#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23511_ACEOF
23512
23513fi
23514
23515
Martin v. Löwis0daad592001-09-30 21:09:59 +000023516# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023517{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23518echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023519if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23520 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023521else
Martin v. Löwis11437992002-04-12 09:54:03 +000023522 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023523LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023525/* confdefs.h. */
23526_ACEOF
23527cat confdefs.h >>conftest.$ac_ext
23528cat >>conftest.$ac_ext <<_ACEOF
23529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023530
Martin v. Löwiseba40652007-08-30 20:10:57 +000023531/* Override any GCC internal prototype to avoid an error.
23532 Use char because int might match the return type of a GCC
23533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023534#ifdef __cplusplus
23535extern "C"
23536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023537char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023538int
23539main ()
23540{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023541return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023542 ;
23543 return 0;
23544}
23545_ACEOF
23546rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547if { (ac_try="$ac_link"
23548case "(($ac_try" in
23549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23550 *) ac_try_echo=$ac_try;;
23551esac
23552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23553 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023555 grep -v '^ *+' conftest.er1 >conftest.err
23556 rm -f conftest.er1
23557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559 (exit $ac_status); } && {
23560 test -z "$ac_c_werror_flag" ||
23561 test ! -s conftest.err
23562 } && test -s conftest$ac_exeext &&
23563 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023564 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023565else
Martin v. Löwis11437992002-04-12 09:54:03 +000023566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023567sed 's/^/| /' conftest.$ac_ext >&5
23568
Martin v. Löwiseba40652007-08-30 20:10:57 +000023569 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023571
23572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023574LIBS=$ac_check_lib_save_LIBS
23575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023576{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23577echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023578if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023579
Martin v. Löwis11437992002-04-12 09:54:03 +000023580cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023581#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023582_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023583
Guido van Rossum353ae582001-07-10 16:45:32 +000023584fi
23585
Jack Jansendd19cf82001-12-06 22:36:17 +000023586
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023587# also in readline 4.2
23588cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023589/* confdefs.h. */
23590_ACEOF
23591cat confdefs.h >>conftest.$ac_ext
23592cat >>conftest.$ac_ext <<_ACEOF
23593/* end confdefs.h. */
23594#include <readline/readline.h>
23595_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023596if { (ac_try="$ac_cpp conftest.$ac_ext"
23597case "(($ac_try" in
23598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23599 *) ac_try_echo=$ac_try;;
23600esac
23601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23602 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023603 ac_status=$?
23604 grep -v '^ *+' conftest.er1 >conftest.err
23605 rm -f conftest.er1
23606 cat conftest.err >&5
23607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023608 (exit $ac_status); } >/dev/null && {
23609 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23610 test ! -s conftest.err
23611 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023612 have_readline=yes
23613else
23614 echo "$as_me: failed program was:" >&5
23615sed 's/^/| /' conftest.$ac_ext >&5
23616
23617 have_readline=no
23618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023620rm -f conftest.err conftest.$ac_ext
23621if test $have_readline = yes
23622then
23623 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023624/* confdefs.h. */
23625_ACEOF
23626cat confdefs.h >>conftest.$ac_ext
23627cat >>conftest.$ac_ext <<_ACEOF
23628/* end confdefs.h. */
23629#include <readline/readline.h>
23630
23631_ACEOF
23632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23633 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23634
23635cat >>confdefs.h <<\_ACEOF
23636#define HAVE_RL_CATCH_SIGNAL 1
23637_ACEOF
23638
23639fi
23640rm -f conftest*
23641
23642fi
23643
Martin v. Löwis82bca632006-02-10 20:49:30 +000023644# End of readline checks: restore LIBS
23645LIBS=$LIBS_no_readline
23646
Martin v. Löwiseba40652007-08-30 20:10:57 +000023647{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23648echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023649if test "${ac_cv_broken_nice+set}" = set; then
23650 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023651else
Martin v. Löwis11437992002-04-12 09:54:03 +000023652
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023653if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023654 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023655else
Martin v. Löwis11437992002-04-12 09:54:03 +000023656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023657/* confdefs.h. */
23658_ACEOF
23659cat confdefs.h >>conftest.$ac_ext
23660cat >>conftest.$ac_ext <<_ACEOF
23661/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023662
23663int main()
23664{
23665 int val1 = nice(1);
23666 if (val1 != -1 && val1 == nice(2))
23667 exit(0);
23668 exit(1);
23669}
23670
Martin v. Löwis11437992002-04-12 09:54:03 +000023671_ACEOF
23672rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673if { (ac_try="$ac_link"
23674case "(($ac_try" in
23675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23676 *) ac_try_echo=$ac_try;;
23677esac
23678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023680 ac_status=$?
23681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023683 { (case "(($ac_try" in
23684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23685 *) ac_try_echo=$ac_try;;
23686esac
23687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023689 ac_status=$?
23690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23691 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023692 ac_cv_broken_nice=yes
23693else
Martin v. Löwis11437992002-04-12 09:54:03 +000023694 echo "$as_me: program exited with status $ac_status" >&5
23695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023696sed 's/^/| /' conftest.$ac_ext >&5
23697
Martin v. Löwis11437992002-04-12 09:54:03 +000023698( exit $ac_status )
23699ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023701rm -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 +000023702fi
23703
Martin v. Löwiseba40652007-08-30 20:10:57 +000023704
23705fi
23706
23707{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23708echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023709if test "$ac_cv_broken_nice" = yes
23710then
Martin v. Löwis11437992002-04-12 09:54:03 +000023711
23712cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023713#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023714_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023715
23716fi
23717
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23719echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023720if test "$cross_compiling" = yes; then
23721 ac_cv_broken_poll=no
23722else
23723 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023724/* confdefs.h. */
23725_ACEOF
23726cat confdefs.h >>conftest.$ac_ext
23727cat >>conftest.$ac_ext <<_ACEOF
23728/* end confdefs.h. */
23729
23730#include <poll.h>
23731
23732int main (void)
23733 {
23734 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23735
23736 close (42);
23737
23738 int poll_test = poll (&poll_struct, 1, 0);
23739
23740 if (poll_test < 0)
23741 {
23742 exit(0);
23743 }
23744 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23745 {
23746 exit(0);
23747 }
23748 else
23749 {
23750 exit(1);
23751 }
23752 }
23753
23754_ACEOF
23755rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023756if { (ac_try="$ac_link"
23757case "(($ac_try" in
23758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23759 *) ac_try_echo=$ac_try;;
23760esac
23761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23762 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023763 ac_status=$?
23764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023766 { (case "(($ac_try" in
23767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23768 *) ac_try_echo=$ac_try;;
23769esac
23770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23771 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023772 ac_status=$?
23773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23774 (exit $ac_status); }; }; then
23775 ac_cv_broken_poll=yes
23776else
23777 echo "$as_me: program exited with status $ac_status" >&5
23778echo "$as_me: failed program was:" >&5
23779sed 's/^/| /' conftest.$ac_ext >&5
23780
23781( exit $ac_status )
23782ac_cv_broken_poll=no
23783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023784rm -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 +000023785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786
23787
23788{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23789echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023790if test "$ac_cv_broken_poll" = yes
23791then
23792
23793cat >>confdefs.h <<\_ACEOF
23794#define HAVE_BROKEN_POLL 1
23795_ACEOF
23796
23797fi
23798
Brett Cannon43802422005-02-10 20:48:03 +000023799# 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 +000023800# (which is not required by ISO C or UNIX spec) and/or if we support
23801# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023802{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23803echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023804if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23805 echo $ECHO_N "(cached) $ECHO_C" >&6
23806else
23807 cat >conftest.$ac_ext <<_ACEOF
23808/* confdefs.h. */
23809_ACEOF
23810cat confdefs.h >>conftest.$ac_ext
23811cat >>conftest.$ac_ext <<_ACEOF
23812/* end confdefs.h. */
23813#include <sys/types.h>
23814#include <$ac_cv_struct_tm>
23815
23816
23817int
23818main ()
23819{
23820static struct tm ac_aggr;
23821if (ac_aggr.tm_zone)
23822return 0;
23823 ;
23824 return 0;
23825}
23826_ACEOF
23827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023828if { (ac_try="$ac_compile"
23829case "(($ac_try" in
23830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23831 *) ac_try_echo=$ac_try;;
23832esac
23833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23834 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023835 ac_status=$?
23836 grep -v '^ *+' conftest.er1 >conftest.err
23837 rm -f conftest.er1
23838 cat conftest.err >&5
23839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023840 (exit $ac_status); } && {
23841 test -z "$ac_c_werror_flag" ||
23842 test ! -s conftest.err
23843 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023844 ac_cv_member_struct_tm_tm_zone=yes
23845else
23846 echo "$as_me: failed program was:" >&5
23847sed 's/^/| /' conftest.$ac_ext >&5
23848
Martin v. Löwiseba40652007-08-30 20:10:57 +000023849 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023850/* confdefs.h. */
23851_ACEOF
23852cat confdefs.h >>conftest.$ac_ext
23853cat >>conftest.$ac_ext <<_ACEOF
23854/* end confdefs.h. */
23855#include <sys/types.h>
23856#include <$ac_cv_struct_tm>
23857
23858
23859int
23860main ()
23861{
23862static struct tm ac_aggr;
23863if (sizeof ac_aggr.tm_zone)
23864return 0;
23865 ;
23866 return 0;
23867}
23868_ACEOF
23869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023870if { (ac_try="$ac_compile"
23871case "(($ac_try" in
23872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23873 *) ac_try_echo=$ac_try;;
23874esac
23875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23876 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023877 ac_status=$?
23878 grep -v '^ *+' conftest.er1 >conftest.err
23879 rm -f conftest.er1
23880 cat conftest.err >&5
23881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023882 (exit $ac_status); } && {
23883 test -z "$ac_c_werror_flag" ||
23884 test ! -s conftest.err
23885 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023886 ac_cv_member_struct_tm_tm_zone=yes
23887else
23888 echo "$as_me: failed program was:" >&5
23889sed 's/^/| /' conftest.$ac_ext >&5
23890
Martin v. Löwiseba40652007-08-30 20:10:57 +000023891 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023893
23894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023896
23897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023899{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23900echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023901if test $ac_cv_member_struct_tm_tm_zone = yes; then
23902
23903cat >>confdefs.h <<_ACEOF
23904#define HAVE_STRUCT_TM_TM_ZONE 1
23905_ACEOF
23906
23907
23908fi
23909
23910if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23911
23912cat >>confdefs.h <<\_ACEOF
23913#define HAVE_TM_ZONE 1
23914_ACEOF
23915
23916else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023917 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23918echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23919if test "${ac_cv_have_decl_tzname+set}" = set; then
23920 echo $ECHO_N "(cached) $ECHO_C" >&6
23921else
23922 cat >conftest.$ac_ext <<_ACEOF
23923/* confdefs.h. */
23924_ACEOF
23925cat confdefs.h >>conftest.$ac_ext
23926cat >>conftest.$ac_ext <<_ACEOF
23927/* end confdefs.h. */
23928#include <time.h>
23929
23930int
23931main ()
23932{
23933#ifndef tzname
23934 (void) tzname;
23935#endif
23936
23937 ;
23938 return 0;
23939}
23940_ACEOF
23941rm -f conftest.$ac_objext
23942if { (ac_try="$ac_compile"
23943case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
23947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23948 (eval "$ac_compile") 2>conftest.er1
23949 ac_status=$?
23950 grep -v '^ *+' conftest.er1 >conftest.err
23951 rm -f conftest.er1
23952 cat conftest.err >&5
23953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23954 (exit $ac_status); } && {
23955 test -z "$ac_c_werror_flag" ||
23956 test ! -s conftest.err
23957 } && test -s conftest.$ac_objext; then
23958 ac_cv_have_decl_tzname=yes
23959else
23960 echo "$as_me: failed program was:" >&5
23961sed 's/^/| /' conftest.$ac_ext >&5
23962
23963 ac_cv_have_decl_tzname=no
23964fi
23965
23966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23967fi
23968{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23969echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23970if test $ac_cv_have_decl_tzname = yes; then
23971
23972cat >>confdefs.h <<_ACEOF
23973#define HAVE_DECL_TZNAME 1
23974_ACEOF
23975
23976
23977else
23978 cat >>confdefs.h <<_ACEOF
23979#define HAVE_DECL_TZNAME 0
23980_ACEOF
23981
23982
23983fi
23984
23985
23986 { echo "$as_me:$LINENO: checking for tzname" >&5
23987echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023988if test "${ac_cv_var_tzname+set}" = set; then
23989 echo $ECHO_N "(cached) $ECHO_C" >&6
23990else
23991 cat >conftest.$ac_ext <<_ACEOF
23992/* confdefs.h. */
23993_ACEOF
23994cat confdefs.h >>conftest.$ac_ext
23995cat >>conftest.$ac_ext <<_ACEOF
23996/* end confdefs.h. */
23997#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023998#if !HAVE_DECL_TZNAME
23999extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024000#endif
24001
24002int
24003main ()
24004{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024005return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024006 ;
24007 return 0;
24008}
24009_ACEOF
24010rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024011if { (ac_try="$ac_link"
24012case "(($ac_try" in
24013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24014 *) ac_try_echo=$ac_try;;
24015esac
24016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24017 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024018 ac_status=$?
24019 grep -v '^ *+' conftest.er1 >conftest.err
24020 rm -f conftest.er1
24021 cat conftest.err >&5
24022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024023 (exit $ac_status); } && {
24024 test -z "$ac_c_werror_flag" ||
24025 test ! -s conftest.err
24026 } && test -s conftest$ac_exeext &&
24027 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024028 ac_cv_var_tzname=yes
24029else
24030 echo "$as_me: failed program was:" >&5
24031sed 's/^/| /' conftest.$ac_ext >&5
24032
Martin v. Löwiseba40652007-08-30 20:10:57 +000024033 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024035
24036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024037 conftest$ac_exeext conftest.$ac_ext
24038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024039{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24040echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024041 if test $ac_cv_var_tzname = yes; then
24042
24043cat >>confdefs.h <<\_ACEOF
24044#define HAVE_TZNAME 1
24045_ACEOF
24046
24047 fi
24048fi
24049
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024050
Martin v. Löwis1d459062005-03-14 21:23:33 +000024051# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24053echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024054if test "${ac_cv_working_tzset+set}" = set; then
24055 echo $ECHO_N "(cached) $ECHO_C" >&6
24056else
24057
24058if test "$cross_compiling" = yes; then
24059 ac_cv_working_tzset=no
24060else
24061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024062/* confdefs.h. */
24063_ACEOF
24064cat confdefs.h >>conftest.$ac_ext
24065cat >>conftest.$ac_ext <<_ACEOF
24066/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024067
24068#include <stdlib.h>
24069#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024070#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024071
24072#if HAVE_TZNAME
24073extern char *tzname[];
24074#endif
24075
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024076int main()
24077{
Brett Cannon18367812003-09-19 00:59:16 +000024078 /* Note that we need to ensure that not only does tzset(3)
24079 do 'something' with localtime, but it works as documented
24080 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024081 This includes making sure that tzname is set properly if
24082 tm->tm_zone does not exist since it is the alternative way
24083 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024084
24085 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024086 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024087 */
24088
Martin v. Löwis1d459062005-03-14 21:23:33 +000024089 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024090 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24091
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024092 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024093 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024094 if (localtime(&groundhogday)->tm_hour != 0)
24095 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024096#if HAVE_TZNAME
24097 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24098 if (strcmp(tzname[0], "UTC") ||
24099 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24100 exit(1);
24101#endif
Brett Cannon18367812003-09-19 00:59:16 +000024102
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024103 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024104 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024105 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024106 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024107#if HAVE_TZNAME
24108 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24109 exit(1);
24110#endif
Brett Cannon18367812003-09-19 00:59:16 +000024111
24112 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24113 tzset();
24114 if (localtime(&groundhogday)->tm_hour != 11)
24115 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024116#if HAVE_TZNAME
24117 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24118 exit(1);
24119#endif
24120
24121#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024122 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24123 exit(1);
24124 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24125 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024126#endif
Brett Cannon18367812003-09-19 00:59:16 +000024127
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024128 exit(0);
24129}
24130
24131_ACEOF
24132rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024133if { (ac_try="$ac_link"
24134case "(($ac_try" in
24135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24136 *) ac_try_echo=$ac_try;;
24137esac
24138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24139 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024140 ac_status=$?
24141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024143 { (case "(($ac_try" in
24144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24145 *) ac_try_echo=$ac_try;;
24146esac
24147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24148 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024149 ac_status=$?
24150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24151 (exit $ac_status); }; }; then
24152 ac_cv_working_tzset=yes
24153else
24154 echo "$as_me: program exited with status $ac_status" >&5
24155echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024156sed 's/^/| /' conftest.$ac_ext >&5
24157
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024158( exit $ac_status )
24159ac_cv_working_tzset=no
24160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024161rm -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 +000024162fi
24163
Martin v. Löwiseba40652007-08-30 20:10:57 +000024164
24165fi
24166
24167{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24168echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024169if test "$ac_cv_working_tzset" = yes
24170then
24171
24172cat >>confdefs.h <<\_ACEOF
24173#define HAVE_WORKING_TZSET 1
24174_ACEOF
24175
24176fi
24177
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024178# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024179{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24180echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024181if test "${ac_cv_stat_tv_nsec+set}" = set; then
24182 echo $ECHO_N "(cached) $ECHO_C" >&6
24183else
24184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024185/* confdefs.h. */
24186_ACEOF
24187cat confdefs.h >>conftest.$ac_ext
24188cat >>conftest.$ac_ext <<_ACEOF
24189/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024190#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024191int
24192main ()
24193{
24194
24195struct stat st;
24196st.st_mtim.tv_nsec = 1;
24197
24198 ;
24199 return 0;
24200}
24201_ACEOF
24202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024203if { (ac_try="$ac_compile"
24204case "(($ac_try" in
24205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24206 *) ac_try_echo=$ac_try;;
24207esac
24208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024211 grep -v '^ *+' conftest.er1 >conftest.err
24212 rm -f conftest.er1
24213 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215 (exit $ac_status); } && {
24216 test -z "$ac_c_werror_flag" ||
24217 test ! -s conftest.err
24218 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024219 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024220else
24221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024222sed 's/^/| /' conftest.$ac_ext >&5
24223
Martin v. Löwiseba40652007-08-30 20:10:57 +000024224 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024225fi
24226
Martin v. Löwiseba40652007-08-30 20:10:57 +000024227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24228fi
24229
24230{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24231echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024232if test "$ac_cv_stat_tv_nsec" = yes
24233then
24234
24235cat >>confdefs.h <<\_ACEOF
24236#define HAVE_STAT_TV_NSEC 1
24237_ACEOF
24238
24239fi
24240
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024241# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024242{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24243echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024244if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24245 echo $ECHO_N "(cached) $ECHO_C" >&6
24246else
24247 cat >conftest.$ac_ext <<_ACEOF
24248/* confdefs.h. */
24249_ACEOF
24250cat confdefs.h >>conftest.$ac_ext
24251cat >>conftest.$ac_ext <<_ACEOF
24252/* end confdefs.h. */
24253#include <sys/stat.h>
24254int
24255main ()
24256{
24257
24258struct stat st;
24259st.st_mtimespec.tv_nsec = 1;
24260
24261 ;
24262 return 0;
24263}
24264_ACEOF
24265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024266if { (ac_try="$ac_compile"
24267case "(($ac_try" in
24268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24269 *) ac_try_echo=$ac_try;;
24270esac
24271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024273 ac_status=$?
24274 grep -v '^ *+' conftest.er1 >conftest.err
24275 rm -f conftest.er1
24276 cat conftest.err >&5
24277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024278 (exit $ac_status); } && {
24279 test -z "$ac_c_werror_flag" ||
24280 test ! -s conftest.err
24281 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024282 ac_cv_stat_tv_nsec2=yes
24283else
24284 echo "$as_me: failed program was:" >&5
24285sed 's/^/| /' conftest.$ac_ext >&5
24286
Martin v. Löwiseba40652007-08-30 20:10:57 +000024287 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024288fi
24289
Martin v. Löwiseba40652007-08-30 20:10:57 +000024290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24291fi
24292
24293{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24294echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024295if test "$ac_cv_stat_tv_nsec2" = yes
24296then
24297
24298cat >>confdefs.h <<\_ACEOF
24299#define HAVE_STAT_TV_NSEC2 1
24300_ACEOF
24301
24302fi
24303
Jack Jansen666b1e72001-10-31 12:11:48 +000024304# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024305{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24306echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024307if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24308 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024309else
Martin v. Löwis11437992002-04-12 09:54:03 +000024310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024311/* confdefs.h. */
24312_ACEOF
24313cat confdefs.h >>conftest.$ac_ext
24314cat >>conftest.$ac_ext <<_ACEOF
24315/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024316#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024317int
24318main ()
24319{
Jack Jansen666b1e72001-10-31 12:11:48 +000024320
24321 int rtn;
24322 rtn = mvwdelch(0,0,0);
24323
Martin v. Löwis11437992002-04-12 09:54:03 +000024324 ;
24325 return 0;
24326}
24327_ACEOF
24328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024329if { (ac_try="$ac_compile"
24330case "(($ac_try" in
24331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24332 *) ac_try_echo=$ac_try;;
24333esac
24334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024337 grep -v '^ *+' conftest.er1 >conftest.err
24338 rm -f conftest.er1
24339 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024341 (exit $ac_status); } && {
24342 test -z "$ac_c_werror_flag" ||
24343 test ! -s conftest.err
24344 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024345 ac_cv_mvwdelch_is_expression=yes
24346else
Martin v. Löwis11437992002-04-12 09:54:03 +000024347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024348sed 's/^/| /' conftest.$ac_ext >&5
24349
Martin v. Löwiseba40652007-08-30 20:10:57 +000024350 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024351fi
24352
Martin v. Löwiseba40652007-08-30 20:10:57 +000024353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24354fi
24355
24356{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24357echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024358
24359if test "$ac_cv_mvwdelch_is_expression" = yes
24360then
Martin v. Löwis11437992002-04-12 09:54:03 +000024361
24362cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024363#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024364_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024365
24366fi
24367
Martin v. Löwiseba40652007-08-30 20:10:57 +000024368{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24369echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024370if test "${ac_cv_window_has_flags+set}" = set; then
24371 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024372else
Martin v. Löwis11437992002-04-12 09:54:03 +000024373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024374/* confdefs.h. */
24375_ACEOF
24376cat confdefs.h >>conftest.$ac_ext
24377cat >>conftest.$ac_ext <<_ACEOF
24378/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024379#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024380int
24381main ()
24382{
Jack Jansen666b1e72001-10-31 12:11:48 +000024383
24384 WINDOW *w;
24385 w->_flags = 0;
24386
Martin v. Löwis11437992002-04-12 09:54:03 +000024387 ;
24388 return 0;
24389}
24390_ACEOF
24391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024392if { (ac_try="$ac_compile"
24393case "(($ac_try" in
24394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24395 *) ac_try_echo=$ac_try;;
24396esac
24397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024400 grep -v '^ *+' conftest.er1 >conftest.err
24401 rm -f conftest.er1
24402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024404 (exit $ac_status); } && {
24405 test -z "$ac_c_werror_flag" ||
24406 test ! -s conftest.err
24407 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024408 ac_cv_window_has_flags=yes
24409else
Martin v. Löwis11437992002-04-12 09:54:03 +000024410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024411sed 's/^/| /' conftest.$ac_ext >&5
24412
Martin v. Löwiseba40652007-08-30 20:10:57 +000024413 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024414fi
24415
Martin v. Löwiseba40652007-08-30 20:10:57 +000024416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24417fi
24418
24419{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24420echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024421
Jack Jansen666b1e72001-10-31 12:11:48 +000024422
24423if test "$ac_cv_window_has_flags" = yes
24424then
Martin v. Löwis11437992002-04-12 09:54:03 +000024425
24426cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024427#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024428_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024429
24430fi
24431
Martin v. Löwiseba40652007-08-30 20:10:57 +000024432{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24433echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024434cat >conftest.$ac_ext <<_ACEOF
24435/* confdefs.h. */
24436_ACEOF
24437cat confdefs.h >>conftest.$ac_ext
24438cat >>conftest.$ac_ext <<_ACEOF
24439/* end confdefs.h. */
24440#include <curses.h>
24441int
24442main ()
24443{
24444void *x=is_term_resized
24445 ;
24446 return 0;
24447}
24448_ACEOF
24449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024450if { (ac_try="$ac_compile"
24451case "(($ac_try" in
24452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24453 *) ac_try_echo=$ac_try;;
24454esac
24455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24456 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024457 ac_status=$?
24458 grep -v '^ *+' conftest.er1 >conftest.err
24459 rm -f conftest.er1
24460 cat conftest.err >&5
24461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024462 (exit $ac_status); } && {
24463 test -z "$ac_c_werror_flag" ||
24464 test ! -s conftest.err
24465 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024466
24467cat >>confdefs.h <<\_ACEOF
24468#define HAVE_CURSES_IS_TERM_RESIZED 1
24469_ACEOF
24470
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471 { echo "$as_me:$LINENO: result: yes" >&5
24472echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024473else
24474 echo "$as_me: failed program was:" >&5
24475sed 's/^/| /' conftest.$ac_ext >&5
24476
Martin v. Löwiseba40652007-08-30 20:10:57 +000024477 { echo "$as_me:$LINENO: result: no" >&5
24478echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024479
24480fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024481
Martin v. Löwiseba40652007-08-30 20:10:57 +000024482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24483
24484{ echo "$as_me:$LINENO: checking for resize_term" >&5
24485echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024486cat >conftest.$ac_ext <<_ACEOF
24487/* confdefs.h. */
24488_ACEOF
24489cat confdefs.h >>conftest.$ac_ext
24490cat >>conftest.$ac_ext <<_ACEOF
24491/* end confdefs.h. */
24492#include <curses.h>
24493int
24494main ()
24495{
24496void *x=resize_term
24497 ;
24498 return 0;
24499}
24500_ACEOF
24501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024502if { (ac_try="$ac_compile"
24503case "(($ac_try" in
24504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24505 *) ac_try_echo=$ac_try;;
24506esac
24507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24508 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024509 ac_status=$?
24510 grep -v '^ *+' conftest.er1 >conftest.err
24511 rm -f conftest.er1
24512 cat conftest.err >&5
24513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024514 (exit $ac_status); } && {
24515 test -z "$ac_c_werror_flag" ||
24516 test ! -s conftest.err
24517 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024518
24519cat >>confdefs.h <<\_ACEOF
24520#define HAVE_CURSES_RESIZE_TERM 1
24521_ACEOF
24522
Martin v. Löwiseba40652007-08-30 20:10:57 +000024523 { echo "$as_me:$LINENO: result: yes" >&5
24524echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024525else
24526 echo "$as_me: failed program was:" >&5
24527sed 's/^/| /' conftest.$ac_ext >&5
24528
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529 { echo "$as_me:$LINENO: result: no" >&5
24530echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024531
24532fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024533
Martin v. Löwiseba40652007-08-30 20:10:57 +000024534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24535
24536{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24537echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024538cat >conftest.$ac_ext <<_ACEOF
24539/* confdefs.h. */
24540_ACEOF
24541cat confdefs.h >>conftest.$ac_ext
24542cat >>conftest.$ac_ext <<_ACEOF
24543/* end confdefs.h. */
24544#include <curses.h>
24545int
24546main ()
24547{
24548void *x=resizeterm
24549 ;
24550 return 0;
24551}
24552_ACEOF
24553rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024554if { (ac_try="$ac_compile"
24555case "(($ac_try" in
24556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24557 *) ac_try_echo=$ac_try;;
24558esac
24559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24560 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024561 ac_status=$?
24562 grep -v '^ *+' conftest.er1 >conftest.err
24563 rm -f conftest.er1
24564 cat conftest.err >&5
24565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024566 (exit $ac_status); } && {
24567 test -z "$ac_c_werror_flag" ||
24568 test ! -s conftest.err
24569 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024570
24571cat >>confdefs.h <<\_ACEOF
24572#define HAVE_CURSES_RESIZETERM 1
24573_ACEOF
24574
Martin v. Löwiseba40652007-08-30 20:10:57 +000024575 { echo "$as_me:$LINENO: result: yes" >&5
24576echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024577else
24578 echo "$as_me: failed program was:" >&5
24579sed 's/^/| /' conftest.$ac_ext >&5
24580
Martin v. Löwiseba40652007-08-30 20:10:57 +000024581 { echo "$as_me:$LINENO: result: no" >&5
24582echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024583
24584fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024585
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24587
24588{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24589echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024590
24591if test -r /dev/ptmx
24592then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024593 { echo "$as_me:$LINENO: result: yes" >&5
24594echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024595
24596cat >>confdefs.h <<\_ACEOF
24597#define HAVE_DEV_PTMX 1
24598_ACEOF
24599
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024600else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024601 { echo "$as_me:$LINENO: result: no" >&5
24602echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024603fi
24604
Martin v. Löwiseba40652007-08-30 20:10:57 +000024605{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24606echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024607
24608if test -r /dev/ptc
24609then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024610 { echo "$as_me:$LINENO: result: yes" >&5
24611echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024612
24613cat >>confdefs.h <<\_ACEOF
24614#define HAVE_DEV_PTC 1
24615_ACEOF
24616
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024617else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618 { echo "$as_me:$LINENO: result: no" >&5
24619echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024620fi
24621
Martin v. Löwiseba40652007-08-30 20:10:57 +000024622{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24623echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024624if test "$cross_compiling" = yes; then
24625 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24626See \`config.log' for more details." >&5
24627echo "$as_me: error: cannot run test program while cross compiling
24628See \`config.log' for more details." >&2;}
24629 { (exit 1); exit 1; }; }
24630else
24631 cat >conftest.$ac_ext <<_ACEOF
24632/* confdefs.h. */
24633_ACEOF
24634cat confdefs.h >>conftest.$ac_ext
24635cat >>conftest.$ac_ext <<_ACEOF
24636/* end confdefs.h. */
24637#include <stdio.h>
24638#include <stddef.h>
24639#include <string.h>
24640
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024641#ifdef HAVE_SYS_TYPES_H
24642#include <sys/types.h>
24643#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024644
24645#ifdef HAVE_SSIZE_T
24646typedef ssize_t Py_ssize_t;
24647#elif SIZEOF_VOID_P == SIZEOF_LONG
24648typedef long Py_ssize_t;
24649#else
24650typedef int Py_ssize_t;
24651#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024652
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024653int main()
24654{
24655 char buffer[256];
24656
Brett Cannon09d12362006-05-11 05:11:33 +000024657 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24658 return 1;
24659
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024660 if (strcmp(buffer, "123"))
24661 return 1;
24662
24663 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24664 return 1;
24665
24666 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024667 return 1;
24668
24669 return 0;
24670}
24671_ACEOF
24672rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024673if { (ac_try="$ac_link"
24674case "(($ac_try" in
24675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24676 *) ac_try_echo=$ac_try;;
24677esac
24678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24679 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024680 ac_status=$?
24681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024683 { (case "(($ac_try" in
24684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24685 *) ac_try_echo=$ac_try;;
24686esac
24687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24688 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024689 ac_status=$?
24690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24691 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024692 { echo "$as_me:$LINENO: result: yes" >&5
24693echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024694
24695cat >>confdefs.h <<\_ACEOF
24696#define PY_FORMAT_SIZE_T "z"
24697_ACEOF
24698
24699else
24700 echo "$as_me: program exited with status $ac_status" >&5
24701echo "$as_me: failed program was:" >&5
24702sed 's/^/| /' conftest.$ac_ext >&5
24703
24704( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024705{ echo "$as_me:$LINENO: result: no" >&5
24706echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708rm -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 +000024709fi
24710
Martin v. Löwiseba40652007-08-30 20:10:57 +000024711
24712
24713{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24714echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024715if test "${ac_cv_type_socklen_t+set}" = set; then
24716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024717else
Martin v. Löwis11437992002-04-12 09:54:03 +000024718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024719/* confdefs.h. */
24720_ACEOF
24721cat confdefs.h >>conftest.$ac_ext
24722cat >>conftest.$ac_ext <<_ACEOF
24723/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024724
24725#ifdef HAVE_SYS_TYPES_H
24726#include <sys/types.h>
24727#endif
24728#ifdef HAVE_SYS_SOCKET_H
24729#include <sys/socket.h>
24730#endif
24731
24732
Martin v. Löwiseba40652007-08-30 20:10:57 +000024733typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024734int
24735main ()
24736{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024737if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024738 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024739if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024740 return 0;
24741 ;
24742 return 0;
24743}
24744_ACEOF
24745rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024746if { (ac_try="$ac_compile"
24747case "(($ac_try" in
24748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24749 *) ac_try_echo=$ac_try;;
24750esac
24751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024754 grep -v '^ *+' conftest.er1 >conftest.err
24755 rm -f conftest.er1
24756 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024758 (exit $ac_status); } && {
24759 test -z "$ac_c_werror_flag" ||
24760 test ! -s conftest.err
24761 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024762 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024763else
Martin v. Löwis11437992002-04-12 09:54:03 +000024764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024765sed 's/^/| /' conftest.$ac_ext >&5
24766
Martin v. Löwiseba40652007-08-30 20:10:57 +000024767 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024769
24770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024772{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24773echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024774if test $ac_cv_type_socklen_t = yes; then
24775 :
24776else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024777
Martin v. Löwis01c04012002-11-11 14:58:44 +000024778cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024779#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024780_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024781
24782fi
24783
Michael W. Hudson54241132001-12-07 15:38:26 +000024784
Michael W. Hudson54241132001-12-07 15:38:26 +000024785
24786
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024787for h in `(cd $srcdir;echo Python/thread_*.h)`
24788do
24789 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24790done
24791
Michael W. Hudson54241132001-12-07 15:38:26 +000024792
Neal Norwitzd24499d2005-12-18 21:36:39 +000024793SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024794{ echo "$as_me:$LINENO: checking for build directories" >&5
24795echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024796for dir in $SRCDIRS; do
24797 if test ! -d $dir; then
24798 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024799 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024800done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024801{ echo "$as_me:$LINENO: result: done" >&5
24802echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024803
Guido van Rossum627b2d71993-12-24 10:39:16 +000024804# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024805ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024806
Martin v. Löwis11437992002-04-12 09:54:03 +000024807cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024808# This file is a shell script that caches the results of configure
24809# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024810# scripts and configure runs, see configure's option --config-cache.
24811# It is not useful on other systems. If it contains results you don't
24812# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024813#
Martin v. Löwis11437992002-04-12 09:54:03 +000024814# config.status only pays attention to the cache file if you give it
24815# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024816#
Skip Montanaro6dead952003-09-25 14:50:04 +000024817# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024818# loading this file, other *unset* `ac_cv_foo' will be assigned the
24819# following values.
24820
24821_ACEOF
24822
Guido van Rossumf78abae1997-01-21 22:02:36 +000024823# The following way of writing the cache mishandles newlines in values,
24824# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024825# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024826# Ultrix sh set writes to stderr and can't be redirected directly,
24827# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024828(
24829 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24830 eval ac_val=\$$ac_var
24831 case $ac_val in #(
24832 *${as_nl}*)
24833 case $ac_var in #(
24834 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24835echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24836 esac
24837 case $ac_var in #(
24838 _ | IFS | as_nl) ;; #(
24839 *) $as_unset $ac_var ;;
24840 esac ;;
24841 esac
24842 done
24843
Martin v. Löwis11437992002-04-12 09:54:03 +000024844 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024845 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24846 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024847 # `set' does not quote correctly, so add quotes (double-quote
24848 # substitution turns \\\\ into \\, and sed turns \\ into \).
24849 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024850 "s/'/'\\\\''/g;
24851 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024852 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024853 *)
24854 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024855 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024856 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857 esac |
24858 sort
24859) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024860 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024861 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024862 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024863 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024864 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24865 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024866 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24867 :end' >>confcache
24868if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24869 if test -w "$cache_file"; then
24870 test "x$cache_file" != "x/dev/null" &&
24871 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24872echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024873 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024874 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024875 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24876echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024877 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024878fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024879rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024880
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024881test "x$prefix" = xNONE && prefix=$ac_default_prefix
24882# Let make expand exec_prefix.
24883test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024885DEFS=-DHAVE_CONFIG_H
24886
Skip Montanaro6dead952003-09-25 14:50:04 +000024887ac_libobjs=
24888ac_ltlibobjs=
24889for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24890 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024891 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24892 ac_i=`echo "$ac_i" | sed "$ac_script"`
24893 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24894 # will be set to the directory where LIBOBJS objects are built.
24895 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24896 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024897done
24898LIBOBJS=$ac_libobjs
24899
24900LTLIBOBJS=$ac_ltlibobjs
24901
24902
Martin v. Löwis11437992002-04-12 09:54:03 +000024903
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024904: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024905ac_clean_files_save=$ac_clean_files
24906ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24907{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24908echo "$as_me: creating $CONFIG_STATUS" >&6;}
24909cat >$CONFIG_STATUS <<_ACEOF
24910#! $SHELL
24911# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024912# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024913# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024914# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024915
Martin v. Löwis11437992002-04-12 09:54:03 +000024916debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024917ac_cs_recheck=false
24918ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024919SHELL=\${CONFIG_SHELL-$SHELL}
24920_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024921
Martin v. Löwis11437992002-04-12 09:54:03 +000024922cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024923## --------------------- ##
24924## M4sh Initialization. ##
24925## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024926
Martin v. Löwiseba40652007-08-30 20:10:57 +000024927# Be more Bourne compatible
24928DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024929if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24930 emulate sh
24931 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024932 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24933 # is contrary to our usage. Disable this feature.
24934 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024936else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024937 case `(set -o) 2>/dev/null` in
24938 *posix*) set -o posix ;;
24939esac
24940
Martin v. Löwis11437992002-04-12 09:54:03 +000024941fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024942
Skip Montanaro6dead952003-09-25 14:50:04 +000024943
Martin v. Löwis11437992002-04-12 09:54:03 +000024944
24945
Martin v. Löwiseba40652007-08-30 20:10:57 +000024946# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024947# Avoid depending upon Character Ranges.
24948as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24949as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24950as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24951as_cr_digits='0123456789'
24952as_cr_alnum=$as_cr_Letters$as_cr_digits
24953
24954# The user is always right.
24955if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024956 echo "#! /bin/sh" >conf$$.sh
24957 echo "exit 0" >>conf$$.sh
24958 chmod +x conf$$.sh
24959 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024960 PATH_SEPARATOR=';'
24961 else
24962 PATH_SEPARATOR=:
24963 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024964 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024965fi
24966
Martin v. Löwiseba40652007-08-30 20:10:57 +000024967# Support unset when possible.
24968if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24969 as_unset=unset
24970else
24971 as_unset=false
24972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024973
Martin v. Löwiseba40652007-08-30 20:10:57 +000024974
24975# IFS
24976# We need space, tab and new line, in precisely that order. Quoting is
24977# there to prevent editors from complaining about space-tab.
24978# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24979# splitting by setting IFS to empty value.)
24980as_nl='
24981'
24982IFS=" "" $as_nl"
24983
24984# Find who we are. Look in the path if we contain no directory separator.
24985case $0 in
24986 *[\\/]* ) as_myself=$0 ;;
24987 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024988for as_dir in $PATH
24989do
24990 IFS=$as_save_IFS
24991 test -z "$as_dir" && as_dir=.
24992 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24993done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024994IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024995
Martin v. Löwiseba40652007-08-30 20:10:57 +000024996 ;;
24997esac
24998# We did not find ourselves, most probably we were run as `sh COMMAND'
24999# in which case we are not to be found in the path.
25000if test "x$as_myself" = x; then
25001 as_myself=$0
25002fi
25003if test ! -f "$as_myself"; then
25004 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25005 { (exit 1); exit 1; }
25006fi
25007
25008# Work around bugs in pre-3.0 UWIN ksh.
25009for as_var in ENV MAIL MAILPATH
25010do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25011done
25012PS1='$ '
25013PS2='> '
25014PS4='+ '
25015
25016# NLS nuisances.
25017for as_var in \
25018 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25019 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25020 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025021do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025022 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25023 eval $as_var=C; export $as_var
25024 else
25025 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25026 fi
25027done
25028
25029# Required to use basename.
25030if expr a : '\(a\)' >/dev/null 2>&1 &&
25031 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25032 as_expr=expr
25033else
25034 as_expr=false
25035fi
25036
25037if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25038 as_basename=basename
25039else
25040 as_basename=false
25041fi
25042
25043
25044# Name of the executable.
25045as_me=`$as_basename -- "$0" ||
25046$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25047 X"$0" : 'X\(//\)$' \| \
25048 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25049echo X/"$0" |
25050 sed '/^.*\/\([^/][^/]*\)\/*$/{
25051 s//\1/
25052 q
25053 }
25054 /^X\/\(\/\/\)$/{
25055 s//\1/
25056 q
25057 }
25058 /^X\/\(\/\).*/{
25059 s//\1/
25060 q
25061 }
25062 s/.*/./; q'`
25063
25064# CDPATH.
25065$as_unset CDPATH
25066
25067
25068
Martin v. Löwis11437992002-04-12 09:54:03 +000025069 as_lineno_1=$LINENO
25070 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025071 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025072 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025073
Martin v. Löwis11437992002-04-12 09:54:03 +000025074 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25075 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025076 # line-number line after each line using $LINENO; the second 'sed'
25077 # does the real work. The second script uses 'N' to pair each
25078 # line-number line with the line containing $LINENO, and appends
25079 # trailing '-' during substitution so that $LINENO is not a special
25080 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025081 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025082 # scripts with optimization help from Paolo Bonzini. Blame Lee
25083 # E. McMahon (1931-1989) for sed's syntax. :-)
25084 sed -n '
25085 p
25086 /[$]LINENO/=
25087 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025088 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025089 s/[$]LINENO.*/&-/
25090 t lineno
25091 b
25092 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025093 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025094 :loop
25095 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025096 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025097 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025098 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099 chmod +x "$as_me.lineno" ||
25100 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025101 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025102
Martin v. Löwis11437992002-04-12 09:54:03 +000025103 # Don't try to exec as it changes $[0], causing all sort of problems
25104 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025105 # original and so on. Autoconf is especially sensitive to this).
25106 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025107 # Exit status is that of the last command.
25108 exit
25109}
25110
25111
Martin v. Löwiseba40652007-08-30 20:10:57 +000025112if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25113 as_dirname=dirname
25114else
25115 as_dirname=false
25116fi
25117
25118ECHO_C= ECHO_N= ECHO_T=
25119case `echo -n x` in
25120-n*)
25121 case `echo 'x\c'` in
25122 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25123 *) ECHO_C='\c';;
25124 esac;;
25125*)
25126 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025127esac
25128
Martin v. Löwiseba40652007-08-30 20:10:57 +000025129if expr a : '\(a\)' >/dev/null 2>&1 &&
25130 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025131 as_expr=expr
25132else
25133 as_expr=false
25134fi
25135
25136rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025137if test -d conf$$.dir; then
25138 rm -f conf$$.dir/conf$$.file
25139else
25140 rm -f conf$$.dir
25141 mkdir conf$$.dir
25142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025143echo >conf$$.file
25144if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025145 as_ln_s='ln -s'
25146 # ... but there are two gotchas:
25147 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25148 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25149 # In both cases, we have to default to `cp -p'.
25150 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025151 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025152elif ln conf$$.file conf$$ 2>/dev/null; then
25153 as_ln_s=ln
25154else
25155 as_ln_s='cp -p'
25156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025157rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25158rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025159
Skip Montanaro6dead952003-09-25 14:50:04 +000025160if mkdir -p . 2>/dev/null; then
25161 as_mkdir_p=:
25162else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025163 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025164 as_mkdir_p=false
25165fi
25166
Martin v. Löwiseba40652007-08-30 20:10:57 +000025167if test -x / >/dev/null 2>&1; then
25168 as_test_x='test -x'
25169else
25170 if ls -dL / >/dev/null 2>&1; then
25171 as_ls_L_option=L
25172 else
25173 as_ls_L_option=
25174 fi
25175 as_test_x='
25176 eval sh -c '\''
25177 if test -d "$1"; then
25178 test -d "$1/.";
25179 else
25180 case $1 in
25181 -*)set "./$1";;
25182 esac;
25183 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25184 ???[sx]*):;;*)false;;esac;fi
25185 '\'' sh
25186 '
25187fi
25188as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025189
25190# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025191as_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 +000025192
25193# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025194as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025195
25196
Martin v. Löwis11437992002-04-12 09:54:03 +000025197exec 6>&1
25198
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025200# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025201# values after options handling.
25202ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025203This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025205
25206 CONFIG_FILES = $CONFIG_FILES
25207 CONFIG_HEADERS = $CONFIG_HEADERS
25208 CONFIG_LINKS = $CONFIG_LINKS
25209 CONFIG_COMMANDS = $CONFIG_COMMANDS
25210 $ $0 $@
25211
Martin v. Löwiseba40652007-08-30 20:10:57 +000025212on `(hostname || uname -n) 2>/dev/null | sed 1q`
25213"
25214
Martin v. Löwis11437992002-04-12 09:54:03 +000025215_ACEOF
25216
Martin v. Löwiseba40652007-08-30 20:10:57 +000025217cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025218# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025219config_files="$ac_config_files"
25220config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025221
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025223
25224cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025225ac_cs_usage="\
25226\`$as_me' instantiates files from templates according to the
25227current configuration.
25228
25229Usage: $0 [OPTIONS] [FILE]...
25230
25231 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025232 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025233 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025234 -d, --debug don't remove temporary files
25235 --recheck update $as_me by reconfiguring in the same conditions
25236 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025237 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025238 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025239 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025240
25241Configuration files:
25242$config_files
25243
25244Configuration headers:
25245$config_headers
25246
25247Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025248
Martin v. Löwiseba40652007-08-30 20:10:57 +000025249_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025250cat >>$CONFIG_STATUS <<_ACEOF
25251ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025252python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253configured by $0, generated by GNU Autoconf 2.61,
25254 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025255
Martin v. Löwiseba40652007-08-30 20:10:57 +000025256Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025257This config.status script is free software; the Free Software Foundation
25258gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025259
25260ac_pwd='$ac_pwd'
25261srcdir='$srcdir'
25262INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025263_ACEOF
25264
25265cat >>$CONFIG_STATUS <<\_ACEOF
25266# If no file are specified by the user, then we need to provide default
25267# value. By we need to know if files were specified by the user.
25268ac_need_defaults=:
25269while test $# != 0
25270do
25271 case $1 in
25272 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25274 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025275 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025276 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025277 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025278 ac_option=$1
25279 ac_optarg=$2
25280 ac_shift=shift
25281 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025282 esac
25283
Skip Montanaro6dead952003-09-25 14:50:04 +000025284 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025285 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025286 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25287 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025288 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25289 echo "$ac_cs_version"; exit ;;
25290 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025291 debug=: ;;
25292 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025293 $ac_shift
25294 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025295 ac_need_defaults=false;;
25296 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025297 $ac_shift
25298 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025299 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025300 --he | --h)
25301 # Conflict between --help and --header
25302 { echo "$as_me: error: ambiguous option: $1
25303Try \`$0 --help' for more information." >&2
25304 { (exit 1); exit 1; }; };;
25305 --help | --hel | -h )
25306 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025307 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25308 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25309 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025310
25311 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025312 -*) { echo "$as_me: error: unrecognized option: $1
25313Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025314 { (exit 1); exit 1; }; } ;;
25315
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316 *) ac_config_targets="$ac_config_targets $1"
25317 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025318
25319 esac
25320 shift
25321done
25322
Skip Montanaro6dead952003-09-25 14:50:04 +000025323ac_configure_extra_args=
25324
25325if $ac_cs_silent; then
25326 exec 6>/dev/null
25327 ac_configure_extra_args="$ac_configure_extra_args --silent"
25328fi
25329
25330_ACEOF
25331cat >>$CONFIG_STATUS <<_ACEOF
25332if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025333 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25334 CONFIG_SHELL=$SHELL
25335 export CONFIG_SHELL
25336 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025337fi
25338
Martin v. Löwis11437992002-04-12 09:54:03 +000025339_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025340cat >>$CONFIG_STATUS <<\_ACEOF
25341exec 5>>config.log
25342{
25343 echo
25344 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25345## Running $as_me. ##
25346_ASBOX
25347 echo "$ac_log"
25348} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025349
Martin v. Löwiseba40652007-08-30 20:10:57 +000025350_ACEOF
25351cat >>$CONFIG_STATUS <<_ACEOF
25352_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025353
25354cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025355
25356# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025357for ac_config_target in $ac_config_targets
25358do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025359 case $ac_config_target in
25360 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25361 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25362 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25363 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025364 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25365 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025366 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25367 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25368
Martin v. Löwis11437992002-04-12 09:54:03 +000025369 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25370echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25371 { (exit 1); exit 1; }; };;
25372 esac
25373done
25374
Martin v. Löwiseba40652007-08-30 20:10:57 +000025375
Martin v. Löwis11437992002-04-12 09:54:03 +000025376# If the user did not use the arguments to specify the items to instantiate,
25377# then the envvar interface is used. Set only those that are not.
25378# We use the long form for the default assignment because of an extremely
25379# bizarre bug on SunOS 4.1.3.
25380if $ac_need_defaults; then
25381 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25382 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25383fi
25384
Skip Montanaro6dead952003-09-25 14:50:04 +000025385# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025386# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025387# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388# Hook for its removal unless debugging.
25389# Note that there is a small window in which the directory will not be cleaned:
25390# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025391$debug ||
25392{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025393 tmp=
25394 trap 'exit_status=$?
25395 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25396' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 trap '{ (exit 1); exit 1; }' 1 2 13 15
25398}
Martin v. Löwis11437992002-04-12 09:54:03 +000025399# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025400
Martin v. Löwis11437992002-04-12 09:54:03 +000025401{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025402 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025403 test -n "$tmp" && test -d "$tmp"
25404} ||
25405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025406 tmp=./conf$$-$RANDOM
25407 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025408} ||
25409{
Skip Montanaro6dead952003-09-25 14:50:04 +000025410 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025411 { (exit 1); exit 1; }
25412}
25413
Martin v. Löwis11437992002-04-12 09:54:03 +000025414#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025416#
25417
25418# No need to generate the scripts if there are no CONFIG_FILES.
25419# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025421
25422_ACEOF
25423
Martin v. Löwiseba40652007-08-30 20:10:57 +000025424
25425
25426ac_delim='%!_!# '
25427for ac_last_try in false false false false false :; do
25428 cat >conf$$subs.sed <<_ACEOF
25429SHELL!$SHELL$ac_delim
25430PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25431PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25432PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25433PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25434PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25435PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25436exec_prefix!$exec_prefix$ac_delim
25437prefix!$prefix$ac_delim
25438program_transform_name!$program_transform_name$ac_delim
25439bindir!$bindir$ac_delim
25440sbindir!$sbindir$ac_delim
25441libexecdir!$libexecdir$ac_delim
25442datarootdir!$datarootdir$ac_delim
25443datadir!$datadir$ac_delim
25444sysconfdir!$sysconfdir$ac_delim
25445sharedstatedir!$sharedstatedir$ac_delim
25446localstatedir!$localstatedir$ac_delim
25447includedir!$includedir$ac_delim
25448oldincludedir!$oldincludedir$ac_delim
25449docdir!$docdir$ac_delim
25450infodir!$infodir$ac_delim
25451htmldir!$htmldir$ac_delim
25452dvidir!$dvidir$ac_delim
25453pdfdir!$pdfdir$ac_delim
25454psdir!$psdir$ac_delim
25455libdir!$libdir$ac_delim
25456localedir!$localedir$ac_delim
25457mandir!$mandir$ac_delim
25458DEFS!$DEFS$ac_delim
25459ECHO_C!$ECHO_C$ac_delim
25460ECHO_N!$ECHO_N$ac_delim
25461ECHO_T!$ECHO_T$ac_delim
25462LIBS!$LIBS$ac_delim
25463build_alias!$build_alias$ac_delim
25464host_alias!$host_alias$ac_delim
25465target_alias!$target_alias$ac_delim
25466VERSION!$VERSION$ac_delim
25467SOVERSION!$SOVERSION$ac_delim
25468CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25469UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025470ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025471PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025472PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025473PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25474PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25475PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25476FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25477FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25478FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25479FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25480FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25481MACHDEP!$MACHDEP$ac_delim
25482SGI_ABI!$SGI_ABI$ac_delim
25483EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25484EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25485CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25486EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25487CC!$CC$ac_delim
25488CFLAGS!$CFLAGS$ac_delim
25489LDFLAGS!$LDFLAGS$ac_delim
25490CPPFLAGS!$CPPFLAGS$ac_delim
25491ac_ct_CC!$ac_ct_CC$ac_delim
25492EXEEXT!$EXEEXT$ac_delim
25493OBJEXT!$OBJEXT$ac_delim
25494CXX!$CXX$ac_delim
25495MAINCC!$MAINCC$ac_delim
25496CPP!$CPP$ac_delim
25497GREP!$GREP$ac_delim
25498EGREP!$EGREP$ac_delim
25499BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25500LIBRARY!$LIBRARY$ac_delim
25501LDLIBRARY!$LDLIBRARY$ac_delim
25502DLLLIBRARY!$DLLLIBRARY$ac_delim
25503BLDLIBRARY!$BLDLIBRARY$ac_delim
25504LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25505INSTSONAME!$INSTSONAME$ac_delim
25506RUNSHARED!$RUNSHARED$ac_delim
25507LINKCC!$LINKCC$ac_delim
25508RANLIB!$RANLIB$ac_delim
25509AR!$AR$ac_delim
25510SVNVERSION!$SVNVERSION$ac_delim
25511INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25512INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25513INSTALL_DATA!$INSTALL_DATA$ac_delim
25514LN!$LN$ac_delim
25515OPT!$OPT$ac_delim
25516BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025517UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025518OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25519LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25520SO!$SO$ac_delim
25521LDSHARED!$LDSHARED$ac_delim
25522BLDSHARED!$BLDSHARED$ac_delim
25523CCSHARED!$CCSHARED$ac_delim
25524LINKFORSHARED!$LINKFORSHARED$ac_delim
25525CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025526_ACEOF
25527
25528 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25529 break
25530 elif $ac_last_try; then
25531 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25532echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25533 { (exit 1); exit 1; }; }
25534 else
25535 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025536 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025537done
25538
25539ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25540if test -n "$ac_eof"; then
25541 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25542 ac_eof=`expr $ac_eof + 1`
25543fi
25544
25545cat >>$CONFIG_STATUS <<_ACEOF
25546cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25547/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25548_ACEOF
25549sed '
25550s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25551s/^/s,@/; s/!/@,|#_!!_#|/
25552:n
25553t n
25554s/'"$ac_delim"'$/,g/; t
25555s/$/\\/; p
25556N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25557' >>$CONFIG_STATUS <conf$$subs.sed
25558rm -f conf$$subs.sed
25559cat >>$CONFIG_STATUS <<_ACEOF
25560CEOF$ac_eof
25561_ACEOF
25562
25563
25564ac_delim='%!_!# '
25565for ac_last_try in false false false false false :; do
25566 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025567SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025568USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025569SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025570USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25571LDLAST!$LDLAST$ac_delim
25572THREADOBJ!$THREADOBJ$ac_delim
25573DLINCLDIR!$DLINCLDIR$ac_delim
25574DYNLOADFILE!$DYNLOADFILE$ac_delim
25575MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25576TRUE!$TRUE$ac_delim
25577LIBOBJS!$LIBOBJS$ac_delim
25578HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25579HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25580HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25581HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25582HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25583LIBM!$LIBM$ac_delim
25584LIBC!$LIBC$ac_delim
25585UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25586THREADHEADERS!$THREADHEADERS$ac_delim
25587SRCDIRS!$SRCDIRS$ac_delim
25588LTLIBOBJS!$LTLIBOBJS$ac_delim
25589_ACEOF
25590
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025591 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 +000025592 break
25593 elif $ac_last_try; then
25594 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25595echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25596 { (exit 1); exit 1; }; }
25597 else
25598 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25599 fi
25600done
25601
25602ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25603if test -n "$ac_eof"; then
25604 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25605 ac_eof=`expr $ac_eof + 1`
25606fi
25607
25608cat >>$CONFIG_STATUS <<_ACEOF
25609cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25610/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25611_ACEOF
25612sed '
25613s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25614s/^/s,@/; s/!/@,|#_!!_#|/
25615:n
25616t n
25617s/'"$ac_delim"'$/,g/; t
25618s/$/\\/; p
25619N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25620' >>$CONFIG_STATUS <conf$$subs.sed
25621rm -f conf$$subs.sed
25622cat >>$CONFIG_STATUS <<_ACEOF
25623:end
25624s/|#_!!_#|//g
25625CEOF$ac_eof
25626_ACEOF
25627
25628
25629# VPATH may cause trouble with some makes, so we remove $(srcdir),
25630# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25631# trailing colons and then remove the whole line if VPATH becomes empty
25632# (actually we leave an empty line to preserve line numbers).
25633if test "x$srcdir" = x.; then
25634 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25635s/:*\$(srcdir):*/:/
25636s/:*\${srcdir}:*/:/
25637s/:*@srcdir@:*/:/
25638s/^\([^=]*=[ ]*\):*/\1/
25639s/:*$//
25640s/^[^=]*=[ ]*$//
25641}'
25642fi
25643
25644cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025645fi # test -n "$CONFIG_FILES"
25646
Martin v. Löwiseba40652007-08-30 20:10:57 +000025647
25648for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25649do
25650 case $ac_tag in
25651 :[FHLC]) ac_mode=$ac_tag; continue;;
25652 esac
25653 case $ac_mode$ac_tag in
25654 :[FHL]*:*);;
25655 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25656echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25657 { (exit 1); exit 1; }; };;
25658 :[FH]-) ac_tag=-:-;;
25659 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25660 esac
25661 ac_save_IFS=$IFS
25662 IFS=:
25663 set x $ac_tag
25664 IFS=$ac_save_IFS
25665 shift
25666 ac_file=$1
25667 shift
25668
25669 case $ac_mode in
25670 :L) ac_source=$1;;
25671 :[FH])
25672 ac_file_inputs=
25673 for ac_f
25674 do
25675 case $ac_f in
25676 -) ac_f="$tmp/stdin";;
25677 *) # Look for the file first in the build tree, then in the source tree
25678 # (if the path is not absolute). The absolute path cannot be DOS-style,
25679 # because $ac_f cannot contain `:'.
25680 test -f "$ac_f" ||
25681 case $ac_f in
25682 [\\/$]*) false;;
25683 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25684 esac ||
25685 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25686echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25687 { (exit 1); exit 1; }; };;
25688 esac
25689 ac_file_inputs="$ac_file_inputs $ac_f"
25690 done
25691
25692 # Let's still pretend it is `configure' which instantiates (i.e., don't
25693 # use $as_me), people would be surprised to read:
25694 # /* config.h. Generated by config.status. */
25695 configure_input="Generated from "`IFS=:
25696 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25697 if test x"$ac_file" != x-; then
25698 configure_input="$ac_file. $configure_input"
25699 { echo "$as_me:$LINENO: creating $ac_file" >&5
25700echo "$as_me: creating $ac_file" >&6;}
25701 fi
25702
25703 case $ac_tag in
25704 *:-:* | *:-) cat >"$tmp/stdin";;
25705 esac
25706 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025707 esac
25708
Martin v. Löwiseba40652007-08-30 20:10:57 +000025709 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025710$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025711 X"$ac_file" : 'X\(//\)[^/]' \| \
25712 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025713 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025714echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025715 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25716 s//\1/
25717 q
25718 }
25719 /^X\(\/\/\)[^/].*/{
25720 s//\1/
25721 q
25722 }
25723 /^X\(\/\/\)$/{
25724 s//\1/
25725 q
25726 }
25727 /^X\(\/\).*/{
25728 s//\1/
25729 q
25730 }
25731 s/.*/./; q'`
25732 { as_dir="$ac_dir"
25733 case $as_dir in #(
25734 -*) as_dir=./$as_dir;;
25735 esac
25736 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025737 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025738 while :; do
25739 case $as_dir in #(
25740 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25741 *) as_qdir=$as_dir;;
25742 esac
25743 as_dirs="'$as_qdir' $as_dirs"
25744 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025745$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025746 X"$as_dir" : 'X\(//\)[^/]' \| \
25747 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025749echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025750 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25751 s//\1/
25752 q
25753 }
25754 /^X\(\/\/\)[^/].*/{
25755 s//\1/
25756 q
25757 }
25758 /^X\(\/\/\)$/{
25759 s//\1/
25760 q
25761 }
25762 /^X\(\/\).*/{
25763 s//\1/
25764 q
25765 }
25766 s/.*/./; q'`
25767 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025768 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025769 test -z "$as_dirs" || eval "mkdir $as_dirs"
25770 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25771echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025772 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025773 ac_builddir=.
25774
Martin v. Löwiseba40652007-08-30 20:10:57 +000025775case "$ac_dir" in
25776.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25777*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025778 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025779 # A ".." for each directory in $ac_dir_suffix.
25780 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25781 case $ac_top_builddir_sub in
25782 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25783 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25784 esac ;;
25785esac
25786ac_abs_top_builddir=$ac_pwd
25787ac_abs_builddir=$ac_pwd$ac_dir_suffix
25788# for backward compatibility:
25789ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025790
25791case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025792 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025793 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025794 ac_top_srcdir=$ac_top_builddir_sub
25795 ac_abs_top_srcdir=$ac_pwd ;;
25796 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025797 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798 ac_top_srcdir=$srcdir
25799 ac_abs_top_srcdir=$srcdir ;;
25800 *) # Relative name.
25801 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25802 ac_top_srcdir=$ac_top_build_prefix$srcdir
25803 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025804esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025805ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025806
Martin v. Löwis11437992002-04-12 09:54:03 +000025807
Martin v. Löwiseba40652007-08-30 20:10:57 +000025808 case $ac_mode in
25809 :F)
25810 #
25811 # CONFIG_FILE
25812 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025813
25814 case $INSTALL in
25815 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025816 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025817 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025818_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819
25820cat >>$CONFIG_STATUS <<\_ACEOF
25821# If the template does not know about datarootdir, expand it.
25822# FIXME: This hack should be removed a few years after 2.60.
25823ac_datarootdir_hack=; ac_datarootdir_seen=
25824
25825case `sed -n '/datarootdir/ {
25826 p
25827 q
25828}
25829/@datadir@/p
25830/@docdir@/p
25831/@infodir@/p
25832/@localedir@/p
25833/@mandir@/p
25834' $ac_file_inputs` in
25835*datarootdir*) ac_datarootdir_seen=yes;;
25836*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25837 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25838echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25839_ACEOF
25840cat >>$CONFIG_STATUS <<_ACEOF
25841 ac_datarootdir_hack='
25842 s&@datadir@&$datadir&g
25843 s&@docdir@&$docdir&g
25844 s&@infodir@&$infodir&g
25845 s&@localedir@&$localedir&g
25846 s&@mandir@&$mandir&g
25847 s&\\\${datarootdir}&$datarootdir&g' ;;
25848esac
25849_ACEOF
25850
25851# Neutralize VPATH when `$srcdir' = `.'.
25852# Shell code in configure.ac might set extrasub.
25853# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025854cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025855 sed "$ac_vpsub
25856$extrasub
25857_ACEOF
25858cat >>$CONFIG_STATUS <<\_ACEOF
25859:t
25860/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025861s&@configure_input@&$configure_input&;t t
25862s&@top_builddir@&$ac_top_builddir_sub&;t t
25863s&@srcdir@&$ac_srcdir&;t t
25864s&@abs_srcdir@&$ac_abs_srcdir&;t t
25865s&@top_srcdir@&$ac_top_srcdir&;t t
25866s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25867s&@builddir@&$ac_builddir&;t t
25868s&@abs_builddir@&$ac_abs_builddir&;t t
25869s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25870s&@INSTALL@&$ac_INSTALL&;t t
25871$ac_datarootdir_hack
25872" $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 +000025873
Martin v. Löwiseba40652007-08-30 20:10:57 +000025874test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25875 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25876 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25877 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25878which seems to be undefined. Please make sure it is defined." >&5
25879echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25880which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025881
Martin v. Löwiseba40652007-08-30 20:10:57 +000025882 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025883 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025884 -) cat "$tmp/out"; rm -f "$tmp/out";;
25885 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025886 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025887 ;;
25888 :H)
25889 #
25890 # CONFIG_HEADER
25891 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025892_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025893
Martin v. Löwiseba40652007-08-30 20:10:57 +000025894# Transform confdefs.h into a sed script `conftest.defines', that
25895# substitutes the proper values into config.h.in to produce config.h.
25896rm -f conftest.defines conftest.tail
25897# First, append a space to every undef/define line, to ease matching.
25898echo 's/$/ /' >conftest.defines
25899# Then, protect against being on the right side of a sed subst, or in
25900# an unquoted here document, in config.status. If some macros were
25901# called several times there might be several #defines for the same
25902# symbol, which is useless. But do not sort them, since the last
25903# AC_DEFINE must be honored.
25904ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25905# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25906# NAME is the cpp macro being defined, VALUE is the value it is being given.
25907# PARAMS is the parameter list in the macro definition--in most cases, it's
25908# just an empty string.
25909ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25910ac_dB='\\)[ (].*,\\1define\\2'
25911ac_dC=' '
25912ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025913
Martin v. Löwiseba40652007-08-30 20:10:57 +000025914uniq confdefs.h |
25915 sed -n '
25916 t rset
25917 :rset
25918 s/^[ ]*#[ ]*define[ ][ ]*//
25919 t ok
25920 d
25921 :ok
25922 s/[\\&,]/\\&/g
25923 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25924 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25925 ' >>conftest.defines
25926
25927# Remove the space that was appended to ease matching.
25928# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025929# example, in the case of _POSIX_SOURCE, which is predefined and required
25930# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025931# (The regexp can be short, since the line contains either #define or #undef.)
25932echo 's/ $//
25933s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025934
Martin v. Löwiseba40652007-08-30 20:10:57 +000025935# Break up conftest.defines:
25936ac_max_sed_lines=50
25937
25938# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25939# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25940# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25941# et cetera.
25942ac_in='$ac_file_inputs'
25943ac_out='"$tmp/out1"'
25944ac_nxt='"$tmp/out2"'
25945
25946while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025947do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025948 # Write a here document:
25949 cat >>$CONFIG_STATUS <<_ACEOF
25950 # First, check the format of the line:
25951 cat >"\$tmp/defines.sed" <<\\CEOF
25952/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25953/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25954b
25955:def
25956_ACEOF
25957 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025958 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025959 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25960 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25961 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25962 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025963 rm -f conftest.defines
25964 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025965done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025966rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025967
Martin v. Löwiseba40652007-08-30 20:10:57 +000025968echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025969cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025970 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025971 echo "/* $configure_input */" >"$tmp/config.h"
25972 cat "$ac_result" >>"$tmp/config.h"
25973 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025974 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25975echo "$as_me: $ac_file is unchanged" >&6;}
25976 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025977 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025978 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025979 fi
25980 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025981 echo "/* $configure_input */"
25982 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025983 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025984 rm -f "$tmp/out12"
25985 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025986
Martin v. Löwiseba40652007-08-30 20:10:57 +000025987
25988 esac
25989
25990done # for ac_tag
25991
Guido van Rossum627b2d71993-12-24 10:39:16 +000025992
Martin v. Löwis11437992002-04-12 09:54:03 +000025993{ (exit 0); exit 0; }
25994_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025995chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025996ac_clean_files=$ac_clean_files_save
25997
25998
25999# configure is writing to config.log, and then calls config.status.
26000# config.status does its own redirection, appending to config.log.
26001# Unfortunately, on DOS this fails, as config.log is still kept open
26002# by configure, so config.status won't be able to write to it; its
26003# output is simply discarded. So we exec the FD to /dev/null,
26004# effectively closing config.log, so it can be properly (re)opened and
26005# appended to by config.status. When coming back to configure, we
26006# need to make the FD available again.
26007if test "$no_create" != yes; then
26008 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026009 ac_config_status_args=
26010 test "$silent" = yes &&
26011 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026012 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026013 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026014 exec 5>>config.log
26015 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26016 # would make configure fail if this is the last instruction.
26017 $ac_cs_success || { (exit 1); exit 1; }
26018fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026019
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026020
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026021echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026022if test ! -f Modules/Setup
26023then
26024 cp $srcdir/Modules/Setup.dist Modules/Setup
26025fi
26026
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026027echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026028if test ! -f Modules/Setup.local
26029then
26030 echo "# Edit this file for local setup changes" >Modules/Setup.local
26031fi
26032
26033echo "creating Makefile"
26034$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26035 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026036 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026037
26038case $ac_sys_system in
26039BeOS)
26040 { echo "$as_me:$LINENO: WARNING:
26041
26042 Support for BeOS is deprecated as of Python 2.6.
26043 See PEP 11 for the gory details.
26044 " >&5
26045echo "$as_me: WARNING:
26046
26047 Support for BeOS is deprecated as of Python 2.6.
26048 See PEP 11 for the gory details.
26049 " >&2;}
26050 ;;
26051*) ;;
26052esac
26053
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026054mv config.c Modules