blob: 3ab80ab34249f736388f5f653b4e363aa1f3177c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Gregory P. Smithff7b2d52008-09-03 05:57:48 +00002# From configure.in Revision: 65652 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001250\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001311 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
1327 --enable-unicode[=ucs[24]]
1328 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
1335 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-signal-module disable/enable signal module
1348 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1349 --with(out)-threads[=DIRECTORY]
1350 disable/enable thread support
1351 --with(out)-thread[=DIRECTORY]
1352 deprecated; use --with(out)-threads
1353 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001355 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-pymalloc disable/enable specialized mallocs
1357 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-fpectl enable SIGFPE catching
1359 --with-libm=STRING math library
1360 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Some influential environment variables:
1363 CC C compiler command
1364 CFLAGS C compiler flags
1365 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1366 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001367 LIBS libraries to pass to the linker, e.g. -l<library>
1368 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1369 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 CPP C preprocessor
1371
1372Use these variables to override the choices made by `configure' or to help
1373it to find libraries and programs with nonstandard names/locations.
1374
Martin v. Löwis1d459062005-03-14 21:23:33 +00001375Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001378fi
1379
1380if test "$ac_init_help" = "recursive"; then
1381 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_builddir=.
1385
Martin v. Löwiseba40652007-08-30 20:10:57 +00001386case "$ac_dir" in
1387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1388*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001390 # A ".." for each directory in $ac_dir_suffix.
1391 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1392 case $ac_top_builddir_sub in
1393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1395 esac ;;
1396esac
1397ac_abs_top_builddir=$ac_pwd
1398ac_abs_builddir=$ac_pwd$ac_dir_suffix
1399# for backward compatibility:
1400ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001403 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 ac_top_srcdir=$ac_top_builddir_sub
1406 ac_abs_top_srcdir=$ac_pwd ;;
1407 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 ac_top_srcdir=$srcdir
1410 ac_abs_top_srcdir=$srcdir ;;
1411 *) # Relative name.
1412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1413 ac_top_srcdir=$ac_top_build_prefix$srcdir
1414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001415esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001417
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 cd "$ac_dir" || { ac_status=$?; continue; }
1419 # Check for guested configure.
1420 if test -f "$ac_srcdir/configure.gnu"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1423 elif test -f "$ac_srcdir/configure"; then
1424 echo &&
1425 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 else
1427 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428 fi || ac_status=$?
1429 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 done
1431fi
1432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001434if $ac_init_version; then
1435 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001436python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001438
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14402002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441This configure script is free software; the Free Software Foundation
1442gives unlimited permission to copy, distribute and modify it.
1443_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This file contains any messages produced by compilers while
1448running configure, to aid debugging if configure makes a mistake.
1449
Neal Norwitz9be57322006-08-18 05:39:20 +00001450It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453 $ $0 $@
1454
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001457{
1458cat <<_ASUNAME
1459## --------- ##
1460## Platform. ##
1461## --------- ##
1462
1463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1464uname -m = `(uname -m) 2>/dev/null || echo unknown`
1465uname -r = `(uname -r) 2>/dev/null || echo unknown`
1466uname -s = `(uname -s) 2>/dev/null || echo unknown`
1467uname -v = `(uname -v) 2>/dev/null || echo unknown`
1468
1469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1471
1472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1479
1480_ASUNAME
1481
1482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483for as_dir in $PATH
1484do
1485 IFS=$as_save_IFS
1486 test -z "$as_dir" && as_dir=.
1487 echo "PATH: $as_dir"
1488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491} >&5
1492
1493cat >&5 <<_ACEOF
1494
1495
1496## ----------- ##
1497## Core tests. ##
1498## ----------- ##
1499
1500_ACEOF
1501
1502
1503# Keep a trace of the command line.
1504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001509ac_configure_args0=
1510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_must_keep_next=false
1512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001513do
Skip Montanaro6dead952003-09-25 14:50:04 +00001514 for ac_arg
1515 do
1516 case $ac_arg in
1517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1519 | -silent | --silent | --silen | --sile | --sil)
1520 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1523 esac
1524 case $ac_pass in
1525 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1526 2)
1527 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 case $ac_arg in
1532 *=* | --config-cache | -C | -disable-* | --disable-* \
1533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1535 | -with-* | --with-* | -without-* | --without-* | --x)
1536 case "$ac_configure_args0 " in
1537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1538 esac
1539 ;;
1540 -* ) ac_must_keep_next=true ;;
1541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001543 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 ;;
1545 esac
1546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001547done
Skip Montanaro6dead952003-09-25 14:50:04 +00001548$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1549$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551# When interrupted or exit'd, cleanup temporary files, and complete
1552# config.log. We remove comments because anyway the quotes in there
1553# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554# WARNING: Use '\'' to represent an apostrophe within the trap.
1555# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556trap 'exit_status=$?
1557 # Save into config.log some information that might help in debugging.
1558 {
1559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001560
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 cat <<\_ASBOX
1562## ---------------- ##
1563## Cache variables. ##
1564## ---------------- ##
1565_ASBOX
1566 echo
1567 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568(
1569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1570 eval ac_val=\$$ac_var
1571 case $ac_val in #(
1572 *${as_nl}*)
1573 case $ac_var in #(
1574 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1575echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1576 esac
1577 case $ac_var in #(
1578 _ | IFS | as_nl) ;; #(
1579 *) $as_unset $ac_var ;;
1580 esac ;;
1581 esac
1582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001587 "s/'\''/'\''\\\\'\'''\''/g;
1588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1589 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001590 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 esac |
1594 sort
1595)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001597
1598 cat <<\_ASBOX
1599## ----------------- ##
1600## Output variables. ##
1601## ----------------- ##
1602_ASBOX
1603 echo
1604 for ac_var in $ac_subst_vars
1605 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 eval ac_val=\$$ac_var
1607 case $ac_val in
1608 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1609 esac
1610 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001611 done | sort
1612 echo
1613
1614 if test -n "$ac_subst_files"; then
1615 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616## ------------------- ##
1617## File substitutions. ##
1618## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001619_ASBOX
1620 echo
1621 for ac_var in $ac_subst_files
1622 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 eval ac_val=\$$ac_var
1624 case $ac_val in
1625 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1626 esac
1627 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001628 done | sort
1629 echo
1630 fi
1631
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 if test -s confdefs.h; then
1633 cat <<\_ASBOX
1634## ----------- ##
1635## confdefs.h. ##
1636## ----------- ##
1637_ASBOX
1638 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001639 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 echo
1641 fi
1642 test "$ac_signal" != 0 &&
1643 echo "$as_me: caught signal $ac_signal"
1644 echo "$as_me: exit $exit_status"
1645 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001646 rm -f core *.core core.conftest.* &&
1647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001649' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001650for ac_signal in 1 2 13 15; do
1651 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1652done
1653ac_signal=0
1654
1655# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
1658# Predefined preprocessor variables.
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_NAME "$PACKAGE_NAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_VERSION "$PACKAGE_VERSION"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_STRING "$PACKAGE_STRING"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1682_ACEOF
1683
1684
1685# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001687if test -n "$CONFIG_SITE"; then
1688 set x "$CONFIG_SITE"
1689elif test "x$prefix" != xNONE; then
1690 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1691else
1692 set x "$ac_default_prefix/share/config.site" \
1693 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695shift
1696for ac_site_file
1697do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1700echo "$as_me: loading site script $ac_site_file" >&6;}
1701 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 . "$ac_site_file"
1703 fi
1704done
1705
1706if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001707 # Some versions of bash will fail to source /dev/null (special
1708 # files actually), so we avoid doing that.
1709 if test -f "$cache_file"; then
1710 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1711echo "$as_me: loading cache $cache_file" >&6;}
1712 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1714 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 esac
1716 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717else
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1719echo "$as_me: creating cache $cache_file" >&6;}
1720 >$cache_file
1721fi
1722
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001726for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 case $ac_old_set,$ac_new_set in
1732 set,)
1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 fi;;
1751 esac
1752 # Pass precious variables to config.status.
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
1771
Martin v. Löwiseba40652007-08-30 20:10:57 +00001772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
Guido van Rossum7f43da71994-08-01 12:15:30 +00001796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802
Michael W. Hudson54241132001-12-07 15:38:26 +00001803
Martin v. Löwiseba40652007-08-30 20:10:57 +00001804ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001805
1806
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
1809
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001810
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001811
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001812# We don't use PACKAGE_ variables, and they cause conflicts
1813# with other autoconf-based packages that include Python.h
1814grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1815rm confdefs.h
1816mv confdefs.h.new confdefs.h
1817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Neal Norwitz9be57322006-08-18 05:39:20 +00001819VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwis1142de32002-03-29 16:28:31 +00001821
1822SOVERSION=1.0
1823
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001824# The later defininition of _XOPEN_SOURCE disables certain features
1825# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _GNU_SOURCE 1
1829_ACEOF
1830
1831
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _NETBSD_SOURCE 1
1838_ACEOF
1839
1840
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define __BSD_VISIBLE 1
1847_ACEOF
1848
1849
Martin v. Löwisd6320502004-08-12 13:45:08 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _BSD_TYPES 1
1855_ACEOF
1856
1857
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _DARWIN_C_SOURCE 1
1864_ACEOF
1865
1866
1867
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001868define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001869
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001870# Arguments passed to configure.
1871
1872CONFIG_ARGS="$ac_configure_args"
1873
Martin v. Löwiseba40652007-08-30 20:10:57 +00001874# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001875if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001876 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001877 case $enableval in
1878 yes)
1879 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1880 ;;
1881 esac
1882 case $enableval in
1883 no)
1884 UNIVERSALSDK=
1885 enable_universalsdk=
1886 ;;
1887 *)
1888 UNIVERSALSDK=$enableval
1889 ;;
1890 esac
1891
1892else
1893
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898
1899
Martin v. Löwiseba40652007-08-30 20:10:57 +00001900
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001901ARCH_RUN_32BIT=
1902
1903
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001904UNIVERSAL_ARCHS="32-bit"
1905{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1906echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1907
1908# Check whether --with-universal-archs was given.
1909if test "${with_universal_archs+set}" = set; then
1910 withval=$with_universal_archs;
1911 { echo "$as_me:$LINENO: result: $withval" >&5
1912echo "${ECHO_T}$withval" >&6; }
1913 UNIVERSAL_ARCHS="$withval"
1914
1915else
1916
1917 { echo "$as_me:$LINENO: result: 32-bit" >&5
1918echo "${ECHO_T}32-bit" >&6; }
1919
1920fi
1921
1922
1923
1924
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001925
1926# Check whether --with-framework-name was given.
1927if test "${with_framework_name+set}" = set; then
1928 withval=$with_framework_name;
1929 PYTHONFRAMEWORK=${withval}
1930 PYTHONFRAMEWORKDIR=${withval}.framework
1931 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1932
1933else
1934
1935 PYTHONFRAMEWORK=Python
1936 PYTHONFRAMEWORKDIR=Python.framework
1937 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1938
1939fi
1940
Martin v. Löwiseba40652007-08-30 20:10:57 +00001941# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001942if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001943 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001944 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001945 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001946 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001947 esac
1948 case $enableval in
1949 no)
1950 PYTHONFRAMEWORK=
1951 PYTHONFRAMEWORKDIR=no-framework
1952 PYTHONFRAMEWORKPREFIX=
1953 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001954 FRAMEWORKINSTALLFIRST=
1955 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001956 FRAMEWORKALTINSTALLFIRST=
1957 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001958 if test "x${prefix}" = "xNONE"; then
1959 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1960 else
1961 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1962 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001963 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001964 ;;
1965 *)
1966 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001967 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001968 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001969 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1970 if test "$UNIVERSAL_ARCHS" = "all"
1971 then
1972 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
1973 else
1974 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1975 fi
1976
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001977 if test "x${prefix}" = "xNONE" ; then
1978 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1979 else
1980 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1981 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001982 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001983
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001984 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001986 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987
Martin v. Löwiseba40652007-08-30 20:10:57 +00001988 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001991
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001992 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1993
1994 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1995
Jack Jansene578a632001-08-15 01:27:14 +00001996 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001997
Guido van Rossum563e7081996-09-10 18:20:48 +00001998else
Martin v. Löwis11437992002-04-12 09:54:03 +00001999
Jack Jansene578a632001-08-15 01:27:14 +00002000 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002002 PYTHONFRAMEWORKPREFIX=
2003 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002004 FRAMEWORKINSTALLFIRST=
2005 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002006 FRAMEWORKALTINSTALLFIRST=
2007 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002008 if test "x${prefix}" = "xNONE" ; then
2009 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2010 else
2011 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2012 fi
Jack Jansene578a632001-08-15 01:27:14 +00002013 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002014
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002015 if test "$UNIVERSAL_ARCHS" = "all"
2016 then
2017 FRAMEWORKINSTALLLAST=update4wayuniversal
2018 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2019 fi
2020
Martin v. Löwiseba40652007-08-30 20:10:57 +00002021fi
2022
Michael W. Hudson54241132001-12-07 15:38:26 +00002023
2024
2025
2026
Jack Jansene578a632001-08-15 01:27:14 +00002027
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002028
2029
Ronald Oussoren5b787322006-06-06 19:50:24 +00002030
2031
2032
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002033
Jack Jansene578a632001-08-15 01:27:14 +00002034##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002035## AC_HELP_STRING(--with-dyld,
2036## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002037##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002038# Set name for machine-dependent library files
2039
Martin v. Löwiseba40652007-08-30 20:10:57 +00002040{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2041echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042if test -z "$MACHDEP"
2043then
Guido van Rossum563e7081996-09-10 18:20:48 +00002044 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002045 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2046 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002047 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002048 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_md_system=`echo $ac_sys_system |
2052 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2053 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002054 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002055 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002056
Guido van Rossum07397971997-04-29 21:49:50 +00002057 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002058 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002059 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002060 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002061 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002062 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 esac
2064fi
Guido van Rossum91922671997-10-09 20:24:13 +00002065
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002066# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2067# disable features if it is defined, without any means to access these
2068# features as extensions. For these systems, we skip the definition of
2069# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2070# some feature, make sure there is no alternative way to access this
2071# feature. Also, when using wildcards, make sure you have verified the
2072# need for not defining _XOPEN_SOURCE on all systems matching the
2073# wildcard, and that the wildcard does not include future systems
2074# (which may remove their limitations).
2075case $ac_sys_system/$ac_sys_release in
2076 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2077 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002078 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithff7b2d52008-09-03 05:57:48 +00002079 OpenBSD*)
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002080 define_xopen_source=no
2081 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2082 # also defined. This can be overridden by defining _BSD_SOURCE
2083 # As this has a different meaning on Linux, only define it on OpenBSD
2084
2085cat >>confdefs.h <<\_ACEOF
2086#define _BSD_SOURCE 1
2087_ACEOF
2088
Gregory P. Smithff7b2d52008-09-03 05:57:48 +00002089 # OpenBSD's readline library needs the libcurses
2090 READLINE_LIBS="-lcurses"
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002091 ;;
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
2095 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2096 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;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002110 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2111 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2112 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2113 # This should hopefully be fixed in FreeBSD 4.9
2114 FreeBSD/4.8* | Darwin/6* )
2115 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002116 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2117 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2118 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002119 AIX/4)
2120 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002121 AIX/5)
2122 if test `uname -r` -eq 1; then
2123 define_xopen_source=no
2124 fi
2125 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002126 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002128 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002129 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002130 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002131 define_xopen_source=no
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
Guido van Rossumda88dad1995-01-26 00:46:29 +00002261 no) CC=cc
2262 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 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004144 esac
Jason Tishler30765592003-09-04 11:04:06 +00004145else # shared is disabled
4146 case $ac_sys_system in
4147 CYGWIN*)
4148 BLDLIBRARY='$(LIBRARY)'
4149 LDLIBRARY='libpython$(VERSION).dll.a'
4150 ;;
4151 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004152fi
4153
Martin v. Löwiseba40652007-08-30 20:10:57 +00004154{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4155echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004156
Martin v. Löwis11437992002-04-12 09:54:03 +00004157if test -n "$ac_tool_prefix"; then
4158 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4159set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004160{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004162if test "${ac_cv_prog_RANLIB+set}" = set; then
4163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164else
4165 if test -n "$RANLIB"; then
4166 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4167else
Martin v. Löwis11437992002-04-12 09:54:03 +00004168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4169for as_dir in $PATH
4170do
4171 IFS=$as_save_IFS
4172 test -z "$as_dir" && as_dir=.
4173 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004174 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 +00004175 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4177 break 2
4178 fi
4179done
4180done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Guido van Rossum627b2d71993-12-24 10:39:16 +00004183fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004185RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4188echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004190 { echo "$as_me:$LINENO: result: no" >&5
4191echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
4193
Martin v. Löwiseba40652007-08-30 20:10:57 +00004194
Martin v. Löwis11437992002-04-12 09:54:03 +00004195fi
4196if test -z "$ac_cv_prog_RANLIB"; then
4197 ac_ct_RANLIB=$RANLIB
4198 # Extract the first word of "ranlib", so it can be a program name with args.
4199set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004202if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4203 echo $ECHO_N "(cached) $ECHO_C" >&6
4204else
4205 if test -n "$ac_ct_RANLIB"; then
4206 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4207else
4208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH
4210do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004214 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 +00004215 ac_cv_prog_ac_ct_RANLIB="ranlib"
4216 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4217 break 2
4218 fi
4219done
4220done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004222
Martin v. Löwis11437992002-04-12 09:54:03 +00004223fi
4224fi
4225ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4226if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4228echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004229else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004230 { echo "$as_me:$LINENO: result: no" >&5
4231echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004232fi
4233
Martin v. Löwiseba40652007-08-30 20:10:57 +00004234 if test "x$ac_ct_RANLIB" = x; then
4235 RANLIB=":"
4236 else
4237 case $cross_compiling:$ac_tool_warned in
4238yes:)
4239{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4240whose name does not start with the host triplet. If you think this
4241configuration is useful to you, please write to autoconf@gnu.org." >&5
4242echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4243whose name does not start with the host triplet. If you think this
4244configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4245ac_tool_warned=yes ;;
4246esac
4247 RANLIB=$ac_ct_RANLIB
4248 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004249else
4250 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252
4253
Guido van Rossum7f43da71994-08-01 12:15:30 +00004254for ac_prog in ar aal
4255do
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004258{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4259echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004260if test "${ac_cv_prog_AR+set}" = set; then
4261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262else
4263 if test -n "$AR"; then
4264 ac_cv_prog_AR="$AR" # Let the user override the test.
4265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4267for as_dir in $PATH
4268do
4269 IFS=$as_save_IFS
4270 test -z "$as_dir" && as_dir=.
4271 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 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 +00004273 ac_cv_prog_AR="$ac_prog"
4274 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4275 break 2
4276 fi
4277done
4278done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004280
Guido van Rossum7f43da71994-08-01 12:15:30 +00004281fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004283AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285 { echo "$as_me:$LINENO: result: $AR" >&5
4286echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004288 { echo "$as_me:$LINENO: result: no" >&5
4289echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004291
Martin v. Löwiseba40652007-08-30 20:10:57 +00004292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004294done
4295test -n "$AR" || AR="ar"
4296
Michael W. Hudson54241132001-12-07 15:38:26 +00004297
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004298
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004299# Extract the first word of "svnversion", so it can be a program name with args.
4300set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4302echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004303if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4304 echo $ECHO_N "(cached) $ECHO_C" >&6
4305else
4306 if test -n "$SVNVERSION"; then
4307 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4308else
4309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4310for as_dir in $PATH
4311do
4312 IFS=$as_save_IFS
4313 test -z "$as_dir" && as_dir=.
4314 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004315 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 +00004316 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004317 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4318 break 2
4319 fi
4320done
4321done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004323
Martin v. Löwisff600232006-04-03 19:12:32 +00004324 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004325fi
4326fi
4327SVNVERSION=$ac_cv_prog_SVNVERSION
4328if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4330echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004331else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332 { echo "$as_me:$LINENO: result: no" >&5
4333echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004334fi
4335
Martin v. Löwiseba40652007-08-30 20:10:57 +00004336
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004337if test $SVNVERSION = found
4338then
4339 SVNVERSION="svnversion \$(srcdir)"
4340else
4341 SVNVERSION="echo exported"
4342fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004343
Neil Schemenauera42c8272001-03-31 00:01:55 +00004344case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004345bsdos*|hp*|HP*)
4346 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004347 if test -z "$INSTALL"
4348 then
4349 INSTALL="${srcdir}/install-sh -c"
4350 fi
4351esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004352ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004353for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4354 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004355 ac_aux_dir=$ac_dir
4356 ac_install_sh="$ac_aux_dir/install-sh -c"
4357 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004359 ac_aux_dir=$ac_dir
4360 ac_install_sh="$ac_aux_dir/install.sh -c"
4361 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 ac_aux_dir=$ac_dir
4364 ac_install_sh="$ac_aux_dir/shtool install -c"
4365 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004366 fi
4367done
4368if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4370echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004371 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004373
4374# These three variables are undocumented and unsupported,
4375# and are intended to be withdrawn in a future Autoconf release.
4376# They can cause serious problems if a builder's source tree is in a directory
4377# whose full name contains unusual characters.
4378ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4379ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4380ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4381
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004382
4383# Find a good install program. We prefer a C program (faster),
4384# so one script is as good as another. But avoid the broken or
4385# incompatible versions:
4386# SysV /etc/install, /usr/sbin/install
4387# SunOS /usr/etc/install
4388# IRIX /sbin/install
4389# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004390# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004391# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4392# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4393# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004394# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004395# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004396{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4397echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004398if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004399if test "${ac_cv_path_install+set}" = set; then
4400 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004401else
Martin v. Löwis11437992002-04-12 09:54:03 +00004402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405 IFS=$as_save_IFS
4406 test -z "$as_dir" && as_dir=.
4407 # Account for people who put trailing slashes in PATH elements.
4408case $as_dir/ in
4409 ./ | .// | /cC/* | \
4410 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004411 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004412 /usr/ucb/* ) ;;
4413 *)
4414 # OSF1 and SCO ODT 3.0 have their own names for install.
4415 # Don't use installbsd from OSF since it installs stuff as root
4416 # by default.
4417 for ac_prog in ginstall scoinst install; do
4418 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004419 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 +00004420 if test $ac_prog = install &&
4421 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4422 # AIX install. It has an incompatible calling convention.
4423 :
4424 elif test $ac_prog = install &&
4425 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4426 # program-specific install script used by HP pwplus--don't use.
4427 :
4428 else
4429 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4430 break 3
4431 fi
4432 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004433 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004434 done
4435 ;;
4436esac
4437done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004439
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004440
4441fi
4442 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004444 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004445 # As a last resort, use the slow shell script. Don't cache a
4446 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004447 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004448 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004449 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004450 fi
4451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004452{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4453echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004454
4455# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4456# It thinks the first close brace ends the variable substitution.
4457test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4458
Martin v. Löwis11437992002-04-12 09:54:03 +00004459test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004460
4461test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4462
Michael W. Hudson54241132001-12-07 15:38:26 +00004463
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004464# Not every filesystem supports hard links
4465
4466if test -z "$LN" ; then
4467 case $ac_sys_system in
4468 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004469 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004470 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004471 *) LN=ln;;
4472 esac
4473fi
4474
Fred Drake109d9862001-07-11 06:27:56 +00004475# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004476{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4477echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004478
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004480if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004482if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004483then
4484
4485cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004486#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004487_ACEOF
4488
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489 { echo "$as_me:$LINENO: result: yes" >&5
4490echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004491 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004492else { echo "$as_me:$LINENO: result: no" >&5
4493echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004494fi
4495else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496 { echo "$as_me:$LINENO: result: no" >&5
4497echo "${ECHO_T}no" >&6; }
4498fi
4499
Fred Drake109d9862001-07-11 06:27:56 +00004500
Skip Montanarodecc6a42003-01-01 20:07:49 +00004501# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4502# merged with this chunk of code?
4503
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004504# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004505# ------------------------
4506# (The following bit of code is complicated enough - please keep things
4507# indented properly. Just pretend you're editing Python code. ;-)
4508
4509# There are two parallel sets of case statements below, one that checks to
4510# see if OPT was set and one that does BASECFLAGS setting based upon
4511# compiler and platform. BASECFLAGS tweaks need to be made even if the
4512# user set OPT.
4513
4514# tweak OPT based on compiler and platform, only if the user didn't set
4515# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004516
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004517if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004518then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004519 case $GCC in
4520 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004521 if test "$CC" != 'g++' ; then
4522 STRICT_PROTO="-Wstrict-prototypes"
4523 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004524 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4525 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4526 WRAP="-fwrapv"
4527 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004528 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004529 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004530 if test "$Py_DEBUG" = 'true' ; then
4531 # Optimization messes up debuggers, so turn it off for
4532 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004533 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004534 else
Thomas Hellere5529592007-12-13 21:20:29 +00004535 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004536 fi
4537 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004538 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004539 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004540 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004541 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004542 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004543 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4544 ;;
4545 esac
Fred Drake109d9862001-07-11 06:27:56 +00004546 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004548 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004549 OPT="-O"
4550 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004551 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004552
4553 # The current (beta) Monterey compiler dies with optimizations
4554 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004555 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004556 Monterey*)
4557 OPT=""
4558 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004559 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004560
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004561fi
4562
Skip Montanarodecc6a42003-01-01 20:07:49 +00004563
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004564
4565# The -arch flags for universal builds on OSX
4566UNIVERSAL_ARCH_FLAGS=
4567
4568
Skip Montanarodecc6a42003-01-01 20:07:49 +00004569# tweak BASECFLAGS based on compiler and platform
4570case $GCC in
4571yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004572 # Python violates C99 rules, by casting between incompatible
4573 # pointer types. GCC may generate bad code as a result of that,
4574 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004575 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4576echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004577 ac_save_cc="$CC"
4578 CC="$CC -fno-strict-aliasing"
4579 if test "$cross_compiling" = yes; then
4580 ac_cv_no_strict_aliasing_ok=no
4581else
4582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004583/* confdefs.h. */
4584_ACEOF
4585cat confdefs.h >>conftest.$ac_ext
4586cat >>conftest.$ac_ext <<_ACEOF
4587/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004588int main() { return 0; }
4589_ACEOF
4590rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004591if { (ac_try="$ac_link"
4592case "(($ac_try" in
4593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4594 *) ac_try_echo=$ac_try;;
4595esac
4596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4597 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004601 { (case "(($ac_try" in
4602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4603 *) ac_try_echo=$ac_try;;
4604esac
4605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4606 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); }; }; then
4610 ac_cv_no_strict_aliasing_ok=yes
4611else
4612 echo "$as_me: program exited with status $ac_status" >&5
4613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004614sed 's/^/| /' conftest.$ac_ext >&5
4615
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004616( exit $ac_status )
4617ac_cv_no_strict_aliasing_ok=no
4618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004619rm -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 +00004620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004621
4622
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004623 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004624 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4625echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004626 if test $ac_cv_no_strict_aliasing_ok = yes
4627 then
4628 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4629 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004630
4631 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4632 # support. Without this, treatment of subnormals doesn't follow
4633 # the standard.
4634 case $ac_sys_machine in
4635 alpha*)
4636 BASECFLAGS="$BASECFLAGS -mieee"
4637 ;;
4638 esac
4639
Skip Montanarodecc6a42003-01-01 20:07:49 +00004640 case $ac_sys_system in
4641 SCO_SV*)
4642 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4643 ;;
4644 # is there any other compiler on Darwin besides gcc?
4645 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004646 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4647 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004648
4649
Ronald Oussoren988117f2006-04-29 11:31:35 +00004650 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004651 UNIVERSAL_ARCH_FLAGS=""
4652 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4653 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004654 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004655
4656 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4657 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4658
4659 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4660 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004661 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004662
4663 else
4664 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4665echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4666 { (exit 1); exit 1; }; }
4667
4668 fi
4669
4670
4671 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004672 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004673 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4674 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4675 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004676 fi
4677
Benjamin Peterson4347c442008-07-17 15:59:24 +00004678 # Calculate the right deployment target for this build.
4679 #
4680 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4681 if test ${cur_target} '>' 10.2; then
4682 cur_target=10.3
4683 fi
4684 if test "${UNIVERSAL_ARCHS}" = "all"; then
4685 # Ensure that the default platform for a 4-way
4686 # universal build is OSX 10.5, that's the first
4687 # OS release where 4-way builds make sense.
4688 cur_target='10.5'
4689 fi
4690 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4691
4692 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4693 # environment with a value that is the same as what we'll use
4694 # in the Makefile to ensure that we'll get the same compiler
4695 # environment during configure and build time.
4696 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4697 export MACOSX_DEPLOYMENT_TARGET
4698 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4699
Skip Montanarodecc6a42003-01-01 20:07:49 +00004700 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004701 OSF*)
4702 BASECFLAGS="$BASECFLAGS -mieee"
4703 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004704 esac
4705 ;;
4706
4707*)
4708 case $ac_sys_system in
4709 OpenUNIX*|UnixWare*)
4710 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4711 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004712 OSF*)
4713 BASECFLAGS="$BASECFLAGS -ieee -std"
4714 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004715 SCO_SV*)
4716 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4717 ;;
4718 esac
4719 ;;
4720esac
4721
Fred Drakee1ceaa02001-12-04 20:55:47 +00004722if test "$Py_DEBUG" = 'true'; then
4723 :
4724else
4725 OPT="-DNDEBUG $OPT"
4726fi
4727
Guido van Rossum563e7081996-09-10 18:20:48 +00004728if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004729then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004730 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004731fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004732
Neal Norwitz020c46a2006-01-07 21:39:28 +00004733# disable check for icc since it seems to pass, but generates a warning
4734if test "$CC" = icc
4735then
4736 ac_cv_opt_olimit_ok=no
4737fi
4738
Martin v. Löwiseba40652007-08-30 20:10:57 +00004739{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4740echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004741if test "${ac_cv_opt_olimit_ok+set}" = set; then
4742 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004743else
4744 ac_save_cc="$CC"
4745CC="$CC -OPT:Olimit=0"
4746if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004747 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004748else
Martin v. Löwis11437992002-04-12 09:54:03 +00004749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004750/* confdefs.h. */
4751_ACEOF
4752cat confdefs.h >>conftest.$ac_ext
4753cat >>conftest.$ac_ext <<_ACEOF
4754/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004755int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004756_ACEOF
4757rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004758if { (ac_try="$ac_link"
4759case "(($ac_try" in
4760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4761 *) ac_try_echo=$ac_try;;
4762esac
4763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4764 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 ac_status=$?
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004768 { (case "(($ac_try" in
4769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4770 *) ac_try_echo=$ac_try;;
4771esac
4772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4773 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 ac_status=$?
4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004777 ac_cv_opt_olimit_ok=yes
4778else
Martin v. Löwis11437992002-04-12 09:54:03 +00004779 echo "$as_me: program exited with status $ac_status" >&5
4780echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004781sed 's/^/| /' conftest.$ac_ext >&5
4782
Martin v. Löwis11437992002-04-12 09:54:03 +00004783( exit $ac_status )
4784ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004786rm -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 +00004787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004788
4789
Guido van Rossum91922671997-10-09 20:24:13 +00004790CC="$ac_save_cc"
4791fi
4792
Martin v. Löwiseba40652007-08-30 20:10:57 +00004793{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4794echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004795if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004796 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004797 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4798 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4799 # environment?
4800 Darwin*)
4801 ;;
4802 *)
4803 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4804 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004805 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004806else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004807 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4808echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004809 if test "${ac_cv_olimit_ok+set}" = set; then
4810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004811else
4812 ac_save_cc="$CC"
4813 CC="$CC -Olimit 1500"
4814 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004815 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004816else
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004818/* confdefs.h. */
4819_ACEOF
4820cat confdefs.h >>conftest.$ac_ext
4821cat >>conftest.$ac_ext <<_ACEOF
4822/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004823int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004824_ACEOF
4825rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826if { (ac_try="$ac_link"
4827case "(($ac_try" in
4828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4829 *) ac_try_echo=$ac_try;;
4830esac
4831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4832 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004836 { (case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
4840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4841 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004845 ac_cv_olimit_ok=yes
4846else
Martin v. Löwis11437992002-04-12 09:54:03 +00004847 echo "$as_me: program exited with status $ac_status" >&5
4848echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004849sed 's/^/| /' conftest.$ac_ext >&5
4850
Martin v. Löwis11437992002-04-12 09:54:03 +00004851( exit $ac_status )
4852ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004854rm -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 +00004855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004856
4857
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004858 CC="$ac_save_cc"
4859fi
4860
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4862echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004863 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004864 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004865 fi
4866fi
4867
Martin v. Löwisaac13162006-10-19 10:58:46 +00004868# Check whether GCC supports PyArg_ParseTuple format
4869if test "$GCC" = "yes"
4870then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4872echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004873 save_CFLAGS=$CFLAGS
4874 CFLAGS="$CFLAGS -Werror"
4875 cat >conftest.$ac_ext <<_ACEOF
4876/* confdefs.h. */
4877_ACEOF
4878cat confdefs.h >>conftest.$ac_ext
4879cat >>conftest.$ac_ext <<_ACEOF
4880/* end confdefs.h. */
4881
4882 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4883
4884int
4885main ()
4886{
4887
4888 ;
4889 return 0;
4890}
4891_ACEOF
4892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893if { (ac_try="$ac_compile"
4894case "(($ac_try" in
4895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4896 *) ac_try_echo=$ac_try;;
4897esac
4898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004900 ac_status=$?
4901 grep -v '^ *+' conftest.er1 >conftest.err
4902 rm -f conftest.er1
4903 cat conftest.err >&5
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905 (exit $ac_status); } && {
4906 test -z "$ac_c_werror_flag" ||
4907 test ! -s conftest.err
4908 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004909
4910cat >>confdefs.h <<\_ACEOF
4911#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4912_ACEOF
4913
Martin v. Löwiseba40652007-08-30 20:10:57 +00004914 { echo "$as_me:$LINENO: result: yes" >&5
4915echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004916else
4917 echo "$as_me: failed program was:" >&5
4918sed 's/^/| /' conftest.$ac_ext >&5
4919
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920 { echo "$as_me:$LINENO: result: no" >&5
4921echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004922
4923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004924
4925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004926 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004927fi
4928
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004929# On some compilers, pthreads are available without further options
4930# (e.g. MacOS X). On some of these systems, the compiler will not
4931# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4932# So we have to see first whether pthreads are available without
4933# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004934{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4935echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004936if test "${ac_cv_pthread_is_default+set}" = set; then
4937 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004938else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004939 if test "$cross_compiling" = yes; then
4940 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004941else
Martin v. Löwis11437992002-04-12 09:54:03 +00004942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004943/* confdefs.h. */
4944_ACEOF
4945cat confdefs.h >>conftest.$ac_ext
4946cat >>conftest.$ac_ext <<_ACEOF
4947/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004948
Martin v. Löwis130fb172001-07-19 11:00:41 +00004949#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004950
4951void* routine(void* p){return NULL;}
4952
4953int main(){
4954 pthread_t p;
4955 if(pthread_create(&p,NULL,routine,NULL)!=0)
4956 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004957 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004958 return 0;
4959}
4960
Martin v. Löwis11437992002-04-12 09:54:03 +00004961_ACEOF
4962rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963if { (ac_try="$ac_link"
4964case "(($ac_try" in
4965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4966 *) ac_try_echo=$ac_try;;
4967esac
4968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004970 ac_status=$?
4971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973 { (case "(($ac_try" in
4974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4975 *) ac_try_echo=$ac_try;;
4976esac
4977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004979 ac_status=$?
4980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004982
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004983 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004984 ac_cv_kthread=no
4985 ac_cv_pthread=no
4986
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004987else
Martin v. Löwis11437992002-04-12 09:54:03 +00004988 echo "$as_me: program exited with status $ac_status" >&5
4989echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004990sed 's/^/| /' conftest.$ac_ext >&5
4991
Martin v. Löwis11437992002-04-12 09:54:03 +00004992( exit $ac_status )
4993ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004995rm -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 +00004996fi
4997
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998
4999
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005000fi
5001
Martin v. Löwiseba40652007-08-30 20:10:57 +00005002{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5003echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005004
Michael W. Hudson54241132001-12-07 15:38:26 +00005005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005007then
5008 ac_cv_kpthread=no
5009else
5010# -Kpthread, if available, provides the right #defines
5011# and linker options to make pthread_create available
5012# Some compilers won't report that they do not support -Kpthread,
5013# so we need to run a program to see whether it really made the
5014# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5016echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005017if test "${ac_cv_kpthread+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005019else
5020 ac_save_cc="$CC"
5021CC="$CC -Kpthread"
5022if test "$cross_compiling" = yes; then
5023 ac_cv_kpthread=no
5024else
Martin v. Löwis11437992002-04-12 09:54:03 +00005025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005026/* confdefs.h. */
5027_ACEOF
5028cat confdefs.h >>conftest.$ac_ext
5029cat >>conftest.$ac_ext <<_ACEOF
5030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005031
5032#include <pthread.h>
5033
5034void* routine(void* p){return NULL;}
5035
5036int main(){
5037 pthread_t p;
5038 if(pthread_create(&p,NULL,routine,NULL)!=0)
5039 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005040 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005041 return 0;
5042}
5043
Martin v. Löwis11437992002-04-12 09:54:03 +00005044_ACEOF
5045rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046if { (ac_try="$ac_link"
5047case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
5051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5052 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005053 ac_status=$?
5054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005056 { (case "(($ac_try" in
5057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058 *) ac_try_echo=$ac_try;;
5059esac
5060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5061 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005065 ac_cv_kpthread=yes
5066else
Martin v. Löwis11437992002-04-12 09:54:03 +00005067 echo "$as_me: program exited with status $ac_status" >&5
5068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
Martin v. Löwis11437992002-04-12 09:54:03 +00005071( exit $ac_status )
5072ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005074rm -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 +00005075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005076
5077
Martin v. Löwis130fb172001-07-19 11:00:41 +00005078CC="$ac_save_cc"
5079fi
5080
Martin v. Löwiseba40652007-08-30 20:10:57 +00005081{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5082echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005083fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005084
Skip Montanarod8d39a02003-07-10 20:44:10 +00005085if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005086then
5087# -Kthread, if available, provides the right #defines
5088# and linker options to make pthread_create available
5089# Some compilers won't report that they do not support -Kthread,
5090# so we need to run a program to see whether it really made the
5091# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005092{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5093echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005094if test "${ac_cv_kthread+set}" = set; then
5095 echo $ECHO_N "(cached) $ECHO_C" >&6
5096else
5097 ac_save_cc="$CC"
5098CC="$CC -Kthread"
5099if test "$cross_compiling" = yes; then
5100 ac_cv_kthread=no
5101else
5102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005103/* confdefs.h. */
5104_ACEOF
5105cat confdefs.h >>conftest.$ac_ext
5106cat >>conftest.$ac_ext <<_ACEOF
5107/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005108
5109#include <pthread.h>
5110
5111void* routine(void* p){return NULL;}
5112
5113int main(){
5114 pthread_t p;
5115 if(pthread_create(&p,NULL,routine,NULL)!=0)
5116 return 1;
5117 (void)pthread_detach(p);
5118 return 0;
5119}
5120
5121_ACEOF
5122rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005123if { (ac_try="$ac_link"
5124case "(($ac_try" in
5125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126 *) ac_try_echo=$ac_try;;
5127esac
5128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5129 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005133 { (case "(($ac_try" in
5134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5135 *) ac_try_echo=$ac_try;;
5136esac
5137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5138 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); }; }; then
5142 ac_cv_kthread=yes
5143else
5144 echo "$as_me: program exited with status $ac_status" >&5
5145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005146sed 's/^/| /' conftest.$ac_ext >&5
5147
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005148( exit $ac_status )
5149ac_cv_kthread=no
5150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005151rm -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 +00005152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005153
5154
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005155CC="$ac_save_cc"
5156fi
5157
Martin v. Löwiseba40652007-08-30 20:10:57 +00005158{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5159echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005160fi
5161
Skip Montanarod8d39a02003-07-10 20:44:10 +00005162if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005163then
5164# -pthread, if available, provides the right #defines
5165# and linker options to make pthread_create available
5166# Some compilers won't report that they do not support -pthread,
5167# so we need to run a program to see whether it really made the
5168# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005169{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5170echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005171if test "${ac_cv_thread+set}" = set; then
5172 echo $ECHO_N "(cached) $ECHO_C" >&6
5173else
5174 ac_save_cc="$CC"
5175CC="$CC -pthread"
5176if test "$cross_compiling" = yes; then
5177 ac_cv_pthread=no
5178else
5179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005180/* confdefs.h. */
5181_ACEOF
5182cat confdefs.h >>conftest.$ac_ext
5183cat >>conftest.$ac_ext <<_ACEOF
5184/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005185
5186#include <pthread.h>
5187
5188void* routine(void* p){return NULL;}
5189
5190int main(){
5191 pthread_t p;
5192 if(pthread_create(&p,NULL,routine,NULL)!=0)
5193 return 1;
5194 (void)pthread_detach(p);
5195 return 0;
5196}
5197
5198_ACEOF
5199rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005200if { (ac_try="$ac_link"
5201case "(($ac_try" in
5202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5203 *) ac_try_echo=$ac_try;;
5204esac
5205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5206 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005207 ac_status=$?
5208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005210 { (case "(($ac_try" in
5211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5212 *) ac_try_echo=$ac_try;;
5213esac
5214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5215 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005216 ac_status=$?
5217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218 (exit $ac_status); }; }; then
5219 ac_cv_pthread=yes
5220else
5221 echo "$as_me: program exited with status $ac_status" >&5
5222echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005223sed 's/^/| /' conftest.$ac_ext >&5
5224
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005225( exit $ac_status )
5226ac_cv_pthread=no
5227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005228rm -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 +00005229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005230
5231
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005232CC="$ac_save_cc"
5233fi
5234
Martin v. Löwiseba40652007-08-30 20:10:57 +00005235{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5236echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005237fi
5238
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005239# If we have set a CC compiler flag for thread support then
5240# check if it works for CXX, too.
5241ac_cv_cxx_thread=no
5242if test ! -z "$CXX"
5243then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005244{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5245echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005246ac_save_cxx="$CXX"
5247
5248if test "$ac_cv_kpthread" = "yes"
5249then
5250 CXX="$CXX -Kpthread"
5251 ac_cv_cxx_thread=yes
5252elif test "$ac_cv_kthread" = "yes"
5253then
5254 CXX="$CXX -Kthread"
5255 ac_cv_cxx_thread=yes
5256elif test "$ac_cv_pthread" = "yes"
5257then
5258 CXX="$CXX -pthread"
5259 ac_cv_cxx_thread=yes
5260fi
5261
5262if test $ac_cv_cxx_thread = yes
5263then
5264 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5265 $CXX -c conftest.$ac_ext 2>&5
5266 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5267 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5268 then
5269 ac_cv_cxx_thread=yes
5270 else
5271 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005272 fi
5273 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005275{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5276echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005277fi
5278CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005279
Michael W. Hudson54241132001-12-07 15:38:26 +00005280
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005281# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005282{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5283echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005284if test "${ac_cv_header_stdc+set}" = set; then
5285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005286else
Martin v. Löwis11437992002-04-12 09:54:03 +00005287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005288/* confdefs.h. */
5289_ACEOF
5290cat confdefs.h >>conftest.$ac_ext
5291cat >>conftest.$ac_ext <<_ACEOF
5292/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005293#include <stdlib.h>
5294#include <stdarg.h>
5295#include <string.h>
5296#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005297
Skip Montanaro6dead952003-09-25 14:50:04 +00005298int
5299main ()
5300{
5301
5302 ;
5303 return 0;
5304}
Martin v. Löwis11437992002-04-12 09:54:03 +00005305_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005306rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005307if { (ac_try="$ac_compile"
5308case "(($ac_try" in
5309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5310 *) ac_try_echo=$ac_try;;
5311esac
5312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5313 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005315 grep -v '^ *+' conftest.er1 >conftest.err
5316 rm -f conftest.er1
5317 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005319 (exit $ac_status); } && {
5320 test -z "$ac_c_werror_flag" ||
5321 test ! -s conftest.err
5322 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323 ac_cv_header_stdc=yes
5324else
Martin v. Löwis11437992002-04-12 09:54:03 +00005325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005326sed 's/^/| /' conftest.$ac_ext >&5
5327
Martin v. Löwiseba40652007-08-30 20:10:57 +00005328 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005330
5331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005332
5333if test $ac_cv_header_stdc = yes; then
5334 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005336/* confdefs.h. */
5337_ACEOF
5338cat confdefs.h >>conftest.$ac_ext
5339cat >>conftest.$ac_ext <<_ACEOF
5340/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005341#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005342
5343_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005345 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346 :
5347else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005348 ac_cv_header_stdc=no
5349fi
5350rm -f conftest*
5351
5352fi
5353
5354if test $ac_cv_header_stdc = yes; then
5355 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005357/* confdefs.h. */
5358_ACEOF
5359cat confdefs.h >>conftest.$ac_ext
5360cat >>conftest.$ac_ext <<_ACEOF
5361/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005363
5364_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005366 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005367 :
5368else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369 ac_cv_header_stdc=no
5370fi
5371rm -f conftest*
5372
5373fi
5374
5375if test $ac_cv_header_stdc = yes; then
5376 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005377 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005378 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005379else
Martin v. Löwis11437992002-04-12 09:54:03 +00005380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005381/* confdefs.h. */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005386#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005387#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005388#if ((' ' & 0x0FF) == 0x020)
5389# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5390# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5391#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005392# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005393 (('a' <= (c) && (c) <= 'i') \
5394 || ('j' <= (c) && (c) <= 'r') \
5395 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005396# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5397#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005398
Martin v. Löwis11437992002-04-12 09:54:03 +00005399#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5400int
5401main ()
5402{
5403 int i;
5404 for (i = 0; i < 256; i++)
5405 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005406 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005407 return 2;
5408 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005409}
5410_ACEOF
5411rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005412if { (ac_try="$ac_link"
5413case "(($ac_try" in
5414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5415 *) ac_try_echo=$ac_try;;
5416esac
5417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5418 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005419 ac_status=$?
5420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005422 { (case "(($ac_try" in
5423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5424 *) ac_try_echo=$ac_try;;
5425esac
5426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5427 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005431 :
5432else
Martin v. Löwis11437992002-04-12 09:54:03 +00005433 echo "$as_me: program exited with status $ac_status" >&5
5434echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005435sed 's/^/| /' conftest.$ac_ext >&5
5436
Martin v. Löwis11437992002-04-12 09:54:03 +00005437( exit $ac_status )
5438ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5441fi
5442
5443
Michael W. Hudson54241132001-12-07 15:38:26 +00005444fi
5445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005446{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5447echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005448if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005449
5450cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005451#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005452_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005453
5454fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005455
Skip Montanarob9820a32004-01-17 00:16:12 +00005456# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005467 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005468do
5469as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005470{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5472if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005473 echo $ECHO_N "(cached) $ECHO_C" >&6
5474else
5475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005476/* confdefs.h. */
5477_ACEOF
5478cat confdefs.h >>conftest.$ac_ext
5479cat >>conftest.$ac_ext <<_ACEOF
5480/* end confdefs.h. */
5481$ac_includes_default
5482
5483#include <$ac_header>
5484_ACEOF
5485rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005486if { (ac_try="$ac_compile"
5487case "(($ac_try" in
5488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5489 *) ac_try_echo=$ac_try;;
5490esac
5491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5492 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005494 grep -v '^ *+' conftest.er1 >conftest.err
5495 rm -f conftest.er1
5496 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005498 (exit $ac_status); } && {
5499 test -z "$ac_c_werror_flag" ||
5500 test ! -s conftest.err
5501 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005502 eval "$as_ac_Header=yes"
5503else
5504 echo "$as_me: failed program was:" >&5
5505sed 's/^/| /' conftest.$ac_ext >&5
5506
Martin v. Löwiseba40652007-08-30 20:10:57 +00005507 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005509
5510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005512ac_res=`eval echo '${'$as_ac_Header'}'`
5513 { echo "$as_me:$LINENO: result: $ac_res" >&5
5514echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005515if test `eval echo '${'$as_ac_Header'}'` = yes; then
5516 cat >>confdefs.h <<_ACEOF
5517#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5518_ACEOF
5519
5520fi
5521
5522done
5523
5524
Martin v. Löwis11437992002-04-12 09:54:03 +00005525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
Anthony Baxter8a560de2004-10-13 15:30:56 +00005561
Martin v. Löwisc3001752005-01-23 09:27:24 +00005562
Martin v. Löwis11017b12006-01-14 18:12:57 +00005563
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005564
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005565
5566
5567
5568
5569
5570
5571
5572
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005573
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005574
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005575
5576
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005577
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005578
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005579for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5580fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005581ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005582shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005583unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005584sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5585sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005586sys/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 +00005587sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005588sys/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 +00005589sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005590bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005591do
Martin v. Löwis11437992002-04-12 09:54:03 +00005592as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005593if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5594 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005597 echo $ECHO_N "(cached) $ECHO_C" >&6
5598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005599ac_res=`eval echo '${'$as_ac_Header'}'`
5600 { echo "$as_me:$LINENO: result: $ac_res" >&5
5601echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005602else
Martin v. Löwis11437992002-04-12 09:54:03 +00005603 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005604{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5605echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005607/* confdefs.h. */
5608_ACEOF
5609cat confdefs.h >>conftest.$ac_ext
5610cat >>conftest.$ac_ext <<_ACEOF
5611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005612$ac_includes_default
5613#include <$ac_header>
5614_ACEOF
5615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005616if { (ac_try="$ac_compile"
5617case "(($ac_try" in
5618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5619 *) ac_try_echo=$ac_try;;
5620esac
5621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005624 grep -v '^ *+' conftest.er1 >conftest.err
5625 rm -f conftest.er1
5626 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005628 (exit $ac_status); } && {
5629 test -z "$ac_c_werror_flag" ||
5630 test ! -s conftest.err
5631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005632 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005633else
Martin v. Löwis11437992002-04-12 09:54:03 +00005634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005635sed 's/^/| /' conftest.$ac_ext >&5
5636
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005639
5640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5641{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5642echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005643
5644# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5646echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005648/* confdefs.h. */
5649_ACEOF
5650cat confdefs.h >>conftest.$ac_ext
5651cat >>conftest.$ac_ext <<_ACEOF
5652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005653#include <$ac_header>
5654_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005655if { (ac_try="$ac_cpp conftest.$ac_ext"
5656case "(($ac_try" in
5657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5658 *) ac_try_echo=$ac_try;;
5659esac
5660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5661 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005663 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 rm -f conftest.er1
5665 cat conftest.err >&5
5666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005667 (exit $ac_status); } >/dev/null && {
5668 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5669 test ! -s conftest.err
5670 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005671 ac_header_preproc=yes
5672else
5673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005674sed 's/^/| /' conftest.$ac_ext >&5
5675
Martin v. Löwis11437992002-04-12 09:54:03 +00005676 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005680{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5681echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005682
5683# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005684case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5685 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005686 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5687echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005688 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5689echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5690 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005691 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005692 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005693 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5694echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005695 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5696echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5698echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5699 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5700echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5702echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5704echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005706## ------------------------------------------------ ##
5707## Report this to http://www.python.org/python-bugs ##
5708## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005709_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005710 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005711 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005712esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005713{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5714echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5715if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005717else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005718 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005720ac_res=`eval echo '${'$as_ac_Header'}'`
5721 { echo "$as_me:$LINENO: result: $ac_res" >&5
5722echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005723
5724fi
5725if test `eval echo '${'$as_ac_Header'}'` = yes; then
5726 cat >>confdefs.h <<_ACEOF
5727#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5728_ACEOF
5729
5730fi
5731
Guido van Rossum627b2d71993-12-24 10:39:16 +00005732done
5733
Martin v. Löwis11437992002-04-12 09:54:03 +00005734
5735
5736
5737
5738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005739ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005740for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5741 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005742{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5743echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5744if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005746else
Martin v. Löwis11437992002-04-12 09:54:03 +00005747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005748/* confdefs.h. */
5749_ACEOF
5750cat confdefs.h >>conftest.$ac_ext
5751cat >>conftest.$ac_ext <<_ACEOF
5752/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753#include <sys/types.h>
5754#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005755
Martin v. Löwis11437992002-04-12 09:54:03 +00005756int
5757main ()
5758{
5759if ((DIR *) 0)
5760return 0;
5761 ;
5762 return 0;
5763}
5764_ACEOF
5765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766if { (ac_try="$ac_compile"
5767case "(($ac_try" in
5768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5769 *) ac_try_echo=$ac_try;;
5770esac
5771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005774 grep -v '^ *+' conftest.er1 >conftest.err
5775 rm -f conftest.er1
5776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005778 (exit $ac_status); } && {
5779 test -z "$ac_c_werror_flag" ||
5780 test ! -s conftest.err
5781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005783else
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005785sed 's/^/| /' conftest.$ac_ext >&5
5786
Martin v. Löwiseba40652007-08-30 20:10:57 +00005787 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005789
5790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792ac_res=`eval echo '${'$as_ac_Header'}'`
5793 { echo "$as_me:$LINENO: result: $ac_res" >&5
5794echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005795if test `eval echo '${'$as_ac_Header'}'` = yes; then
5796 cat >>confdefs.h <<_ACEOF
5797#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5798_ACEOF
5799
5800ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803done
5804# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5805if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005806 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5807echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808if test "${ac_cv_search_opendir+set}" = set; then
5809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810else
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005812cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005813/* confdefs.h. */
5814_ACEOF
5815cat confdefs.h >>conftest.$ac_ext
5816cat >>conftest.$ac_ext <<_ACEOF
5817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005818
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819/* Override any GCC internal prototype to avoid an error.
5820 Use char because int might match the return type of a GCC
5821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005822#ifdef __cplusplus
5823extern "C"
5824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005825char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005826int
5827main ()
5828{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005829return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005830 ;
5831 return 0;
5832}
5833_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005834for ac_lib in '' dir; do
5835 if test -z "$ac_lib"; then
5836 ac_res="none required"
5837 else
5838 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005839 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005840 fi
5841 rm -f conftest.$ac_objext conftest$ac_exeext
5842if { (ac_try="$ac_link"
5843case "(($ac_try" in
5844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5845 *) ac_try_echo=$ac_try;;
5846esac
5847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5848 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005849 ac_status=$?
5850 grep -v '^ *+' conftest.er1 >conftest.err
5851 rm -f conftest.er1
5852 cat conftest.err >&5
5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854 (exit $ac_status); } && {
5855 test -z "$ac_c_werror_flag" ||
5856 test ! -s conftest.err
5857 } && test -s conftest$ac_exeext &&
5858 $as_test_x conftest$ac_exeext; then
5859 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005860else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005861 echo "$as_me: failed program was:" >&5
5862sed 's/^/| /' conftest.$ac_ext >&5
5863
Martin v. Löwiseba40652007-08-30 20:10:57 +00005864
Brett Cannon19fab762007-06-02 03:02:29 +00005865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005866
5867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5868 conftest$ac_exeext
5869 if test "${ac_cv_search_opendir+set}" = set; then
5870 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872done
5873if test "${ac_cv_search_opendir+set}" = set; then
5874 :
5875else
5876 ac_cv_search_opendir=no
5877fi
5878rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005879LIBS=$ac_func_search_save_LIBS
5880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5882echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5883ac_res=$ac_cv_search_opendir
5884if test "$ac_res" != no; then
5885 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005888
Michael W. Hudson54241132001-12-07 15:38:26 +00005889else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005890 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5891echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005892if test "${ac_cv_search_opendir+set}" = set; then
5893 echo $ECHO_N "(cached) $ECHO_C" >&6
5894else
5895 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005897/* confdefs.h. */
5898_ACEOF
5899cat confdefs.h >>conftest.$ac_ext
5900cat >>conftest.$ac_ext <<_ACEOF
5901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005902
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903/* Override any GCC internal prototype to avoid an error.
5904 Use char because int might match the return type of a GCC
5905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005906#ifdef __cplusplus
5907extern "C"
5908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005909char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005910int
5911main ()
5912{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005914 ;
5915 return 0;
5916}
5917_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005918for ac_lib in '' x; do
5919 if test -z "$ac_lib"; then
5920 ac_res="none required"
5921 else
5922 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005923 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924 fi
5925 rm -f conftest.$ac_objext conftest$ac_exeext
5926if { (ac_try="$ac_link"
5927case "(($ac_try" in
5928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5929 *) ac_try_echo=$ac_try;;
5930esac
5931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5932 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005933 ac_status=$?
5934 grep -v '^ *+' conftest.er1 >conftest.err
5935 rm -f conftest.er1
5936 cat conftest.err >&5
5937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005938 (exit $ac_status); } && {
5939 test -z "$ac_c_werror_flag" ||
5940 test ! -s conftest.err
5941 } && test -s conftest$ac_exeext &&
5942 $as_test_x conftest$ac_exeext; then
5943 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005944else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005945 echo "$as_me: failed program was:" >&5
5946sed 's/^/| /' conftest.$ac_ext >&5
5947
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948
Brett Cannon19fab762007-06-02 03:02:29 +00005949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005950
5951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5952 conftest$ac_exeext
5953 if test "${ac_cv_search_opendir+set}" = set; then
5954 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005956done
5957if test "${ac_cv_search_opendir+set}" = set; then
5958 :
5959else
5960 ac_cv_search_opendir=no
5961fi
5962rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005963LIBS=$ac_func_search_save_LIBS
5964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005965{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5966echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5967ac_res=$ac_cv_search_opendir
5968if test "$ac_res" != no; then
5969 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005970
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971fi
5972
5973fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005974
Martin v. Löwiseba40652007-08-30 20:10:57 +00005975{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5976echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5978 echo $ECHO_N "(cached) $ECHO_C" >&6
5979else
5980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005981/* confdefs.h. */
5982_ACEOF
5983cat confdefs.h >>conftest.$ac_ext
5984cat >>conftest.$ac_ext <<_ACEOF
5985/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005986#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005987int
5988main ()
5989{
5990return makedev(0, 0);
5991 ;
5992 return 0;
5993}
5994_ACEOF
5995rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005996if { (ac_try="$ac_link"
5997case "(($ac_try" in
5998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5999 *) ac_try_echo=$ac_try;;
6000esac
6001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006004 grep -v '^ *+' conftest.er1 >conftest.err
6005 rm -f conftest.er1
6006 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008 (exit $ac_status); } && {
6009 test -z "$ac_c_werror_flag" ||
6010 test ! -s conftest.err
6011 } && test -s conftest$ac_exeext &&
6012 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013 ac_cv_header_sys_types_h_makedev=yes
6014else
6015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006016sed 's/^/| /' conftest.$ac_ext >&5
6017
Martin v. Löwiseba40652007-08-30 20:10:57 +00006018 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006020
6021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023
6024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6026echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027
6028if test $ac_cv_header_sys_types_h_makedev = no; then
6029if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006030 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6031echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6033 echo $ECHO_N "(cached) $ECHO_C" >&6
6034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006035{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6036echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037else
6038 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006039{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6040echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047$ac_includes_default
6048#include <sys/mkdev.h>
6049_ACEOF
6050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006051if { (ac_try="$ac_compile"
6052case "(($ac_try" in
6053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6054 *) ac_try_echo=$ac_try;;
6055esac
6056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006059 grep -v '^ *+' conftest.er1 >conftest.err
6060 rm -f conftest.er1
6061 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063 (exit $ac_status); } && {
6064 test -z "$ac_c_werror_flag" ||
6065 test ! -s conftest.err
6066 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067 ac_header_compiler=yes
6068else
6069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006070sed 's/^/| /' conftest.$ac_ext >&5
6071
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074
6075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6077echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078
6079# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6081echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006083/* confdefs.h. */
6084_ACEOF
6085cat confdefs.h >>conftest.$ac_ext
6086cat >>conftest.$ac_ext <<_ACEOF
6087/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088#include <sys/mkdev.h>
6089_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006090if { (ac_try="$ac_cpp conftest.$ac_ext"
6091case "(($ac_try" in
6092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6093 *) ac_try_echo=$ac_try;;
6094esac
6095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006098 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099 rm -f conftest.er1
6100 cat conftest.err >&5
6101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006102 (exit $ac_status); } >/dev/null && {
6103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6104 test ! -s conftest.err
6105 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106 ac_header_preproc=yes
6107else
6108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006109sed 's/^/| /' conftest.$ac_ext >&5
6110
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111 ac_header_preproc=no
6112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6116echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117
6118# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6120 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6125 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006126 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006127 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6132 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6133echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6134 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6135echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006136 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6137echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006141## ------------------------------------------------ ##
6142## Report this to http://www.python.org/python-bugs ##
6143## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006144_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006145 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006146 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006148{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6149echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6151 echo $ECHO_N "(cached) $ECHO_C" >&6
6152else
6153 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006155{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6156echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157
6158fi
6159if test $ac_cv_header_sys_mkdev_h = yes; then
6160
6161cat >>confdefs.h <<\_ACEOF
6162#define MAJOR_IN_MKDEV 1
6163_ACEOF
6164
6165fi
6166
6167
6168
6169 if test $ac_cv_header_sys_mkdev_h = no; then
6170 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006171 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6172echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6174 echo $ECHO_N "(cached) $ECHO_C" >&6
6175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006176{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6177echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178else
6179 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6181echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006183/* confdefs.h. */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188$ac_includes_default
6189#include <sys/sysmacros.h>
6190_ACEOF
6191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192if { (ac_try="$ac_compile"
6193case "(($ac_try" in
6194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6195 *) ac_try_echo=$ac_try;;
6196esac
6197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006200 grep -v '^ *+' conftest.er1 >conftest.err
6201 rm -f conftest.er1
6202 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204 (exit $ac_status); } && {
6205 test -z "$ac_c_werror_flag" ||
6206 test ! -s conftest.err
6207 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208 ac_header_compiler=yes
6209else
6210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006211sed 's/^/| /' conftest.$ac_ext >&5
6212
Martin v. Löwiseba40652007-08-30 20:10:57 +00006213 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215
6216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6217{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6218echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219
6220# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6222echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006224/* confdefs.h. */
6225_ACEOF
6226cat confdefs.h >>conftest.$ac_ext
6227cat >>conftest.$ac_ext <<_ACEOF
6228/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229#include <sys/sysmacros.h>
6230_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006231if { (ac_try="$ac_cpp conftest.$ac_ext"
6232case "(($ac_try" in
6233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6234 *) ac_try_echo=$ac_try;;
6235esac
6236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6237 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006239 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240 rm -f conftest.er1
6241 cat conftest.err >&5
6242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006243 (exit $ac_status); } >/dev/null && {
6244 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6245 test ! -s conftest.err
6246 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247 ac_header_preproc=yes
6248else
6249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006250sed 's/^/| /' conftest.$ac_ext >&5
6251
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252 ac_header_preproc=no
6253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6257echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258
6259# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6261 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6263echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006264 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6265echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6266 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006267 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6273 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6274echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6275 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6276echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006277 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6278echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006282## ------------------------------------------------ ##
6283## Report this to http://www.python.org/python-bugs ##
6284## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006285_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006286 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006287 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6290echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6292 echo $ECHO_N "(cached) $ECHO_C" >&6
6293else
6294 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006296{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6297echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298
6299fi
6300if test $ac_cv_header_sys_sysmacros_h = yes; then
6301
6302cat >>confdefs.h <<\_ACEOF
6303#define MAJOR_IN_SYSMACROS 1
6304_ACEOF
6305
6306fi
6307
6308
6309 fi
6310fi
6311
Michael W. Hudson54241132001-12-07 15:38:26 +00006312
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006313# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006314
6315for ac_header in term.h
6316do
6317as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6319echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6320if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321 echo $ECHO_N "(cached) $ECHO_C" >&6
6322else
6323 cat >conftest.$ac_ext <<_ACEOF
6324/* confdefs.h. */
6325_ACEOF
6326cat confdefs.h >>conftest.$ac_ext
6327cat >>conftest.$ac_ext <<_ACEOF
6328/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006329
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006330#ifdef HAVE_CURSES_H
6331#include <curses.h>
6332#endif
6333
6334
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006335#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336_ACEOF
6337rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006338if { (ac_try="$ac_compile"
6339case "(($ac_try" in
6340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6341 *) ac_try_echo=$ac_try;;
6342esac
6343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345 ac_status=$?
6346 grep -v '^ *+' conftest.er1 >conftest.err
6347 rm -f conftest.er1
6348 cat conftest.err >&5
6349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006350 (exit $ac_status); } && {
6351 test -z "$ac_c_werror_flag" ||
6352 test ! -s conftest.err
6353 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006354 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355else
6356 echo "$as_me: failed program was:" >&5
6357sed 's/^/| /' conftest.$ac_ext >&5
6358
Martin v. Löwiseba40652007-08-30 20:10:57 +00006359 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006361
6362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006364ac_res=`eval echo '${'$as_ac_Header'}'`
6365 { echo "$as_me:$LINENO: result: $ac_res" >&5
6366echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006367if test `eval echo '${'$as_ac_Header'}'` = yes; then
6368 cat >>confdefs.h <<_ACEOF
6369#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6370_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006371
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006372fi
6373
6374done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006375
6376
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377# On Linux, netlink.h requires asm/types.h
6378
6379for ac_header in linux/netlink.h
6380do
6381as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006382{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6383echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6384if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385 echo $ECHO_N "(cached) $ECHO_C" >&6
6386else
6387 cat >conftest.$ac_ext <<_ACEOF
6388/* confdefs.h. */
6389_ACEOF
6390cat confdefs.h >>conftest.$ac_ext
6391cat >>conftest.$ac_ext <<_ACEOF
6392/* end confdefs.h. */
6393
6394#ifdef HAVE_ASM_TYPES_H
6395#include <asm/types.h>
6396#endif
6397#ifdef HAVE_SYS_SOCKET_H
6398#include <sys/socket.h>
6399#endif
6400
6401
6402#include <$ac_header>
6403_ACEOF
6404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405if { (ac_try="$ac_compile"
6406case "(($ac_try" in
6407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6408 *) ac_try_echo=$ac_try;;
6409esac
6410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006412 ac_status=$?
6413 grep -v '^ *+' conftest.er1 >conftest.err
6414 rm -f conftest.er1
6415 cat conftest.err >&5
6416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006417 (exit $ac_status); } && {
6418 test -z "$ac_c_werror_flag" ||
6419 test ! -s conftest.err
6420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421 eval "$as_ac_Header=yes"
6422else
6423 echo "$as_me: failed program was:" >&5
6424sed 's/^/| /' conftest.$ac_ext >&5
6425
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006428
6429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006431ac_res=`eval echo '${'$as_ac_Header'}'`
6432 { echo "$as_me:$LINENO: result: $ac_res" >&5
6433echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434if test `eval echo '${'$as_ac_Header'}'` = yes; then
6435 cat >>confdefs.h <<_ACEOF
6436#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6437_ACEOF
6438
6439fi
6440
6441done
6442
6443
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006445was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006446{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6447echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006455
6456_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006458 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006459 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460else
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462
6463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006465_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006466
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006467
Guido van Rossum627b2d71993-12-24 10:39:16 +00006468fi
6469rm -f conftest*
6470
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6472echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006473
Neal Norwitz11690112002-07-30 01:08:28 +00006474# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006475{ echo "$as_me:$LINENO: checking for makedev" >&5
6476echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006478/* confdefs.h. */
6479_ACEOF
6480cat confdefs.h >>conftest.$ac_ext
6481cat >>conftest.$ac_ext <<_ACEOF
6482/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006483#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006484int
6485main ()
6486{
6487 makedev(0, 0)
6488 ;
6489 return 0;
6490}
6491_ACEOF
6492rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493if { (ac_try="$ac_link"
6494case "(($ac_try" in
6495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6496 *) ac_try_echo=$ac_try;;
6497esac
6498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6499 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006501 grep -v '^ *+' conftest.er1 >conftest.err
6502 rm -f conftest.er1
6503 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006505 (exit $ac_status); } && {
6506 test -z "$ac_c_werror_flag" ||
6507 test ! -s conftest.err
6508 } && test -s conftest$ac_exeext &&
6509 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006510 ac_cv_has_makedev=yes
6511else
6512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006513sed 's/^/| /' conftest.$ac_ext >&5
6514
Martin v. Löwiseba40652007-08-30 20:10:57 +00006515 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006517
6518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006519 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006520if test "$ac_cv_has_makedev" = "no"; then
6521 # we didn't link, try if _OSF_SOURCE will allow us to link
6522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006523/* confdefs.h. */
6524_ACEOF
6525cat confdefs.h >>conftest.$ac_ext
6526cat >>conftest.$ac_ext <<_ACEOF
6527/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006528
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006529#define _OSF_SOURCE 1
6530#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006531
Neal Norwitz11690112002-07-30 01:08:28 +00006532int
6533main ()
6534{
6535 makedev(0, 0)
6536 ;
6537 return 0;
6538}
6539_ACEOF
6540rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006541if { (ac_try="$ac_link"
6542case "(($ac_try" in
6543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6544 *) ac_try_echo=$ac_try;;
6545esac
6546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6547 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006549 grep -v '^ *+' conftest.er1 >conftest.err
6550 rm -f conftest.er1
6551 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006553 (exit $ac_status); } && {
6554 test -z "$ac_c_werror_flag" ||
6555 test ! -s conftest.err
6556 } && test -s conftest$ac_exeext &&
6557 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006558 ac_cv_has_makedev=yes
6559else
6560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006561sed 's/^/| /' conftest.$ac_ext >&5
6562
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006565
6566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006567 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006568 if test "$ac_cv_has_makedev" = "yes"; then
6569
6570cat >>confdefs.h <<\_ACEOF
6571#define _OSF_SOURCE 1
6572_ACEOF
6573
6574 fi
6575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6577echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006578if test "$ac_cv_has_makedev" = "yes"; then
6579
6580cat >>confdefs.h <<\_ACEOF
6581#define HAVE_MAKEDEV 1
6582_ACEOF
6583
6584fi
6585
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6587# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6588# defined, but the compiler does not support pragma redefine_extname,
6589# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6590# structures (such as rlimit64) without declaring them. As a
6591# work-around, disable LFS on such configurations
6592
6593use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6595echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006597/* confdefs.h. */
6598_ACEOF
6599cat confdefs.h >>conftest.$ac_ext
6600cat >>conftest.$ac_ext <<_ACEOF
6601/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602
6603#define _LARGEFILE_SOURCE 1
6604#define _FILE_OFFSET_BITS 64
6605#include <sys/resource.h>
6606
Martin v. Löwis399a6892002-10-04 10:22:02 +00006607int
6608main ()
6609{
6610struct rlimit foo;
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006616if { (ac_try="$ac_compile"
6617case "(($ac_try" in
6618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6619 *) ac_try_echo=$ac_try;;
6620esac
6621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 grep -v '^ *+' conftest.er1 >conftest.err
6625 rm -f conftest.er1
6626 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628 (exit $ac_status); } && {
6629 test -z "$ac_c_werror_flag" ||
6630 test ! -s conftest.err
6631 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632 sol_lfs_bug=no
6633else
6634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006635sed 's/^/| /' conftest.$ac_ext >&5
6636
Martin v. Löwiseba40652007-08-30 20:10:57 +00006637 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006639
6640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6641{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6642echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643if test "$sol_lfs_bug" = "yes"; then
6644 use_lfs=no
6645fi
6646
6647if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006648# Two defines needed to enable largefile support on various platforms
6649# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651cat >>confdefs.h <<\_ACEOF
6652#define _LARGEFILE_SOURCE 1
6653_ACEOF
6654
6655
6656cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006657#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006658_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006659
Martin v. Löwis399a6892002-10-04 10:22:02 +00006660fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006661
Guido van Rossum84e7b241996-08-19 21:59:00 +00006662# Add some code to confdefs.h so that the test for off_t works on SCO
6663cat >> confdefs.h <<\EOF
6664#if defined(SCO_DS)
6665#undef _OFF_T
6666#endif
6667EOF
6668
Guido van Rossumef2255b2000-03-10 22:30:29 +00006669# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670{ echo "$as_me:$LINENO: checking for mode_t" >&5
6671echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006672if test "${ac_cv_type_mode_t+set}" = set; then
6673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006674else
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006676/* confdefs.h. */
6677_ACEOF
6678cat confdefs.h >>conftest.$ac_ext
6679cat >>conftest.$ac_ext <<_ACEOF
6680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006681$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006683int
6684main ()
6685{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006687 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006689 return 0;
6690 ;
6691 return 0;
6692}
6693_ACEOF
6694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695if { (ac_try="$ac_compile"
6696case "(($ac_try" in
6697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6698 *) ac_try_echo=$ac_try;;
6699esac
6700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006703 grep -v '^ *+' conftest.er1 >conftest.err
6704 rm -f conftest.er1
6705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006707 (exit $ac_status); } && {
6708 test -z "$ac_c_werror_flag" ||
6709 test ! -s conftest.err
6710 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006711 ac_cv_type_mode_t=yes
6712else
Martin v. Löwis11437992002-04-12 09:54:03 +00006713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006714sed 's/^/| /' conftest.$ac_ext >&5
6715
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718
6719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006721{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6722echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006723if test $ac_cv_type_mode_t = yes; then
6724 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006725else
Martin v. Löwis11437992002-04-12 09:54:03 +00006726
6727cat >>confdefs.h <<_ACEOF
6728#define mode_t int
6729_ACEOF
6730
6731fi
6732
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733{ echo "$as_me:$LINENO: checking for off_t" >&5
6734echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006735if test "${ac_cv_type_off_t+set}" = set; then
6736 echo $ECHO_N "(cached) $ECHO_C" >&6
6737else
6738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006744$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006746int
6747main ()
6748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006752 return 0;
6753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758if { (ac_try="$ac_compile"
6759case "(($ac_try" in
6760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6761 *) ac_try_echo=$ac_try;;
6762esac
6763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006766 grep -v '^ *+' conftest.er1 >conftest.err
6767 rm -f conftest.er1
6768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770 (exit $ac_status); } && {
6771 test -z "$ac_c_werror_flag" ||
6772 test ! -s conftest.err
6773 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006774 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006775else
Martin v. Löwis11437992002-04-12 09:54:03 +00006776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006777sed 's/^/| /' conftest.$ac_ext >&5
6778
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006781
6782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6785echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006786if test $ac_cv_type_off_t = yes; then
6787 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789
6790cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006791#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006792_ACEOF
6793
6794fi
6795
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796{ echo "$as_me:$LINENO: checking for pid_t" >&5
6797echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006798if test "${ac_cv_type_pid_t+set}" = set; then
6799 echo $ECHO_N "(cached) $ECHO_C" >&6
6800else
6801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006809int
6810main ()
6811{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006815 return 0;
6816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821if { (ac_try="$ac_compile"
6822case "(($ac_try" in
6823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6824 *) ac_try_echo=$ac_try;;
6825esac
6826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006829 grep -v '^ *+' conftest.er1 >conftest.err
6830 rm -f conftest.er1
6831 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006833 (exit $ac_status); } && {
6834 test -z "$ac_c_werror_flag" ||
6835 test ! -s conftest.err
6836 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006837 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006838else
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006840sed 's/^/| /' conftest.$ac_ext >&5
6841
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844
6845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6848echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006849if test $ac_cv_type_pid_t = yes; then
6850 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852
6853cat >>confdefs.h <<_ACEOF
6854#define pid_t int
6855_ACEOF
6856
6857fi
6858
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6860echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006861if test "${ac_cv_type_signal+set}" = set; then
6862 echo $ECHO_N "(cached) $ECHO_C" >&6
6863else
6864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006870#include <sys/types.h>
6871#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006872
Martin v. Löwis11437992002-04-12 09:54:03 +00006873int
6874main ()
6875{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006876return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
6887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
6898 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899else
Martin v. Löwis11437992002-04-12 09:54:03 +00006900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006901sed 's/^/| /' conftest.$ac_ext >&5
6902
Martin v. Löwiseba40652007-08-30 20:10:57 +00006903 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6909echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006913_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006914
Michael W. Hudson54241132001-12-07 15:38:26 +00006915
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916{ echo "$as_me:$LINENO: checking for size_t" >&5
6917echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006918if test "${ac_cv_type_size_t+set}" = set; then
6919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920else
Martin v. Löwis11437992002-04-12 09:54:03 +00006921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006922/* confdefs.h. */
6923_ACEOF
6924cat confdefs.h >>conftest.$ac_ext
6925cat >>conftest.$ac_ext <<_ACEOF
6926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006927$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006929int
6930main ()
6931{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006935 return 0;
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941if { (ac_try="$ac_compile"
6942case "(($ac_try" in
6943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6944 *) ac_try_echo=$ac_try;;
6945esac
6946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006949 grep -v '^ *+' conftest.er1 >conftest.err
6950 rm -f conftest.er1
6951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953 (exit $ac_status); } && {
6954 test -z "$ac_c_werror_flag" ||
6955 test ! -s conftest.err
6956 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006957 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006958else
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006960sed 's/^/| /' conftest.$ac_ext >&5
6961
Martin v. Löwiseba40652007-08-30 20:10:57 +00006962 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964
6965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6968echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006969if test $ac_cv_type_size_t = yes; then
6970 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006971else
Martin v. Löwis11437992002-04-12 09:54:03 +00006972
6973cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006974#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006975_ACEOF
6976
6977fi
6978
Martin v. Löwiseba40652007-08-30 20:10:57 +00006979{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6980echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006981if test "${ac_cv_type_uid_t+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6983else
6984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006985/* confdefs.h. */
6986_ACEOF
6987cat confdefs.h >>conftest.$ac_ext
6988cat >>conftest.$ac_ext <<_ACEOF
6989/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006990#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006991
6992_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006994 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995 ac_cv_type_uid_t=yes
6996else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997 ac_cv_type_uid_t=no
6998fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006999rm -f conftest*
7000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007002{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7003echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007004if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007005
Martin v. Löwis11437992002-04-12 09:54:03 +00007006cat >>confdefs.h <<\_ACEOF
7007#define uid_t int
7008_ACEOF
7009
7010
7011cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007012#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014
7015fi
7016
Martin v. Löwiseba40652007-08-30 20:10:57 +00007017{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7018echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007019if test "${ac_cv_type_ssize_t+set}" = set; then
7020 echo $ECHO_N "(cached) $ECHO_C" >&6
7021else
7022 cat >conftest.$ac_ext <<_ACEOF
7023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
7027/* end confdefs.h. */
7028$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007030int
7031main ()
7032{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007034 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007036 return 0;
7037 ;
7038 return 0;
7039}
7040_ACEOF
7041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007042if { (ac_try="$ac_compile"
7043case "(($ac_try" in
7044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7045 *) ac_try_echo=$ac_try;;
7046esac
7047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007049 ac_status=$?
7050 grep -v '^ *+' conftest.er1 >conftest.err
7051 rm -f conftest.er1
7052 cat conftest.err >&5
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007054 (exit $ac_status); } && {
7055 test -z "$ac_c_werror_flag" ||
7056 test ! -s conftest.err
7057 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007058 ac_cv_type_ssize_t=yes
7059else
7060 echo "$as_me: failed program was:" >&5
7061sed 's/^/| /' conftest.$ac_ext >&5
7062
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007065
7066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7069echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007070if test $ac_cv_type_ssize_t = yes; then
7071
7072cat >>confdefs.h <<\_ACEOF
7073#define HAVE_SSIZE_T 1
7074_ACEOF
7075
7076fi
7077
Jack Jansendd19cf82001-12-06 22:36:17 +00007078
Michael W. Hudson54241132001-12-07 15:38:26 +00007079# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007080# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007081{ echo "$as_me:$LINENO: checking for int" >&5
7082echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007083if test "${ac_cv_type_int+set}" = set; then
7084 echo $ECHO_N "(cached) $ECHO_C" >&6
7085else
7086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007087/* confdefs.h. */
7088_ACEOF
7089cat confdefs.h >>conftest.$ac_ext
7090cat >>conftest.$ac_ext <<_ACEOF
7091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007092$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007093typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007094int
7095main ()
7096{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007100 return 0;
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007106if { (ac_try="$ac_compile"
7107case "(($ac_try" in
7108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7109 *) ac_try_echo=$ac_try;;
7110esac
7111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007114 grep -v '^ *+' conftest.er1 >conftest.err
7115 rm -f conftest.er1
7116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007118 (exit $ac_status); } && {
7119 test -z "$ac_c_werror_flag" ||
7120 test ! -s conftest.err
7121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 ac_cv_type_int=yes
7123else
7124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007125sed 's/^/| /' conftest.$ac_ext >&5
7126
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007128fi
Brett Cannon19fab762007-06-02 03:02:29 +00007129
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7131fi
7132{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7133echo "${ECHO_T}$ac_cv_type_int" >&6; }
7134
7135# The cast to long int works around a bug in the HP C Compiler
7136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7138# This bug is HP SR number 8606223364.
7139{ echo "$as_me:$LINENO: checking size of int" >&5
7140echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007141if test "${ac_cv_sizeof_int+set}" = set; then
7142 echo $ECHO_N "(cached) $ECHO_C" >&6
7143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 if test "$cross_compiling" = yes; then
7145 # Depending upon the size, compute the lo and hi bounds.
7146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007147/* confdefs.h. */
7148_ACEOF
7149cat confdefs.h >>conftest.$ac_ext
7150cat >>conftest.$ac_ext <<_ACEOF
7151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007152$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007153 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007154int
7155main ()
7156{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007158test_array [0] = 0
7159
7160 ;
7161 return 0;
7162}
7163_ACEOF
7164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007165if { (ac_try="$ac_compile"
7166case "(($ac_try" in
7167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7168 *) ac_try_echo=$ac_try;;
7169esac
7170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007173 grep -v '^ *+' conftest.er1 >conftest.err
7174 rm -f conftest.er1
7175 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177 (exit $ac_status); } && {
7178 test -z "$ac_c_werror_flag" ||
7179 test ! -s conftest.err
7180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007181 ac_lo=0 ac_mid=0
7182 while :; do
7183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007184/* confdefs.h. */
7185_ACEOF
7186cat confdefs.h >>conftest.$ac_ext
7187cat >>conftest.$ac_ext <<_ACEOF
7188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007189$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007191int
7192main ()
7193{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007195test_array [0] = 0
7196
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202if { (ac_try="$ac_compile"
7203case "(($ac_try" in
7204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7205 *) ac_try_echo=$ac_try;;
7206esac
7207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007210 grep -v '^ *+' conftest.er1 >conftest.err
7211 rm -f conftest.er1
7212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214 (exit $ac_status); } && {
7215 test -z "$ac_c_werror_flag" ||
7216 test ! -s conftest.err
7217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 ac_hi=$ac_mid; break
7219else
7220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007221sed 's/^/| /' conftest.$ac_ext >&5
7222
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223 ac_lo=`expr $ac_mid + 1`
7224 if test $ac_lo -le $ac_mid; then
7225 ac_lo= ac_hi=
7226 break
7227 fi
7228 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230
7231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 done
7233else
7234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007235sed 's/^/| /' conftest.$ac_ext >&5
7236
Martin v. Löwiseba40652007-08-30 20:10:57 +00007237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007238/* confdefs.h. */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007243$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007244 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007245int
7246main ()
7247{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007249test_array [0] = 0
7250
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256if { (ac_try="$ac_compile"
7257case "(($ac_try" in
7258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7259 *) ac_try_echo=$ac_try;;
7260esac
7261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007264 grep -v '^ *+' conftest.er1 >conftest.err
7265 rm -f conftest.er1
7266 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007268 (exit $ac_status); } && {
7269 test -z "$ac_c_werror_flag" ||
7270 test ! -s conftest.err
7271 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 ac_hi=-1 ac_mid=-1
7273 while :; do
7274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007275/* confdefs.h. */
7276_ACEOF
7277cat confdefs.h >>conftest.$ac_ext
7278cat >>conftest.$ac_ext <<_ACEOF
7279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007280$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007282int
7283main ()
7284{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007286test_array [0] = 0
7287
7288 ;
7289 return 0;
7290}
7291_ACEOF
7292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007293if { (ac_try="$ac_compile"
7294case "(($ac_try" in
7295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7296 *) ac_try_echo=$ac_try;;
7297esac
7298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007301 grep -v '^ *+' conftest.er1 >conftest.err
7302 rm -f conftest.er1
7303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007305 (exit $ac_status); } && {
7306 test -z "$ac_c_werror_flag" ||
7307 test ! -s conftest.err
7308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007309 ac_lo=$ac_mid; break
7310else
7311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007312sed 's/^/| /' conftest.$ac_ext >&5
7313
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314 ac_hi=`expr '(' $ac_mid ')' - 1`
7315 if test $ac_mid -le $ac_hi; then
7316 ac_lo= ac_hi=
7317 break
7318 fi
7319 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007321
7322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007323 done
7324else
7325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007326sed 's/^/| /' conftest.$ac_ext >&5
7327
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007330
7331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007333
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007335# Binary search between lo and hi bounds.
7336while test "x$ac_lo" != "x$ac_hi"; do
7337 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007339/* confdefs.h. */
7340_ACEOF
7341cat confdefs.h >>conftest.$ac_ext
7342cat >>conftest.$ac_ext <<_ACEOF
7343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007344$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007346int
7347main ()
7348{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007357if { (ac_try="$ac_compile"
7358case "(($ac_try" in
7359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7360 *) ac_try_echo=$ac_try;;
7361esac
7362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007365 grep -v '^ *+' conftest.er1 >conftest.err
7366 rm -f conftest.er1
7367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007369 (exit $ac_status); } && {
7370 test -z "$ac_c_werror_flag" ||
7371 test ! -s conftest.err
7372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 ac_hi=$ac_mid
7374else
7375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007376sed 's/^/| /' conftest.$ac_ext >&5
7377
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007380
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007382done
7383case $ac_lo in
7384?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007385'') if test "$ac_cv_type_int" = yes; then
7386 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007387See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007389See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007390 { (exit 77); exit 77; }; }
7391 else
7392 ac_cv_sizeof_int=0
7393 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007394esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007395else
Martin v. Löwis11437992002-04-12 09:54:03 +00007396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007397/* confdefs.h. */
7398_ACEOF
7399cat confdefs.h >>conftest.$ac_ext
7400cat >>conftest.$ac_ext <<_ACEOF
7401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007402$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403 typedef int ac__type_sizeof_;
7404static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7405static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007406#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007407#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007408int
7409main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007410{
Martin v. Löwis11437992002-04-12 09:54:03 +00007411
7412 FILE *f = fopen ("conftest.val", "w");
7413 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007414 return 1;
7415 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007416 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007417 long int i = longval ();
7418 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7419 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007420 fprintf (f, "%ld\n", i);
7421 }
7422 else
7423 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424 unsigned long int i = ulongval ();
7425 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7426 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 fprintf (f, "%lu\n", i);
7428 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007429 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007430
7431 ;
7432 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007433}
Martin v. Löwis11437992002-04-12 09:54:03 +00007434_ACEOF
7435rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436if { (ac_try="$ac_link"
7437case "(($ac_try" in
7438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7439 *) ac_try_echo=$ac_try;;
7440esac
7441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7442 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007446 { (case "(($ac_try" in
7447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7448 *) ac_try_echo=$ac_try;;
7449esac
7450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7451 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007452 ac_status=$?
7453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7454 (exit $ac_status); }; }; then
7455 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007456else
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 echo "$as_me: program exited with status $ac_status" >&5
7458echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007459sed 's/^/| /' conftest.$ac_ext >&5
7460
Martin v. Löwis11437992002-04-12 09:54:03 +00007461( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462if test "$ac_cv_type_int" = yes; then
7463 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007464See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007466See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007467 { (exit 77); exit 77; }; }
7468 else
7469 ac_cv_sizeof_int=0
7470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007472rm -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 +00007473fi
7474rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007476{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7477echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7478
7479
7480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007482#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007483_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007484
7485
Martin v. Löwiseba40652007-08-30 20:10:57 +00007486{ echo "$as_me:$LINENO: checking for long" >&5
7487echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007488if test "${ac_cv_type_long+set}" = set; then
7489 echo $ECHO_N "(cached) $ECHO_C" >&6
7490else
7491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007492/* confdefs.h. */
7493_ACEOF
7494cat confdefs.h >>conftest.$ac_ext
7495cat >>conftest.$ac_ext <<_ACEOF
7496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007497$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007499int
7500main ()
7501{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 return 0;
7506 ;
7507 return 0;
7508}
7509_ACEOF
7510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511if { (ac_try="$ac_compile"
7512case "(($ac_try" in
7513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7514 *) ac_try_echo=$ac_try;;
7515esac
7516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007519 grep -v '^ *+' conftest.er1 >conftest.err
7520 rm -f conftest.er1
7521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523 (exit $ac_status); } && {
7524 test -z "$ac_c_werror_flag" ||
7525 test ! -s conftest.err
7526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 ac_cv_type_long=yes
7528else
7529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007530sed 's/^/| /' conftest.$ac_ext >&5
7531
Martin v. Löwiseba40652007-08-30 20:10:57 +00007532 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007533fi
Brett Cannon19fab762007-06-02 03:02:29 +00007534
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7536fi
7537{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7538echo "${ECHO_T}$ac_cv_type_long" >&6; }
7539
7540# The cast to long int works around a bug in the HP C Compiler
7541# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7542# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7543# This bug is HP SR number 8606223364.
7544{ echo "$as_me:$LINENO: checking size of long" >&5
7545echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007546if test "${ac_cv_sizeof_long+set}" = set; then
7547 echo $ECHO_N "(cached) $ECHO_C" >&6
7548else
Martin v. Löwis11437992002-04-12 09:54:03 +00007549 if test "$cross_compiling" = yes; then
7550 # Depending upon the size, compute the lo and hi bounds.
7551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007552/* confdefs.h. */
7553_ACEOF
7554cat confdefs.h >>conftest.$ac_ext
7555cat >>conftest.$ac_ext <<_ACEOF
7556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007557$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007559int
7560main ()
7561{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007563test_array [0] = 0
7564
7565 ;
7566 return 0;
7567}
7568_ACEOF
7569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570if { (ac_try="$ac_compile"
7571case "(($ac_try" in
7572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7573 *) ac_try_echo=$ac_try;;
7574esac
7575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007578 grep -v '^ *+' conftest.er1 >conftest.err
7579 rm -f conftest.er1
7580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582 (exit $ac_status); } && {
7583 test -z "$ac_c_werror_flag" ||
7584 test ! -s conftest.err
7585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_lo=0 ac_mid=0
7587 while :; do
7588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007594$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607if { (ac_try="$ac_compile"
7608case "(($ac_try" in
7609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7610 *) ac_try_echo=$ac_try;;
7611esac
7612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007615 grep -v '^ *+' conftest.er1 >conftest.err
7616 rm -f conftest.er1
7617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007619 (exit $ac_status); } && {
7620 test -z "$ac_c_werror_flag" ||
7621 test ! -s conftest.err
7622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 ac_hi=$ac_mid; break
7624else
7625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007626sed 's/^/| /' conftest.$ac_ext >&5
7627
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 ac_lo=`expr $ac_mid + 1`
7629 if test $ac_lo -le $ac_mid; then
7630 ac_lo= ac_hi=
7631 break
7632 fi
7633 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635
7636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 done
7638else
7639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007640sed 's/^/| /' conftest.$ac_ext >&5
7641
Martin v. Löwiseba40652007-08-30 20:10:57 +00007642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007648$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007650int
7651main ()
7652{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007654test_array [0] = 0
7655
7656 ;
7657 return 0;
7658}
7659_ACEOF
7660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661if { (ac_try="$ac_compile"
7662case "(($ac_try" in
7663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7664 *) ac_try_echo=$ac_try;;
7665esac
7666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007669 grep -v '^ *+' conftest.er1 >conftest.err
7670 rm -f conftest.er1
7671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673 (exit $ac_status); } && {
7674 test -z "$ac_c_werror_flag" ||
7675 test ! -s conftest.err
7676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ac_hi=-1 ac_mid=-1
7678 while :; do
7679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007680/* confdefs.h. */
7681_ACEOF
7682cat confdefs.h >>conftest.$ac_ext
7683cat >>conftest.$ac_ext <<_ACEOF
7684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007685$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007687int
7688main ()
7689{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007691test_array [0] = 0
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698if { (ac_try="$ac_compile"
7699case "(($ac_try" in
7700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7701 *) ac_try_echo=$ac_try;;
7702esac
7703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007706 grep -v '^ *+' conftest.er1 >conftest.err
7707 rm -f conftest.er1
7708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710 (exit $ac_status); } && {
7711 test -z "$ac_c_werror_flag" ||
7712 test ! -s conftest.err
7713 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_lo=$ac_mid; break
7715else
7716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007717sed 's/^/| /' conftest.$ac_ext >&5
7718
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 ac_hi=`expr '(' $ac_mid ')' - 1`
7720 if test $ac_mid -le $ac_hi; then
7721 ac_lo= ac_hi=
7722 break
7723 fi
7724 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726
7727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728 done
7729else
7730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007731sed 's/^/| /' conftest.$ac_ext >&5
7732
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735
7736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738
7739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007740# Binary search between lo and hi bounds.
7741while test "x$ac_lo" != "x$ac_hi"; do
7742 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* confdefs.h. */
7745_ACEOF
7746cat confdefs.h >>conftest.$ac_ext
7747cat >>conftest.$ac_ext <<_ACEOF
7748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007751int
7752main ()
7753{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007755test_array [0] = 0
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762if { (ac_try="$ac_compile"
7763case "(($ac_try" in
7764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7765 *) ac_try_echo=$ac_try;;
7766esac
7767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007770 grep -v '^ *+' conftest.er1 >conftest.err
7771 rm -f conftest.er1
7772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 (exit $ac_status); } && {
7775 test -z "$ac_c_werror_flag" ||
7776 test ! -s conftest.err
7777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_hi=$ac_mid
7779else
7780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007781sed 's/^/| /' conftest.$ac_ext >&5
7782
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785
7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007787done
7788case $ac_lo in
7789?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007790'') if test "$ac_cv_type_long" = yes; then
7791 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007792See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007794See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795 { (exit 77); exit 77; }; }
7796 else
7797 ac_cv_sizeof_long=0
7798 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007799esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007802/* confdefs.h. */
7803_ACEOF
7804cat confdefs.h >>conftest.$ac_ext
7805cat >>conftest.$ac_ext <<_ACEOF
7806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808 typedef long ac__type_sizeof_;
7809static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7810static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007812#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007815{
Martin v. Löwis11437992002-04-12 09:54:03 +00007816
7817 FILE *f = fopen ("conftest.val", "w");
7818 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 return 1;
7820 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 long int i = longval ();
7823 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7824 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 fprintf (f, "%ld\n", i);
7826 }
7827 else
7828 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829 unsigned long int i = ulongval ();
7830 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7831 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 fprintf (f, "%lu\n", i);
7833 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007835
7836 ;
7837 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007838}
Martin v. Löwis11437992002-04-12 09:54:03 +00007839_ACEOF
7840rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841if { (ac_try="$ac_link"
7842case "(($ac_try" in
7843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7844 *) ac_try_echo=$ac_try;;
7845esac
7846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7847 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ac_status=$?
7849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 { (case "(($ac_try" in
7852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7853 *) ac_try_echo=$ac_try;;
7854esac
7855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7856 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; }; then
7860 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007861else
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 echo "$as_me: program exited with status $ac_status" >&5
7863echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007864sed 's/^/| /' conftest.$ac_ext >&5
7865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867if test "$ac_cv_type_long" = yes; then
7868 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007869See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007871See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 { (exit 77); exit 77; }; }
7873 else
7874 ac_cv_sizeof_long=0
7875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877rm -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 +00007878fi
7879rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7882echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7883
7884
7885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007887#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007888_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007889
7890
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891{ echo "$as_me:$LINENO: checking for void *" >&5
7892echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007893if test "${ac_cv_type_void_p+set}" = set; then
7894 echo $ECHO_N "(cached) $ECHO_C" >&6
7895else
7896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007897/* confdefs.h. */
7898_ACEOF
7899cat confdefs.h >>conftest.$ac_ext
7900cat >>conftest.$ac_ext <<_ACEOF
7901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007902$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007904int
7905main ()
7906{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007910 return 0;
7911 ;
7912 return 0;
7913}
7914_ACEOF
7915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007916if { (ac_try="$ac_compile"
7917case "(($ac_try" in
7918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7919 *) ac_try_echo=$ac_try;;
7920esac
7921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007924 grep -v '^ *+' conftest.er1 >conftest.err
7925 rm -f conftest.er1
7926 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 (exit $ac_status); } && {
7929 test -z "$ac_c_werror_flag" ||
7930 test ! -s conftest.err
7931 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ac_cv_type_void_p=yes
7933else
7934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007935sed 's/^/| /' conftest.$ac_ext >&5
7936
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007938fi
Brett Cannon19fab762007-06-02 03:02:29 +00007939
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7941fi
7942{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7943echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7944
7945# The cast to long int works around a bug in the HP C Compiler
7946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7948# This bug is HP SR number 8606223364.
7949{ echo "$as_me:$LINENO: checking size of void *" >&5
7950echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007951if test "${ac_cv_sizeof_void_p+set}" = set; then
7952 echo $ECHO_N "(cached) $ECHO_C" >&6
7953else
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 if test "$cross_compiling" = yes; then
7955 # Depending upon the size, compute the lo and hi bounds.
7956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007962$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007963 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
7980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 grep -v '^ *+' conftest.er1 >conftest.err
7984 rm -f conftest.er1
7985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987 (exit $ac_status); } && {
7988 test -z "$ac_c_werror_flag" ||
7989 test ! -s conftest.err
7990 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_lo=0 ac_mid=0
7992 while :; do
7993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008001int
8002main ()
8003{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008005test_array [0] = 0
8006
8007 ;
8008 return 0;
8009}
8010_ACEOF
8011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012if { (ac_try="$ac_compile"
8013case "(($ac_try" in
8014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8015 *) ac_try_echo=$ac_try;;
8016esac
8017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020 grep -v '^ *+' conftest.er1 >conftest.err
8021 rm -f conftest.er1
8022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008024 (exit $ac_status); } && {
8025 test -z "$ac_c_werror_flag" ||
8026 test ! -s conftest.err
8027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_hi=$ac_mid; break
8029else
8030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008031sed 's/^/| /' conftest.$ac_ext >&5
8032
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 ac_lo=`expr $ac_mid + 1`
8034 if test $ac_lo -le $ac_mid; then
8035 ac_lo= ac_hi=
8036 break
8037 fi
8038 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040
8041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 done
8043else
8044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008045sed 's/^/| /' conftest.$ac_ext >&5
8046
Martin v. Löwiseba40652007-08-30 20:10:57 +00008047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008048/* confdefs.h. */
8049_ACEOF
8050cat confdefs.h >>conftest.$ac_ext
8051cat >>conftest.$ac_ext <<_ACEOF
8052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008053$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008055int
8056main ()
8057{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008059test_array [0] = 0
8060
8061 ;
8062 return 0;
8063}
8064_ACEOF
8065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066if { (ac_try="$ac_compile"
8067case "(($ac_try" in
8068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8069 *) ac_try_echo=$ac_try;;
8070esac
8071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008074 grep -v '^ *+' conftest.er1 >conftest.err
8075 rm -f conftest.er1
8076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008078 (exit $ac_status); } && {
8079 test -z "$ac_c_werror_flag" ||
8080 test ! -s conftest.err
8081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 ac_hi=-1 ac_mid=-1
8083 while :; do
8084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008085/* confdefs.h. */
8086_ACEOF
8087cat confdefs.h >>conftest.$ac_ext
8088cat >>conftest.$ac_ext <<_ACEOF
8089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008090$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008092int
8093main ()
8094{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008096test_array [0] = 0
8097
8098 ;
8099 return 0;
8100}
8101_ACEOF
8102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103if { (ac_try="$ac_compile"
8104case "(($ac_try" in
8105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8106 *) ac_try_echo=$ac_try;;
8107esac
8108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008111 grep -v '^ *+' conftest.er1 >conftest.err
8112 rm -f conftest.er1
8113 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115 (exit $ac_status); } && {
8116 test -z "$ac_c_werror_flag" ||
8117 test ! -s conftest.err
8118 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_lo=$ac_mid; break
8120else
8121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008122sed 's/^/| /' conftest.$ac_ext >&5
8123
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124 ac_hi=`expr '(' $ac_mid ')' - 1`
8125 if test $ac_mid -le $ac_hi; then
8126 ac_lo= ac_hi=
8127 break
8128 fi
8129 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131
8132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 done
8134else
8135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008136sed 's/^/| /' conftest.$ac_ext >&5
8137
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008140
8141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143
8144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008145# Binary search between lo and hi bounds.
8146while test "x$ac_lo" != "x$ac_hi"; do
8147 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008149/* confdefs.h. */
8150_ACEOF
8151cat confdefs.h >>conftest.$ac_ext
8152cat >>conftest.$ac_ext <<_ACEOF
8153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008154$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008156int
8157main ()
8158{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008160test_array [0] = 0
8161
8162 ;
8163 return 0;
8164}
8165_ACEOF
8166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167if { (ac_try="$ac_compile"
8168case "(($ac_try" in
8169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8170 *) ac_try_echo=$ac_try;;
8171esac
8172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008175 grep -v '^ *+' conftest.er1 >conftest.err
8176 rm -f conftest.er1
8177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 (exit $ac_status); } && {
8180 test -z "$ac_c_werror_flag" ||
8181 test ! -s conftest.err
8182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ac_hi=$ac_mid
8184else
8185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008186sed 's/^/| /' conftest.$ac_ext >&5
8187
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190
8191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008192done
8193case $ac_lo in
8194?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008195'') if test "$ac_cv_type_void_p" = yes; then
8196 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008197See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008199See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008200 { (exit 77); exit 77; }; }
8201 else
8202 ac_cv_sizeof_void_p=0
8203 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008204esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008205else
Martin v. Löwis11437992002-04-12 09:54:03 +00008206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213 typedef void * ac__type_sizeof_;
8214static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8215static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008216#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008217#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008218int
8219main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008220{
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222 FILE *f = fopen ("conftest.val", "w");
8223 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224 return 1;
8225 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 long int i = longval ();
8228 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8229 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 fprintf (f, "%ld\n", i);
8231 }
8232 else
8233 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234 unsigned long int i = ulongval ();
8235 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8236 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 fprintf (f, "%lu\n", i);
8238 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241 ;
8242 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008243}
Martin v. Löwis11437992002-04-12 09:54:03 +00008244_ACEOF
8245rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246if { (ac_try="$ac_link"
8247case "(($ac_try" in
8248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8249 *) ac_try_echo=$ac_try;;
8250esac
8251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8252 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256 { (case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259esac
8260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8261 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); }; }; then
8265 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008266else
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 echo "$as_me: program exited with status $ac_status" >&5
8268echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008269sed 's/^/| /' conftest.$ac_ext >&5
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272if test "$ac_cv_type_void_p" = yes; then
8273 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008274See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008276See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 { (exit 77); exit 77; }; }
8278 else
8279 ac_cv_sizeof_void_p=0
8280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008282rm -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 +00008283fi
8284rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8287echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8288
8289
8290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008292#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008293_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008294
8295
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296{ echo "$as_me:$LINENO: checking for short" >&5
8297echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008298if test "${ac_cv_type_short+set}" = set; then
8299 echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008302/* confdefs.h. */
8303_ACEOF
8304cat confdefs.h >>conftest.$ac_ext
8305cat >>conftest.$ac_ext <<_ACEOF
8306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008307$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008309int
8310main ()
8311{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 return 0;
8316 ;
8317 return 0;
8318}
8319_ACEOF
8320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321if { (ac_try="$ac_compile"
8322case "(($ac_try" in
8323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8324 *) ac_try_echo=$ac_try;;
8325esac
8326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008329 grep -v '^ *+' conftest.er1 >conftest.err
8330 rm -f conftest.er1
8331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 (exit $ac_status); } && {
8334 test -z "$ac_c_werror_flag" ||
8335 test ! -s conftest.err
8336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 ac_cv_type_short=yes
8338else
8339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008340sed 's/^/| /' conftest.$ac_ext >&5
8341
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008343fi
Brett Cannon19fab762007-06-02 03:02:29 +00008344
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8346fi
8347{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8348echo "${ECHO_T}$ac_cv_type_short" >&6; }
8349
8350# The cast to long int works around a bug in the HP C Compiler
8351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8353# This bug is HP SR number 8606223364.
8354{ echo "$as_me:$LINENO: checking size of short" >&5
8355echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008356if test "${ac_cv_sizeof_short+set}" = set; then
8357 echo $ECHO_N "(cached) $ECHO_C" >&6
8358else
Martin v. Löwis11437992002-04-12 09:54:03 +00008359 if test "$cross_compiling" = yes; then
8360 # Depending upon the size, compute the lo and hi bounds.
8361cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008362/* confdefs.h. */
8363_ACEOF
8364cat confdefs.h >>conftest.$ac_ext
8365cat >>conftest.$ac_ext <<_ACEOF
8366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008369int
8370main ()
8371{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008373test_array [0] = 0
8374
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380if { (ac_try="$ac_compile"
8381case "(($ac_try" in
8382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8383 *) ac_try_echo=$ac_try;;
8384esac
8385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008388 grep -v '^ *+' conftest.er1 >conftest.err
8389 rm -f conftest.er1
8390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392 (exit $ac_status); } && {
8393 test -z "$ac_c_werror_flag" ||
8394 test ! -s conftest.err
8395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008396 ac_lo=0 ac_mid=0
8397 while :; do
8398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008406int
8407main ()
8408{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008410test_array [0] = 0
8411
8412 ;
8413 return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417if { (ac_try="$ac_compile"
8418case "(($ac_try" in
8419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420 *) ac_try_echo=$ac_try;;
8421esac
8422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008425 grep -v '^ *+' conftest.er1 >conftest.err
8426 rm -f conftest.er1
8427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008429 (exit $ac_status); } && {
8430 test -z "$ac_c_werror_flag" ||
8431 test ! -s conftest.err
8432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_hi=$ac_mid; break
8434else
8435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008436sed 's/^/| /' conftest.$ac_ext >&5
8437
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 ac_lo=`expr $ac_mid + 1`
8439 if test $ac_lo -le $ac_mid; then
8440 ac_lo= ac_hi=
8441 break
8442 fi
8443 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445
8446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 done
8448else
8449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008450sed 's/^/| /' conftest.$ac_ext >&5
8451
Martin v. Löwiseba40652007-08-30 20:10:57 +00008452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* confdefs.h. */
8454_ACEOF
8455cat confdefs.h >>conftest.$ac_ext
8456cat >>conftest.$ac_ext <<_ACEOF
8457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008460int
8461main ()
8462{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008464test_array [0] = 0
8465
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471if { (ac_try="$ac_compile"
8472case "(($ac_try" in
8473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8474 *) ac_try_echo=$ac_try;;
8475esac
8476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008479 grep -v '^ *+' conftest.er1 >conftest.err
8480 rm -f conftest.er1
8481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008483 (exit $ac_status); } && {
8484 test -z "$ac_c_werror_flag" ||
8485 test ! -s conftest.err
8486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_hi=-1 ac_mid=-1
8488 while :; do
8489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008490/* confdefs.h. */
8491_ACEOF
8492cat confdefs.h >>conftest.$ac_ext
8493cat >>conftest.$ac_ext <<_ACEOF
8494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008495$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008497int
8498main ()
8499{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008501test_array [0] = 0
8502
8503 ;
8504 return 0;
8505}
8506_ACEOF
8507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508if { (ac_try="$ac_compile"
8509case "(($ac_try" in
8510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8511 *) ac_try_echo=$ac_try;;
8512esac
8513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008516 grep -v '^ *+' conftest.er1 >conftest.err
8517 rm -f conftest.er1
8518 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008520 (exit $ac_status); } && {
8521 test -z "$ac_c_werror_flag" ||
8522 test ! -s conftest.err
8523 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_lo=$ac_mid; break
8525else
8526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008527sed 's/^/| /' conftest.$ac_ext >&5
8528
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529 ac_hi=`expr '(' $ac_mid ')' - 1`
8530 if test $ac_mid -le $ac_hi; then
8531 ac_lo= ac_hi=
8532 break
8533 fi
8534 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 done
8539else
8540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008541sed 's/^/| /' conftest.$ac_ext >&5
8542
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008545
8546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548
8549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008550# Binary search between lo and hi bounds.
8551while test "x$ac_lo" != "x$ac_hi"; do
8552 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* confdefs.h. */
8555_ACEOF
8556cat confdefs.h >>conftest.$ac_ext
8557cat >>conftest.$ac_ext <<_ACEOF
8558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008565test_array [0] = 0
8566
8567 ;
8568 return 0;
8569}
8570_ACEOF
8571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572if { (ac_try="$ac_compile"
8573case "(($ac_try" in
8574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8575 *) ac_try_echo=$ac_try;;
8576esac
8577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008580 grep -v '^ *+' conftest.er1 >conftest.err
8581 rm -f conftest.er1
8582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 (exit $ac_status); } && {
8585 test -z "$ac_c_werror_flag" ||
8586 test ! -s conftest.err
8587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_hi=$ac_mid
8589else
8590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008591sed 's/^/| /' conftest.$ac_ext >&5
8592
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595
8596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597done
8598case $ac_lo in
8599?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008600'') if test "$ac_cv_type_short" = yes; then
8601 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008602See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008604See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008605 { (exit 77); exit 77; }; }
8606 else
8607 ac_cv_sizeof_short=0
8608 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008609esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008610else
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008612/* confdefs.h. */
8613_ACEOF
8614cat confdefs.h >>conftest.$ac_ext
8615cat >>conftest.$ac_ext <<_ACEOF
8616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618 typedef short ac__type_sizeof_;
8619static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8620static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008621#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008622#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008623int
8624main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008625{
Martin v. Löwis11437992002-04-12 09:54:03 +00008626
8627 FILE *f = fopen ("conftest.val", "w");
8628 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 return 1;
8630 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 long int i = longval ();
8633 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8634 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 fprintf (f, "%ld\n", i);
8636 }
8637 else
8638 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639 unsigned long int i = ulongval ();
8640 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8641 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 fprintf (f, "%lu\n", i);
8643 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008645
8646 ;
8647 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008648}
Martin v. Löwis11437992002-04-12 09:54:03 +00008649_ACEOF
8650rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651if { (ac_try="$ac_link"
8652case "(($ac_try" in
8653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8654 *) ac_try_echo=$ac_try;;
8655esac
8656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8657 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ac_status=$?
8659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661 { (case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664esac
8665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
8668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8670 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008671else
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 echo "$as_me: program exited with status $ac_status" >&5
8673echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008674sed 's/^/| /' conftest.$ac_ext >&5
8675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677if test "$ac_cv_type_short" = yes; then
8678 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008679See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008681See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 { (exit 77); exit 77; }; }
8683 else
8684 ac_cv_sizeof_short=0
8685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008687rm -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 +00008688fi
8689rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8692echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8693
8694
8695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008697#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008698_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008699
8700
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701{ echo "$as_me:$LINENO: checking for float" >&5
8702echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008703if test "${ac_cv_type_float+set}" = set; then
8704 echo $ECHO_N "(cached) $ECHO_C" >&6
8705else
8706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008707/* confdefs.h. */
8708_ACEOF
8709cat confdefs.h >>conftest.$ac_ext
8710cat >>conftest.$ac_ext <<_ACEOF
8711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008714int
8715main ()
8716{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 return 0;
8721 ;
8722 return 0;
8723}
8724_ACEOF
8725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726if { (ac_try="$ac_compile"
8727case "(($ac_try" in
8728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8729 *) ac_try_echo=$ac_try;;
8730esac
8731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008734 grep -v '^ *+' conftest.er1 >conftest.err
8735 rm -f conftest.er1
8736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 (exit $ac_status); } && {
8739 test -z "$ac_c_werror_flag" ||
8740 test ! -s conftest.err
8741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 ac_cv_type_float=yes
8743else
8744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008745sed 's/^/| /' conftest.$ac_ext >&5
8746
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008748fi
Brett Cannon19fab762007-06-02 03:02:29 +00008749
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8751fi
8752{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8753echo "${ECHO_T}$ac_cv_type_float" >&6; }
8754
8755# The cast to long int works around a bug in the HP C Compiler
8756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8758# This bug is HP SR number 8606223364.
8759{ echo "$as_me:$LINENO: checking size of float" >&5
8760echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008761if test "${ac_cv_sizeof_float+set}" = set; then
8762 echo $ECHO_N "(cached) $ECHO_C" >&6
8763else
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 if test "$cross_compiling" = yes; then
8765 # Depending upon the size, compute the lo and hi bounds.
8766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008767/* confdefs.h. */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008774int
8775main ()
8776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008778test_array [0] = 0
8779
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785if { (ac_try="$ac_compile"
8786case "(($ac_try" in
8787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8788 *) ac_try_echo=$ac_try;;
8789esac
8790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008793 grep -v '^ *+' conftest.er1 >conftest.err
8794 rm -f conftest.er1
8795 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797 (exit $ac_status); } && {
8798 test -z "$ac_c_werror_flag" ||
8799 test ! -s conftest.err
8800 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ac_lo=0 ac_mid=0
8802 while :; do
8803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008811int
8812main ()
8813{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008815test_array [0] = 0
8816
8817 ;
8818 return 0;
8819}
8820_ACEOF
8821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822if { (ac_try="$ac_compile"
8823case "(($ac_try" in
8824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8825 *) ac_try_echo=$ac_try;;
8826esac
8827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008830 grep -v '^ *+' conftest.er1 >conftest.err
8831 rm -f conftest.er1
8832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834 (exit $ac_status); } && {
8835 test -z "$ac_c_werror_flag" ||
8836 test ! -s conftest.err
8837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_hi=$ac_mid; break
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 ac_lo=`expr $ac_mid + 1`
8844 if test $ac_lo -le $ac_mid; then
8845 ac_lo= ac_hi=
8846 break
8847 fi
8848 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850
8851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 done
8853else
8854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008855sed 's/^/| /' conftest.$ac_ext >&5
8856
Martin v. Löwiseba40652007-08-30 20:10:57 +00008857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* confdefs.h. */
8859_ACEOF
8860cat confdefs.h >>conftest.$ac_ext
8861cat >>conftest.$ac_ext <<_ACEOF
8862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008863$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008869test_array [0] = 0
8870
8871 ;
8872 return 0;
8873}
8874_ACEOF
8875rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876if { (ac_try="$ac_compile"
8877case "(($ac_try" in
8878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8879 *) ac_try_echo=$ac_try;;
8880esac
8881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008884 grep -v '^ *+' conftest.er1 >conftest.err
8885 rm -f conftest.er1
8886 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888 (exit $ac_status); } && {
8889 test -z "$ac_c_werror_flag" ||
8890 test ! -s conftest.err
8891 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_hi=-1 ac_mid=-1
8893 while :; do
8894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* confdefs.h. */
8896_ACEOF
8897cat confdefs.h >>conftest.$ac_ext
8898cat >>conftest.$ac_ext <<_ACEOF
8899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008900$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008902int
8903main ()
8904{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008906test_array [0] = 0
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913if { (ac_try="$ac_compile"
8914case "(($ac_try" in
8915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8916 *) ac_try_echo=$ac_try;;
8917esac
8918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008921 grep -v '^ *+' conftest.er1 >conftest.err
8922 rm -f conftest.er1
8923 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925 (exit $ac_status); } && {
8926 test -z "$ac_c_werror_flag" ||
8927 test ! -s conftest.err
8928 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ac_lo=$ac_mid; break
8930else
8931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008932sed 's/^/| /' conftest.$ac_ext >&5
8933
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934 ac_hi=`expr '(' $ac_mid ')' - 1`
8935 if test $ac_mid -le $ac_hi; then
8936 ac_lo= ac_hi=
8937 break
8938 fi
8939 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 done
8944else
8945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008946sed 's/^/| /' conftest.$ac_ext >&5
8947
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950
8951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953
8954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008955# Binary search between lo and hi bounds.
8956while test "x$ac_lo" != "x$ac_hi"; do
8957 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* confdefs.h. */
8960_ACEOF
8961cat confdefs.h >>conftest.$ac_ext
8962cat >>conftest.$ac_ext <<_ACEOF
8963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008964$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008966int
8967main ()
8968{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008970test_array [0] = 0
8971
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977if { (ac_try="$ac_compile"
8978case "(($ac_try" in
8979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8980 *) ac_try_echo=$ac_try;;
8981esac
8982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008985 grep -v '^ *+' conftest.er1 >conftest.err
8986 rm -f conftest.er1
8987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 (exit $ac_status); } && {
8990 test -z "$ac_c_werror_flag" ||
8991 test ! -s conftest.err
8992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_hi=$ac_mid
8994else
8995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008996sed 's/^/| /' conftest.$ac_ext >&5
8997
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000
9001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009002done
9003case $ac_lo in
9004?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009005'') if test "$ac_cv_type_float" = yes; then
9006 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009007See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009009See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010 { (exit 77); exit 77; }; }
9011 else
9012 ac_cv_sizeof_float=0
9013 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009014esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009015else
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009017/* confdefs.h. */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023 typedef float ac__type_sizeof_;
9024static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9025static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009026#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009027#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009028int
9029main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009030{
Martin v. Löwis11437992002-04-12 09:54:03 +00009031
9032 FILE *f = fopen ("conftest.val", "w");
9033 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034 return 1;
9035 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 long int i = longval ();
9038 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9039 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 fprintf (f, "%ld\n", i);
9041 }
9042 else
9043 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044 unsigned long int i = ulongval ();
9045 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9046 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 fprintf (f, "%lu\n", i);
9048 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
9051 ;
9052 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009053}
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
9055rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056if { (ac_try="$ac_link"
9057case "(($ac_try" in
9058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9059 *) ac_try_echo=$ac_try;;
9060esac
9061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9062 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_status=$?
9064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 { (case "(($ac_try" in
9067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9068 *) ac_try_echo=$ac_try;;
9069esac
9070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9071 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ac_status=$?
9073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9074 (exit $ac_status); }; }; then
9075 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009076else
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 echo "$as_me: program exited with status $ac_status" >&5
9078echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009079sed 's/^/| /' conftest.$ac_ext >&5
9080
Martin v. Löwis11437992002-04-12 09:54:03 +00009081( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082if test "$ac_cv_type_float" = yes; then
9083 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009084See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009086See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 { (exit 77); exit 77; }; }
9088 else
9089 ac_cv_sizeof_float=0
9090 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009092rm -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 +00009093fi
9094rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9097echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9098
9099
9100
Martin v. Löwis11437992002-04-12 09:54:03 +00009101cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009102#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009103_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009104
9105
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106{ echo "$as_me:$LINENO: checking for double" >&5
9107echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009108if test "${ac_cv_type_double+set}" = set; then
9109 echo $ECHO_N "(cached) $ECHO_C" >&6
9110else
9111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* confdefs.h. */
9113_ACEOF
9114cat confdefs.h >>conftest.$ac_ext
9115cat >>conftest.$ac_ext <<_ACEOF
9116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009117$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009119int
9120main ()
9121{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 return 0;
9126 ;
9127 return 0;
9128}
9129_ACEOF
9130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131if { (ac_try="$ac_compile"
9132case "(($ac_try" in
9133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9134 *) ac_try_echo=$ac_try;;
9135esac
9136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009139 grep -v '^ *+' conftest.er1 >conftest.err
9140 rm -f conftest.er1
9141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 (exit $ac_status); } && {
9144 test -z "$ac_c_werror_flag" ||
9145 test ! -s conftest.err
9146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ac_cv_type_double=yes
9148else
9149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009150sed 's/^/| /' conftest.$ac_ext >&5
9151
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009153fi
Brett Cannon19fab762007-06-02 03:02:29 +00009154
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156fi
9157{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9158echo "${ECHO_T}$ac_cv_type_double" >&6; }
9159
9160# The cast to long int works around a bug in the HP C Compiler
9161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9163# This bug is HP SR number 8606223364.
9164{ echo "$as_me:$LINENO: checking size of double" >&5
9165echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009166if test "${ac_cv_sizeof_double+set}" = set; then
9167 echo $ECHO_N "(cached) $ECHO_C" >&6
9168else
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 if test "$cross_compiling" = yes; then
9170 # Depending upon the size, compute the lo and hi bounds.
9171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* confdefs.h. */
9173_ACEOF
9174cat confdefs.h >>conftest.$ac_ext
9175cat >>conftest.$ac_ext <<_ACEOF
9176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009177$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009179int
9180main ()
9181{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009183test_array [0] = 0
9184
9185 ;
9186 return 0;
9187}
9188_ACEOF
9189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190if { (ac_try="$ac_compile"
9191case "(($ac_try" in
9192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9193 *) ac_try_echo=$ac_try;;
9194esac
9195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009198 grep -v '^ *+' conftest.er1 >conftest.err
9199 rm -f conftest.er1
9200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202 (exit $ac_status); } && {
9203 test -z "$ac_c_werror_flag" ||
9204 test ! -s conftest.err
9205 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 ac_lo=0 ac_mid=0
9207 while :; do
9208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009209/* confdefs.h. */
9210_ACEOF
9211cat confdefs.h >>conftest.$ac_ext
9212cat >>conftest.$ac_ext <<_ACEOF
9213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009214$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009216int
9217main ()
9218{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009220test_array [0] = 0
9221
9222 ;
9223 return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227if { (ac_try="$ac_compile"
9228case "(($ac_try" in
9229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9230 *) ac_try_echo=$ac_try;;
9231esac
9232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009239 (exit $ac_status); } && {
9240 test -z "$ac_c_werror_flag" ||
9241 test ! -s conftest.err
9242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ac_hi=$ac_mid; break
9244else
9245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009246sed 's/^/| /' conftest.$ac_ext >&5
9247
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 ac_lo=`expr $ac_mid + 1`
9249 if test $ac_lo -le $ac_mid; then
9250 ac_lo= ac_hi=
9251 break
9252 fi
9253 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255
9256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 done
9258else
9259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009260sed 's/^/| /' conftest.$ac_ext >&5
9261
Martin v. Löwiseba40652007-08-30 20:10:57 +00009262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009263/* confdefs.h. */
9264_ACEOF
9265cat confdefs.h >>conftest.$ac_ext
9266cat >>conftest.$ac_ext <<_ACEOF
9267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009270int
9271main ()
9272{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009274test_array [0] = 0
9275
9276 ;
9277 return 0;
9278}
9279_ACEOF
9280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281if { (ac_try="$ac_compile"
9282case "(($ac_try" in
9283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9284 *) ac_try_echo=$ac_try;;
9285esac
9286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009289 grep -v '^ *+' conftest.er1 >conftest.err
9290 rm -f conftest.er1
9291 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009293 (exit $ac_status); } && {
9294 test -z "$ac_c_werror_flag" ||
9295 test ! -s conftest.err
9296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 ac_hi=-1 ac_mid=-1
9298 while :; do
9299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* confdefs.h. */
9301_ACEOF
9302cat confdefs.h >>conftest.$ac_ext
9303cat >>conftest.$ac_ext <<_ACEOF
9304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009305$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009307int
9308main ()
9309{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009311test_array [0] = 0
9312
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318if { (ac_try="$ac_compile"
9319case "(($ac_try" in
9320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9321 *) ac_try_echo=$ac_try;;
9322esac
9323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009326 grep -v '^ *+' conftest.er1 >conftest.err
9327 rm -f conftest.er1
9328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009330 (exit $ac_status); } && {
9331 test -z "$ac_c_werror_flag" ||
9332 test ! -s conftest.err
9333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ac_lo=$ac_mid; break
9335else
9336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009337sed 's/^/| /' conftest.$ac_ext >&5
9338
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339 ac_hi=`expr '(' $ac_mid ')' - 1`
9340 if test $ac_mid -le $ac_hi; then
9341 ac_lo= ac_hi=
9342 break
9343 fi
9344 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 done
9349else
9350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009351sed 's/^/| /' conftest.$ac_ext >&5
9352
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355
9356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358
9359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009360# Binary search between lo and hi bounds.
9361while test "x$ac_lo" != "x$ac_hi"; do
9362 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009364/* confdefs.h. */
9365_ACEOF
9366cat confdefs.h >>conftest.$ac_ext
9367cat >>conftest.$ac_ext <<_ACEOF
9368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009369$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009371int
9372main ()
9373{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009375test_array [0] = 0
9376
9377 ;
9378 return 0;
9379}
9380_ACEOF
9381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382if { (ac_try="$ac_compile"
9383case "(($ac_try" in
9384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9385 *) ac_try_echo=$ac_try;;
9386esac
9387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009390 grep -v '^ *+' conftest.er1 >conftest.err
9391 rm -f conftest.er1
9392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 (exit $ac_status); } && {
9395 test -z "$ac_c_werror_flag" ||
9396 test ! -s conftest.err
9397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_hi=$ac_mid
9399else
9400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009401sed 's/^/| /' conftest.$ac_ext >&5
9402
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405
9406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009407done
9408case $ac_lo in
9409?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009410'') if test "$ac_cv_type_double" = yes; then
9411 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009412See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009414See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415 { (exit 77); exit 77; }; }
9416 else
9417 ac_cv_sizeof_double=0
9418 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009419esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009420else
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* confdefs.h. */
9423_ACEOF
9424cat confdefs.h >>conftest.$ac_ext
9425cat >>conftest.$ac_ext <<_ACEOF
9426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428 typedef double ac__type_sizeof_;
9429static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9430static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009431#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009432#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009433int
9434main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009435{
Martin v. Löwis11437992002-04-12 09:54:03 +00009436
9437 FILE *f = fopen ("conftest.val", "w");
9438 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439 return 1;
9440 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 long int i = longval ();
9443 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9444 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 fprintf (f, "%ld\n", i);
9446 }
9447 else
9448 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449 unsigned long int i = ulongval ();
9450 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9451 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 fprintf (f, "%lu\n", i);
9453 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009455
9456 ;
9457 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009458}
Martin v. Löwis11437992002-04-12 09:54:03 +00009459_ACEOF
9460rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461if { (ac_try="$ac_link"
9462case "(($ac_try" in
9463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9464 *) ac_try_echo=$ac_try;;
9465esac
9466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9467 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_status=$?
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 { (case "(($ac_try" in
9472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9473 *) ac_try_echo=$ac_try;;
9474esac
9475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9476 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_status=$?
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); }; }; then
9480 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009481else
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 echo "$as_me: program exited with status $ac_status" >&5
9483echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009484sed 's/^/| /' conftest.$ac_ext >&5
9485
Martin v. Löwis11437992002-04-12 09:54:03 +00009486( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487if test "$ac_cv_type_double" = yes; then
9488 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009489See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009491See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 { (exit 77); exit 77; }; }
9493 else
9494 ac_cv_sizeof_double=0
9495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009497rm -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 +00009498fi
9499rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9502echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9503
9504
9505
Martin v. Löwis11437992002-04-12 09:54:03 +00009506cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009507#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009508_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009509
9510
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9512echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009513if test "${ac_cv_type_fpos_t+set}" = set; then
9514 echo $ECHO_N "(cached) $ECHO_C" >&6
9515else
9516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009517/* confdefs.h. */
9518_ACEOF
9519cat confdefs.h >>conftest.$ac_ext
9520cat >>conftest.$ac_ext <<_ACEOF
9521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009522$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009524int
9525main ()
9526{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 return 0;
9531 ;
9532 return 0;
9533}
9534_ACEOF
9535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536if { (ac_try="$ac_compile"
9537case "(($ac_try" in
9538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9539 *) ac_try_echo=$ac_try;;
9540esac
9541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009544 grep -v '^ *+' conftest.er1 >conftest.err
9545 rm -f conftest.er1
9546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 (exit $ac_status); } && {
9549 test -z "$ac_c_werror_flag" ||
9550 test ! -s conftest.err
9551 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ac_cv_type_fpos_t=yes
9553else
9554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009555sed 's/^/| /' conftest.$ac_ext >&5
9556
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009558fi
Brett Cannon19fab762007-06-02 03:02:29 +00009559
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9561fi
9562{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9563echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9564
9565# The cast to long int works around a bug in the HP C Compiler
9566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9568# This bug is HP SR number 8606223364.
9569{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9570echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009571if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9572 echo $ECHO_N "(cached) $ECHO_C" >&6
9573else
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 if test "$cross_compiling" = yes; then
9575 # Depending upon the size, compute the lo and hi bounds.
9576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* confdefs.h. */
9578_ACEOF
9579cat confdefs.h >>conftest.$ac_ext
9580cat >>conftest.$ac_ext <<_ACEOF
9581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009582$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009588test_array [0] = 0
9589
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595if { (ac_try="$ac_compile"
9596case "(($ac_try" in
9597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9598 *) ac_try_echo=$ac_try;;
9599esac
9600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009603 grep -v '^ *+' conftest.er1 >conftest.err
9604 rm -f conftest.er1
9605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607 (exit $ac_status); } && {
9608 test -z "$ac_c_werror_flag" ||
9609 test ! -s conftest.err
9610 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_lo=0 ac_mid=0
9612 while :; do
9613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
9623{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009625test_array [0] = 0
9626
9627 ;
9628 return 0;
9629}
9630_ACEOF
9631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632if { (ac_try="$ac_compile"
9633case "(($ac_try" in
9634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9635 *) ac_try_echo=$ac_try;;
9636esac
9637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009640 grep -v '^ *+' conftest.er1 >conftest.err
9641 rm -f conftest.er1
9642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644 (exit $ac_status); } && {
9645 test -z "$ac_c_werror_flag" ||
9646 test ! -s conftest.err
9647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_hi=$ac_mid; break
9649else
9650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009651sed 's/^/| /' conftest.$ac_ext >&5
9652
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 ac_lo=`expr $ac_mid + 1`
9654 if test $ac_lo -le $ac_mid; then
9655 ac_lo= ac_hi=
9656 break
9657 fi
9658 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660
9661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 done
9663else
9664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009665sed 's/^/| /' conftest.$ac_ext >&5
9666
Martin v. Löwiseba40652007-08-30 20:10:57 +00009667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009668/* confdefs.h. */
9669_ACEOF
9670cat confdefs.h >>conftest.$ac_ext
9671cat >>conftest.$ac_ext <<_ACEOF
9672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009673$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009675int
9676main ()
9677{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009679test_array [0] = 0
9680
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686if { (ac_try="$ac_compile"
9687case "(($ac_try" in
9688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9689 *) ac_try_echo=$ac_try;;
9690esac
9691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009694 grep -v '^ *+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009698 (exit $ac_status); } && {
9699 test -z "$ac_c_werror_flag" ||
9700 test ! -s conftest.err
9701 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ac_hi=-1 ac_mid=-1
9703 while :; do
9704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* confdefs.h. */
9706_ACEOF
9707cat confdefs.h >>conftest.$ac_ext
9708cat >>conftest.$ac_ext <<_ACEOF
9709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009710$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009712int
9713main ()
9714{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009716test_array [0] = 0
9717
9718 ;
9719 return 0;
9720}
9721_ACEOF
9722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723if { (ac_try="$ac_compile"
9724case "(($ac_try" in
9725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9726 *) ac_try_echo=$ac_try;;
9727esac
9728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009731 grep -v '^ *+' conftest.er1 >conftest.err
9732 rm -f conftest.er1
9733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009735 (exit $ac_status); } && {
9736 test -z "$ac_c_werror_flag" ||
9737 test ! -s conftest.err
9738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_lo=$ac_mid; break
9740else
9741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009742sed 's/^/| /' conftest.$ac_ext >&5
9743
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744 ac_hi=`expr '(' $ac_mid ')' - 1`
9745 if test $ac_mid -le $ac_hi; then
9746 ac_lo= ac_hi=
9747 break
9748 fi
9749 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751
9752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 done
9754else
9755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009756sed 's/^/| /' conftest.$ac_ext >&5
9757
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760
9761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763
9764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009765# Binary search between lo and hi bounds.
9766while test "x$ac_lo" != "x$ac_hi"; do
9767 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* confdefs.h. */
9770_ACEOF
9771cat confdefs.h >>conftest.$ac_ext
9772cat >>conftest.$ac_ext <<_ACEOF
9773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009780test_array [0] = 0
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787if { (ac_try="$ac_compile"
9788case "(($ac_try" in
9789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9790 *) ac_try_echo=$ac_try;;
9791esac
9792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009795 grep -v '^ *+' conftest.er1 >conftest.err
9796 rm -f conftest.er1
9797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 (exit $ac_status); } && {
9800 test -z "$ac_c_werror_flag" ||
9801 test ! -s conftest.err
9802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_hi=$ac_mid
9804else
9805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009812done
9813case $ac_lo in
9814?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009815'') if test "$ac_cv_type_fpos_t" = yes; then
9816 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009817See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009819See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820 { (exit 77); exit 77; }; }
9821 else
9822 ac_cv_sizeof_fpos_t=0
9823 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009824esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* confdefs.h. */
9828_ACEOF
9829cat confdefs.h >>conftest.$ac_ext
9830cat >>conftest.$ac_ext <<_ACEOF
9831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833 typedef fpos_t ac__type_sizeof_;
9834static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9835static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009840{
Martin v. Löwis11437992002-04-12 09:54:03 +00009841
9842 FILE *f = fopen ("conftest.val", "w");
9843 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009844 return 1;
9845 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 long int i = longval ();
9848 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9849 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 fprintf (f, "%ld\n", i);
9851 }
9852 else
9853 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854 unsigned long int i = ulongval ();
9855 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9856 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 fprintf (f, "%lu\n", i);
9858 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
9861 ;
9862 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009863}
Martin v. Löwis11437992002-04-12 09:54:03 +00009864_ACEOF
9865rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866if { (ac_try="$ac_link"
9867case "(($ac_try" in
9868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9869 *) ac_try_echo=$ac_try;;
9870esac
9871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9872 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_status=$?
9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876 { (case "(($ac_try" in
9877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9878 *) ac_try_echo=$ac_try;;
9879esac
9880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9881 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); }; }; then
9885 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009886else
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 echo "$as_me: program exited with status $ac_status" >&5
9888echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009889sed 's/^/| /' conftest.$ac_ext >&5
9890
Martin v. Löwis11437992002-04-12 09:54:03 +00009891( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892if test "$ac_cv_type_fpos_t" = yes; then
9893 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009894See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009896See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 { (exit 77); exit 77; }; }
9898 else
9899 ac_cv_sizeof_fpos_t=0
9900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009902rm -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 +00009903fi
9904rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9907echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9908
9909
9910
Martin v. Löwis11437992002-04-12 09:54:03 +00009911cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009912#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009914
Michael W. Hudson54241132001-12-07 15:38:26 +00009915
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916{ echo "$as_me:$LINENO: checking for size_t" >&5
9917echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009918if test "${ac_cv_type_size_t+set}" = set; then
9919 echo $ECHO_N "(cached) $ECHO_C" >&6
9920else
9921 cat >conftest.$ac_ext <<_ACEOF
9922/* confdefs.h. */
9923_ACEOF
9924cat confdefs.h >>conftest.$ac_ext
9925cat >>conftest.$ac_ext <<_ACEOF
9926/* end confdefs.h. */
9927$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009929int
9930main ()
9931{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009933 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009935 return 0;
9936 ;
9937 return 0;
9938}
9939_ACEOF
9940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941if { (ac_try="$ac_compile"
9942case "(($ac_try" in
9943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9944 *) ac_try_echo=$ac_try;;
9945esac
9946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009948 ac_status=$?
9949 grep -v '^ *+' conftest.er1 >conftest.err
9950 rm -f conftest.er1
9951 cat conftest.err >&5
9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 (exit $ac_status); } && {
9954 test -z "$ac_c_werror_flag" ||
9955 test ! -s conftest.err
9956 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009957 ac_cv_type_size_t=yes
9958else
9959 echo "$as_me: failed program was:" >&5
9960sed 's/^/| /' conftest.$ac_ext >&5
9961
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963fi
Brett Cannon19fab762007-06-02 03:02:29 +00009964
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9966fi
9967{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9968echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9969
9970# The cast to long int works around a bug in the HP C Compiler
9971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9973# This bug is HP SR number 8606223364.
9974{ echo "$as_me:$LINENO: checking size of size_t" >&5
9975echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009976if test "${ac_cv_sizeof_size_t+set}" = set; then
9977 echo $ECHO_N "(cached) $ECHO_C" >&6
9978else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009979 if test "$cross_compiling" = yes; then
9980 # Depending upon the size, compute the lo and hi bounds.
9981cat >conftest.$ac_ext <<_ACEOF
9982/* confdefs.h. */
9983_ACEOF
9984cat confdefs.h >>conftest.$ac_ext
9985cat >>conftest.$ac_ext <<_ACEOF
9986/* end confdefs.h. */
9987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009988 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009989int
9990main ()
9991{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009993test_array [0] = 0
9994
9995 ;
9996 return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000if { (ac_try="$ac_compile"
10001case "(($ac_try" in
10002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10003 *) ac_try_echo=$ac_try;;
10004esac
10005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010007 ac_status=$?
10008 grep -v '^ *+' conftest.er1 >conftest.err
10009 rm -f conftest.er1
10010 cat conftest.err >&5
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012 (exit $ac_status); } && {
10013 test -z "$ac_c_werror_flag" ||
10014 test ! -s conftest.err
10015 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010016 ac_lo=0 ac_mid=0
10017 while :; do
10018 cat >conftest.$ac_ext <<_ACEOF
10019/* confdefs.h. */
10020_ACEOF
10021cat confdefs.h >>conftest.$ac_ext
10022cat >>conftest.$ac_ext <<_ACEOF
10023/* end confdefs.h. */
10024$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026int
10027main ()
10028{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010030test_array [0] = 0
10031
10032 ;
10033 return 0;
10034}
10035_ACEOF
10036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037if { (ac_try="$ac_compile"
10038case "(($ac_try" in
10039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10040 *) ac_try_echo=$ac_try;;
10041esac
10042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010044 ac_status=$?
10045 grep -v '^ *+' conftest.er1 >conftest.err
10046 rm -f conftest.er1
10047 cat conftest.err >&5
10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049 (exit $ac_status); } && {
10050 test -z "$ac_c_werror_flag" ||
10051 test ! -s conftest.err
10052 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010053 ac_hi=$ac_mid; break
10054else
10055 echo "$as_me: failed program was:" >&5
10056sed 's/^/| /' conftest.$ac_ext >&5
10057
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 ac_lo=`expr $ac_mid + 1`
10059 if test $ac_lo -le $ac_mid; then
10060 ac_lo= ac_hi=
10061 break
10062 fi
10063 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065
10066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010067 done
10068else
10069 echo "$as_me: failed program was:" >&5
10070sed 's/^/| /' conftest.$ac_ext >&5
10071
Martin v. Löwiseba40652007-08-30 20:10:57 +000010072 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010073/* confdefs.h. */
10074_ACEOF
10075cat confdefs.h >>conftest.$ac_ext
10076cat >>conftest.$ac_ext <<_ACEOF
10077/* end confdefs.h. */
10078$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010080int
10081main ()
10082{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010084test_array [0] = 0
10085
10086 ;
10087 return 0;
10088}
10089_ACEOF
10090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091if { (ac_try="$ac_compile"
10092case "(($ac_try" in
10093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10094 *) ac_try_echo=$ac_try;;
10095esac
10096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010098 ac_status=$?
10099 grep -v '^ *+' conftest.er1 >conftest.err
10100 rm -f conftest.er1
10101 cat conftest.err >&5
10102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010103 (exit $ac_status); } && {
10104 test -z "$ac_c_werror_flag" ||
10105 test ! -s conftest.err
10106 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010107 ac_hi=-1 ac_mid=-1
10108 while :; do
10109 cat >conftest.$ac_ext <<_ACEOF
10110/* confdefs.h. */
10111_ACEOF
10112cat confdefs.h >>conftest.$ac_ext
10113cat >>conftest.$ac_ext <<_ACEOF
10114/* end confdefs.h. */
10115$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010117int
10118main ()
10119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010121test_array [0] = 0
10122
10123 ;
10124 return 0;
10125}
10126_ACEOF
10127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128if { (ac_try="$ac_compile"
10129case "(($ac_try" in
10130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10131 *) ac_try_echo=$ac_try;;
10132esac
10133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010135 ac_status=$?
10136 grep -v '^ *+' conftest.er1 >conftest.err
10137 rm -f conftest.er1
10138 cat conftest.err >&5
10139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010140 (exit $ac_status); } && {
10141 test -z "$ac_c_werror_flag" ||
10142 test ! -s conftest.err
10143 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010144 ac_lo=$ac_mid; break
10145else
10146 echo "$as_me: failed program was:" >&5
10147sed 's/^/| /' conftest.$ac_ext >&5
10148
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149 ac_hi=`expr '(' $ac_mid ')' - 1`
10150 if test $ac_mid -le $ac_hi; then
10151 ac_lo= ac_hi=
10152 break
10153 fi
10154 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156
10157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010158 done
10159else
10160 echo "$as_me: failed program was:" >&5
10161sed 's/^/| /' conftest.$ac_ext >&5
10162
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165
10166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168
10169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010170# Binary search between lo and hi bounds.
10171while test "x$ac_lo" != "x$ac_hi"; do
10172 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10173 cat >conftest.$ac_ext <<_ACEOF
10174/* confdefs.h. */
10175_ACEOF
10176cat confdefs.h >>conftest.$ac_ext
10177cat >>conftest.$ac_ext <<_ACEOF
10178/* end confdefs.h. */
10179$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010181int
10182main ()
10183{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010185test_array [0] = 0
10186
10187 ;
10188 return 0;
10189}
10190_ACEOF
10191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192if { (ac_try="$ac_compile"
10193case "(($ac_try" in
10194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10195 *) ac_try_echo=$ac_try;;
10196esac
10197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010199 ac_status=$?
10200 grep -v '^ *+' conftest.er1 >conftest.err
10201 rm -f conftest.er1
10202 cat conftest.err >&5
10203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 (exit $ac_status); } && {
10205 test -z "$ac_c_werror_flag" ||
10206 test ! -s conftest.err
10207 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010208 ac_hi=$ac_mid
10209else
10210 echo "$as_me: failed program was:" >&5
10211sed 's/^/| /' conftest.$ac_ext >&5
10212
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010217done
10218case $ac_lo in
10219?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010220'') if test "$ac_cv_type_size_t" = yes; then
10221 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010222See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010224See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225 { (exit 77); exit 77; }; }
10226 else
10227 ac_cv_sizeof_size_t=0
10228 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010229esac
10230else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010231 cat >conftest.$ac_ext <<_ACEOF
10232/* confdefs.h. */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h. */
10237$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010238 typedef size_t ac__type_sizeof_;
10239static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10240static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010241#include <stdio.h>
10242#include <stdlib.h>
10243int
10244main ()
10245{
10246
10247 FILE *f = fopen ("conftest.val", "w");
10248 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 return 1;
10250 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010251 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252 long int i = longval ();
10253 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10254 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010255 fprintf (f, "%ld\n", i);
10256 }
10257 else
10258 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259 unsigned long int i = ulongval ();
10260 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10261 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010262 fprintf (f, "%lu\n", i);
10263 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010265
10266 ;
10267 return 0;
10268}
10269_ACEOF
10270rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271if { (ac_try="$ac_link"
10272case "(($ac_try" in
10273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10274 *) ac_try_echo=$ac_try;;
10275esac
10276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10277 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010278 ac_status=$?
10279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 { (case "(($ac_try" in
10282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10283 *) ac_try_echo=$ac_try;;
10284esac
10285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10286 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_cv_sizeof_size_t=`cat conftest.val`
10291else
10292 echo "$as_me: program exited with status $ac_status" >&5
10293echo "$as_me: failed program was:" >&5
10294sed 's/^/| /' conftest.$ac_ext >&5
10295
10296( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297if test "$ac_cv_type_size_t" = yes; then
10298 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010299See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010301See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 { (exit 77); exit 77; }; }
10303 else
10304 ac_cv_sizeof_size_t=0
10305 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307rm -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 +000010308fi
10309rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010311{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10312echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10313
10314
10315
Martin v. Löwis18e16552006-02-15 17:27:45 +000010316cat >>confdefs.h <<_ACEOF
10317#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10318_ACEOF
10319
10320
Christian Heimes951cc0f2008-01-31 23:08:23 +000010321{ echo "$as_me:$LINENO: checking for pid_t" >&5
10322echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10323if test "${ac_cv_type_pid_t+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
10325else
10326 cat >conftest.$ac_ext <<_ACEOF
10327/* confdefs.h. */
10328_ACEOF
10329cat confdefs.h >>conftest.$ac_ext
10330cat >>conftest.$ac_ext <<_ACEOF
10331/* end confdefs.h. */
10332$ac_includes_default
10333typedef pid_t ac__type_new_;
10334int
10335main ()
10336{
10337if ((ac__type_new_ *) 0)
10338 return 0;
10339if (sizeof (ac__type_new_))
10340 return 0;
10341 ;
10342 return 0;
10343}
10344_ACEOF
10345rm -f conftest.$ac_objext
10346if { (ac_try="$ac_compile"
10347case "(($ac_try" in
10348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10349 *) ac_try_echo=$ac_try;;
10350esac
10351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10352 (eval "$ac_compile") 2>conftest.er1
10353 ac_status=$?
10354 grep -v '^ *+' conftest.er1 >conftest.err
10355 rm -f conftest.er1
10356 cat conftest.err >&5
10357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10358 (exit $ac_status); } && {
10359 test -z "$ac_c_werror_flag" ||
10360 test ! -s conftest.err
10361 } && test -s conftest.$ac_objext; then
10362 ac_cv_type_pid_t=yes
10363else
10364 echo "$as_me: failed program was:" >&5
10365sed 's/^/| /' conftest.$ac_ext >&5
10366
10367 ac_cv_type_pid_t=no
10368fi
10369
10370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10371fi
10372{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10373echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10374
10375# The cast to long int works around a bug in the HP C Compiler
10376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10378# This bug is HP SR number 8606223364.
10379{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10380echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10381if test "${ac_cv_sizeof_pid_t+set}" = set; then
10382 echo $ECHO_N "(cached) $ECHO_C" >&6
10383else
10384 if test "$cross_compiling" = yes; then
10385 # Depending upon the size, compute the lo and hi bounds.
10386cat >conftest.$ac_ext <<_ACEOF
10387/* confdefs.h. */
10388_ACEOF
10389cat confdefs.h >>conftest.$ac_ext
10390cat >>conftest.$ac_ext <<_ACEOF
10391/* end confdefs.h. */
10392$ac_includes_default
10393 typedef pid_t ac__type_sizeof_;
10394int
10395main ()
10396{
10397static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10398test_array [0] = 0
10399
10400 ;
10401 return 0;
10402}
10403_ACEOF
10404rm -f conftest.$ac_objext
10405if { (ac_try="$ac_compile"
10406case "(($ac_try" in
10407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10408 *) ac_try_echo=$ac_try;;
10409esac
10410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10411 (eval "$ac_compile") 2>conftest.er1
10412 ac_status=$?
10413 grep -v '^ *+' conftest.er1 >conftest.err
10414 rm -f conftest.er1
10415 cat conftest.err >&5
10416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10417 (exit $ac_status); } && {
10418 test -z "$ac_c_werror_flag" ||
10419 test ! -s conftest.err
10420 } && test -s conftest.$ac_objext; then
10421 ac_lo=0 ac_mid=0
10422 while :; do
10423 cat >conftest.$ac_ext <<_ACEOF
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
10429$ac_includes_default
10430 typedef pid_t ac__type_sizeof_;
10431int
10432main ()
10433{
10434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10435test_array [0] = 0
10436
10437 ;
10438 return 0;
10439}
10440_ACEOF
10441rm -f conftest.$ac_objext
10442if { (ac_try="$ac_compile"
10443case "(($ac_try" in
10444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10445 *) ac_try_echo=$ac_try;;
10446esac
10447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10448 (eval "$ac_compile") 2>conftest.er1
10449 ac_status=$?
10450 grep -v '^ *+' conftest.er1 >conftest.err
10451 rm -f conftest.er1
10452 cat conftest.err >&5
10453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10454 (exit $ac_status); } && {
10455 test -z "$ac_c_werror_flag" ||
10456 test ! -s conftest.err
10457 } && test -s conftest.$ac_objext; then
10458 ac_hi=$ac_mid; break
10459else
10460 echo "$as_me: failed program was:" >&5
10461sed 's/^/| /' conftest.$ac_ext >&5
10462
10463 ac_lo=`expr $ac_mid + 1`
10464 if test $ac_lo -le $ac_mid; then
10465 ac_lo= ac_hi=
10466 break
10467 fi
10468 ac_mid=`expr 2 '*' $ac_mid + 1`
10469fi
10470
10471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10472 done
10473else
10474 echo "$as_me: failed program was:" >&5
10475sed 's/^/| /' conftest.$ac_ext >&5
10476
10477 cat >conftest.$ac_ext <<_ACEOF
10478/* confdefs.h. */
10479_ACEOF
10480cat confdefs.h >>conftest.$ac_ext
10481cat >>conftest.$ac_ext <<_ACEOF
10482/* end confdefs.h. */
10483$ac_includes_default
10484 typedef pid_t ac__type_sizeof_;
10485int
10486main ()
10487{
10488static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10489test_array [0] = 0
10490
10491 ;
10492 return 0;
10493}
10494_ACEOF
10495rm -f conftest.$ac_objext
10496if { (ac_try="$ac_compile"
10497case "(($ac_try" in
10498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10499 *) ac_try_echo=$ac_try;;
10500esac
10501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10502 (eval "$ac_compile") 2>conftest.er1
10503 ac_status=$?
10504 grep -v '^ *+' conftest.er1 >conftest.err
10505 rm -f conftest.er1
10506 cat conftest.err >&5
10507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508 (exit $ac_status); } && {
10509 test -z "$ac_c_werror_flag" ||
10510 test ! -s conftest.err
10511 } && test -s conftest.$ac_objext; then
10512 ac_hi=-1 ac_mid=-1
10513 while :; do
10514 cat >conftest.$ac_ext <<_ACEOF
10515/* confdefs.h. */
10516_ACEOF
10517cat confdefs.h >>conftest.$ac_ext
10518cat >>conftest.$ac_ext <<_ACEOF
10519/* end confdefs.h. */
10520$ac_includes_default
10521 typedef pid_t ac__type_sizeof_;
10522int
10523main ()
10524{
10525static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10526test_array [0] = 0
10527
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext
10533if { (ac_try="$ac_compile"
10534case "(($ac_try" in
10535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10536 *) ac_try_echo=$ac_try;;
10537esac
10538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10539 (eval "$ac_compile") 2>conftest.er1
10540 ac_status=$?
10541 grep -v '^ *+' conftest.er1 >conftest.err
10542 rm -f conftest.er1
10543 cat conftest.err >&5
10544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545 (exit $ac_status); } && {
10546 test -z "$ac_c_werror_flag" ||
10547 test ! -s conftest.err
10548 } && test -s conftest.$ac_objext; then
10549 ac_lo=$ac_mid; break
10550else
10551 echo "$as_me: failed program was:" >&5
10552sed 's/^/| /' conftest.$ac_ext >&5
10553
10554 ac_hi=`expr '(' $ac_mid ')' - 1`
10555 if test $ac_mid -le $ac_hi; then
10556 ac_lo= ac_hi=
10557 break
10558 fi
10559 ac_mid=`expr 2 '*' $ac_mid`
10560fi
10561
10562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10563 done
10564else
10565 echo "$as_me: failed program was:" >&5
10566sed 's/^/| /' conftest.$ac_ext >&5
10567
10568 ac_lo= ac_hi=
10569fi
10570
10571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10572fi
10573
10574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10575# Binary search between lo and hi bounds.
10576while test "x$ac_lo" != "x$ac_hi"; do
10577 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10578 cat >conftest.$ac_ext <<_ACEOF
10579/* confdefs.h. */
10580_ACEOF
10581cat confdefs.h >>conftest.$ac_ext
10582cat >>conftest.$ac_ext <<_ACEOF
10583/* end confdefs.h. */
10584$ac_includes_default
10585 typedef pid_t ac__type_sizeof_;
10586int
10587main ()
10588{
10589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10590test_array [0] = 0
10591
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596rm -f conftest.$ac_objext
10597if { (ac_try="$ac_compile"
10598case "(($ac_try" in
10599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10600 *) ac_try_echo=$ac_try;;
10601esac
10602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10603 (eval "$ac_compile") 2>conftest.er1
10604 ac_status=$?
10605 grep -v '^ *+' conftest.er1 >conftest.err
10606 rm -f conftest.er1
10607 cat conftest.err >&5
10608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10609 (exit $ac_status); } && {
10610 test -z "$ac_c_werror_flag" ||
10611 test ! -s conftest.err
10612 } && test -s conftest.$ac_objext; then
10613 ac_hi=$ac_mid
10614else
10615 echo "$as_me: failed program was:" >&5
10616sed 's/^/| /' conftest.$ac_ext >&5
10617
10618 ac_lo=`expr '(' $ac_mid ')' + 1`
10619fi
10620
10621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10622done
10623case $ac_lo in
10624?*) ac_cv_sizeof_pid_t=$ac_lo;;
10625'') if test "$ac_cv_type_pid_t" = yes; then
10626 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10627See \`config.log' for more details." >&5
10628echo "$as_me: error: cannot compute sizeof (pid_t)
10629See \`config.log' for more details." >&2;}
10630 { (exit 77); exit 77; }; }
10631 else
10632 ac_cv_sizeof_pid_t=0
10633 fi ;;
10634esac
10635else
10636 cat >conftest.$ac_ext <<_ACEOF
10637/* confdefs.h. */
10638_ACEOF
10639cat confdefs.h >>conftest.$ac_ext
10640cat >>conftest.$ac_ext <<_ACEOF
10641/* end confdefs.h. */
10642$ac_includes_default
10643 typedef pid_t ac__type_sizeof_;
10644static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10645static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10646#include <stdio.h>
10647#include <stdlib.h>
10648int
10649main ()
10650{
10651
10652 FILE *f = fopen ("conftest.val", "w");
10653 if (! f)
10654 return 1;
10655 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10656 {
10657 long int i = longval ();
10658 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10659 return 1;
10660 fprintf (f, "%ld\n", i);
10661 }
10662 else
10663 {
10664 unsigned long int i = ulongval ();
10665 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10666 return 1;
10667 fprintf (f, "%lu\n", i);
10668 }
10669 return ferror (f) || fclose (f) != 0;
10670
10671 ;
10672 return 0;
10673}
10674_ACEOF
10675rm -f conftest$ac_exeext
10676if { (ac_try="$ac_link"
10677case "(($ac_try" in
10678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10679 *) ac_try_echo=$ac_try;;
10680esac
10681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10682 (eval "$ac_link") 2>&5
10683 ac_status=$?
10684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10686 { (case "(($ac_try" in
10687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688 *) ac_try_echo=$ac_try;;
10689esac
10690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10691 (eval "$ac_try") 2>&5
10692 ac_status=$?
10693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10694 (exit $ac_status); }; }; then
10695 ac_cv_sizeof_pid_t=`cat conftest.val`
10696else
10697 echo "$as_me: program exited with status $ac_status" >&5
10698echo "$as_me: failed program was:" >&5
10699sed 's/^/| /' conftest.$ac_ext >&5
10700
10701( exit $ac_status )
10702if test "$ac_cv_type_pid_t" = yes; then
10703 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10704See \`config.log' for more details." >&5
10705echo "$as_me: error: cannot compute sizeof (pid_t)
10706See \`config.log' for more details." >&2;}
10707 { (exit 77); exit 77; }; }
10708 else
10709 ac_cv_sizeof_pid_t=0
10710 fi
10711fi
10712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10713fi
10714rm -f conftest.val
10715fi
10716{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10717echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10718
10719
10720
10721cat >>confdefs.h <<_ACEOF
10722#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10723_ACEOF
10724
10725
Michael W. Hudson54241132001-12-07 15:38:26 +000010726
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727{ echo "$as_me:$LINENO: checking for long long support" >&5
10728echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010729have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010730cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010731/* confdefs.h. */
10732_ACEOF
10733cat confdefs.h >>conftest.$ac_ext
10734cat >>conftest.$ac_ext <<_ACEOF
10735/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010736
Martin v. Löwis11437992002-04-12 09:54:03 +000010737int
10738main ()
10739{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010740long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 ;
10742 return 0;
10743}
10744_ACEOF
10745rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010746if { (ac_try="$ac_compile"
10747case "(($ac_try" in
10748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10749 *) ac_try_echo=$ac_try;;
10750esac
10751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010754 grep -v '^ *+' conftest.er1 >conftest.err
10755 rm -f conftest.er1
10756 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758 (exit $ac_status); } && {
10759 test -z "$ac_c_werror_flag" ||
10760 test ! -s conftest.err
10761 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010762
10763
10764cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010765#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
10767
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010768 have_long_long=yes
10769
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010770else
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010772sed 's/^/| /' conftest.$ac_ext >&5
10773
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776
10777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10778{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10779echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010780if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010781{ echo "$as_me:$LINENO: checking for long long" >&5
10782echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010783if test "${ac_cv_type_long_long+set}" = set; then
10784 echo $ECHO_N "(cached) $ECHO_C" >&6
10785else
10786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010787/* confdefs.h. */
10788_ACEOF
10789cat confdefs.h >>conftest.$ac_ext
10790cat >>conftest.$ac_ext <<_ACEOF
10791/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010792$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010793typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010794int
10795main ()
10796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010797if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 return 0;
10801 ;
10802 return 0;
10803}
10804_ACEOF
10805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806if { (ac_try="$ac_compile"
10807case "(($ac_try" in
10808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10809 *) ac_try_echo=$ac_try;;
10810esac
10811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010814 grep -v '^ *+' conftest.er1 >conftest.err
10815 rm -f conftest.er1
10816 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818 (exit $ac_status); } && {
10819 test -z "$ac_c_werror_flag" ||
10820 test ! -s conftest.err
10821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010822 ac_cv_type_long_long=yes
10823else
10824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010825sed 's/^/| /' conftest.$ac_ext >&5
10826
Martin v. Löwiseba40652007-08-30 20:10:57 +000010827 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010828fi
Brett Cannon19fab762007-06-02 03:02:29 +000010829
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10831fi
10832{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10833echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10834
10835# The cast to long int works around a bug in the HP C Compiler
10836# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10837# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10838# This bug is HP SR number 8606223364.
10839{ echo "$as_me:$LINENO: checking size of long long" >&5
10840echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010841if test "${ac_cv_sizeof_long_long+set}" = set; then
10842 echo $ECHO_N "(cached) $ECHO_C" >&6
10843else
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 if test "$cross_compiling" = yes; then
10845 # Depending upon the size, compute the lo and hi bounds.
10846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010847/* confdefs.h. */
10848_ACEOF
10849cat confdefs.h >>conftest.$ac_ext
10850cat >>conftest.$ac_ext <<_ACEOF
10851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010852$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010853 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010854int
10855main ()
10856{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010857static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010858test_array [0] = 0
10859
10860 ;
10861 return 0;
10862}
10863_ACEOF
10864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010865if { (ac_try="$ac_compile"
10866case "(($ac_try" in
10867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10868 *) ac_try_echo=$ac_try;;
10869esac
10870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010873 grep -v '^ *+' conftest.er1 >conftest.err
10874 rm -f conftest.er1
10875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010877 (exit $ac_status); } && {
10878 test -z "$ac_c_werror_flag" ||
10879 test ! -s conftest.err
10880 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 ac_lo=0 ac_mid=0
10882 while :; do
10883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010889$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010891int
10892main ()
10893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010895test_array [0] = 0
10896
10897 ;
10898 return 0;
10899}
10900_ACEOF
10901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902if { (ac_try="$ac_compile"
10903case "(($ac_try" in
10904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10905 *) ac_try_echo=$ac_try;;
10906esac
10907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010910 grep -v '^ *+' conftest.er1 >conftest.err
10911 rm -f conftest.er1
10912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010914 (exit $ac_status); } && {
10915 test -z "$ac_c_werror_flag" ||
10916 test ! -s conftest.err
10917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ac_hi=$ac_mid; break
10919else
10920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
Martin v. Löwiseba40652007-08-30 20:10:57 +000010923 ac_lo=`expr $ac_mid + 1`
10924 if test $ac_lo -le $ac_mid; then
10925 ac_lo= ac_hi=
10926 break
10927 fi
10928 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010930
10931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 done
10933else
10934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010935sed 's/^/| /' conftest.$ac_ext >&5
10936
Martin v. Löwiseba40652007-08-30 20:10:57 +000010937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010938/* confdefs.h. */
10939_ACEOF
10940cat confdefs.h >>conftest.$ac_ext
10941cat >>conftest.$ac_ext <<_ACEOF
10942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010943$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010944 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010945int
10946main ()
10947{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010948static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010949test_array [0] = 0
10950
10951 ;
10952 return 0;
10953}
10954_ACEOF
10955rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010956if { (ac_try="$ac_compile"
10957case "(($ac_try" in
10958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10959 *) ac_try_echo=$ac_try;;
10960esac
10961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010964 grep -v '^ *+' conftest.er1 >conftest.err
10965 rm -f conftest.er1
10966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010968 (exit $ac_status); } && {
10969 test -z "$ac_c_werror_flag" ||
10970 test ! -s conftest.err
10971 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 ac_hi=-1 ac_mid=-1
10973 while :; do
10974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010975/* confdefs.h. */
10976_ACEOF
10977cat confdefs.h >>conftest.$ac_ext
10978cat >>conftest.$ac_ext <<_ACEOF
10979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010980$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010981 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982int
10983main ()
10984{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010985static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010986test_array [0] = 0
10987
10988 ;
10989 return 0;
10990}
10991_ACEOF
10992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010993if { (ac_try="$ac_compile"
10994case "(($ac_try" in
10995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10996 *) ac_try_echo=$ac_try;;
10997esac
10998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011001 grep -v '^ *+' conftest.er1 >conftest.err
11002 rm -f conftest.er1
11003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011005 (exit $ac_status); } && {
11006 test -z "$ac_c_werror_flag" ||
11007 test ! -s conftest.err
11008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011009 ac_lo=$ac_mid; break
11010else
11011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011012sed 's/^/| /' conftest.$ac_ext >&5
11013
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014 ac_hi=`expr '(' $ac_mid ')' - 1`
11015 if test $ac_mid -le $ac_hi; then
11016 ac_lo= ac_hi=
11017 break
11018 fi
11019 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021
11022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 done
11024else
11025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011026sed 's/^/| /' conftest.$ac_ext >&5
11027
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011030
11031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033
11034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011035# Binary search between lo and hi bounds.
11036while test "x$ac_lo" != "x$ac_hi"; do
11037 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011039/* confdefs.h. */
11040_ACEOF
11041cat confdefs.h >>conftest.$ac_ext
11042cat >>conftest.$ac_ext <<_ACEOF
11043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011044$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011045 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011046int
11047main ()
11048{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011049static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011050test_array [0] = 0
11051
11052 ;
11053 return 0;
11054}
11055_ACEOF
11056rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011057if { (ac_try="$ac_compile"
11058case "(($ac_try" in
11059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11060 *) ac_try_echo=$ac_try;;
11061esac
11062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011065 grep -v '^ *+' conftest.er1 >conftest.err
11066 rm -f conftest.er1
11067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011069 (exit $ac_status); } && {
11070 test -z "$ac_c_werror_flag" ||
11071 test ! -s conftest.err
11072 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 ac_hi=$ac_mid
11074else
11075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011076sed 's/^/| /' conftest.$ac_ext >&5
11077
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080
11081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011082done
11083case $ac_lo in
11084?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085'') if test "$ac_cv_type_long_long" = yes; then
11086 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011087See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011089See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011090 { (exit 77); exit 77; }; }
11091 else
11092 ac_cv_sizeof_long_long=0
11093 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011094esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011095else
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011097/* confdefs.h. */
11098_ACEOF
11099cat confdefs.h >>conftest.$ac_ext
11100cat >>conftest.$ac_ext <<_ACEOF
11101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011102$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011103 typedef long long ac__type_sizeof_;
11104static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11105static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011106#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011107#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011108int
11109main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011110{
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
11112 FILE *f = fopen ("conftest.val", "w");
11113 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011114 return 1;
11115 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011117 long int i = longval ();
11118 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11119 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 fprintf (f, "%ld\n", i);
11121 }
11122 else
11123 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011124 unsigned long int i = ulongval ();
11125 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11126 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 fprintf (f, "%lu\n", i);
11128 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011129 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
11131 ;
11132 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133}
Martin v. Löwis11437992002-04-12 09:54:03 +000011134_ACEOF
11135rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136if { (ac_try="$ac_link"
11137case "(($ac_try" in
11138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11139 *) ac_try_echo=$ac_try;;
11140esac
11141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11142 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ac_status=$?
11144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011146 { (case "(($ac_try" in
11147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11148 *) ac_try_echo=$ac_try;;
11149esac
11150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11151 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 ac_status=$?
11153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11154 (exit $ac_status); }; }; then
11155 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011156else
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 echo "$as_me: program exited with status $ac_status" >&5
11158echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011159sed 's/^/| /' conftest.$ac_ext >&5
11160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011162if test "$ac_cv_type_long_long" = yes; then
11163 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011164See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011165echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011166See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167 { (exit 77); exit 77; }; }
11168 else
11169 ac_cv_sizeof_long_long=0
11170 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011172rm -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 +000011173fi
11174rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011176{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11177echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11178
11179
11180
Martin v. Löwis11437992002-04-12 09:54:03 +000011181cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011182#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184
Michael W. Hudson54241132001-12-07 15:38:26 +000011185
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011186fi
11187
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011188{ echo "$as_me:$LINENO: checking for long double support" >&5
11189echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11190have_long_double=no
11191cat >conftest.$ac_ext <<_ACEOF
11192/* confdefs.h. */
11193_ACEOF
11194cat confdefs.h >>conftest.$ac_ext
11195cat >>conftest.$ac_ext <<_ACEOF
11196/* end confdefs.h. */
11197
11198int
11199main ()
11200{
11201long double x; x = (long double)0.;
11202 ;
11203 return 0;
11204}
11205_ACEOF
11206rm -f conftest.$ac_objext
11207if { (ac_try="$ac_compile"
11208case "(($ac_try" in
11209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11210 *) ac_try_echo=$ac_try;;
11211esac
11212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11213 (eval "$ac_compile") 2>conftest.er1
11214 ac_status=$?
11215 grep -v '^ *+' conftest.er1 >conftest.err
11216 rm -f conftest.er1
11217 cat conftest.err >&5
11218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219 (exit $ac_status); } && {
11220 test -z "$ac_c_werror_flag" ||
11221 test ! -s conftest.err
11222 } && test -s conftest.$ac_objext; then
11223
11224
11225cat >>confdefs.h <<\_ACEOF
11226#define HAVE_LONG_DOUBLE 1
11227_ACEOF
11228
11229 have_long_double=yes
11230
11231else
11232 echo "$as_me: failed program was:" >&5
11233sed 's/^/| /' conftest.$ac_ext >&5
11234
11235
11236fi
11237
11238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11239{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11240echo "${ECHO_T}$have_long_double" >&6; }
11241if test "$have_long_double" = yes ; then
11242{ echo "$as_me:$LINENO: checking for long double" >&5
11243echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11244if test "${ac_cv_type_long_double+set}" = set; then
11245 echo $ECHO_N "(cached) $ECHO_C" >&6
11246else
11247 cat >conftest.$ac_ext <<_ACEOF
11248/* confdefs.h. */
11249_ACEOF
11250cat confdefs.h >>conftest.$ac_ext
11251cat >>conftest.$ac_ext <<_ACEOF
11252/* end confdefs.h. */
11253$ac_includes_default
11254typedef long double ac__type_new_;
11255int
11256main ()
11257{
11258if ((ac__type_new_ *) 0)
11259 return 0;
11260if (sizeof (ac__type_new_))
11261 return 0;
11262 ;
11263 return 0;
11264}
11265_ACEOF
11266rm -f conftest.$ac_objext
11267if { (ac_try="$ac_compile"
11268case "(($ac_try" in
11269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11270 *) ac_try_echo=$ac_try;;
11271esac
11272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11273 (eval "$ac_compile") 2>conftest.er1
11274 ac_status=$?
11275 grep -v '^ *+' conftest.er1 >conftest.err
11276 rm -f conftest.er1
11277 cat conftest.err >&5
11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279 (exit $ac_status); } && {
11280 test -z "$ac_c_werror_flag" ||
11281 test ! -s conftest.err
11282 } && test -s conftest.$ac_objext; then
11283 ac_cv_type_long_double=yes
11284else
11285 echo "$as_me: failed program was:" >&5
11286sed 's/^/| /' conftest.$ac_ext >&5
11287
11288 ac_cv_type_long_double=no
11289fi
11290
11291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11292fi
11293{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11294echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11295
11296# The cast to long int works around a bug in the HP C Compiler
11297# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11298# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11299# This bug is HP SR number 8606223364.
11300{ echo "$as_me:$LINENO: checking size of long double" >&5
11301echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11302if test "${ac_cv_sizeof_long_double+set}" = set; then
11303 echo $ECHO_N "(cached) $ECHO_C" >&6
11304else
11305 if test "$cross_compiling" = yes; then
11306 # Depending upon the size, compute the lo and hi bounds.
11307cat >conftest.$ac_ext <<_ACEOF
11308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
11313$ac_includes_default
11314 typedef long double ac__type_sizeof_;
11315int
11316main ()
11317{
11318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11319test_array [0] = 0
11320
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325rm -f conftest.$ac_objext
11326if { (ac_try="$ac_compile"
11327case "(($ac_try" in
11328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11329 *) ac_try_echo=$ac_try;;
11330esac
11331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11332 (eval "$ac_compile") 2>conftest.er1
11333 ac_status=$?
11334 grep -v '^ *+' conftest.er1 >conftest.err
11335 rm -f conftest.er1
11336 cat conftest.err >&5
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); } && {
11339 test -z "$ac_c_werror_flag" ||
11340 test ! -s conftest.err
11341 } && test -s conftest.$ac_objext; then
11342 ac_lo=0 ac_mid=0
11343 while :; do
11344 cat >conftest.$ac_ext <<_ACEOF
11345/* confdefs.h. */
11346_ACEOF
11347cat confdefs.h >>conftest.$ac_ext
11348cat >>conftest.$ac_ext <<_ACEOF
11349/* end confdefs.h. */
11350$ac_includes_default
11351 typedef long double ac__type_sizeof_;
11352int
11353main ()
11354{
11355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11356test_array [0] = 0
11357
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext
11363if { (ac_try="$ac_compile"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
11368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11369 (eval "$ac_compile") 2>conftest.er1
11370 ac_status=$?
11371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
11374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest.$ac_objext; then
11379 ac_hi=$ac_mid; break
11380else
11381 echo "$as_me: failed program was:" >&5
11382sed 's/^/| /' conftest.$ac_ext >&5
11383
11384 ac_lo=`expr $ac_mid + 1`
11385 if test $ac_lo -le $ac_mid; then
11386 ac_lo= ac_hi=
11387 break
11388 fi
11389 ac_mid=`expr 2 '*' $ac_mid + 1`
11390fi
11391
11392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11393 done
11394else
11395 echo "$as_me: failed program was:" >&5
11396sed 's/^/| /' conftest.$ac_ext >&5
11397
11398 cat >conftest.$ac_ext <<_ACEOF
11399/* confdefs.h. */
11400_ACEOF
11401cat confdefs.h >>conftest.$ac_ext
11402cat >>conftest.$ac_ext <<_ACEOF
11403/* end confdefs.h. */
11404$ac_includes_default
11405 typedef long double ac__type_sizeof_;
11406int
11407main ()
11408{
11409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11410test_array [0] = 0
11411
11412 ;
11413 return 0;
11414}
11415_ACEOF
11416rm -f conftest.$ac_objext
11417if { (ac_try="$ac_compile"
11418case "(($ac_try" in
11419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11420 *) ac_try_echo=$ac_try;;
11421esac
11422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11423 (eval "$ac_compile") 2>conftest.er1
11424 ac_status=$?
11425 grep -v '^ *+' conftest.er1 >conftest.err
11426 rm -f conftest.er1
11427 cat conftest.err >&5
11428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11429 (exit $ac_status); } && {
11430 test -z "$ac_c_werror_flag" ||
11431 test ! -s conftest.err
11432 } && test -s conftest.$ac_objext; then
11433 ac_hi=-1 ac_mid=-1
11434 while :; do
11435 cat >conftest.$ac_ext <<_ACEOF
11436/* confdefs.h. */
11437_ACEOF
11438cat confdefs.h >>conftest.$ac_ext
11439cat >>conftest.$ac_ext <<_ACEOF
11440/* end confdefs.h. */
11441$ac_includes_default
11442 typedef long double ac__type_sizeof_;
11443int
11444main ()
11445{
11446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11447test_array [0] = 0
11448
11449 ;
11450 return 0;
11451}
11452_ACEOF
11453rm -f conftest.$ac_objext
11454if { (ac_try="$ac_compile"
11455case "(($ac_try" in
11456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11457 *) ac_try_echo=$ac_try;;
11458esac
11459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11460 (eval "$ac_compile") 2>conftest.er1
11461 ac_status=$?
11462 grep -v '^ *+' conftest.er1 >conftest.err
11463 rm -f conftest.er1
11464 cat conftest.err >&5
11465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11466 (exit $ac_status); } && {
11467 test -z "$ac_c_werror_flag" ||
11468 test ! -s conftest.err
11469 } && test -s conftest.$ac_objext; then
11470 ac_lo=$ac_mid; break
11471else
11472 echo "$as_me: failed program was:" >&5
11473sed 's/^/| /' conftest.$ac_ext >&5
11474
11475 ac_hi=`expr '(' $ac_mid ')' - 1`
11476 if test $ac_mid -le $ac_hi; then
11477 ac_lo= ac_hi=
11478 break
11479 fi
11480 ac_mid=`expr 2 '*' $ac_mid`
11481fi
11482
11483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11484 done
11485else
11486 echo "$as_me: failed program was:" >&5
11487sed 's/^/| /' conftest.$ac_ext >&5
11488
11489 ac_lo= ac_hi=
11490fi
11491
11492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11493fi
11494
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11496# Binary search between lo and hi bounds.
11497while test "x$ac_lo" != "x$ac_hi"; do
11498 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11499 cat >conftest.$ac_ext <<_ACEOF
11500/* confdefs.h. */
11501_ACEOF
11502cat confdefs.h >>conftest.$ac_ext
11503cat >>conftest.$ac_ext <<_ACEOF
11504/* end confdefs.h. */
11505$ac_includes_default
11506 typedef long double ac__type_sizeof_;
11507int
11508main ()
11509{
11510static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11511test_array [0] = 0
11512
11513 ;
11514 return 0;
11515}
11516_ACEOF
11517rm -f conftest.$ac_objext
11518if { (ac_try="$ac_compile"
11519case "(($ac_try" in
11520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11521 *) ac_try_echo=$ac_try;;
11522esac
11523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11524 (eval "$ac_compile") 2>conftest.er1
11525 ac_status=$?
11526 grep -v '^ *+' conftest.er1 >conftest.err
11527 rm -f conftest.er1
11528 cat conftest.err >&5
11529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530 (exit $ac_status); } && {
11531 test -z "$ac_c_werror_flag" ||
11532 test ! -s conftest.err
11533 } && test -s conftest.$ac_objext; then
11534 ac_hi=$ac_mid
11535else
11536 echo "$as_me: failed program was:" >&5
11537sed 's/^/| /' conftest.$ac_ext >&5
11538
11539 ac_lo=`expr '(' $ac_mid ')' + 1`
11540fi
11541
11542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11543done
11544case $ac_lo in
11545?*) ac_cv_sizeof_long_double=$ac_lo;;
11546'') if test "$ac_cv_type_long_double" = yes; then
11547 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11548See \`config.log' for more details." >&5
11549echo "$as_me: error: cannot compute sizeof (long double)
11550See \`config.log' for more details." >&2;}
11551 { (exit 77); exit 77; }; }
11552 else
11553 ac_cv_sizeof_long_double=0
11554 fi ;;
11555esac
11556else
11557 cat >conftest.$ac_ext <<_ACEOF
11558/* confdefs.h. */
11559_ACEOF
11560cat confdefs.h >>conftest.$ac_ext
11561cat >>conftest.$ac_ext <<_ACEOF
11562/* end confdefs.h. */
11563$ac_includes_default
11564 typedef long double ac__type_sizeof_;
11565static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11566static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11567#include <stdio.h>
11568#include <stdlib.h>
11569int
11570main ()
11571{
11572
11573 FILE *f = fopen ("conftest.val", "w");
11574 if (! f)
11575 return 1;
11576 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11577 {
11578 long int i = longval ();
11579 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11580 return 1;
11581 fprintf (f, "%ld\n", i);
11582 }
11583 else
11584 {
11585 unsigned long int i = ulongval ();
11586 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11587 return 1;
11588 fprintf (f, "%lu\n", i);
11589 }
11590 return ferror (f) || fclose (f) != 0;
11591
11592 ;
11593 return 0;
11594}
11595_ACEOF
11596rm -f conftest$ac_exeext
11597if { (ac_try="$ac_link"
11598case "(($ac_try" in
11599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11600 *) ac_try_echo=$ac_try;;
11601esac
11602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11603 (eval "$ac_link") 2>&5
11604 ac_status=$?
11605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11607 { (case "(($ac_try" in
11608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11609 *) ac_try_echo=$ac_try;;
11610esac
11611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11612 (eval "$ac_try") 2>&5
11613 ac_status=$?
11614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11615 (exit $ac_status); }; }; then
11616 ac_cv_sizeof_long_double=`cat conftest.val`
11617else
11618 echo "$as_me: program exited with status $ac_status" >&5
11619echo "$as_me: failed program was:" >&5
11620sed 's/^/| /' conftest.$ac_ext >&5
11621
11622( exit $ac_status )
11623if test "$ac_cv_type_long_double" = yes; then
11624 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11625See \`config.log' for more details." >&5
11626echo "$as_me: error: cannot compute sizeof (long double)
11627See \`config.log' for more details." >&2;}
11628 { (exit 77); exit 77; }; }
11629 else
11630 ac_cv_sizeof_long_double=0
11631 fi
11632fi
11633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11634fi
11635rm -f conftest.val
11636fi
11637{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11638echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11639
11640
11641
11642cat >>confdefs.h <<_ACEOF
11643#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11644_ACEOF
11645
11646
11647fi
11648
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11650echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011651have_c99_bool=no
11652cat >conftest.$ac_ext <<_ACEOF
11653/* confdefs.h. */
11654_ACEOF
11655cat confdefs.h >>conftest.$ac_ext
11656cat >>conftest.$ac_ext <<_ACEOF
11657/* end confdefs.h. */
11658
11659int
11660main ()
11661{
11662_Bool x; x = (_Bool)0;
11663 ;
11664 return 0;
11665}
11666_ACEOF
11667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668if { (ac_try="$ac_compile"
11669case "(($ac_try" in
11670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11671 *) ac_try_echo=$ac_try;;
11672esac
11673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011675 ac_status=$?
11676 grep -v '^ *+' conftest.er1 >conftest.err
11677 rm -f conftest.er1
11678 cat conftest.err >&5
11679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011680 (exit $ac_status); } && {
11681 test -z "$ac_c_werror_flag" ||
11682 test ! -s conftest.err
11683 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011684
11685
11686cat >>confdefs.h <<\_ACEOF
11687#define HAVE_C99_BOOL 1
11688_ACEOF
11689
11690 have_c99_bool=yes
11691
11692else
11693 echo "$as_me: failed program was:" >&5
11694sed 's/^/| /' conftest.$ac_ext >&5
11695
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698
11699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11700{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11701echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011702if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703{ echo "$as_me:$LINENO: checking for _Bool" >&5
11704echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011705if test "${ac_cv_type__Bool+set}" = set; then
11706 echo $ECHO_N "(cached) $ECHO_C" >&6
11707else
11708 cat >conftest.$ac_ext <<_ACEOF
11709/* confdefs.h. */
11710_ACEOF
11711cat confdefs.h >>conftest.$ac_ext
11712cat >>conftest.$ac_ext <<_ACEOF
11713/* end confdefs.h. */
11714$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011715typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011716int
11717main ()
11718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011720 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011721if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011722 return 0;
11723 ;
11724 return 0;
11725}
11726_ACEOF
11727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728if { (ac_try="$ac_compile"
11729case "(($ac_try" in
11730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11731 *) ac_try_echo=$ac_try;;
11732esac
11733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011735 ac_status=$?
11736 grep -v '^ *+' conftest.er1 >conftest.err
11737 rm -f conftest.er1
11738 cat conftest.err >&5
11739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740 (exit $ac_status); } && {
11741 test -z "$ac_c_werror_flag" ||
11742 test ! -s conftest.err
11743 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011744 ac_cv_type__Bool=yes
11745else
11746 echo "$as_me: failed program was:" >&5
11747sed 's/^/| /' conftest.$ac_ext >&5
11748
Martin v. Löwiseba40652007-08-30 20:10:57 +000011749 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011750fi
Brett Cannon19fab762007-06-02 03:02:29 +000011751
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11753fi
11754{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11755echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11756
11757# The cast to long int works around a bug in the HP C Compiler
11758# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11759# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11760# This bug is HP SR number 8606223364.
11761{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11762echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011763if test "${ac_cv_sizeof__Bool+set}" = set; then
11764 echo $ECHO_N "(cached) $ECHO_C" >&6
11765else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011766 if test "$cross_compiling" = yes; then
11767 # Depending upon the size, compute the lo and hi bounds.
11768cat >conftest.$ac_ext <<_ACEOF
11769/* confdefs.h. */
11770_ACEOF
11771cat confdefs.h >>conftest.$ac_ext
11772cat >>conftest.$ac_ext <<_ACEOF
11773/* end confdefs.h. */
11774$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011775 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011776int
11777main ()
11778{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011780test_array [0] = 0
11781
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787if { (ac_try="$ac_compile"
11788case "(($ac_try" in
11789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11790 *) ac_try_echo=$ac_try;;
11791esac
11792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011794 ac_status=$?
11795 grep -v '^ *+' conftest.er1 >conftest.err
11796 rm -f conftest.er1
11797 cat conftest.err >&5
11798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011799 (exit $ac_status); } && {
11800 test -z "$ac_c_werror_flag" ||
11801 test ! -s conftest.err
11802 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011803 ac_lo=0 ac_mid=0
11804 while :; do
11805 cat >conftest.$ac_ext <<_ACEOF
11806/* confdefs.h. */
11807_ACEOF
11808cat confdefs.h >>conftest.$ac_ext
11809cat >>conftest.$ac_ext <<_ACEOF
11810/* end confdefs.h. */
11811$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011812 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011813int
11814main ()
11815{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011817test_array [0] = 0
11818
11819 ;
11820 return 0;
11821}
11822_ACEOF
11823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824if { (ac_try="$ac_compile"
11825case "(($ac_try" in
11826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11827 *) ac_try_echo=$ac_try;;
11828esac
11829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011831 ac_status=$?
11832 grep -v '^ *+' conftest.er1 >conftest.err
11833 rm -f conftest.er1
11834 cat conftest.err >&5
11835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011836 (exit $ac_status); } && {
11837 test -z "$ac_c_werror_flag" ||
11838 test ! -s conftest.err
11839 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011840 ac_hi=$ac_mid; break
11841else
11842 echo "$as_me: failed program was:" >&5
11843sed 's/^/| /' conftest.$ac_ext >&5
11844
Martin v. Löwiseba40652007-08-30 20:10:57 +000011845 ac_lo=`expr $ac_mid + 1`
11846 if test $ac_lo -le $ac_mid; then
11847 ac_lo= ac_hi=
11848 break
11849 fi
11850 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011852
11853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011854 done
11855else
11856 echo "$as_me: failed program was:" >&5
11857sed 's/^/| /' conftest.$ac_ext >&5
11858
Martin v. Löwiseba40652007-08-30 20:10:57 +000011859 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011860/* confdefs.h. */
11861_ACEOF
11862cat confdefs.h >>conftest.$ac_ext
11863cat >>conftest.$ac_ext <<_ACEOF
11864/* end confdefs.h. */
11865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011867int
11868main ()
11869{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011871test_array [0] = 0
11872
11873 ;
11874 return 0;
11875}
11876_ACEOF
11877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878if { (ac_try="$ac_compile"
11879case "(($ac_try" in
11880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11881 *) ac_try_echo=$ac_try;;
11882esac
11883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011885 ac_status=$?
11886 grep -v '^ *+' conftest.er1 >conftest.err
11887 rm -f conftest.er1
11888 cat conftest.err >&5
11889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890 (exit $ac_status); } && {
11891 test -z "$ac_c_werror_flag" ||
11892 test ! -s conftest.err
11893 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011894 ac_hi=-1 ac_mid=-1
11895 while :; do
11896 cat >conftest.$ac_ext <<_ACEOF
11897/* confdefs.h. */
11898_ACEOF
11899cat confdefs.h >>conftest.$ac_ext
11900cat >>conftest.$ac_ext <<_ACEOF
11901/* end confdefs.h. */
11902$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011903 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011904int
11905main ()
11906{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011907static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011908test_array [0] = 0
11909
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011915if { (ac_try="$ac_compile"
11916case "(($ac_try" in
11917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11918 *) ac_try_echo=$ac_try;;
11919esac
11920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011922 ac_status=$?
11923 grep -v '^ *+' conftest.er1 >conftest.err
11924 rm -f conftest.er1
11925 cat conftest.err >&5
11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011927 (exit $ac_status); } && {
11928 test -z "$ac_c_werror_flag" ||
11929 test ! -s conftest.err
11930 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011931 ac_lo=$ac_mid; break
11932else
11933 echo "$as_me: failed program was:" >&5
11934sed 's/^/| /' conftest.$ac_ext >&5
11935
Martin v. Löwiseba40652007-08-30 20:10:57 +000011936 ac_hi=`expr '(' $ac_mid ')' - 1`
11937 if test $ac_mid -le $ac_hi; then
11938 ac_lo= ac_hi=
11939 break
11940 fi
11941 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943
11944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011945 done
11946else
11947 echo "$as_me: failed program was:" >&5
11948sed 's/^/| /' conftest.$ac_ext >&5
11949
Martin v. Löwiseba40652007-08-30 20:10:57 +000011950 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011952
11953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955
11956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011957# Binary search between lo and hi bounds.
11958while test "x$ac_lo" != "x$ac_hi"; do
11959 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11960 cat >conftest.$ac_ext <<_ACEOF
11961/* confdefs.h. */
11962_ACEOF
11963cat confdefs.h >>conftest.$ac_ext
11964cat >>conftest.$ac_ext <<_ACEOF
11965/* end confdefs.h. */
11966$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011967 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011968int
11969main ()
11970{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011972test_array [0] = 0
11973
11974 ;
11975 return 0;
11976}
11977_ACEOF
11978rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011979if { (ac_try="$ac_compile"
11980case "(($ac_try" in
11981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11982 *) ac_try_echo=$ac_try;;
11983esac
11984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011986 ac_status=$?
11987 grep -v '^ *+' conftest.er1 >conftest.err
11988 rm -f conftest.er1
11989 cat conftest.err >&5
11990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991 (exit $ac_status); } && {
11992 test -z "$ac_c_werror_flag" ||
11993 test ! -s conftest.err
11994 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011995 ac_hi=$ac_mid
11996else
11997 echo "$as_me: failed program was:" >&5
11998sed 's/^/| /' conftest.$ac_ext >&5
11999
Martin v. Löwiseba40652007-08-30 20:10:57 +000012000 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002
12003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012004done
12005case $ac_lo in
12006?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012007'') if test "$ac_cv_type__Bool" = yes; then
12008 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012009See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012010echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012011See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012012 { (exit 77); exit 77; }; }
12013 else
12014 ac_cv_sizeof__Bool=0
12015 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012016esac
12017else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012018 cat >conftest.$ac_ext <<_ACEOF
12019/* confdefs.h. */
12020_ACEOF
12021cat confdefs.h >>conftest.$ac_ext
12022cat >>conftest.$ac_ext <<_ACEOF
12023/* end confdefs.h. */
12024$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012025 typedef _Bool ac__type_sizeof_;
12026static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12027static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012028#include <stdio.h>
12029#include <stdlib.h>
12030int
12031main ()
12032{
12033
12034 FILE *f = fopen ("conftest.val", "w");
12035 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012036 return 1;
12037 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012038 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012039 long int i = longval ();
12040 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12041 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012042 fprintf (f, "%ld\n", i);
12043 }
12044 else
12045 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012046 unsigned long int i = ulongval ();
12047 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12048 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012049 fprintf (f, "%lu\n", i);
12050 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012052
12053 ;
12054 return 0;
12055}
12056_ACEOF
12057rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012058if { (ac_try="$ac_link"
12059case "(($ac_try" in
12060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12061 *) ac_try_echo=$ac_try;;
12062esac
12063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12064 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012065 ac_status=$?
12066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012068 { (case "(($ac_try" in
12069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12070 *) ac_try_echo=$ac_try;;
12071esac
12072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12073 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012074 ac_status=$?
12075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076 (exit $ac_status); }; }; then
12077 ac_cv_sizeof__Bool=`cat conftest.val`
12078else
12079 echo "$as_me: program exited with status $ac_status" >&5
12080echo "$as_me: failed program was:" >&5
12081sed 's/^/| /' conftest.$ac_ext >&5
12082
12083( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084if test "$ac_cv_type__Bool" = yes; then
12085 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012086See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012088See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012089 { (exit 77); exit 77; }; }
12090 else
12091 ac_cv_sizeof__Bool=0
12092 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094rm -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 +000012095fi
12096rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12099echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12100
12101
12102
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012103cat >>confdefs.h <<_ACEOF
12104#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12105_ACEOF
12106
12107
12108fi
12109
Martin v. Löwiseba40652007-08-30 20:10:57 +000012110{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12111echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012112if test "${ac_cv_type_uintptr_t+set}" = set; then
12113 echo $ECHO_N "(cached) $ECHO_C" >&6
12114else
12115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* confdefs.h. */
12117_ACEOF
12118cat confdefs.h >>conftest.$ac_ext
12119cat >>conftest.$ac_ext <<_ACEOF
12120/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012121#ifdef HAVE_STDINT_H
12122 #include <stdint.h>
12123 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012124
Martin v. Löwiseba40652007-08-30 20:10:57 +000012125typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012126int
12127main ()
12128{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012129if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012130 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012131if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012132 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 ;
12134 return 0;
12135}
12136_ACEOF
12137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012138if { (ac_try="$ac_compile"
12139case "(($ac_try" in
12140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12141 *) ac_try_echo=$ac_try;;
12142esac
12143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012146 grep -v '^ *+' conftest.er1 >conftest.err
12147 rm -f conftest.er1
12148 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012150 (exit $ac_status); } && {
12151 test -z "$ac_c_werror_flag" ||
12152 test ! -s conftest.err
12153 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012154 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012155else
Martin v. Löwis11437992002-04-12 09:54:03 +000012156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012157sed 's/^/| /' conftest.$ac_ext >&5
12158
Martin v. Löwiseba40652007-08-30 20:10:57 +000012159 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012161
12162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012164{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12165echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012166if test $ac_cv_type_uintptr_t = yes; then
12167
12168cat >>confdefs.h <<_ACEOF
12169#define HAVE_UINTPTR_T 1
12170_ACEOF
12171
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12173echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012174if test "${ac_cv_type_uintptr_t+set}" = set; then
12175 echo $ECHO_N "(cached) $ECHO_C" >&6
12176else
12177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012178/* confdefs.h. */
12179_ACEOF
12180cat confdefs.h >>conftest.$ac_ext
12181cat >>conftest.$ac_ext <<_ACEOF
12182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012183$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012184typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012185int
12186main ()
12187{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012188if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012190if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 return 0;
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012197if { (ac_try="$ac_compile"
12198case "(($ac_try" in
12199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12200 *) ac_try_echo=$ac_try;;
12201esac
12202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012205 grep -v '^ *+' conftest.er1 >conftest.err
12206 rm -f conftest.er1
12207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209 (exit $ac_status); } && {
12210 test -z "$ac_c_werror_flag" ||
12211 test ! -s conftest.err
12212 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 ac_cv_type_uintptr_t=yes
12214else
12215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012216sed 's/^/| /' conftest.$ac_ext >&5
12217
Martin v. Löwiseba40652007-08-30 20:10:57 +000012218 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012219fi
Brett Cannon19fab762007-06-02 03:02:29 +000012220
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12222fi
12223{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12224echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12225
12226# The cast to long int works around a bug in the HP C Compiler
12227# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12228# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12229# This bug is HP SR number 8606223364.
12230{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12231echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012232if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12233 echo $ECHO_N "(cached) $ECHO_C" >&6
12234else
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 if test "$cross_compiling" = yes; then
12236 # Depending upon the size, compute the lo and hi bounds.
12237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* confdefs.h. */
12239_ACEOF
12240cat confdefs.h >>conftest.$ac_ext
12241cat >>conftest.$ac_ext <<_ACEOF
12242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012243$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012245int
12246main ()
12247{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012249test_array [0] = 0
12250
12251 ;
12252 return 0;
12253}
12254_ACEOF
12255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256if { (ac_try="$ac_compile"
12257case "(($ac_try" in
12258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12259 *) ac_try_echo=$ac_try;;
12260esac
12261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012264 grep -v '^ *+' conftest.er1 >conftest.err
12265 rm -f conftest.er1
12266 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012268 (exit $ac_status); } && {
12269 test -z "$ac_c_werror_flag" ||
12270 test ! -s conftest.err
12271 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 ac_lo=0 ac_mid=0
12273 while :; do
12274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012275/* confdefs.h. */
12276_ACEOF
12277cat confdefs.h >>conftest.$ac_ext
12278cat >>conftest.$ac_ext <<_ACEOF
12279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012280$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012286test_array [0] = 0
12287
12288 ;
12289 return 0;
12290}
12291_ACEOF
12292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293if { (ac_try="$ac_compile"
12294case "(($ac_try" in
12295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12296 *) ac_try_echo=$ac_try;;
12297esac
12298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012301 grep -v '^ *+' conftest.er1 >conftest.err
12302 rm -f conftest.er1
12303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012305 (exit $ac_status); } && {
12306 test -z "$ac_c_werror_flag" ||
12307 test ! -s conftest.err
12308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 ac_hi=$ac_mid; break
12310else
12311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012312sed 's/^/| /' conftest.$ac_ext >&5
12313
Martin v. Löwiseba40652007-08-30 20:10:57 +000012314 ac_lo=`expr $ac_mid + 1`
12315 if test $ac_lo -le $ac_mid; then
12316 ac_lo= ac_hi=
12317 break
12318 fi
12319 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012321
12322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 done
12324else
12325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012326sed 's/^/| /' conftest.$ac_ext >&5
12327
Martin v. Löwiseba40652007-08-30 20:10:57 +000012328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012329/* confdefs.h. */
12330_ACEOF
12331cat confdefs.h >>conftest.$ac_ext
12332cat >>conftest.$ac_ext <<_ACEOF
12333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012334$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012336int
12337main ()
12338{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012340test_array [0] = 0
12341
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347if { (ac_try="$ac_compile"
12348case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
12352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012355 grep -v '^ *+' conftest.er1 >conftest.err
12356 rm -f conftest.er1
12357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359 (exit $ac_status); } && {
12360 test -z "$ac_c_werror_flag" ||
12361 test ! -s conftest.err
12362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 ac_hi=-1 ac_mid=-1
12364 while :; do
12365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012371$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012373int
12374main ()
12375{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012377test_array [0] = 0
12378
12379 ;
12380 return 0;
12381}
12382_ACEOF
12383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384if { (ac_try="$ac_compile"
12385case "(($ac_try" in
12386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12387 *) ac_try_echo=$ac_try;;
12388esac
12389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012392 grep -v '^ *+' conftest.er1 >conftest.err
12393 rm -f conftest.er1
12394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 (exit $ac_status); } && {
12397 test -z "$ac_c_werror_flag" ||
12398 test ! -s conftest.err
12399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 ac_lo=$ac_mid; break
12401else
12402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012403sed 's/^/| /' conftest.$ac_ext >&5
12404
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 ac_hi=`expr '(' $ac_mid ')' - 1`
12406 if test $ac_mid -le $ac_hi; then
12407 ac_lo= ac_hi=
12408 break
12409 fi
12410 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012412
12413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 done
12415else
12416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012417sed 's/^/| /' conftest.$ac_ext >&5
12418
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012421
12422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012424
12425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012426# Binary search between lo and hi bounds.
12427while test "x$ac_lo" != "x$ac_hi"; do
12428 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* confdefs.h. */
12431_ACEOF
12432cat confdefs.h >>conftest.$ac_ext
12433cat >>conftest.$ac_ext <<_ACEOF
12434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012435$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012437int
12438main ()
12439{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012441test_array [0] = 0
12442
12443 ;
12444 return 0;
12445}
12446_ACEOF
12447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448if { (ac_try="$ac_compile"
12449case "(($ac_try" in
12450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12451 *) ac_try_echo=$ac_try;;
12452esac
12453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012456 grep -v '^ *+' conftest.er1 >conftest.err
12457 rm -f conftest.er1
12458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012460 (exit $ac_status); } && {
12461 test -z "$ac_c_werror_flag" ||
12462 test ! -s conftest.err
12463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 ac_hi=$ac_mid
12465else
12466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012467sed 's/^/| /' conftest.$ac_ext >&5
12468
Martin v. Löwiseba40652007-08-30 20:10:57 +000012469 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012471
12472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012473done
12474case $ac_lo in
12475?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012476'') if test "$ac_cv_type_uintptr_t" = yes; then
12477 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012478See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012480See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481 { (exit 77); exit 77; }; }
12482 else
12483 ac_cv_sizeof_uintptr_t=0
12484 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012485esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012486else
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* confdefs.h. */
12489_ACEOF
12490cat confdefs.h >>conftest.$ac_ext
12491cat >>conftest.$ac_ext <<_ACEOF
12492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012493$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 typedef uintptr_t ac__type_sizeof_;
12495static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12496static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012497#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012498#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012501{
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
12503 FILE *f = fopen ("conftest.val", "w");
12504 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012505 return 1;
12506 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508 long int i = longval ();
12509 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12510 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 fprintf (f, "%ld\n", i);
12512 }
12513 else
12514 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515 unsigned long int i = ulongval ();
12516 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12517 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 fprintf (f, "%lu\n", i);
12519 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
12522 ;
12523 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012524}
Martin v. Löwis11437992002-04-12 09:54:03 +000012525_ACEOF
12526rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012527if { (ac_try="$ac_link"
12528case "(($ac_try" in
12529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12530 *) ac_try_echo=$ac_try;;
12531esac
12532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12533 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ac_status=$?
12535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12536 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537 { (case "(($ac_try" in
12538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12539 *) ac_try_echo=$ac_try;;
12540esac
12541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12542 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012543 ac_status=$?
12544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545 (exit $ac_status); }; }; then
12546 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012547else
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 echo "$as_me: program exited with status $ac_status" >&5
12549echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012550sed 's/^/| /' conftest.$ac_ext >&5
12551
Martin v. Löwis11437992002-04-12 09:54:03 +000012552( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553if test "$ac_cv_type_uintptr_t" = yes; then
12554 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012555See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012557See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558 { (exit 77); exit 77; }; }
12559 else
12560 ac_cv_sizeof_uintptr_t=0
12561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012563rm -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 +000012564fi
12565rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012567{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12568echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12569
12570
12571
Martin v. Löwis11437992002-04-12 09:54:03 +000012572cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012573#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012574_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012575
Michael W. Hudson54241132001-12-07 15:38:26 +000012576
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012577fi
12578
Martin v. Löwisebe26702006-10-02 14:55:51 +000012579
12580
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012581# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012582{ echo "$as_me:$LINENO: checking size of off_t" >&5
12583echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012584if test "${ac_cv_sizeof_off_t+set}" = set; then
12585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012586else
12587 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012588 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012589else
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012591/* confdefs.h. */
12592_ACEOF
12593cat confdefs.h >>conftest.$ac_ext
12594cat >>conftest.$ac_ext <<_ACEOF
12595/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012596#include <stdio.h>
12597#include <sys/types.h>
12598main()
12599{
12600 FILE *f=fopen("conftestval", "w");
12601 if (!f) exit(1);
12602 fprintf(f, "%d\n", sizeof(off_t));
12603 exit(0);
12604}
Martin v. Löwis11437992002-04-12 09:54:03 +000012605_ACEOF
12606rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607if { (ac_try="$ac_link"
12608case "(($ac_try" in
12609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12610 *) ac_try_echo=$ac_try;;
12611esac
12612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12613 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 ac_status=$?
12615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12616 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617 { (case "(($ac_try" in
12618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12619 *) ac_try_echo=$ac_try;;
12620esac
12621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12622 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ac_status=$?
12624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12625 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012626 ac_cv_sizeof_off_t=`cat conftestval`
12627else
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 echo "$as_me: program exited with status $ac_status" >&5
12629echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012630sed 's/^/| /' conftest.$ac_ext >&5
12631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632( exit $ac_status )
12633ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012635rm -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 +000012636fi
12637
Martin v. Löwiseba40652007-08-30 20:10:57 +000012638
12639
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012640fi
12641
Martin v. Löwiseba40652007-08-30 20:10:57 +000012642{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12643echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
12645cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012646#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012647_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012648
Michael W. Hudson54241132001-12-07 15:38:26 +000012649
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12651echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012652if test "$have_long_long" = yes -a \
12653 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12654 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656cat >>confdefs.h <<\_ACEOF
12657#define HAVE_LARGEFILE_SUPPORT 1
12658_ACEOF
12659
Martin v. Löwiseba40652007-08-30 20:10:57 +000012660 { echo "$as_me:$LINENO: result: yes" >&5
12661echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012662else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012663 { echo "$as_me:$LINENO: result: no" >&5
12664echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012665fi
12666
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012667# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668{ echo "$as_me:$LINENO: checking size of time_t" >&5
12669echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012670if test "${ac_cv_sizeof_time_t+set}" = set; then
12671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012672else
12673 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012674 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012675else
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012677/* confdefs.h. */
12678_ACEOF
12679cat confdefs.h >>conftest.$ac_ext
12680cat >>conftest.$ac_ext <<_ACEOF
12681/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012682#include <stdio.h>
12683#include <time.h>
12684main()
12685{
12686 FILE *f=fopen("conftestval", "w");
12687 if (!f) exit(1);
12688 fprintf(f, "%d\n", sizeof(time_t));
12689 exit(0);
12690}
Martin v. Löwis11437992002-04-12 09:54:03 +000012691_ACEOF
12692rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012693if { (ac_try="$ac_link"
12694case "(($ac_try" in
12695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12696 *) ac_try_echo=$ac_try;;
12697esac
12698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12699 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012700 ac_status=$?
12701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703 { (case "(($ac_try" in
12704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12705 *) ac_try_echo=$ac_try;;
12706esac
12707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12708 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_status=$?
12710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012712 ac_cv_sizeof_time_t=`cat conftestval`
12713else
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 echo "$as_me: program exited with status $ac_status" >&5
12715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012716sed 's/^/| /' conftest.$ac_ext >&5
12717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718( exit $ac_status )
12719ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721rm -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 +000012722fi
12723
Martin v. Löwiseba40652007-08-30 20:10:57 +000012724
12725
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012726fi
12727
Martin v. Löwiseba40652007-08-30 20:10:57 +000012728{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12729echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
12731cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012732#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012733_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012734
Michael W. Hudson54241132001-12-07 15:38:26 +000012735
12736
Trent Mick635f6fb2000-08-23 21:33:05 +000012737# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012738ac_save_cc="$CC"
12739if test "$ac_cv_kpthread" = "yes"
12740then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012741elif test "$ac_cv_kthread" = "yes"
12742then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012743elif test "$ac_cv_pthread" = "yes"
12744then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12747echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012748have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* confdefs.h. */
12751_ACEOF
12752cat confdefs.h >>conftest.$ac_ext
12753cat >>conftest.$ac_ext <<_ACEOF
12754/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012755#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012756int
12757main ()
12758{
Guido van Rossum12580492000-09-24 16:47:19 +000012759pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 ;
12761 return 0;
12762}
12763_ACEOF
12764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765if { (ac_try="$ac_compile"
12766case "(($ac_try" in
12767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12768 *) ac_try_echo=$ac_try;;
12769esac
12770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012773 grep -v '^ *+' conftest.er1 >conftest.err
12774 rm -f conftest.er1
12775 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777 (exit $ac_status); } && {
12778 test -z "$ac_c_werror_flag" ||
12779 test ! -s conftest.err
12780 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012781 have_pthread_t=yes
12782else
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012784sed 's/^/| /' conftest.$ac_ext >&5
12785
Martin v. Löwiseba40652007-08-30 20:10:57 +000012786
Trent Mick635f6fb2000-08-23 21:33:05 +000012787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012788
12789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12790{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12791echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012792if test "$have_pthread_t" = yes ; then
12793 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12795echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12797 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012798else
12799 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012800 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012801else
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012803/* confdefs.h. */
12804_ACEOF
12805cat confdefs.h >>conftest.$ac_ext
12806cat >>conftest.$ac_ext <<_ACEOF
12807/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012808#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012809#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012810 main()
12811 {
12812 FILE *f=fopen("conftestval", "w");
12813 if (!f) exit(1);
12814 fprintf(f, "%d\n", sizeof(pthread_t));
12815 exit(0);
12816 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012817_ACEOF
12818rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819if { (ac_try="$ac_link"
12820case "(($ac_try" in
12821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12822 *) ac_try_echo=$ac_try;;
12823esac
12824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12825 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ac_status=$?
12827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829 { (case "(($ac_try" in
12830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12831 *) ac_try_echo=$ac_try;;
12832esac
12833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ac_status=$?
12836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012838 ac_cv_sizeof_pthread_t=`cat conftestval`
12839else
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 echo "$as_me: program exited with status $ac_status" >&5
12841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012842sed 's/^/| /' conftest.$ac_ext >&5
12843
Martin v. Löwis11437992002-04-12 09:54:03 +000012844( exit $ac_status )
12845ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847rm -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 +000012848fi
12849
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850
12851
Trent Mick635f6fb2000-08-23 21:33:05 +000012852fi
12853
Martin v. Löwiseba40652007-08-30 20:10:57 +000012854 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12855echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
12857cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012858#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012859_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012860
12861fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012862CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012863
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12865echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12866# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012867if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868 enableval=$enable_toolbox_glue;
12869fi
Jack Jansene578a632001-08-15 01:27:14 +000012870
12871
12872if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012873then
Jack Jansene578a632001-08-15 01:27:14 +000012874 case $ac_sys_system/$ac_sys_release in
12875 Darwin/*)
12876 enable_toolbox_glue="yes";;
12877 *)
12878 enable_toolbox_glue="no";;
12879 esac
12880fi
12881case "$enable_toolbox_glue" in
12882yes)
Jack Jansene578a632001-08-15 01:27:14 +000012883 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012884 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
12886cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012887#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012888_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012889
12890 ;;
12891*)
Jack Jansene578a632001-08-15 01:27:14 +000012892 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012893 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012894 ;;
12895esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12897echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012898
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012899
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012900
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012901case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012902 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012903 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12904 ;;
12905 Darwin/*)
12906 OTHER_LIBTOOL_OPT=""
12907 ;;
12908esac
12909
12910
12911case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012912 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012913 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12914 if test "${enable_universalsdk}"; then
12915 :
12916 else
12917 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12918 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012919 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012920 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012921 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012922 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12923 if test ${gcc_version} '<' 4.0
12924 then
12925 LIBTOOL_CRUFT="-lcc_dynamic"
12926 else
12927 LIBTOOL_CRUFT=""
12928 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012929 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012930 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012931 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012932esac
12933
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12935echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012936if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012937then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012938 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012940 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012941
Martin v. Löwis11437992002-04-12 09:54:03 +000012942cat >>confdefs.h <<\_ACEOF
12943#define WITH_NEXT_FRAMEWORK 1
12944_ACEOF
12945
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946 { echo "$as_me:$LINENO: result: yes" >&5
12947echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012948else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949 { echo "$as_me:$LINENO: result: no" >&5
12950echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012951fi
12952
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953{ echo "$as_me:$LINENO: checking for dyld" >&5
12954echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012955case $ac_sys_system/$ac_sys_release in
12956 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012957
Martin v. Löwis11437992002-04-12 09:54:03 +000012958cat >>confdefs.h <<\_ACEOF
12959#define WITH_DYLD 1
12960_ACEOF
12961
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12963echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012964 ;;
12965 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 { echo "$as_me:$LINENO: result: no" >&5
12967echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012968 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012969esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012970
Guido van Rossum0a516c91994-09-12 10:58:40 +000012971# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012972
Michael W. Hudson54241132001-12-07 15:38:26 +000012973
12974
12975
12976
Guido van Rossum0a516c91994-09-12 10:58:40 +000012977# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012978# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979{ echo "$as_me:$LINENO: checking SO" >&5
12980echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012981if test -z "$SO"
12982then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012984 hp*|HP*)
12985 case `uname -m` in
12986 ia64) SO=.so;;
12987 *) SO=.sl;;
12988 esac
12989 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012990 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012991 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012992 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012993else
12994 # this might also be a termcap variable, see #610332
12995 echo
12996 echo '====================================================================='
12997 echo '+ +'
12998 echo '+ WARNING: You have set SO in your environment. +'
12999 echo '+ Do you really mean to change the extension for shared libraries? +'
13000 echo '+ Continuing in 10 seconds to let you to ponder. +'
13001 echo '+ +'
13002 echo '====================================================================='
13003 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005{ echo "$as_me:$LINENO: result: $SO" >&5
13006echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013007
13008cat >>confdefs.h <<_ACEOF
13009#define SHLIB_EXT "$SO"
13010_ACEOF
13011
Guido van Rossum0a516c91994-09-12 10:58:40 +000013012# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013013# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013014# (Shared libraries in this instance are shared modules to be loaded into
13015# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13017echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013018if test -z "$LDSHARED"
13019then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013021 AIX*)
13022 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013023 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013024 ;;
13025 BeOS*)
13026 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013027 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013028 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013029 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013030 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013032 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013033 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013034 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013035 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013036 hp*|HP*)
13037 if test "$GCC" = "yes"
13038 then LDSHARED='$(CC) -shared'
13039 else LDSHARED='ld -b';
13040 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013041 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013042 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013043 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13044 if test "$enable_framework" ; then
13045 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013046 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13047 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013048 else
13049 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013050 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013051 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013052 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013053 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13054 if test "$enable_framework" ; then
13055 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013056 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13057 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013058 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013059 # No framework, use the Python app as bundle-loader
13060 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013061 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013062 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013063 Darwin/*)
13064 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13065 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013066
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013067 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013068 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013069 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013070 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013071 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013072 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13073 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013074 else
13075 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13076 if test "$enable_framework" ; then
13077 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013078 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13079 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013080 else
13081 # No framework, use the Python app as bundle-loader
13082 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13083 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13084 fi
13085 fi
13086 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013087 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013088 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013089 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013090 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013091 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013092 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013093 else
13094 LDSHARED="ld -Bshareable ${LDFLAGS}"
13095 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013096 OpenBSD*)
13097 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13098 then
13099 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13100 else
13101 case `uname -r` in
13102 [01].* | 2.[0-7] | 2.[0-7].*)
13103 LDSHARED="ld -Bshareable ${LDFLAGS}"
13104 ;;
13105 *)
13106 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13107 ;;
13108 esac
13109 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013110 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013111 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013112 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013113 then LDSHARED='$(CC) -shared'
13114 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013115 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013116 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013117 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013118 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013119 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013120 *) LDSHARED="ld";;
13121 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013123{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13124echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013125BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013126# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013127# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013128{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13129echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013130if test -z "$CCSHARED"
13131then
Guido van Rossum07397971997-04-29 21:49:50 +000013132 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013133 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013134 then CCSHARED="-fPIC";
13135 elif test `uname -p` = sparc;
13136 then CCSHARED="-xcode=pic32";
13137 else CCSHARED="-Kpic";
13138 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013139 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013140 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013141 else CCSHARED="+z";
13142 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013143 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013144 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013145 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013146 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013147 if test "$GCC" = "yes"
13148 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013149 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013150 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013151 SCO_SV*)
13152 if test "$GCC" = "yes"
13153 then CCSHARED="-fPIC"
13154 else CCSHARED="-Kpic -belf"
13155 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013156 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013157 IRIX*/6*) case $CC in
13158 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013159 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013160 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013161 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013162 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013164{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13165echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013166# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013167# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013168{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13169echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013170if test -z "$LINKFORSHARED"
13171then
Guido van Rossum07397971997-04-29 21:49:50 +000013172 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013173 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013174 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013175 LINKFORSHARED="-Wl,-E -Wl,+s";;
13176# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013177 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013178 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013179 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013181 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13182 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013183 # not used by the core itself but which needs to be in the core so
13184 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013185 # -prebind is no longer used, because it actually seems to give a
13186 # slowdown in stead of a speedup, maybe due to the large number of
13187 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013188
13189 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013190 if test "$enable_framework"
13191 then
Jack Jansenda49e192005-01-07 13:08:22 +000013192 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013193 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013194 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013195 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013196 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013197 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013198 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013199 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13200 then
13201 LINKFORSHARED="-Wl,--export-dynamic"
13202 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013203 SunOS/5*) case $CC in
13204 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013205 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013206 then
13207 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013208 fi;;
13209 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013210 CYGWIN*)
13211 if test $enable_shared = "no"
13212 then
13213 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13214 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013215 QNX*)
13216 # -Wl,-E causes the symbols to be added to the dynamic
13217 # symbol table so that they can be found when a module
13218 # is loaded. -N 2048K causes the stack size to be set
13219 # to 2048 kilobytes so that the stack doesn't overflow
13220 # when running test_compile.py.
13221 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013222 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013224{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13225echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013226
Michael W. Hudson54241132001-12-07 15:38:26 +000013227
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013228
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13230echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013231if test ! "$LIBRARY" = "$LDLIBRARY"
13232then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013233 case $ac_sys_system in
13234 CYGWIN*)
13235 # Cygwin needs CCSHARED when building extension DLLs
13236 # but not when building the interpreter DLL.
13237 CFLAGSFORSHARED='';;
13238 *)
13239 CFLAGSFORSHARED='$(CCSHARED)'
13240 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013242{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13243echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013244
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013245# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13246# library (with --enable-shared).
13247# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013248# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13249# if it is not required, since it creates a dependency of the shared library
13250# to LIBS. This, in turn, means that applications linking the shared libpython
13251# don't need to link LIBS explicitly. The default should be only changed
13252# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013253
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13255echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013256case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013257 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013258 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013259esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013260{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13261echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013262
13263
Guido van Rossum627b2d71993-12-24 10:39:16 +000013264# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013265
Martin v. Löwiseba40652007-08-30 20:10:57 +000013266{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13267echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013268if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270else
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013272LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013274/* confdefs.h. */
13275_ACEOF
13276cat confdefs.h >>conftest.$ac_ext
13277cat >>conftest.$ac_ext <<_ACEOF
13278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013279
Martin v. Löwiseba40652007-08-30 20:10:57 +000013280/* Override any GCC internal prototype to avoid an error.
13281 Use char because int might match the return type of a GCC
13282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013283#ifdef __cplusplus
13284extern "C"
13285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013286char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013287int
13288main ()
13289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013290return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 ;
13292 return 0;
13293}
13294_ACEOF
13295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013296if { (ac_try="$ac_link"
13297case "(($ac_try" in
13298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13299 *) ac_try_echo=$ac_try;;
13300esac
13301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013304 grep -v '^ *+' conftest.er1 >conftest.err
13305 rm -f conftest.er1
13306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013308 (exit $ac_status); } && {
13309 test -z "$ac_c_werror_flag" ||
13310 test ! -s conftest.err
13311 } && test -s conftest$ac_exeext &&
13312 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314else
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013316sed 's/^/| /' conftest.$ac_ext >&5
13317
Martin v. Löwiseba40652007-08-30 20:10:57 +000013318 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013320
13321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013323LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013325{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13326echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013327if test $ac_cv_lib_dl_dlopen = yes; then
13328 cat >>confdefs.h <<_ACEOF
13329#define HAVE_LIBDL 1
13330_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013331
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013332 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013333
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334fi
13335 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013336
Martin v. Löwiseba40652007-08-30 20:10:57 +000013337{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13338echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013339if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013343LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* confdefs.h. */
13346_ACEOF
13347cat confdefs.h >>conftest.$ac_ext
13348cat >>conftest.$ac_ext <<_ACEOF
13349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351/* Override any GCC internal prototype to avoid an error.
13352 Use char because int might match the return type of a GCC
13353 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013354#ifdef __cplusplus
13355extern "C"
13356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013357char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013358int
13359main ()
13360{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013361return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 ;
13363 return 0;
13364}
13365_ACEOF
13366rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367if { (ac_try="$ac_link"
13368case "(($ac_try" in
13369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13370 *) ac_try_echo=$ac_try;;
13371esac
13372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13373 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013375 grep -v '^ *+' conftest.er1 >conftest.err
13376 rm -f conftest.er1
13377 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013379 (exit $ac_status); } && {
13380 test -z "$ac_c_werror_flag" ||
13381 test ! -s conftest.err
13382 } && test -s conftest$ac_exeext &&
13383 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013385else
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013387sed 's/^/| /' conftest.$ac_ext >&5
13388
Martin v. Löwiseba40652007-08-30 20:10:57 +000013389 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013391
13392rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013393 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013394LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013396{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13397echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013398if test $ac_cv_lib_dld_shl_load = yes; then
13399 cat >>confdefs.h <<_ACEOF
13400#define HAVE_LIBDLD 1
13401_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013402
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013403 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405fi
13406 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013407
13408# only check for sem_ini if thread support is requested
13409if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13411echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013412if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013414else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013415 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013417/* confdefs.h. */
13418_ACEOF
13419cat confdefs.h >>conftest.$ac_ext
13420cat >>conftest.$ac_ext <<_ACEOF
13421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423/* Override any GCC internal prototype to avoid an error.
13424 Use char because int might match the return type of a GCC
13425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013426#ifdef __cplusplus
13427extern "C"
13428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013429char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013430int
13431main ()
13432{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013433return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 ;
13435 return 0;
13436}
13437_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438for ac_lib in '' pthread rt posix4; do
13439 if test -z "$ac_lib"; then
13440 ac_res="none required"
13441 else
13442 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013443 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013444 fi
13445 rm -f conftest.$ac_objext conftest$ac_exeext
13446if { (ac_try="$ac_link"
13447case "(($ac_try" in
13448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13449 *) ac_try_echo=$ac_try;;
13450esac
13451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13452 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013453 ac_status=$?
13454 grep -v '^ *+' conftest.er1 >conftest.err
13455 rm -f conftest.er1
13456 cat conftest.err >&5
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013458 (exit $ac_status); } && {
13459 test -z "$ac_c_werror_flag" ||
13460 test ! -s conftest.err
13461 } && test -s conftest$ac_exeext &&
13462 $as_test_x conftest$ac_exeext; then
13463 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013464else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013465 echo "$as_me: failed program was:" >&5
13466sed 's/^/| /' conftest.$ac_ext >&5
13467
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468
Brett Cannon19fab762007-06-02 03:02:29 +000013469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470
13471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13472 conftest$ac_exeext
13473 if test "${ac_cv_search_sem_init+set}" = set; then
13474 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013476done
13477if test "${ac_cv_search_sem_init+set}" = set; then
13478 :
13479else
13480 ac_cv_search_sem_init=no
13481fi
13482rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013483LIBS=$ac_func_search_save_LIBS
13484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013485{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13486echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13487ac_res=$ac_cv_search_sem_init
13488if test "$ac_res" != no; then
13489 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013490
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013491fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013492 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013493 # posix4 on Solaris 2.6
13494 # pthread (first!) on Linux
13495fi
13496
Martin v. Löwis19d17342003-06-14 21:03:05 +000013497# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13499echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013500if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13501 echo $ECHO_N "(cached) $ECHO_C" >&6
13502else
13503 ac_check_lib_save_LIBS=$LIBS
13504LIBS="-lintl $LIBS"
13505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013506/* confdefs.h. */
13507_ACEOF
13508cat confdefs.h >>conftest.$ac_ext
13509cat >>conftest.$ac_ext <<_ACEOF
13510/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013511
Martin v. Löwiseba40652007-08-30 20:10:57 +000013512/* Override any GCC internal prototype to avoid an error.
13513 Use char because int might match the return type of a GCC
13514 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013515#ifdef __cplusplus
13516extern "C"
13517#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013518char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013519int
13520main ()
13521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013523 ;
13524 return 0;
13525}
13526_ACEOF
13527rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013528if { (ac_try="$ac_link"
13529case "(($ac_try" in
13530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13531 *) ac_try_echo=$ac_try;;
13532esac
13533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13534 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013536 grep -v '^ *+' conftest.er1 >conftest.err
13537 rm -f conftest.er1
13538 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013540 (exit $ac_status); } && {
13541 test -z "$ac_c_werror_flag" ||
13542 test ! -s conftest.err
13543 } && test -s conftest$ac_exeext &&
13544 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013545 ac_cv_lib_intl_textdomain=yes
13546else
13547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013548sed 's/^/| /' conftest.$ac_ext >&5
13549
Martin v. Löwiseba40652007-08-30 20:10:57 +000013550 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013552
13553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013555LIBS=$ac_check_lib_save_LIBS
13556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013557{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13558echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013559if test $ac_cv_lib_intl_textdomain = yes; then
13560
13561cat >>confdefs.h <<\_ACEOF
13562#define WITH_LIBINTL 1
13563_ACEOF
13564
13565fi
13566
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013567
13568# checks for system dependent C++ extensions support
13569case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13571echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013573/* confdefs.h. */
13574_ACEOF
13575cat confdefs.h >>conftest.$ac_ext
13576cat >>conftest.$ac_ext <<_ACEOF
13577/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013578#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013579int
13580main ()
13581{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013582loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 ;
13584 return 0;
13585}
13586_ACEOF
13587rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013588if { (ac_try="$ac_link"
13589case "(($ac_try" in
13590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13591 *) ac_try_echo=$ac_try;;
13592esac
13593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13594 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013596 grep -v '^ *+' conftest.er1 >conftest.err
13597 rm -f conftest.er1
13598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600 (exit $ac_status); } && {
13601 test -z "$ac_c_werror_flag" ||
13602 test ! -s conftest.err
13603 } && test -s conftest$ac_exeext &&
13604 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013605
Martin v. Löwis11437992002-04-12 09:54:03 +000013606cat >>confdefs.h <<\_ACEOF
13607#define AIX_GENUINE_CPLUSPLUS 1
13608_ACEOF
13609
Martin v. Löwiseba40652007-08-30 20:10:57 +000013610 { echo "$as_me:$LINENO: result: yes" >&5
13611echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013612else
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013614sed 's/^/| /' conftest.$ac_ext >&5
13615
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616 { echo "$as_me:$LINENO: result: no" >&5
13617echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013619
13620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013621 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013622 *) ;;
13623esac
13624
Guido van Rossum70c7f481998-03-26 18:44:10 +000013625# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013626# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013627{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13628echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013629if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013631else
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013633LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013635/* confdefs.h. */
13636_ACEOF
13637cat confdefs.h >>conftest.$ac_ext
13638cat >>conftest.$ac_ext <<_ACEOF
13639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641/* Override any GCC internal prototype to avoid an error.
13642 Use char because int might match the return type of a GCC
13643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013644#ifdef __cplusplus
13645extern "C"
13646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013647char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013648int
13649main ()
13650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
13656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013657if { (ac_try="$ac_link"
13658case "(($ac_try" in
13659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13660 *) ac_try_echo=$ac_try;;
13661esac
13662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013665 grep -v '^ *+' conftest.er1 >conftest.err
13666 rm -f conftest.er1
13667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669 (exit $ac_status); } && {
13670 test -z "$ac_c_werror_flag" ||
13671 test ! -s conftest.err
13672 } && test -s conftest$ac_exeext &&
13673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013675else
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013677sed 's/^/| /' conftest.$ac_ext >&5
13678
Martin v. Löwiseba40652007-08-30 20:10:57 +000013679 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681
13682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13687echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013688if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013689 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013690fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013691 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013692{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13693echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013694if test "${ac_cv_lib_socket_socket+set}" = set; then
13695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696else
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013698LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013700/* confdefs.h. */
13701_ACEOF
13702cat confdefs.h >>conftest.$ac_ext
13703cat >>conftest.$ac_ext <<_ACEOF
13704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Martin v. Löwiseba40652007-08-30 20:10:57 +000013706/* Override any GCC internal prototype to avoid an error.
13707 Use char because int might match the return type of a GCC
13708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013709#ifdef __cplusplus
13710extern "C"
13711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013712char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013713int
13714main ()
13715{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013716return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 ;
13718 return 0;
13719}
13720_ACEOF
13721rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013722if { (ac_try="$ac_link"
13723case "(($ac_try" in
13724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13725 *) ac_try_echo=$ac_try;;
13726esac
13727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13728 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013730 grep -v '^ *+' conftest.er1 >conftest.err
13731 rm -f conftest.er1
13732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013734 (exit $ac_status); } && {
13735 test -z "$ac_c_werror_flag" ||
13736 test ! -s conftest.err
13737 } && test -s conftest$ac_exeext &&
13738 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013740else
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013742sed 's/^/| /' conftest.$ac_ext >&5
13743
Martin v. Löwiseba40652007-08-30 20:10:57 +000013744 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013746
13747rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013749LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13752echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013753if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013754 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013755fi
13756 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013757
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013758case "$ac_sys_system" in
13759BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013760{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13761echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013762if test "${ac_cv_lib_net_socket+set}" = set; then
13763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013764else
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013766LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013767cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013768/* confdefs.h. */
13769_ACEOF
13770cat confdefs.h >>conftest.$ac_ext
13771cat >>conftest.$ac_ext <<_ACEOF
13772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Martin v. Löwiseba40652007-08-30 20:10:57 +000013774/* Override any GCC internal prototype to avoid an error.
13775 Use char because int might match the return type of a GCC
13776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013777#ifdef __cplusplus
13778extern "C"
13779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013780char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013781int
13782main ()
13783{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ;
13786 return 0;
13787}
13788_ACEOF
13789rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013790if { (ac_try="$ac_link"
13791case "(($ac_try" in
13792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13793 *) ac_try_echo=$ac_try;;
13794esac
13795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13796 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013798 grep -v '^ *+' conftest.er1 >conftest.err
13799 rm -f conftest.er1
13800 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013802 (exit $ac_status); } && {
13803 test -z "$ac_c_werror_flag" ||
13804 test ! -s conftest.err
13805 } && test -s conftest$ac_exeext &&
13806 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013810sed 's/^/| /' conftest.$ac_ext >&5
13811
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013814
13815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013816 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013817LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13820echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013821if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013822 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013823fi
13824 # BeOS
13825;;
13826esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013827
Martin v. Löwiseba40652007-08-30 20:10:57 +000013828{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13829echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013830
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013832if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013833 withval=$with_libs;
13834{ echo "$as_me:$LINENO: result: $withval" >&5
13835echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013836LIBS="$withval $LIBS"
13837
13838else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013839 { echo "$as_me:$LINENO: result: no" >&5
13840echo "${ECHO_T}no" >&6; }
13841fi
13842
Guido van Rossum7f43da71994-08-01 12:15:30 +000013843
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013844# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013845{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13846echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013847
Martin v. Löwiseba40652007-08-30 20:10:57 +000013848# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013849if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850 withval=$with_system_ffi;
13851fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013852
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013853
Martin v. Löwiseba40652007-08-30 20:10:57 +000013854{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13855echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013856
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013857# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013858
13859
Martin v. Löwiseba40652007-08-30 20:10:57 +000013860{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13861echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013864if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865 withval=$with_signal_module;
13866fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013867
13868
13869if test -z "$with_signal_module"
13870then with_signal_module="yes"
13871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13873echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013874
13875if test "${with_signal_module}" = "yes"; then
13876 USE_SIGNAL_MODULE=""
13877 SIGNAL_OBJS=""
13878else
13879 USE_SIGNAL_MODULE="#"
13880 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13881fi
13882
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013883# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013884
Barry Warsawc0d24d82000-06-29 16:12:00 +000013885USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013886
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13888echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
Guido van Rossumec2f0731997-01-22 20:54:01 +000013890
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013892if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013893 withval=$with_dec_threads;
13894{ echo "$as_me:$LINENO: result: $withval" >&5
13895echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013896LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013897if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013898 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013899fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013900else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901 { echo "$as_me:$LINENO: result: no" >&5
13902echo "${ECHO_T}no" >&6; }
13903fi
13904
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
13906# Templates for things AC_DEFINEd more than once.
13907# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013908
13909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910
13911
13912
13913
13914
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13916echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013919if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920 withval=$with_threads;
13921fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013922
13923
Barry Warsawc0d24d82000-06-29 16:12:00 +000013924# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013925
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013927if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013928 withval=$with_thread; with_threads=$with_thread
13929fi
13930
Barry Warsawc0d24d82000-06-29 16:12:00 +000013931
13932if test -z "$with_threads"
13933then with_threads="yes"
13934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935{ echo "$as_me:$LINENO: result: $with_threads" >&5
13936echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013937
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013938
Barry Warsawc0d24d82000-06-29 16:12:00 +000013939if test "$with_threads" = "no"
13940then
13941 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013942elif test "$ac_cv_pthread_is_default" = yes
13943then
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013945#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013946_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013947
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013948 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013950#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013951_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013952
13953 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013955elif test "$ac_cv_kpthread" = "yes"
13956then
13957 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013958 if test "$ac_cv_cxx_thread" = "yes"; then
13959 CXX="$CXX -Kpthread"
13960 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013962#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013963_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013965 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013966 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013967elif test "$ac_cv_kthread" = "yes"
13968then
13969 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013970 if test "$ac_cv_cxx_thread" = "yes"; then
13971 CXX="$CXX -Kthread"
13972 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013973 cat >>confdefs.h <<\_ACEOF
13974#define WITH_THREAD 1
13975_ACEOF
13976
13977 posix_threads=yes
13978 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013979elif test "$ac_cv_pthread" = "yes"
13980then
13981 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013982 if test "$ac_cv_cxx_thread" = "yes"; then
13983 CXX="$CXX -pthread"
13984 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013985 cat >>confdefs.h <<\_ACEOF
13986#define WITH_THREAD 1
13987_ACEOF
13988
13989 posix_threads=yes
13990 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013991else
13992 if test ! -z "$with_threads" -a -d "$with_threads"
13993 then LDFLAGS="$LDFLAGS -L$with_threads"
13994 fi
13995 if test ! -z "$withval" -a -d "$withval"
13996 then LDFLAGS="$LDFLAGS -L$withval"
13997 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013998
13999 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014000 # define _POSIX_THREADS in unistd.h. Some apparently don't
14001 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14003echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* confdefs.h. */
14006_ACEOF
14007cat confdefs.h >>conftest.$ac_ext
14008cat >>conftest.$ac_ext <<_ACEOF
14009/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014010
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014011#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014012#ifdef _POSIX_THREADS
14013yes
14014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
14016_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014018 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014019 unistd_defines_pthreads=yes
14020else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014021 unistd_defines_pthreads=no
14022fi
14023rm -f conftest*
14024
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14026echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014027
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014029#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014030_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014031
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014033 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14034echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014035if test "${ac_cv_header_cthreads_h+set}" = set; then
14036 echo $ECHO_N "(cached) $ECHO_C" >&6
14037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14039echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014040else
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014042{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14043echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014045/* confdefs.h. */
14046_ACEOF
14047cat confdefs.h >>conftest.$ac_ext
14048cat >>conftest.$ac_ext <<_ACEOF
14049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014050$ac_includes_default
14051#include <cthreads.h>
14052_ACEOF
14053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014054if { (ac_try="$ac_compile"
14055case "(($ac_try" in
14056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14057 *) ac_try_echo=$ac_try;;
14058esac
14059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014062 grep -v '^ *+' conftest.er1 >conftest.err
14063 rm -f conftest.er1
14064 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066 (exit $ac_status); } && {
14067 test -z "$ac_c_werror_flag" ||
14068 test ! -s conftest.err
14069 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 ac_header_compiler=yes
14071else
14072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014073sed 's/^/| /' conftest.$ac_ext >&5
14074
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077
14078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14080echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
14082# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14084echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014086/* confdefs.h. */
14087_ACEOF
14088cat confdefs.h >>conftest.$ac_ext
14089cat >>conftest.$ac_ext <<_ACEOF
14090/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014091#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014092_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014093if { (ac_try="$ac_cpp conftest.$ac_ext"
14094case "(($ac_try" in
14095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14096 *) ac_try_echo=$ac_try;;
14097esac
14098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014101 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 rm -f conftest.er1
14103 cat conftest.err >&5
14104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014105 (exit $ac_status); } >/dev/null && {
14106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14107 test ! -s conftest.err
14108 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 ac_header_preproc=yes
14110else
14111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014112sed 's/^/| /' conftest.$ac_ext >&5
14113
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014116
Martin v. Löwis11437992002-04-12 09:54:03 +000014117rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14119echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
14121# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14123 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014124 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14125echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014126 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14127echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14128 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014130 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014131 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14132echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14134echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14135 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14136echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14137 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14138echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014139 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14140echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014141 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14142echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014143 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014144## ------------------------------------------------ ##
14145## Report this to http://www.python.org/python-bugs ##
14146## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014147_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014148 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014149 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014150esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014151{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14152echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014153if test "${ac_cv_header_cthreads_h+set}" = set; then
14154 echo $ECHO_N "(cached) $ECHO_C" >&6
14155else
14156 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014158{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14159echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
14161fi
14162if test $ac_cv_header_cthreads_h = yes; then
14163 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014164#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014165_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014166
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014168#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014169_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014170
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
14172cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014173#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014174_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014175
14176 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014177 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014178else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014179
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14182echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014183if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14184 echo $ECHO_N "(cached) $ECHO_C" >&6
14185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014186{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14187echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014188else
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14191echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014193/* confdefs.h. */
14194_ACEOF
14195cat confdefs.h >>conftest.$ac_ext
14196cat >>conftest.$ac_ext <<_ACEOF
14197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014198$ac_includes_default
14199#include <mach/cthreads.h>
14200_ACEOF
14201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202if { (ac_try="$ac_compile"
14203case "(($ac_try" in
14204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14205 *) ac_try_echo=$ac_try;;
14206esac
14207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014210 grep -v '^ *+' conftest.er1 >conftest.err
14211 rm -f conftest.er1
14212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214 (exit $ac_status); } && {
14215 test -z "$ac_c_werror_flag" ||
14216 test ! -s conftest.err
14217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 ac_header_compiler=yes
14219else
14220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014221sed 's/^/| /' conftest.$ac_ext >&5
14222
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225
14226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14227{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14228echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
14230# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14232echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014233cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014234/* confdefs.h. */
14235_ACEOF
14236cat confdefs.h >>conftest.$ac_ext
14237cat >>conftest.$ac_ext <<_ACEOF
14238/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014239#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014240_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241if { (ac_try="$ac_cpp conftest.$ac_ext"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
14246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14247 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014249 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 rm -f conftest.er1
14251 cat conftest.err >&5
14252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253 (exit $ac_status); } >/dev/null && {
14254 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 ac_header_preproc=yes
14258else
14259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014260sed 's/^/| /' conftest.$ac_ext >&5
14261
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264
Martin v. Löwis11437992002-04-12 09:54:03 +000014265rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014266{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14267echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
14269# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14271 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14273echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014274 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14275echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14276 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014277 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014278 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014279 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14280echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14282echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14283 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14284echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14285 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14286echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014287 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14288echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14290echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014292## ------------------------------------------------ ##
14293## Report this to http://www.python.org/python-bugs ##
14294## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014295_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014297 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014298esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014299{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14300echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014301if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14302 echo $ECHO_N "(cached) $ECHO_C" >&6
14303else
14304 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14307echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309fi
14310if test $ac_cv_header_mach_cthreads_h = yes; then
14311 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014312#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014313_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014314
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014316#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014318
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
14320cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014321#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014322_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014323
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014324 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014325else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014326
Martin v. Löwiseba40652007-08-30 20:10:57 +000014327 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14328echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014331if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014332 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14333echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014334 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014335#define WITH_THREAD 1
14336_ACEOF
14337
14338
14339cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014340#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014341_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014342
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014343 LIBS="-lpth $LIBS"
14344 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014345else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014346 { echo "$as_me:$LINENO: result: no" >&5
14347echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014348
14349 # Just looking for pthread_create in libpthread is not enough:
14350 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14351 # So we really have to include pthread.h, and then link.
14352 _libs=$LIBS
14353 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014354 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14355echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014357/* confdefs.h. */
14358_ACEOF
14359cat confdefs.h >>conftest.$ac_ext
14360cat >>conftest.$ac_ext <<_ACEOF
14361/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014362#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014363
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014364void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014365int
14366main ()
14367{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014368
14369pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 ;
14371 return 0;
14372}
14373_ACEOF
14374rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014375if { (ac_try="$ac_link"
14376case "(($ac_try" in
14377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14378 *) ac_try_echo=$ac_try;;
14379esac
14380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14381 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014383 grep -v '^ *+' conftest.er1 >conftest.err
14384 rm -f conftest.er1
14385 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014387 (exit $ac_status); } && {
14388 test -z "$ac_c_werror_flag" ||
14389 test ! -s conftest.err
14390 } && test -s conftest$ac_exeext &&
14391 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393 { echo "$as_me:$LINENO: result: yes" >&5
14394echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014396#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014397_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014398
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014399 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014400 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014403sed 's/^/| /' conftest.$ac_ext >&5
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014406 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14408echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014409if test "${ac_cv_func_pthread_detach+set}" = set; then
14410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014411else
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014413/* confdefs.h. */
14414_ACEOF
14415cat confdefs.h >>conftest.$ac_ext
14416cat >>conftest.$ac_ext <<_ACEOF
14417/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014418/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14419 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14420#define pthread_detach innocuous_pthread_detach
14421
Guido van Rossumad678af1998-10-02 14:42:15 +000014422/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014423 which can conflict with char pthread_detach (); below.
14424 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014425 <limits.h> exists even on freestanding compilers. */
14426
14427#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014428# include <limits.h>
14429#else
14430# include <assert.h>
14431#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014432
14433#undef pthread_detach
14434
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435/* Override any GCC internal prototype to avoid an error.
14436 Use char because int might match the return type of a GCC
14437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014438#ifdef __cplusplus
14439extern "C"
14440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014441char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014442/* The GNU C library defines this for functions which it implements
14443 to always fail with ENOSYS. Some functions are actually named
14444 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014445#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014446choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014447#endif
14448
Skip Montanaro6dead952003-09-25 14:50:04 +000014449int
14450main ()
14451{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014452return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 ;
14454 return 0;
14455}
14456_ACEOF
14457rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458if { (ac_try="$ac_link"
14459case "(($ac_try" in
14460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14461 *) ac_try_echo=$ac_try;;
14462esac
14463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14464 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014466 grep -v '^ *+' conftest.er1 >conftest.err
14467 rm -f conftest.er1
14468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470 (exit $ac_status); } && {
14471 test -z "$ac_c_werror_flag" ||
14472 test ! -s conftest.err
14473 } && test -s conftest$ac_exeext &&
14474 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014476else
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014478sed 's/^/| /' conftest.$ac_ext >&5
14479
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482
14483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014484 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014486{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14487echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014488if test $ac_cv_func_pthread_detach = yes; then
14489 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014490#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014491_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014492
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014493 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014494 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014495else
Guido van Rossumad678af1998-10-02 14:42:15 +000014496
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014497 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014498 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14499echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014500if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14501 echo $ECHO_N "(cached) $ECHO_C" >&6
14502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14504echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014505else
14506 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014507{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14508echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014510/* confdefs.h. */
14511_ACEOF
14512cat confdefs.h >>conftest.$ac_ext
14513cat >>conftest.$ac_ext <<_ACEOF
14514/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014515$ac_includes_default
14516#include <atheos/threads.h>
14517_ACEOF
14518rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014519if { (ac_try="$ac_compile"
14520case "(($ac_try" in
14521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14522 *) ac_try_echo=$ac_try;;
14523esac
14524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014527 grep -v '^ *+' conftest.er1 >conftest.err
14528 rm -f conftest.er1
14529 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531 (exit $ac_status); } && {
14532 test -z "$ac_c_werror_flag" ||
14533 test ! -s conftest.err
14534 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014535 ac_header_compiler=yes
14536else
14537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014538sed 's/^/| /' conftest.$ac_ext >&5
14539
Martin v. Löwiseba40652007-08-30 20:10:57 +000014540 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542
14543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14544{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14545echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014546
14547# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014548{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14549echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014551/* confdefs.h. */
14552_ACEOF
14553cat confdefs.h >>conftest.$ac_ext
14554cat >>conftest.$ac_ext <<_ACEOF
14555/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014556#include <atheos/threads.h>
14557_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014558if { (ac_try="$ac_cpp conftest.$ac_ext"
14559case "(($ac_try" in
14560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14561 *) ac_try_echo=$ac_try;;
14562esac
14563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14564 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014565 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014566 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014567 rm -f conftest.er1
14568 cat conftest.err >&5
14569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570 (exit $ac_status); } >/dev/null && {
14571 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14572 test ! -s conftest.err
14573 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014574 ac_header_preproc=yes
14575else
14576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014577sed 's/^/| /' conftest.$ac_ext >&5
14578
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014579 ac_header_preproc=no
14580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014582rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14584echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014585
14586# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014587case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14588 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014589 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14590echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014591 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14592echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14593 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014594 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014595 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014596 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14597echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014598 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14599echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14600 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14601echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14602 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14603echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014604 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14605echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014606 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14607echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014609## ------------------------------------------------ ##
14610## Report this to http://www.python.org/python-bugs ##
14611## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014612_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014613 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014614 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014615esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014616{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14617echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014618if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14619 echo $ECHO_N "(cached) $ECHO_C" >&6
14620else
14621 ac_cv_header_atheos_threads_h=$ac_header_preproc
14622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014623{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14624echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014625
14626fi
14627if test $ac_cv_header_atheos_threads_h = yes; then
14628 cat >>confdefs.h <<\_ACEOF
14629#define WITH_THREAD 1
14630_ACEOF
14631
14632
14633cat >>confdefs.h <<\_ACEOF
14634#define ATHEOS_THREADS 1
14635_ACEOF
14636
14637 THREADOBJ="Python/thread.o"
14638else
14639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14642echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014643if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14644 echo $ECHO_N "(cached) $ECHO_C" >&6
14645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14647echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014648else
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14651echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014653/* confdefs.h. */
14654_ACEOF
14655cat confdefs.h >>conftest.$ac_ext
14656cat >>conftest.$ac_ext <<_ACEOF
14657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014658$ac_includes_default
14659#include <kernel/OS.h>
14660_ACEOF
14661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662if { (ac_try="$ac_compile"
14663case "(($ac_try" in
14664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14665 *) ac_try_echo=$ac_try;;
14666esac
14667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014670 grep -v '^ *+' conftest.er1 >conftest.err
14671 rm -f conftest.er1
14672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674 (exit $ac_status); } && {
14675 test -z "$ac_c_werror_flag" ||
14676 test ! -s conftest.err
14677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 ac_header_compiler=yes
14679else
14680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014681sed 's/^/| /' conftest.$ac_ext >&5
14682
Martin v. Löwiseba40652007-08-30 20:10:57 +000014683 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685
14686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14688echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014689
14690# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14692echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014693cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014694/* confdefs.h. */
14695_ACEOF
14696cat confdefs.h >>conftest.$ac_ext
14697cat >>conftest.$ac_ext <<_ACEOF
14698/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014699#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014700_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014701if { (ac_try="$ac_cpp conftest.$ac_ext"
14702case "(($ac_try" in
14703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14704 *) ac_try_echo=$ac_try;;
14705esac
14706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14707 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014709 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014710 rm -f conftest.er1
14711 cat conftest.err >&5
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014713 (exit $ac_status); } >/dev/null && {
14714 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14715 test ! -s conftest.err
14716 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 ac_header_preproc=yes
14718else
14719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014720sed 's/^/| /' conftest.$ac_ext >&5
14721
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724
Martin v. Löwis11437992002-04-12 09:54:03 +000014725rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14727echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14731 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14733echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014734 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14735echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14736 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014737 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014738 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014739 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14740echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014741 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14742echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14743 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14744echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14745 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14746echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014747 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14748echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014749 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14750echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014752## ------------------------------------------------ ##
14753## Report this to http://www.python.org/python-bugs ##
14754## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014755_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014757 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014758esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014759{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14760echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014761if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14762 echo $ECHO_N "(cached) $ECHO_C" >&6
14763else
14764 ac_cv_header_kernel_OS_h=$ac_header_preproc
14765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014766{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14767echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014768
14769fi
14770if test $ac_cv_header_kernel_OS_h = yes; then
14771 cat >>confdefs.h <<\_ACEOF
14772#define WITH_THREAD 1
14773_ACEOF
14774
14775
14776cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014777#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014778_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014779
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014780 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014781else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014782
Martin v. Löwiseba40652007-08-30 20:10:57 +000014783 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14784echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014785if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014787else
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014789LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014791/* confdefs.h. */
14792_ACEOF
14793cat confdefs.h >>conftest.$ac_ext
14794cat >>conftest.$ac_ext <<_ACEOF
14795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014796
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797/* Override any GCC internal prototype to avoid an error.
14798 Use char because int might match the return type of a GCC
14799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014800#ifdef __cplusplus
14801extern "C"
14802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014803char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014804int
14805main ()
14806{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014807return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014808 ;
14809 return 0;
14810}
14811_ACEOF
14812rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014813if { (ac_try="$ac_link"
14814case "(($ac_try" in
14815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14816 *) ac_try_echo=$ac_try;;
14817esac
14818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14819 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014821 grep -v '^ *+' conftest.er1 >conftest.err
14822 rm -f conftest.er1
14823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014825 (exit $ac_status); } && {
14826 test -z "$ac_c_werror_flag" ||
14827 test ! -s conftest.err
14828 } && test -s conftest$ac_exeext &&
14829 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014830 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014831else
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014833sed 's/^/| /' conftest.$ac_ext >&5
14834
Martin v. Löwiseba40652007-08-30 20:10:57 +000014835 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014837
14838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014839 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014840LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014842{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14843echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014844if test $ac_cv_lib_pthreads_pthread_create = yes; then
14845 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014846#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014847_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014848
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014849 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014850 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014851 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014852else
Greg Steinadf63d62000-07-05 10:38:09 +000014853
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14855echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014856if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14857 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014858else
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014860LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014862/* confdefs.h. */
14863_ACEOF
14864cat confdefs.h >>conftest.$ac_ext
14865cat >>conftest.$ac_ext <<_ACEOF
14866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014867
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868/* Override any GCC internal prototype to avoid an error.
14869 Use char because int might match the return type of a GCC
14870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014871#ifdef __cplusplus
14872extern "C"
14873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014874char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014875int
14876main ()
14877{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014878return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 ;
14880 return 0;
14881}
14882_ACEOF
14883rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014884if { (ac_try="$ac_link"
14885case "(($ac_try" in
14886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14887 *) ac_try_echo=$ac_try;;
14888esac
14889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14890 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014892 grep -v '^ *+' conftest.er1 >conftest.err
14893 rm -f conftest.er1
14894 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896 (exit $ac_status); } && {
14897 test -z "$ac_c_werror_flag" ||
14898 test ! -s conftest.err
14899 } && test -s conftest$ac_exeext &&
14900 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014901 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014902else
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014904sed 's/^/| /' conftest.$ac_ext >&5
14905
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014908
14909rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014911LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014913{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14914echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014915if test $ac_cv_lib_c_r_pthread_create = yes; then
14916 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014917#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014918_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014919
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014920 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014921 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014922 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014923else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014924
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14926echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014927if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014929else
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014931LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014932cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014933/* confdefs.h. */
14934_ACEOF
14935cat confdefs.h >>conftest.$ac_ext
14936cat >>conftest.$ac_ext <<_ACEOF
14937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014938
Martin v. Löwiseba40652007-08-30 20:10:57 +000014939/* Override any GCC internal prototype to avoid an error.
14940 Use char because int might match the return type of a GCC
14941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014942#ifdef __cplusplus
14943extern "C"
14944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014945char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014946int
14947main ()
14948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 ;
14951 return 0;
14952}
14953_ACEOF
14954rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955if { (ac_try="$ac_link"
14956case "(($ac_try" in
14957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14958 *) ac_try_echo=$ac_try;;
14959esac
14960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14961 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014963 grep -v '^ *+' conftest.er1 >conftest.err
14964 rm -f conftest.er1
14965 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967 (exit $ac_status); } && {
14968 test -z "$ac_c_werror_flag" ||
14969 test ! -s conftest.err
14970 } && test -s conftest$ac_exeext &&
14971 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014973else
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014975sed 's/^/| /' conftest.$ac_ext >&5
14976
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014979
14980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014981 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014982LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14985echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014986if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14987 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014988#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014989_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014990
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014991 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014992 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014993 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014994else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014995
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14997echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014998if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015000else
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015002LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015004/* confdefs.h. */
15005_ACEOF
15006cat confdefs.h >>conftest.$ac_ext
15007cat >>conftest.$ac_ext <<_ACEOF
15008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015009
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010/* Override any GCC internal prototype to avoid an error.
15011 Use char because int might match the return type of a GCC
15012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015013#ifdef __cplusplus
15014extern "C"
15015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015016char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015017int
15018main ()
15019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ;
15022 return 0;
15023}
15024_ACEOF
15025rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026if { (ac_try="$ac_link"
15027case "(($ac_try" in
15028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15029 *) ac_try_echo=$ac_try;;
15030esac
15031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015034 grep -v '^ *+' conftest.er1 >conftest.err
15035 rm -f conftest.er1
15036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038 (exit $ac_status); } && {
15039 test -z "$ac_c_werror_flag" ||
15040 test ! -s conftest.err
15041 } && test -s conftest$ac_exeext &&
15042 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015044else
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015046sed 's/^/| /' conftest.$ac_ext >&5
15047
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050
15051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015053LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15056echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015057if test $ac_cv_lib_cma_pthread_create = yes; then
15058 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015059#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015060_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015062 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015063 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015064 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015065else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015066
Martin v. Löwis130fb172001-07-19 11:00:41 +000015067 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015068fi
15069
Guido van Rossum627b2d71993-12-24 10:39:16 +000015070
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015071fi
15072
Guido van Rossum0be3e491997-05-22 20:33:33 +000015073fi
15074
Guido van Rossum49545951997-12-02 19:28:29 +000015075fi
15076
Guido van Rossumb93a8621998-05-07 13:27:32 +000015077fi
15078
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015079
Michael W. Hudson54241132001-12-07 15:38:26 +000015080fi
15081
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015082
15083fi
15084
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086
15087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015089fi
15090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091fi
15092
15093
15094fi
15095
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015096
Michael W. Hudson54241132001-12-07 15:38:26 +000015097
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15099echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015100if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15101 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015104LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015106/* confdefs.h. */
15107_ACEOF
15108cat confdefs.h >>conftest.$ac_ext
15109cat >>conftest.$ac_ext <<_ACEOF
15110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015111
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112/* Override any GCC internal prototype to avoid an error.
15113 Use char because int might match the return type of a GCC
15114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015115#ifdef __cplusplus
15116extern "C"
15117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015118char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015119int
15120main ()
15121{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 ;
15124 return 0;
15125}
15126_ACEOF
15127rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128if { (ac_try="$ac_link"
15129case "(($ac_try" in
15130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15131 *) ac_try_echo=$ac_try;;
15132esac
15133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15134 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015136 grep -v '^ *+' conftest.er1 >conftest.err
15137 rm -f conftest.er1
15138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140 (exit $ac_status); } && {
15141 test -z "$ac_c_werror_flag" ||
15142 test ! -s conftest.err
15143 } && test -s conftest$ac_exeext &&
15144 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146else
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015148sed 's/^/| /' conftest.$ac_ext >&5
15149
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015152
15153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015155LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15158echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015159if test $ac_cv_lib_mpc_usconfig = yes; then
15160 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015161#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015163
Martin v. Löwis130fb172001-07-19 11:00:41 +000015164 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015165 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015166 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015167fi
15168
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015169
Neal Norwitza978ab02002-11-02 16:58:05 +000015170 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015171 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15172echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015173if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015175else
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015177LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015178cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015179/* confdefs.h. */
15180_ACEOF
15181cat confdefs.h >>conftest.$ac_ext
15182cat >>conftest.$ac_ext <<_ACEOF
15183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185/* Override any GCC internal prototype to avoid an error.
15186 Use char because int might match the return type of a GCC
15187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015188#ifdef __cplusplus
15189extern "C"
15190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015191char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015192int
15193main ()
15194{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015195return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 ;
15197 return 0;
15198}
15199_ACEOF
15200rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201if { (ac_try="$ac_link"
15202case "(($ac_try" in
15203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15204 *) ac_try_echo=$ac_try;;
15205esac
15206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15207 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015209 grep -v '^ *+' conftest.er1 >conftest.err
15210 rm -f conftest.er1
15211 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 (exit $ac_status); } && {
15214 test -z "$ac_c_werror_flag" ||
15215 test ! -s conftest.err
15216 } && test -s conftest$ac_exeext &&
15217 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219else
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015221sed 's/^/| /' conftest.$ac_ext >&5
15222
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225
15226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015228LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15231echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015232if test $ac_cv_lib_thread_thr_create = yes; then
15233 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015235_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015236
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015237 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015238 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015239 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015240fi
15241
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015242 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015243
Martin v. Löwis130fb172001-07-19 11:00:41 +000015244 if test "$USE_THREAD_MODULE" != "#"
15245 then
15246 # If the above checks didn't disable threads, (at least) OSF1
15247 # needs this '-threads' argument during linking.
15248 case $ac_sys_system in
15249 OSF1) LDLAST=-threads;;
15250 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015251 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015252fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015253
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015254if test "$posix_threads" = "yes"; then
15255 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015256
15257cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015258#define _POSIX_THREADS 1
15259_ACEOF
15260
15261 fi
15262
15263 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15264 case $ac_sys_system/$ac_sys_release in
15265 SunOS/5.6)
15266cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015267#define HAVE_PTHREAD_DESTRUCTOR 1
15268_ACEOF
15269
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015270 ;;
15271 SunOS/5.8)
15272cat >>confdefs.h <<\_ACEOF
15273#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15274_ACEOF
15275
15276 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015277 AIX/5)
15278cat >>confdefs.h <<\_ACEOF
15279#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15280_ACEOF
15281
15282 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015283 esac
15284
Martin v. Löwiseba40652007-08-30 20:10:57 +000015285 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15286echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015287 if test "${ac_cv_pthread_system_supported+set}" = set; then
15288 echo $ECHO_N "(cached) $ECHO_C" >&6
15289else
15290 if test "$cross_compiling" = yes; then
15291 ac_cv_pthread_system_supported=no
15292else
15293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015294/* confdefs.h. */
15295_ACEOF
15296cat confdefs.h >>conftest.$ac_ext
15297cat >>conftest.$ac_ext <<_ACEOF
15298/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015299#include <pthread.h>
15300 void *foo(void *parm) {
15301 return NULL;
15302 }
15303 main() {
15304 pthread_attr_t attr;
15305 pthread_t id;
15306 if (pthread_attr_init(&attr)) exit(-1);
15307 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15308 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15309 exit(0);
15310 }
15311_ACEOF
15312rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313if { (ac_try="$ac_link"
15314case "(($ac_try" in
15315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15316 *) ac_try_echo=$ac_try;;
15317esac
15318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15319 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015320 ac_status=$?
15321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015323 { (case "(($ac_try" in
15324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15325 *) ac_try_echo=$ac_try;;
15326esac
15327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15328 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); }; }; then
15332 ac_cv_pthread_system_supported=yes
15333else
15334 echo "$as_me: program exited with status $ac_status" >&5
15335echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015336sed 's/^/| /' conftest.$ac_ext >&5
15337
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015338( exit $ac_status )
15339ac_cv_pthread_system_supported=no
15340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341rm -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 +000015342fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015343
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344
15345
Guido van Rossum627b2d71993-12-24 10:39:16 +000015346fi
15347
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15349echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015350 if test "$ac_cv_pthread_system_supported" = "yes"; then
15351
15352cat >>confdefs.h <<\_ACEOF
15353#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15354_ACEOF
15355
15356 fi
15357
15358for ac_func in pthread_sigmask
15359do
15360as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15362echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15363if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015364 echo $ECHO_N "(cached) $ECHO_C" >&6
15365else
15366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015367/* confdefs.h. */
15368_ACEOF
15369cat confdefs.h >>conftest.$ac_ext
15370cat >>conftest.$ac_ext <<_ACEOF
15371/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015372/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15373 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15374#define $ac_func innocuous_$ac_func
15375
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015376/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015377 which can conflict with char $ac_func (); below.
15378 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015379 <limits.h> exists even on freestanding compilers. */
15380
15381#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015382# include <limits.h>
15383#else
15384# include <assert.h>
15385#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015386
15387#undef $ac_func
15388
Martin v. Löwiseba40652007-08-30 20:10:57 +000015389/* Override any GCC internal prototype to avoid an error.
15390 Use char because int might match the return type of a GCC
15391 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015392#ifdef __cplusplus
15393extern "C"
15394#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015395char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015396/* The GNU C library defines this for functions which it implements
15397 to always fail with ENOSYS. Some functions are actually named
15398 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015400choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015401#endif
15402
Skip Montanaro6dead952003-09-25 14:50:04 +000015403int
15404main ()
15405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015406return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015407 ;
15408 return 0;
15409}
15410_ACEOF
15411rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412if { (ac_try="$ac_link"
15413case "(($ac_try" in
15414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15415 *) ac_try_echo=$ac_try;;
15416esac
15417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15418 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015420 grep -v '^ *+' conftest.er1 >conftest.err
15421 rm -f conftest.er1
15422 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424 (exit $ac_status); } && {
15425 test -z "$ac_c_werror_flag" ||
15426 test ! -s conftest.err
15427 } && test -s conftest$ac_exeext &&
15428 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015429 eval "$as_ac_var=yes"
15430else
15431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015432sed 's/^/| /' conftest.$ac_ext >&5
15433
Martin v. Löwiseba40652007-08-30 20:10:57 +000015434 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436
15437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015440ac_res=`eval echo '${'$as_ac_var'}'`
15441 { echo "$as_me:$LINENO: result: $ac_res" >&5
15442echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015443if test `eval echo '${'$as_ac_var'}'` = yes; then
15444 cat >>confdefs.h <<_ACEOF
15445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15446_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015447 case $ac_sys_system in
15448 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015449
Jason Tishlerfac083d2003-07-22 15:20:49 +000015450cat >>confdefs.h <<\_ACEOF
15451#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15452_ACEOF
15453
15454 ;;
15455 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015456fi
15457done
15458
15459fi
15460
15461
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015462# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015463
15464
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15466echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15467# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015468if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015469 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015470 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 { echo "$as_me:$LINENO: result: no" >&5
15472echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015473 ipv6=no
15474 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475 *) { echo "$as_me:$LINENO: result: yes" >&5
15476echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015478#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015479_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015480
15481 ipv6=yes
15482 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015484else
Martin v. Löwis11437992002-04-12 09:54:03 +000015485
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015486 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 { echo "$as_me:$LINENO: result: no" >&5
15488echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015489 ipv6=no
15490
15491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015493/* confdefs.h. */
15494_ACEOF
15495cat confdefs.h >>conftest.$ac_ext
15496cat >>conftest.$ac_ext <<_ACEOF
15497/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015498 /* AF_INET6 available check */
15499#include <sys/types.h>
15500#include <sys/socket.h>
15501main()
15502{
15503 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15504 exit(1);
15505 else
15506 exit(0);
15507}
15508
Martin v. Löwis11437992002-04-12 09:54:03 +000015509_ACEOF
15510rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511if { (ac_try="$ac_link"
15512case "(($ac_try" in
15513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15514 *) ac_try_echo=$ac_try;;
15515esac
15516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15517 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 ac_status=$?
15519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015521 { (case "(($ac_try" in
15522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15523 *) ac_try_echo=$ac_try;;
15524esac
15525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15526 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015527 ac_status=$?
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015530 { echo "$as_me:$LINENO: result: yes" >&5
15531echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015532 ipv6=yes
15533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 echo "$as_me: program exited with status $ac_status" >&5
15535echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015536sed 's/^/| /' conftest.$ac_ext >&5
15537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015539{ echo "$as_me:$LINENO: result: no" >&5
15540echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015541 ipv6=no
15542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015543rm -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 +000015544fi
15545
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546
15547
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015548if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15550echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015552/* confdefs.h. */
15553_ACEOF
15554cat confdefs.h >>conftest.$ac_ext
15555cat >>conftest.$ac_ext <<_ACEOF
15556/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015557#include <sys/types.h>
15558#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015559int
15560main ()
15561{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015562struct sockaddr_in6 x;
15563x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ;
15565 return 0;
15566}
15567_ACEOF
15568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569if { (ac_try="$ac_compile"
15570case "(($ac_try" in
15571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15572 *) ac_try_echo=$ac_try;;
15573esac
15574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015577 grep -v '^ *+' conftest.er1 >conftest.err
15578 rm -f conftest.er1
15579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581 (exit $ac_status); } && {
15582 test -z "$ac_c_werror_flag" ||
15583 test ! -s conftest.err
15584 } && test -s conftest.$ac_objext; then
15585 { echo "$as_me:$LINENO: result: yes" >&5
15586echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015587 ipv6=yes
15588else
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015590sed 's/^/| /' conftest.$ac_ext >&5
15591
Martin v. Löwiseba40652007-08-30 20:10:57 +000015592 { echo "$as_me:$LINENO: result: no" >&5
15593echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015594 ipv6=no
15595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596
15597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015598fi
15599
15600if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015602#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015603_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015604
15605fi
15606
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607fi
15608
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015609
15610ipv6type=unknown
15611ipv6lib=none
15612ipv6trylibc=no
15613
15614if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15616echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015617 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15618 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015619 case $i in
15620 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015622/* confdefs.h. */
15623_ACEOF
15624cat confdefs.h >>conftest.$ac_ext
15625cat >>conftest.$ac_ext <<_ACEOF
15626/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015627
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015628#include <netinet/in.h>
15629#ifdef IPV6_INRIA_VERSION
15630yes
15631#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015632_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015634 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015635 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015636fi
15637rm -f conftest*
15638
15639 ;;
15640 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* confdefs.h. */
15643_ACEOF
15644cat confdefs.h >>conftest.$ac_ext
15645cat >>conftest.$ac_ext <<_ACEOF
15646/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015648#include <netinet/in.h>
15649#ifdef __KAME__
15650yes
15651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015652_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015654 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015655 ipv6type=$i;
15656 ipv6lib=inet6
15657 ipv6libdir=/usr/local/v6/lib
15658 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015659fi
15660rm -f conftest*
15661
15662 ;;
15663 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015665/* confdefs.h. */
15666_ACEOF
15667cat confdefs.h >>conftest.$ac_ext
15668cat >>conftest.$ac_ext <<_ACEOF
15669/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015670
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015671#include <features.h>
15672#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15673yes
15674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015675_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015677 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015678 ipv6type=$i;
15679 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015680fi
15681rm -f conftest*
15682
15683 ;;
15684 linux-inet6)
15685 if test -d /usr/inet6; then
15686 ipv6type=$i
15687 ipv6lib=inet6
15688 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015689 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015690 fi
15691 ;;
15692 solaris)
15693 if test -f /etc/netconfig; then
15694 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15695 ipv6type=$i
15696 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015697 fi
15698 fi
15699 ;;
15700 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015708#include <sys/param.h>
15709#ifdef _TOSHIBA_INET6
15710yes
15711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015712_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015714 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015715 ipv6type=$i;
15716 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015717 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015718fi
15719rm -f conftest*
15720
15721 ;;
15722 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015729
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015730#include </usr/local/v6/include/sys/v6config.h>
15731#ifdef __V6D__
15732yes
15733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015734_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015736 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015737 ipv6type=$i;
15738 ipv6lib=v6;
15739 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015740 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015741fi
15742rm -f conftest*
15743
15744 ;;
15745 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015753#include <sys/param.h>
15754#ifdef _ZETA_MINAMI_INET6
15755yes
15756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015757_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015759 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015760 ipv6type=$i;
15761 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015762 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015763fi
15764rm -f conftest*
15765
15766 ;;
15767 esac
15768 if test "$ipv6type" != "unknown"; then
15769 break
15770 fi
15771 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15773echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015774fi
15775
15776if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15777 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15778 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15779 echo "using lib$ipv6lib"
15780 else
15781 if test $ipv6trylibc = "yes"; then
15782 echo "using libc"
15783 else
15784 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15785 echo "You need to fetch lib$ipv6lib.a from appropriate"
15786 echo 'ipv6 kit and compile beforehand.'
15787 exit 1
15788 fi
15789 fi
15790fi
15791
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015792{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15793echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15794cat >conftest.$ac_ext <<_ACEOF
15795/* confdefs.h. */
15796_ACEOF
15797cat confdefs.h >>conftest.$ac_ext
15798cat >>conftest.$ac_ext <<_ACEOF
15799/* end confdefs.h. */
15800#include <Carbon/Carbon.h>
15801int
15802main ()
15803{
15804FSIORefNum fRef = 0
15805 ;
15806 return 0;
15807}
15808_ACEOF
15809rm -f conftest.$ac_objext
15810if { (ac_try="$ac_compile"
15811case "(($ac_try" in
15812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15813 *) ac_try_echo=$ac_try;;
15814esac
15815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15816 (eval "$ac_compile") 2>conftest.er1
15817 ac_status=$?
15818 grep -v '^ *+' conftest.er1 >conftest.err
15819 rm -f conftest.er1
15820 cat conftest.err >&5
15821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15822 (exit $ac_status); } && {
15823 test -z "$ac_c_werror_flag" ||
15824 test ! -s conftest.err
15825 } && test -s conftest.$ac_objext; then
15826
15827cat >>confdefs.h <<\_ACEOF
15828#define HAVE_OSX105_SDK 1
15829_ACEOF
15830
15831 { echo "$as_me:$LINENO: result: yes" >&5
15832echo "${ECHO_T}yes" >&6; }
15833else
15834 echo "$as_me: failed program was:" >&5
15835sed 's/^/| /' conftest.$ac_ext >&5
15836
15837 { echo "$as_me:$LINENO: result: no" >&5
15838echo "${ECHO_T}no" >&6; }
15839
15840fi
15841
15842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15843
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015844# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15846echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015847
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015849if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 withval=$with_doc_strings;
15851fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015852
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015853
15854if test -z "$with_doc_strings"
15855then with_doc_strings="yes"
15856fi
15857if test "$with_doc_strings" != "no"
15858then
15859
15860cat >>confdefs.h <<\_ACEOF
15861#define WITH_DOC_STRINGS 1
15862_ACEOF
15863
15864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15866echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015867
Neil Schemenauera35c6882001-02-27 04:45:05 +000015868# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15870echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015871
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015873if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015875if test "$withval" != no
15876then
15877
15878cat >>confdefs.h <<\_ACEOF
15879#define WITH_TSC 1
15880_ACEOF
15881
Martin v. Löwiseba40652007-08-30 20:10:57 +000015882 { echo "$as_me:$LINENO: result: yes" >&5
15883echo "${ECHO_T}yes" >&6; }
15884else { echo "$as_me:$LINENO: result: no" >&5
15885echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015886fi
15887else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888 { echo "$as_me:$LINENO: result: no" >&5
15889echo "${ECHO_T}no" >&6; }
15890fi
15891
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015892
15893# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015894{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15895echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015898if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899 withval=$with_pymalloc;
15900fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015901
Neil Schemenauera35c6882001-02-27 04:45:05 +000015902
Neil Schemenauer16c22972002-03-22 15:34:49 +000015903if test -z "$with_pymalloc"
15904then with_pymalloc="yes"
15905fi
15906if test "$with_pymalloc" != "no"
15907then
Martin v. Löwis11437992002-04-12 09:54:03 +000015908
15909cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015910#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015911_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015912
15913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015914{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15915echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015916
Barry Warsawef82cd72000-06-30 16:21:01 +000015917# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15919echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015920
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015922if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015924if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015925then
15926
15927cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015928#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015929_ACEOF
15930
Martin v. Löwiseba40652007-08-30 20:10:57 +000015931 { echo "$as_me:$LINENO: result: yes" >&5
15932echo "${ECHO_T}yes" >&6; }
15933else { echo "$as_me:$LINENO: result: no" >&5
15934echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015935fi
15936else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937 { echo "$as_me:$LINENO: result: no" >&5
15938echo "${ECHO_T}no" >&6; }
15939fi
15940
Barry Warsawef82cd72000-06-30 16:21:01 +000015941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015942# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015943
Guido van Rossum98935bf2001-09-05 19:13:16 +000015944DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015945
Guido van Rossume97ee181999-12-20 21:27:22 +000015946# the dlopen() function means we might want to use dynload_shlib.o. some
15947# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
Thomas Wouters3a584202000-08-05 23:28:51 +000015949for ac_func in dlopen
15950do
Martin v. Löwis11437992002-04-12 09:54:03 +000015951as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15953echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15954if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015956else
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015958/* confdefs.h. */
15959_ACEOF
15960cat confdefs.h >>conftest.$ac_ext
15961cat >>conftest.$ac_ext <<_ACEOF
15962/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015963/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15964 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15965#define $ac_func innocuous_$ac_func
15966
Guido van Rossume97ee181999-12-20 21:27:22 +000015967/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015968 which can conflict with char $ac_func (); below.
15969 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015970 <limits.h> exists even on freestanding compilers. */
15971
15972#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015973# include <limits.h>
15974#else
15975# include <assert.h>
15976#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015977
15978#undef $ac_func
15979
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980/* Override any GCC internal prototype to avoid an error.
15981 Use char because int might match the return type of a GCC
15982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015983#ifdef __cplusplus
15984extern "C"
15985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015986char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015987/* The GNU C library defines this for functions which it implements
15988 to always fail with ENOSYS. Some functions are actually named
15989 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015991choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015992#endif
15993
Skip Montanaro6dead952003-09-25 14:50:04 +000015994int
15995main ()
15996{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015997return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 ;
15999 return 0;
16000}
16001_ACEOF
16002rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003if { (ac_try="$ac_link"
16004case "(($ac_try" in
16005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16006 *) ac_try_echo=$ac_try;;
16007esac
16008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16009 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016011 grep -v '^ *+' conftest.er1 >conftest.err
16012 rm -f conftest.er1
16013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 (exit $ac_status); } && {
16016 test -z "$ac_c_werror_flag" ||
16017 test ! -s conftest.err
16018 } && test -s conftest$ac_exeext &&
16019 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016021else
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016023sed 's/^/| /' conftest.$ac_ext >&5
16024
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016027
16028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016029 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016031ac_res=`eval echo '${'$as_ac_var'}'`
16032 { echo "$as_me:$LINENO: result: $ac_res" >&5
16033echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016034if test `eval echo '${'$as_ac_var'}'` = yes; then
16035 cat >>confdefs.h <<_ACEOF
16036#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16037_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016038
Guido van Rossume97ee181999-12-20 21:27:22 +000016039fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016040done
Guido van Rossume97ee181999-12-20 21:27:22 +000016041
Michael W. Hudson54241132001-12-07 15:38:26 +000016042
Guido van Rossume97ee181999-12-20 21:27:22 +000016043# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16044# loading of modules.
16045
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16047echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016048if test -z "$DYNLOADFILE"
16049then
16050 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016051 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16052 if test "$ac_cv_func_dlopen" = yes
16053 then DYNLOADFILE="dynload_shlib.o"
16054 else DYNLOADFILE="dynload_aix.o"
16055 fi
16056 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016057 BeOS*) DYNLOADFILE="dynload_beos.o";;
16058 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016059 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16060 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016061 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016062 *)
16063 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16064 # out any dynamic loading
16065 if test "$ac_cv_func_dlopen" = yes
16066 then DYNLOADFILE="dynload_shlib.o"
16067 else DYNLOADFILE="dynload_stub.o"
16068 fi
16069 ;;
16070 esac
16071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16073echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016074if test "$DYNLOADFILE" != "dynload_stub.o"
16075then
Martin v. Löwis11437992002-04-12 09:54:03 +000016076
16077cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016078#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016079_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016080
16081fi
16082
Neil Schemenauer4e425612001-06-19 15:44:15 +000016083# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16084
Michael W. Hudson54241132001-12-07 15:38:26 +000016085
Martin v. Löwiseba40652007-08-30 20:10:57 +000016086{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16087echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016088if test -z "$MACHDEP_OBJS"
16089then
Jack Jansene578a632001-08-15 01:27:14 +000016090 MACHDEP_OBJS=$extra_machdep_objs
16091else
16092 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016094{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16095echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016096
Guido van Rossum627b2d71993-12-24 10:39:16 +000016097# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
Martin v. Löwisd6320502004-08-12 13:45:08 +000016169
Martin v. Löwisc3001752005-01-23 09:27:24 +000016170
16171
Neal Norwitz05a45592006-03-20 06:30:08 +000016172
16173
Martin v. Löwis382abef2007-02-19 10:55:19 +000016174
16175
Christian Heimes36281872007-11-30 21:11:28 +000016176
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016177
16178
16179for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16180 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016181 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016182 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016183 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016184 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016185 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016186 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016187 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016188 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016189 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016190 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016191do
Martin v. Löwis11437992002-04-12 09:54:03 +000016192as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16194echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16195if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016197else
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016199/* confdefs.h. */
16200_ACEOF
16201cat confdefs.h >>conftest.$ac_ext
16202cat >>conftest.$ac_ext <<_ACEOF
16203/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016204/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16205 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16206#define $ac_func innocuous_$ac_func
16207
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016208/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016209 which can conflict with char $ac_func (); below.
16210 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016211 <limits.h> exists even on freestanding compilers. */
16212
16213#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016214# include <limits.h>
16215#else
16216# include <assert.h>
16217#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016218
16219#undef $ac_func
16220
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221/* Override any GCC internal prototype to avoid an error.
16222 Use char because int might match the return type of a GCC
16223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016224#ifdef __cplusplus
16225extern "C"
16226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016227char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016228/* The GNU C library defines this for functions which it implements
16229 to always fail with ENOSYS. Some functions are actually named
16230 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016232choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016233#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016234
Skip Montanaro6dead952003-09-25 14:50:04 +000016235int
16236main ()
16237{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016238return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 ;
16240 return 0;
16241}
16242_ACEOF
16243rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244if { (ac_try="$ac_link"
16245case "(($ac_try" in
16246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16247 *) ac_try_echo=$ac_try;;
16248esac
16249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16250 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016252 grep -v '^ *+' conftest.er1 >conftest.err
16253 rm -f conftest.er1
16254 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256 (exit $ac_status); } && {
16257 test -z "$ac_c_werror_flag" ||
16258 test ! -s conftest.err
16259 } && test -s conftest$ac_exeext &&
16260 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016262else
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016264sed 's/^/| /' conftest.$ac_ext >&5
16265
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268
16269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016270 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272ac_res=`eval echo '${'$as_ac_var'}'`
16273 { echo "$as_me:$LINENO: result: $ac_res" >&5
16274echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016275if test `eval echo '${'$as_ac_var'}'` = yes; then
16276 cat >>confdefs.h <<_ACEOF
16277#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16278_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016280fi
16281done
16282
Michael W. Hudson54241132001-12-07 15:38:26 +000016283
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016284# For some functions, having a definition is not sufficient, since
16285# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286{ echo "$as_me:$LINENO: checking for chroot" >&5
16287echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016289/* confdefs.h. */
16290_ACEOF
16291cat confdefs.h >>conftest.$ac_ext
16292cat >>conftest.$ac_ext <<_ACEOF
16293/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016294#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016295int
16296main ()
16297{
16298void *x=chroot
16299 ;
16300 return 0;
16301}
16302_ACEOF
16303rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016304if { (ac_try="$ac_compile"
16305case "(($ac_try" in
16306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16307 *) ac_try_echo=$ac_try;;
16308esac
16309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16310 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016312 grep -v '^ *+' conftest.er1 >conftest.err
16313 rm -f conftest.er1
16314 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016316 (exit $ac_status); } && {
16317 test -z "$ac_c_werror_flag" ||
16318 test ! -s conftest.err
16319 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016320
16321cat >>confdefs.h <<\_ACEOF
16322#define HAVE_CHROOT 1
16323_ACEOF
16324
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325 { echo "$as_me:$LINENO: result: yes" >&5
16326echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016327else
16328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016329sed 's/^/| /' conftest.$ac_ext >&5
16330
Martin v. Löwiseba40652007-08-30 20:10:57 +000016331 { echo "$as_me:$LINENO: result: no" >&5
16332echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016333
16334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016335
16336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16337{ echo "$as_me:$LINENO: checking for link" >&5
16338echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016345#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016346int
16347main ()
16348{
16349void *x=link
16350 ;
16351 return 0;
16352}
16353_ACEOF
16354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016355if { (ac_try="$ac_compile"
16356case "(($ac_try" in
16357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16358 *) ac_try_echo=$ac_try;;
16359esac
16360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016363 grep -v '^ *+' conftest.er1 >conftest.err
16364 rm -f conftest.er1
16365 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367 (exit $ac_status); } && {
16368 test -z "$ac_c_werror_flag" ||
16369 test ! -s conftest.err
16370 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016371
16372cat >>confdefs.h <<\_ACEOF
16373#define HAVE_LINK 1
16374_ACEOF
16375
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376 { echo "$as_me:$LINENO: result: yes" >&5
16377echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016378else
16379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016380sed 's/^/| /' conftest.$ac_ext >&5
16381
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382 { echo "$as_me:$LINENO: result: no" >&5
16383echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016384
16385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386
16387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16388{ echo "$as_me:$LINENO: checking for symlink" >&5
16389echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016391/* confdefs.h. */
16392_ACEOF
16393cat confdefs.h >>conftest.$ac_ext
16394cat >>conftest.$ac_ext <<_ACEOF
16395/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016396#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016397int
16398main ()
16399{
16400void *x=symlink
16401 ;
16402 return 0;
16403}
16404_ACEOF
16405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406if { (ac_try="$ac_compile"
16407case "(($ac_try" in
16408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16409 *) ac_try_echo=$ac_try;;
16410esac
16411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016414 grep -v '^ *+' conftest.er1 >conftest.err
16415 rm -f conftest.er1
16416 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016418 (exit $ac_status); } && {
16419 test -z "$ac_c_werror_flag" ||
16420 test ! -s conftest.err
16421 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016422
16423cat >>confdefs.h <<\_ACEOF
16424#define HAVE_SYMLINK 1
16425_ACEOF
16426
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427 { echo "$as_me:$LINENO: result: yes" >&5
16428echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016429else
16430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431sed 's/^/| /' conftest.$ac_ext >&5
16432
Martin v. Löwiseba40652007-08-30 20:10:57 +000016433 { echo "$as_me:$LINENO: result: no" >&5
16434echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016435
16436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016437
16438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16439{ echo "$as_me:$LINENO: checking for fchdir" >&5
16440echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016442/* confdefs.h. */
16443_ACEOF
16444cat confdefs.h >>conftest.$ac_ext
16445cat >>conftest.$ac_ext <<_ACEOF
16446/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016447#include <unistd.h>
16448int
16449main ()
16450{
16451void *x=fchdir
16452 ;
16453 return 0;
16454}
16455_ACEOF
16456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016457if { (ac_try="$ac_compile"
16458case "(($ac_try" in
16459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16460 *) ac_try_echo=$ac_try;;
16461esac
16462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016465 grep -v '^ *+' conftest.er1 >conftest.err
16466 rm -f conftest.er1
16467 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016469 (exit $ac_status); } && {
16470 test -z "$ac_c_werror_flag" ||
16471 test ! -s conftest.err
16472 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016473
16474cat >>confdefs.h <<\_ACEOF
16475#define HAVE_FCHDIR 1
16476_ACEOF
16477
Martin v. Löwiseba40652007-08-30 20:10:57 +000016478 { echo "$as_me:$LINENO: result: yes" >&5
16479echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016480else
16481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016482sed 's/^/| /' conftest.$ac_ext >&5
16483
Martin v. Löwiseba40652007-08-30 20:10:57 +000016484 { echo "$as_me:$LINENO: result: no" >&5
16485echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016486
16487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016488
16489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16490{ echo "$as_me:$LINENO: checking for fsync" >&5
16491echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016493/* confdefs.h. */
16494_ACEOF
16495cat confdefs.h >>conftest.$ac_ext
16496cat >>conftest.$ac_ext <<_ACEOF
16497/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016498#include <unistd.h>
16499int
16500main ()
16501{
16502void *x=fsync
16503 ;
16504 return 0;
16505}
16506_ACEOF
16507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016508if { (ac_try="$ac_compile"
16509case "(($ac_try" in
16510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16511 *) ac_try_echo=$ac_try;;
16512esac
16513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016516 grep -v '^ *+' conftest.er1 >conftest.err
16517 rm -f conftest.er1
16518 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016520 (exit $ac_status); } && {
16521 test -z "$ac_c_werror_flag" ||
16522 test ! -s conftest.err
16523 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016524
16525cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016526#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016527_ACEOF
16528
Martin v. Löwiseba40652007-08-30 20:10:57 +000016529 { echo "$as_me:$LINENO: result: yes" >&5
16530echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016531else
16532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016533sed 's/^/| /' conftest.$ac_ext >&5
16534
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535 { echo "$as_me:$LINENO: result: no" >&5
16536echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016537
16538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016539
16540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16541{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16542echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016544/* confdefs.h. */
16545_ACEOF
16546cat confdefs.h >>conftest.$ac_ext
16547cat >>conftest.$ac_ext <<_ACEOF
16548/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016549#include <unistd.h>
16550int
16551main ()
16552{
16553void *x=fdatasync
16554 ;
16555 return 0;
16556}
16557_ACEOF
16558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016559if { (ac_try="$ac_compile"
16560case "(($ac_try" in
16561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16562 *) ac_try_echo=$ac_try;;
16563esac
16564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016567 grep -v '^ *+' conftest.er1 >conftest.err
16568 rm -f conftest.er1
16569 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016571 (exit $ac_status); } && {
16572 test -z "$ac_c_werror_flag" ||
16573 test ! -s conftest.err
16574 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016575
16576cat >>confdefs.h <<\_ACEOF
16577#define HAVE_FDATASYNC 1
16578_ACEOF
16579
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580 { echo "$as_me:$LINENO: result: yes" >&5
16581echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016582else
16583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016584sed 's/^/| /' conftest.$ac_ext >&5
16585
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586 { echo "$as_me:$LINENO: result: no" >&5
16587echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016588
16589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016590
16591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016592{ echo "$as_me:$LINENO: checking for epoll" >&5
16593echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16594cat >conftest.$ac_ext <<_ACEOF
16595/* confdefs.h. */
16596_ACEOF
16597cat confdefs.h >>conftest.$ac_ext
16598cat >>conftest.$ac_ext <<_ACEOF
16599/* end confdefs.h. */
16600#include <sys/epoll.h>
16601int
16602main ()
16603{
16604void *x=epoll_create
16605 ;
16606 return 0;
16607}
16608_ACEOF
16609rm -f conftest.$ac_objext
16610if { (ac_try="$ac_compile"
16611case "(($ac_try" in
16612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16613 *) ac_try_echo=$ac_try;;
16614esac
16615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16616 (eval "$ac_compile") 2>conftest.er1
16617 ac_status=$?
16618 grep -v '^ *+' conftest.er1 >conftest.err
16619 rm -f conftest.er1
16620 cat conftest.err >&5
16621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16622 (exit $ac_status); } && {
16623 test -z "$ac_c_werror_flag" ||
16624 test ! -s conftest.err
16625 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016626
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016627cat >>confdefs.h <<\_ACEOF
16628#define HAVE_EPOLL 1
16629_ACEOF
16630
16631 { echo "$as_me:$LINENO: result: yes" >&5
16632echo "${ECHO_T}yes" >&6; }
16633else
16634 echo "$as_me: failed program was:" >&5
16635sed 's/^/| /' conftest.$ac_ext >&5
16636
16637 { echo "$as_me:$LINENO: result: no" >&5
16638echo "${ECHO_T}no" >&6; }
16639
16640fi
16641
16642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16643{ echo "$as_me:$LINENO: checking for kqueue" >&5
16644echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16645cat >conftest.$ac_ext <<_ACEOF
16646/* confdefs.h. */
16647_ACEOF
16648cat confdefs.h >>conftest.$ac_ext
16649cat >>conftest.$ac_ext <<_ACEOF
16650/* end confdefs.h. */
16651
16652#include <sys/types.h>
16653#include <sys/event.h>
16654
16655int
16656main ()
16657{
16658int x=kqueue()
16659 ;
16660 return 0;
16661}
16662_ACEOF
16663rm -f conftest.$ac_objext
16664if { (ac_try="$ac_compile"
16665case "(($ac_try" in
16666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16667 *) ac_try_echo=$ac_try;;
16668esac
16669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16670 (eval "$ac_compile") 2>conftest.er1
16671 ac_status=$?
16672 grep -v '^ *+' conftest.er1 >conftest.err
16673 rm -f conftest.er1
16674 cat conftest.err >&5
16675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16676 (exit $ac_status); } && {
16677 test -z "$ac_c_werror_flag" ||
16678 test ! -s conftest.err
16679 } && test -s conftest.$ac_objext; then
16680
16681cat >>confdefs.h <<\_ACEOF
16682#define HAVE_KQUEUE 1
16683_ACEOF
16684
16685 { echo "$as_me:$LINENO: result: yes" >&5
16686echo "${ECHO_T}yes" >&6; }
16687else
16688 echo "$as_me: failed program was:" >&5
16689sed 's/^/| /' conftest.$ac_ext >&5
16690
16691 { echo "$as_me:$LINENO: result: no" >&5
16692echo "${ECHO_T}no" >&6; }
16693
16694fi
16695
16696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016697# On some systems (eg. FreeBSD 5), we would find a definition of the
16698# functions ctermid_r, setgroups in the library, but no prototype
16699# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16700# address to avoid compiler warnings and potential miscompilations
16701# because of the missing prototypes.
16702
Martin v. Löwiseba40652007-08-30 20:10:57 +000016703{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16704echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016706/* confdefs.h. */
16707_ACEOF
16708cat confdefs.h >>conftest.$ac_ext
16709cat >>conftest.$ac_ext <<_ACEOF
16710/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016711
16712#include "confdefs.h"
16713#include <stdio.h>
16714
Martin v. Löwisd5843682002-11-21 20:41:28 +000016715int
16716main ()
16717{
16718void* p = ctermid_r
16719 ;
16720 return 0;
16721}
16722_ACEOF
16723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016724if { (ac_try="$ac_compile"
16725case "(($ac_try" in
16726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16727 *) ac_try_echo=$ac_try;;
16728esac
16729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016732 grep -v '^ *+' conftest.er1 >conftest.err
16733 rm -f conftest.er1
16734 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016736 (exit $ac_status); } && {
16737 test -z "$ac_c_werror_flag" ||
16738 test ! -s conftest.err
16739 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016740
16741cat >>confdefs.h <<\_ACEOF
16742#define HAVE_CTERMID_R 1
16743_ACEOF
16744
Martin v. Löwiseba40652007-08-30 20:10:57 +000016745 { echo "$as_me:$LINENO: result: yes" >&5
16746echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016747else
16748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016749sed 's/^/| /' conftest.$ac_ext >&5
16750
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751 { echo "$as_me:$LINENO: result: no" >&5
16752echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016753
16754fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016755
Martin v. Löwiseba40652007-08-30 20:10:57 +000016756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16757
16758{ echo "$as_me:$LINENO: checking for flock" >&5
16759echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016760cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016761/* confdefs.h. */
16762_ACEOF
16763cat confdefs.h >>conftest.$ac_ext
16764cat >>conftest.$ac_ext <<_ACEOF
16765/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016766
16767#include "confdefs.h"
16768#include <sys/file.h>
16769
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016770int
16771main ()
16772{
16773void* p = flock
16774 ;
16775 return 0;
16776}
16777_ACEOF
16778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016779if { (ac_try="$ac_compile"
16780case "(($ac_try" in
16781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16782 *) ac_try_echo=$ac_try;;
16783esac
16784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016787 grep -v '^ *+' conftest.er1 >conftest.err
16788 rm -f conftest.er1
16789 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791 (exit $ac_status); } && {
16792 test -z "$ac_c_werror_flag" ||
16793 test ! -s conftest.err
16794 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016795
16796cat >>confdefs.h <<\_ACEOF
16797#define HAVE_FLOCK 1
16798_ACEOF
16799
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800 { echo "$as_me:$LINENO: result: yes" >&5
16801echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016802else
16803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016804sed 's/^/| /' conftest.$ac_ext >&5
16805
Martin v. Löwiseba40652007-08-30 20:10:57 +000016806 { echo "$as_me:$LINENO: result: no" >&5
16807echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016808
16809fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016810
Martin v. Löwiseba40652007-08-30 20:10:57 +000016811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16812
16813{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16814echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016816/* confdefs.h. */
16817_ACEOF
16818cat confdefs.h >>conftest.$ac_ext
16819cat >>conftest.$ac_ext <<_ACEOF
16820/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016821
16822#include "confdefs.h"
16823#include <unistd.h>
16824
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016825int
16826main ()
16827{
16828void* p = getpagesize
16829 ;
16830 return 0;
16831}
16832_ACEOF
16833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016834if { (ac_try="$ac_compile"
16835case "(($ac_try" in
16836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16837 *) ac_try_echo=$ac_try;;
16838esac
16839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016842 grep -v '^ *+' conftest.er1 >conftest.err
16843 rm -f conftest.er1
16844 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016846 (exit $ac_status); } && {
16847 test -z "$ac_c_werror_flag" ||
16848 test ! -s conftest.err
16849 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016850
16851cat >>confdefs.h <<\_ACEOF
16852#define HAVE_GETPAGESIZE 1
16853_ACEOF
16854
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855 { echo "$as_me:$LINENO: result: yes" >&5
16856echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016857else
16858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016859sed 's/^/| /' conftest.$ac_ext >&5
16860
Martin v. Löwiseba40652007-08-30 20:10:57 +000016861 { echo "$as_me:$LINENO: result: no" >&5
16862echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016863
16864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016865
16866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016867
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016868for ac_prog in true
16869do
16870 # Extract the first word of "$ac_prog", so it can be a program name with args.
16871set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016872{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016874if test "${ac_cv_prog_TRUE+set}" = set; then
16875 echo $ECHO_N "(cached) $ECHO_C" >&6
16876else
16877 if test -n "$TRUE"; then
16878 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16879else
16880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16881for as_dir in $PATH
16882do
16883 IFS=$as_save_IFS
16884 test -z "$as_dir" && as_dir=.
16885 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886 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 +000016887 ac_cv_prog_TRUE="$ac_prog"
16888 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16889 break 2
16890 fi
16891done
16892done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016894
16895fi
16896fi
16897TRUE=$ac_cv_prog_TRUE
16898if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899 { echo "$as_me:$LINENO: result: $TRUE" >&5
16900echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016901else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016902 { echo "$as_me:$LINENO: result: no" >&5
16903echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016904fi
16905
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016907 test -n "$TRUE" && break
16908done
16909test -n "$TRUE" || TRUE="/bin/true"
16910
16911
Martin v. Löwiseba40652007-08-30 20:10:57 +000016912{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16913echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016914if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16915 echo $ECHO_N "(cached) $ECHO_C" >&6
16916else
16917 ac_check_lib_save_LIBS=$LIBS
16918LIBS="-lc $LIBS"
16919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016920/* confdefs.h. */
16921_ACEOF
16922cat confdefs.h >>conftest.$ac_ext
16923cat >>conftest.$ac_ext <<_ACEOF
16924/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016925
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926/* Override any GCC internal prototype to avoid an error.
16927 Use char because int might match the return type of a GCC
16928 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016929#ifdef __cplusplus
16930extern "C"
16931#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016932char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016933int
16934main ()
16935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942if { (ac_try="$ac_link"
16943case "(($ac_try" in
16944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16945 *) ac_try_echo=$ac_try;;
16946esac
16947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016950 grep -v '^ *+' conftest.er1 >conftest.err
16951 rm -f conftest.er1
16952 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954 (exit $ac_status); } && {
16955 test -z "$ac_c_werror_flag" ||
16956 test ! -s conftest.err
16957 } && test -s conftest$ac_exeext &&
16958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016959 ac_cv_lib_c_inet_aton=yes
16960else
16961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016962sed 's/^/| /' conftest.$ac_ext >&5
16963
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016966
16967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016969LIBS=$ac_check_lib_save_LIBS
16970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016971{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16972echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016973if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016974 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016975else
16976
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16978echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016979if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16980 echo $ECHO_N "(cached) $ECHO_C" >&6
16981else
16982 ac_check_lib_save_LIBS=$LIBS
16983LIBS="-lresolv $LIBS"
16984cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016985/* confdefs.h. */
16986_ACEOF
16987cat confdefs.h >>conftest.$ac_ext
16988cat >>conftest.$ac_ext <<_ACEOF
16989/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016990
Martin v. Löwiseba40652007-08-30 20:10:57 +000016991/* Override any GCC internal prototype to avoid an error.
16992 Use char because int might match the return type of a GCC
16993 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016994#ifdef __cplusplus
16995extern "C"
16996#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016997char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016998int
16999main ()
17000{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017001return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017002 ;
17003 return 0;
17004}
17005_ACEOF
17006rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007if { (ac_try="$ac_link"
17008case "(($ac_try" in
17009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17010 *) ac_try_echo=$ac_try;;
17011esac
17012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17013 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017015 grep -v '^ *+' conftest.er1 >conftest.err
17016 rm -f conftest.er1
17017 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 (exit $ac_status); } && {
17020 test -z "$ac_c_werror_flag" ||
17021 test ! -s conftest.err
17022 } && test -s conftest$ac_exeext &&
17023 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017024 ac_cv_lib_resolv_inet_aton=yes
17025else
17026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017027sed 's/^/| /' conftest.$ac_ext >&5
17028
Martin v. Löwiseba40652007-08-30 20:10:57 +000017029 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031
17032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017033 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017034LIBS=$ac_check_lib_save_LIBS
17035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017036{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17037echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017038if test $ac_cv_lib_resolv_inet_aton = yes; then
17039 cat >>confdefs.h <<_ACEOF
17040#define HAVE_LIBRESOLV 1
17041_ACEOF
17042
17043 LIBS="-lresolv $LIBS"
17044
17045fi
17046
17047
17048fi
17049
17050
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017051# On Tru64, chflags seems to be present, but calling it will
17052# exit Python
17053{ echo "$as_me:$LINENO: checking for chflags" >&5
17054echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17055if test "$cross_compiling" = yes; then
17056 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17057See \`config.log' for more details." >&5
17058echo "$as_me: error: cannot run test program while cross compiling
17059See \`config.log' for more details." >&2;}
17060 { (exit 1); exit 1; }; }
17061else
17062 cat >conftest.$ac_ext <<_ACEOF
17063/* confdefs.h. */
17064_ACEOF
17065cat confdefs.h >>conftest.$ac_ext
17066cat >>conftest.$ac_ext <<_ACEOF
17067/* end confdefs.h. */
17068
17069#include <sys/stat.h>
17070#include <unistd.h>
17071int main(int argc, char*argv[])
17072{
17073 if(chflags(argv[0], 0) != 0)
17074 return 1;
17075 return 0;
17076}
17077
17078_ACEOF
17079rm -f conftest$ac_exeext
17080if { (ac_try="$ac_link"
17081case "(($ac_try" in
17082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17083 *) ac_try_echo=$ac_try;;
17084esac
17085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17086 (eval "$ac_link") 2>&5
17087 ac_status=$?
17088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17090 { (case "(($ac_try" in
17091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17092 *) ac_try_echo=$ac_try;;
17093esac
17094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17095 (eval "$ac_try") 2>&5
17096 ac_status=$?
17097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17098 (exit $ac_status); }; }; then
17099
17100cat >>confdefs.h <<\_ACEOF
17101#define HAVE_CHFLAGS 1
17102_ACEOF
17103
17104 { echo "$as_me:$LINENO: result: yes" >&5
17105echo "${ECHO_T}yes" >&6; }
17106else
17107 echo "$as_me: program exited with status $ac_status" >&5
17108echo "$as_me: failed program was:" >&5
17109sed 's/^/| /' conftest.$ac_ext >&5
17110
17111( exit $ac_status )
17112{ echo "$as_me:$LINENO: result: no" >&5
17113echo "${ECHO_T}no" >&6; }
17114
17115fi
17116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17117fi
17118
17119
17120
17121{ echo "$as_me:$LINENO: checking for lchflags" >&5
17122echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17123if test "$cross_compiling" = yes; then
17124 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17125See \`config.log' for more details." >&5
17126echo "$as_me: error: cannot run test program while cross compiling
17127See \`config.log' for more details." >&2;}
17128 { (exit 1); exit 1; }; }
17129else
17130 cat >conftest.$ac_ext <<_ACEOF
17131/* confdefs.h. */
17132_ACEOF
17133cat confdefs.h >>conftest.$ac_ext
17134cat >>conftest.$ac_ext <<_ACEOF
17135/* end confdefs.h. */
17136
17137#include <sys/stat.h>
17138#include <unistd.h>
17139int main(int argc, char*argv[])
17140{
17141 if(lchflags(argv[0], 0) != 0)
17142 return 1;
17143 return 0;
17144}
17145
17146_ACEOF
17147rm -f conftest$ac_exeext
17148if { (ac_try="$ac_link"
17149case "(($ac_try" in
17150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17151 *) ac_try_echo=$ac_try;;
17152esac
17153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17154 (eval "$ac_link") 2>&5
17155 ac_status=$?
17156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17158 { (case "(($ac_try" in
17159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17160 *) ac_try_echo=$ac_try;;
17161esac
17162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17163 (eval "$ac_try") 2>&5
17164 ac_status=$?
17165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17166 (exit $ac_status); }; }; then
17167
17168cat >>confdefs.h <<\_ACEOF
17169#define HAVE_LCHFLAGS 1
17170_ACEOF
17171
17172 { echo "$as_me:$LINENO: result: yes" >&5
17173echo "${ECHO_T}yes" >&6; }
17174else
17175 echo "$as_me: program exited with status $ac_status" >&5
17176echo "$as_me: failed program was:" >&5
17177sed 's/^/| /' conftest.$ac_ext >&5
17178
17179( exit $ac_status )
17180{ echo "$as_me:$LINENO: result: no" >&5
17181echo "${ECHO_T}no" >&6; }
17182
17183fi
17184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17185fi
17186
17187
17188
Ronald Oussorenf8752642006-07-06 10:13:35 +000017189case $ac_sys_system/$ac_sys_release in
17190Darwin/*)
17191 _CUR_CFLAGS="${CFLAGS}"
17192 _CUR_LDFLAGS="${LDFLAGS}"
17193 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17194 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17195 ;;
17196esac
17197
Martin v. Löwiseba40652007-08-30 20:10:57 +000017198{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17199echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017200if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17201 echo $ECHO_N "(cached) $ECHO_C" >&6
17202else
17203 ac_check_lib_save_LIBS=$LIBS
17204LIBS="-lz $LIBS"
17205cat >conftest.$ac_ext <<_ACEOF
17206/* confdefs.h. */
17207_ACEOF
17208cat confdefs.h >>conftest.$ac_ext
17209cat >>conftest.$ac_ext <<_ACEOF
17210/* end confdefs.h. */
17211
Martin v. Löwiseba40652007-08-30 20:10:57 +000017212/* Override any GCC internal prototype to avoid an error.
17213 Use char because int might match the return type of a GCC
17214 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017215#ifdef __cplusplus
17216extern "C"
17217#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017218char inflateCopy ();
17219int
17220main ()
17221{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017222return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017223 ;
17224 return 0;
17225}
17226_ACEOF
17227rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228if { (ac_try="$ac_link"
17229case "(($ac_try" in
17230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17231 *) ac_try_echo=$ac_try;;
17232esac
17233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17234 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017235 ac_status=$?
17236 grep -v '^ *+' conftest.er1 >conftest.err
17237 rm -f conftest.er1
17238 cat conftest.err >&5
17239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240 (exit $ac_status); } && {
17241 test -z "$ac_c_werror_flag" ||
17242 test ! -s conftest.err
17243 } && test -s conftest$ac_exeext &&
17244 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017245 ac_cv_lib_z_inflateCopy=yes
17246else
17247 echo "$as_me: failed program was:" >&5
17248sed 's/^/| /' conftest.$ac_ext >&5
17249
Martin v. Löwiseba40652007-08-30 20:10:57 +000017250 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017252
17253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017254 conftest$ac_exeext conftest.$ac_ext
17255LIBS=$ac_check_lib_save_LIBS
17256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17258echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017259if test $ac_cv_lib_z_inflateCopy = yes; then
17260
17261cat >>confdefs.h <<\_ACEOF
17262#define HAVE_ZLIB_COPY 1
17263_ACEOF
17264
17265fi
17266
17267
Ronald Oussorenf8752642006-07-06 10:13:35 +000017268case $ac_sys_system/$ac_sys_release in
17269Darwin/*)
17270 CFLAGS="${_CUR_CFLAGS}"
17271 LDFLAGS="${_CUR_LDFLAGS}"
17272 ;;
17273esac
17274
Martin v. Löwiseba40652007-08-30 20:10:57 +000017275{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17276echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017277cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017278/* confdefs.h. */
17279_ACEOF
17280cat confdefs.h >>conftest.$ac_ext
17281cat >>conftest.$ac_ext <<_ACEOF
17282/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017283
17284#include "confdefs.h"
17285#include <netdb.h>
17286
Martin v. Löwise9416172003-05-03 10:12:45 +000017287int
17288main ()
17289{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017290void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017291 ;
17292 return 0;
17293}
17294_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017296if { (ac_try="$ac_link"
17297case "(($ac_try" in
17298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17299 *) ac_try_echo=$ac_try;;
17300esac
17301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017304 grep -v '^ *+' conftest.er1 >conftest.err
17305 rm -f conftest.er1
17306 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017308 (exit $ac_status); } && {
17309 test -z "$ac_c_werror_flag" ||
17310 test ! -s conftest.err
17311 } && test -s conftest$ac_exeext &&
17312 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017313
17314cat >>confdefs.h <<\_ACEOF
17315#define HAVE_HSTRERROR 1
17316_ACEOF
17317
Martin v. Löwiseba40652007-08-30 20:10:57 +000017318 { echo "$as_me:$LINENO: result: yes" >&5
17319echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017320else
17321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017322sed 's/^/| /' conftest.$ac_ext >&5
17323
Martin v. Löwiseba40652007-08-30 20:10:57 +000017324 { echo "$as_me:$LINENO: result: no" >&5
17325echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017326
17327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017328
17329rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017331
Martin v. Löwiseba40652007-08-30 20:10:57 +000017332{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17333echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017335/* confdefs.h. */
17336_ACEOF
17337cat confdefs.h >>conftest.$ac_ext
17338cat >>conftest.$ac_ext <<_ACEOF
17339/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017340
17341#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017342#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017343#include <sys/socket.h>
17344#include <netinet/in.h>
17345#include <arpa/inet.h>
17346
Martin v. Löwise9416172003-05-03 10:12:45 +000017347int
17348main ()
17349{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017350void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017351 ;
17352 return 0;
17353}
17354_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017355rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017356if { (ac_try="$ac_link"
17357case "(($ac_try" in
17358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17359 *) ac_try_echo=$ac_try;;
17360esac
17361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17362 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017364 grep -v '^ *+' conftest.er1 >conftest.err
17365 rm -f conftest.er1
17366 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017368 (exit $ac_status); } && {
17369 test -z "$ac_c_werror_flag" ||
17370 test ! -s conftest.err
17371 } && test -s conftest$ac_exeext &&
17372 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017373
17374cat >>confdefs.h <<\_ACEOF
17375#define HAVE_INET_ATON 1
17376_ACEOF
17377
Martin v. Löwiseba40652007-08-30 20:10:57 +000017378 { echo "$as_me:$LINENO: result: yes" >&5
17379echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017380else
17381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017382sed 's/^/| /' conftest.$ac_ext >&5
17383
Martin v. Löwiseba40652007-08-30 20:10:57 +000017384 { echo "$as_me:$LINENO: result: no" >&5
17385echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017386
17387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017388
17389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017391
Martin v. Löwiseba40652007-08-30 20:10:57 +000017392{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17393echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017395/* confdefs.h. */
17396_ACEOF
17397cat confdefs.h >>conftest.$ac_ext
17398cat >>conftest.$ac_ext <<_ACEOF
17399/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017400
17401#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017402#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017403#include <sys/socket.h>
17404#include <netinet/in.h>
17405#include <arpa/inet.h>
17406
Martin v. Löwise9416172003-05-03 10:12:45 +000017407int
17408main ()
17409{
17410void* p = inet_pton
17411 ;
17412 return 0;
17413}
17414_ACEOF
17415rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017416if { (ac_try="$ac_compile"
17417case "(($ac_try" in
17418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17419 *) ac_try_echo=$ac_try;;
17420esac
17421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017424 grep -v '^ *+' conftest.er1 >conftest.err
17425 rm -f conftest.er1
17426 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017428 (exit $ac_status); } && {
17429 test -z "$ac_c_werror_flag" ||
17430 test ! -s conftest.err
17431 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017432
17433cat >>confdefs.h <<\_ACEOF
17434#define HAVE_INET_PTON 1
17435_ACEOF
17436
Martin v. Löwiseba40652007-08-30 20:10:57 +000017437 { echo "$as_me:$LINENO: result: yes" >&5
17438echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017439else
17440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017441sed 's/^/| /' conftest.$ac_ext >&5
17442
Martin v. Löwiseba40652007-08-30 20:10:57 +000017443 { echo "$as_me:$LINENO: result: no" >&5
17444echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017445
17446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017447
17448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017449
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017450# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451{ echo "$as_me:$LINENO: checking for setgroups" >&5
17452echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017453cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017454/* confdefs.h. */
17455_ACEOF
17456cat confdefs.h >>conftest.$ac_ext
17457cat >>conftest.$ac_ext <<_ACEOF
17458/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017459
17460#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017461#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017462#ifdef HAVE_GRP_H
17463#include <grp.h>
17464#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017465
Martin v. Löwisd5843682002-11-21 20:41:28 +000017466int
17467main ()
17468{
17469void* p = setgroups
17470 ;
17471 return 0;
17472}
17473_ACEOF
17474rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475if { (ac_try="$ac_compile"
17476case "(($ac_try" in
17477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17478 *) ac_try_echo=$ac_try;;
17479esac
17480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017483 grep -v '^ *+' conftest.er1 >conftest.err
17484 rm -f conftest.er1
17485 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017487 (exit $ac_status); } && {
17488 test -z "$ac_c_werror_flag" ||
17489 test ! -s conftest.err
17490 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017491
17492cat >>confdefs.h <<\_ACEOF
17493#define HAVE_SETGROUPS 1
17494_ACEOF
17495
Martin v. Löwiseba40652007-08-30 20:10:57 +000017496 { echo "$as_me:$LINENO: result: yes" >&5
17497echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017498else
17499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017500sed 's/^/| /' conftest.$ac_ext >&5
17501
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502 { echo "$as_me:$LINENO: result: no" >&5
17503echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017504
17505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017506
17507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017508
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017509# check for openpty and forkpty
17510
Martin v. Löwis11437992002-04-12 09:54:03 +000017511
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017512for ac_func in openpty
17513do
Martin v. Löwis11437992002-04-12 09:54:03 +000017514as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017515{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17516echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17517if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017519else
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017521/* confdefs.h. */
17522_ACEOF
17523cat confdefs.h >>conftest.$ac_ext
17524cat >>conftest.$ac_ext <<_ACEOF
17525/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017526/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17527 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17528#define $ac_func innocuous_$ac_func
17529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017530/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017531 which can conflict with char $ac_func (); below.
17532 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017533 <limits.h> exists even on freestanding compilers. */
17534
17535#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017536# include <limits.h>
17537#else
17538# include <assert.h>
17539#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017540
17541#undef $ac_func
17542
Martin v. Löwiseba40652007-08-30 20:10:57 +000017543/* Override any GCC internal prototype to avoid an error.
17544 Use char because int might match the return type of a GCC
17545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017546#ifdef __cplusplus
17547extern "C"
17548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017549char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017550/* The GNU C library defines this for functions which it implements
17551 to always fail with ENOSYS. Some functions are actually named
17552 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017553#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017554choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017555#endif
17556
Skip Montanaro6dead952003-09-25 14:50:04 +000017557int
17558main ()
17559{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017560return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 ;
17562 return 0;
17563}
17564_ACEOF
17565rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017566if { (ac_try="$ac_link"
17567case "(($ac_try" in
17568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17569 *) ac_try_echo=$ac_try;;
17570esac
17571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17572 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017574 grep -v '^ *+' conftest.er1 >conftest.err
17575 rm -f conftest.er1
17576 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578 (exit $ac_status); } && {
17579 test -z "$ac_c_werror_flag" ||
17580 test ! -s conftest.err
17581 } && test -s conftest$ac_exeext &&
17582 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017584else
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017586sed 's/^/| /' conftest.$ac_ext >&5
17587
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017590
17591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017592 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017594ac_res=`eval echo '${'$as_ac_var'}'`
17595 { echo "$as_me:$LINENO: result: $ac_res" >&5
17596echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017597if test `eval echo '${'$as_ac_var'}'` = yes; then
17598 cat >>confdefs.h <<_ACEOF
17599#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17600_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017601
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017602else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017603 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17604echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017605if test "${ac_cv_lib_util_openpty+set}" = set; then
17606 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017607else
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017609LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017611/* confdefs.h. */
17612_ACEOF
17613cat confdefs.h >>conftest.$ac_ext
17614cat >>conftest.$ac_ext <<_ACEOF
17615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017616
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617/* Override any GCC internal prototype to avoid an error.
17618 Use char because int might match the return type of a GCC
17619 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017620#ifdef __cplusplus
17621extern "C"
17622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017623char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017624int
17625main ()
17626{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017627return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 ;
17629 return 0;
17630}
17631_ACEOF
17632rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017633if { (ac_try="$ac_link"
17634case "(($ac_try" in
17635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17636 *) ac_try_echo=$ac_try;;
17637esac
17638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17639 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017641 grep -v '^ *+' conftest.er1 >conftest.err
17642 rm -f conftest.er1
17643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017645 (exit $ac_status); } && {
17646 test -z "$ac_c_werror_flag" ||
17647 test ! -s conftest.err
17648 } && test -s conftest$ac_exeext &&
17649 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017651else
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017653sed 's/^/| /' conftest.$ac_ext >&5
17654
Martin v. Löwiseba40652007-08-30 20:10:57 +000017655 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017657
17658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017660LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017662{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17663echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017664if test $ac_cv_lib_util_openpty = yes; then
17665 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017666#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017667_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017668 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017669else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017670 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17671echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017672if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17673 echo $ECHO_N "(cached) $ECHO_C" >&6
17674else
17675 ac_check_lib_save_LIBS=$LIBS
17676LIBS="-lbsd $LIBS"
17677cat >conftest.$ac_ext <<_ACEOF
17678/* confdefs.h. */
17679_ACEOF
17680cat confdefs.h >>conftest.$ac_ext
17681cat >>conftest.$ac_ext <<_ACEOF
17682/* end confdefs.h. */
17683
Martin v. Löwiseba40652007-08-30 20:10:57 +000017684/* Override any GCC internal prototype to avoid an error.
17685 Use char because int might match the return type of a GCC
17686 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017687#ifdef __cplusplus
17688extern "C"
17689#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017690char openpty ();
17691int
17692main ()
17693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017694return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017695 ;
17696 return 0;
17697}
17698_ACEOF
17699rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017700if { (ac_try="$ac_link"
17701case "(($ac_try" in
17702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17703 *) ac_try_echo=$ac_try;;
17704esac
17705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17706 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017707 ac_status=$?
17708 grep -v '^ *+' conftest.er1 >conftest.err
17709 rm -f conftest.er1
17710 cat conftest.err >&5
17711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017712 (exit $ac_status); } && {
17713 test -z "$ac_c_werror_flag" ||
17714 test ! -s conftest.err
17715 } && test -s conftest$ac_exeext &&
17716 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017717 ac_cv_lib_bsd_openpty=yes
17718else
17719 echo "$as_me: failed program was:" >&5
17720sed 's/^/| /' conftest.$ac_ext >&5
17721
Martin v. Löwiseba40652007-08-30 20:10:57 +000017722 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017724
17725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017726 conftest$ac_exeext conftest.$ac_ext
17727LIBS=$ac_check_lib_save_LIBS
17728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17730echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017731if test $ac_cv_lib_bsd_openpty = yes; then
17732 cat >>confdefs.h <<\_ACEOF
17733#define HAVE_OPENPTY 1
17734_ACEOF
17735 LIBS="$LIBS -lbsd"
17736fi
17737
17738
17739fi
17740
Fred Drake8cef4cf2000-06-28 16:40:38 +000017741
17742fi
17743done
17744
Martin v. Löwis11437992002-04-12 09:54:03 +000017745
Fred Drake8cef4cf2000-06-28 16:40:38 +000017746for ac_func in forkpty
17747do
Martin v. Löwis11437992002-04-12 09:54:03 +000017748as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017749{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17751if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017753else
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017755/* confdefs.h. */
17756_ACEOF
17757cat confdefs.h >>conftest.$ac_ext
17758cat >>conftest.$ac_ext <<_ACEOF
17759/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017760/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17761 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17762#define $ac_func innocuous_$ac_func
17763
Fred Drake8cef4cf2000-06-28 16:40:38 +000017764/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017765 which can conflict with char $ac_func (); below.
17766 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017767 <limits.h> exists even on freestanding compilers. */
17768
17769#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017770# include <limits.h>
17771#else
17772# include <assert.h>
17773#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017774
17775#undef $ac_func
17776
Martin v. Löwiseba40652007-08-30 20:10:57 +000017777/* Override any GCC internal prototype to avoid an error.
17778 Use char because int might match the return type of a GCC
17779 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017780#ifdef __cplusplus
17781extern "C"
17782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017783char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017784/* The GNU C library defines this for functions which it implements
17785 to always fail with ENOSYS. Some functions are actually named
17786 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017787#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017788choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017789#endif
17790
Skip Montanaro6dead952003-09-25 14:50:04 +000017791int
17792main ()
17793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017794return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 ;
17796 return 0;
17797}
17798_ACEOF
17799rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800if { (ac_try="$ac_link"
17801case "(($ac_try" in
17802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17803 *) ac_try_echo=$ac_try;;
17804esac
17805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017808 grep -v '^ *+' conftest.er1 >conftest.err
17809 rm -f conftest.er1
17810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017812 (exit $ac_status); } && {
17813 test -z "$ac_c_werror_flag" ||
17814 test ! -s conftest.err
17815 } && test -s conftest$ac_exeext &&
17816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017817 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017818else
Martin v. Löwis11437992002-04-12 09:54:03 +000017819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017820sed 's/^/| /' conftest.$ac_ext >&5
17821
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017824
17825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017826 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017828ac_res=`eval echo '${'$as_ac_var'}'`
17829 { echo "$as_me:$LINENO: result: $ac_res" >&5
17830echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017831if test `eval echo '${'$as_ac_var'}'` = yes; then
17832 cat >>confdefs.h <<_ACEOF
17833#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17834_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017835
Fred Drake8cef4cf2000-06-28 16:40:38 +000017836else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17838echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017839if test "${ac_cv_lib_util_forkpty+set}" = set; then
17840 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017841else
Martin v. Löwis11437992002-04-12 09:54:03 +000017842 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017843LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017845/* confdefs.h. */
17846_ACEOF
17847cat confdefs.h >>conftest.$ac_ext
17848cat >>conftest.$ac_ext <<_ACEOF
17849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017850
Martin v. Löwiseba40652007-08-30 20:10:57 +000017851/* Override any GCC internal prototype to avoid an error.
17852 Use char because int might match the return type of a GCC
17853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017854#ifdef __cplusplus
17855extern "C"
17856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017857char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017858int
17859main ()
17860{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017861return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 ;
17863 return 0;
17864}
17865_ACEOF
17866rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017867if { (ac_try="$ac_link"
17868case "(($ac_try" in
17869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17870 *) ac_try_echo=$ac_try;;
17871esac
17872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17873 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017875 grep -v '^ *+' conftest.er1 >conftest.err
17876 rm -f conftest.er1
17877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017879 (exit $ac_status); } && {
17880 test -z "$ac_c_werror_flag" ||
17881 test ! -s conftest.err
17882 } && test -s conftest$ac_exeext &&
17883 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017885else
Martin v. Löwis11437992002-04-12 09:54:03 +000017886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017887sed 's/^/| /' conftest.$ac_ext >&5
17888
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017891
17892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017893 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017894LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017896{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17897echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017898if test $ac_cv_lib_util_forkpty = yes; then
17899 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017900#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017901_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017902 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017903else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017904 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17905echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017906if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17907 echo $ECHO_N "(cached) $ECHO_C" >&6
17908else
17909 ac_check_lib_save_LIBS=$LIBS
17910LIBS="-lbsd $LIBS"
17911cat >conftest.$ac_ext <<_ACEOF
17912/* confdefs.h. */
17913_ACEOF
17914cat confdefs.h >>conftest.$ac_ext
17915cat >>conftest.$ac_ext <<_ACEOF
17916/* end confdefs.h. */
17917
Martin v. Löwiseba40652007-08-30 20:10:57 +000017918/* Override any GCC internal prototype to avoid an error.
17919 Use char because int might match the return type of a GCC
17920 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017921#ifdef __cplusplus
17922extern "C"
17923#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017924char forkpty ();
17925int
17926main ()
17927{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017928return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017929 ;
17930 return 0;
17931}
17932_ACEOF
17933rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017934if { (ac_try="$ac_link"
17935case "(($ac_try" in
17936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17937 *) ac_try_echo=$ac_try;;
17938esac
17939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17940 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017941 ac_status=$?
17942 grep -v '^ *+' conftest.er1 >conftest.err
17943 rm -f conftest.er1
17944 cat conftest.err >&5
17945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017946 (exit $ac_status); } && {
17947 test -z "$ac_c_werror_flag" ||
17948 test ! -s conftest.err
17949 } && test -s conftest$ac_exeext &&
17950 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017951 ac_cv_lib_bsd_forkpty=yes
17952else
17953 echo "$as_me: failed program was:" >&5
17954sed 's/^/| /' conftest.$ac_ext >&5
17955
Martin v. Löwiseba40652007-08-30 20:10:57 +000017956 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017958
17959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017960 conftest$ac_exeext conftest.$ac_ext
17961LIBS=$ac_check_lib_save_LIBS
17962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017963{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17964echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017965if test $ac_cv_lib_bsd_forkpty = yes; then
17966 cat >>confdefs.h <<\_ACEOF
17967#define HAVE_FORKPTY 1
17968_ACEOF
17969 LIBS="$LIBS -lbsd"
17970fi
17971
17972
17973fi
17974
Fred Drake8cef4cf2000-06-28 16:40:38 +000017975
17976fi
17977done
17978
Jack Jansendd19cf82001-12-06 22:36:17 +000017979
Brett Cannonaa5778d2008-03-18 04:09:00 +000017980# Stuff for expat.
17981
17982for ac_func in memmove
17983do
17984as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17985{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17986echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17987if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17988 echo $ECHO_N "(cached) $ECHO_C" >&6
17989else
17990 cat >conftest.$ac_ext <<_ACEOF
17991/* confdefs.h. */
17992_ACEOF
17993cat confdefs.h >>conftest.$ac_ext
17994cat >>conftest.$ac_ext <<_ACEOF
17995/* end confdefs.h. */
17996/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17997 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17998#define $ac_func innocuous_$ac_func
17999
18000/* System header to define __stub macros and hopefully few prototypes,
18001 which can conflict with char $ac_func (); below.
18002 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18003 <limits.h> exists even on freestanding compilers. */
18004
18005#ifdef __STDC__
18006# include <limits.h>
18007#else
18008# include <assert.h>
18009#endif
18010
18011#undef $ac_func
18012
18013/* Override any GCC internal prototype to avoid an error.
18014 Use char because int might match the return type of a GCC
18015 builtin and then its argument prototype would still apply. */
18016#ifdef __cplusplus
18017extern "C"
18018#endif
18019char $ac_func ();
18020/* The GNU C library defines this for functions which it implements
18021 to always fail with ENOSYS. Some functions are actually named
18022 something starting with __ and the normal name is an alias. */
18023#if defined __stub_$ac_func || defined __stub___$ac_func
18024choke me
18025#endif
18026
18027int
18028main ()
18029{
18030return $ac_func ();
18031 ;
18032 return 0;
18033}
18034_ACEOF
18035rm -f conftest.$ac_objext conftest$ac_exeext
18036if { (ac_try="$ac_link"
18037case "(($ac_try" in
18038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18039 *) ac_try_echo=$ac_try;;
18040esac
18041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18042 (eval "$ac_link") 2>conftest.er1
18043 ac_status=$?
18044 grep -v '^ *+' conftest.er1 >conftest.err
18045 rm -f conftest.er1
18046 cat conftest.err >&5
18047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048 (exit $ac_status); } && {
18049 test -z "$ac_c_werror_flag" ||
18050 test ! -s conftest.err
18051 } && test -s conftest$ac_exeext &&
18052 $as_test_x conftest$ac_exeext; then
18053 eval "$as_ac_var=yes"
18054else
18055 echo "$as_me: failed program was:" >&5
18056sed 's/^/| /' conftest.$ac_ext >&5
18057
18058 eval "$as_ac_var=no"
18059fi
18060
18061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18062 conftest$ac_exeext conftest.$ac_ext
18063fi
18064ac_res=`eval echo '${'$as_ac_var'}'`
18065 { echo "$as_me:$LINENO: result: $ac_res" >&5
18066echo "${ECHO_T}$ac_res" >&6; }
18067if test `eval echo '${'$as_ac_var'}'` = yes; then
18068 cat >>confdefs.h <<_ACEOF
18069#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18070_ACEOF
18071
18072fi
18073done
18074
18075
Michael W. Hudson54241132001-12-07 15:38:26 +000018076# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018077
18078
18079
18080
18081
18082
Fred Drake8cef4cf2000-06-28 16:40:38 +000018083for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18084do
Martin v. Löwis11437992002-04-12 09:54:03 +000018085as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018086{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18087echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18088if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018090else
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018092/* confdefs.h. */
18093_ACEOF
18094cat confdefs.h >>conftest.$ac_ext
18095cat >>conftest.$ac_ext <<_ACEOF
18096/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018097/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18098 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18099#define $ac_func innocuous_$ac_func
18100
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018101/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018102 which can conflict with char $ac_func (); below.
18103 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018104 <limits.h> exists even on freestanding compilers. */
18105
18106#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018107# include <limits.h>
18108#else
18109# include <assert.h>
18110#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018111
18112#undef $ac_func
18113
Martin v. Löwiseba40652007-08-30 20:10:57 +000018114/* Override any GCC internal prototype to avoid an error.
18115 Use char because int might match the return type of a GCC
18116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018117#ifdef __cplusplus
18118extern "C"
18119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018120char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018121/* The GNU C library defines this for functions which it implements
18122 to always fail with ENOSYS. Some functions are actually named
18123 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018124#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018125choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018126#endif
18127
Skip Montanaro6dead952003-09-25 14:50:04 +000018128int
18129main ()
18130{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018131return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018132 ;
18133 return 0;
18134}
18135_ACEOF
18136rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018137if { (ac_try="$ac_link"
18138case "(($ac_try" in
18139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18140 *) ac_try_echo=$ac_try;;
18141esac
18142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018145 grep -v '^ *+' conftest.er1 >conftest.err
18146 rm -f conftest.er1
18147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018149 (exit $ac_status); } && {
18150 test -z "$ac_c_werror_flag" ||
18151 test ! -s conftest.err
18152 } && test -s conftest$ac_exeext &&
18153 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018154 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018155else
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018157sed 's/^/| /' conftest.$ac_ext >&5
18158
Martin v. Löwiseba40652007-08-30 20:10:57 +000018159 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161
18162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018163 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018165ac_res=`eval echo '${'$as_ac_var'}'`
18166 { echo "$as_me:$LINENO: result: $ac_res" >&5
18167echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018168if test `eval echo '${'$as_ac_var'}'` = yes; then
18169 cat >>confdefs.h <<_ACEOF
18170#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18171_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018173fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018174done
18175
Michael W. Hudson54241132001-12-07 15:38:26 +000018176
Martin v. Löwis11437992002-04-12 09:54:03 +000018177
18178
18179
Brett Cannonaa5778d2008-03-18 04:09:00 +000018180for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018181do
Martin v. Löwis11437992002-04-12 09:54:03 +000018182as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018183{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18184echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18185if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018186 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018187else
Martin v. Löwis11437992002-04-12 09:54:03 +000018188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018189/* confdefs.h. */
18190_ACEOF
18191cat confdefs.h >>conftest.$ac_ext
18192cat >>conftest.$ac_ext <<_ACEOF
18193/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018194/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18196#define $ac_func innocuous_$ac_func
18197
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018198/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018199 which can conflict with char $ac_func (); below.
18200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018201 <limits.h> exists even on freestanding compilers. */
18202
18203#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018204# include <limits.h>
18205#else
18206# include <assert.h>
18207#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018208
18209#undef $ac_func
18210
Martin v. Löwiseba40652007-08-30 20:10:57 +000018211/* Override any GCC internal prototype to avoid an error.
18212 Use char because int might match the return type of a GCC
18213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018214#ifdef __cplusplus
18215extern "C"
18216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018217char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018218/* The GNU C library defines this for functions which it implements
18219 to always fail with ENOSYS. Some functions are actually named
18220 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018221#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018222choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018223#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018224
Skip Montanaro6dead952003-09-25 14:50:04 +000018225int
18226main ()
18227{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018228return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 ;
18230 return 0;
18231}
18232_ACEOF
18233rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018234if { (ac_try="$ac_link"
18235case "(($ac_try" in
18236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18237 *) ac_try_echo=$ac_try;;
18238esac
18239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018242 grep -v '^ *+' conftest.er1 >conftest.err
18243 rm -f conftest.er1
18244 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018246 (exit $ac_status); } && {
18247 test -z "$ac_c_werror_flag" ||
18248 test ! -s conftest.err
18249 } && test -s conftest$ac_exeext &&
18250 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018252else
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018254sed 's/^/| /' conftest.$ac_ext >&5
18255
Martin v. Löwiseba40652007-08-30 20:10:57 +000018256 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018258
18259rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018262ac_res=`eval echo '${'$as_ac_var'}'`
18263 { echo "$as_me:$LINENO: result: $ac_res" >&5
18264echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018265if test `eval echo '${'$as_ac_var'}'` = yes; then
18266 cat >>confdefs.h <<_ACEOF
18267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18268_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018269
Martin v. Löwis1142de32002-03-29 16:28:31 +000018270else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018271 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018272 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018273 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18274 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018275esac
18276
Martin v. Löwis1142de32002-03-29 16:28:31 +000018277fi
18278done
18279
18280
Martin v. Löwis11437992002-04-12 09:54:03 +000018281
Martin v. Löwis1142de32002-03-29 16:28:31 +000018282for ac_func in getpgrp
18283do
Martin v. Löwis11437992002-04-12 09:54:03 +000018284as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18286echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18287if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018289else
Martin v. Löwis11437992002-04-12 09:54:03 +000018290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018291/* confdefs.h. */
18292_ACEOF
18293cat confdefs.h >>conftest.$ac_ext
18294cat >>conftest.$ac_ext <<_ACEOF
18295/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018296/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18297 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18298#define $ac_func innocuous_$ac_func
18299
Martin v. Löwis1142de32002-03-29 16:28:31 +000018300/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018301 which can conflict with char $ac_func (); below.
18302 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018303 <limits.h> exists even on freestanding compilers. */
18304
18305#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018306# include <limits.h>
18307#else
18308# include <assert.h>
18309#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018310
18311#undef $ac_func
18312
Martin v. Löwiseba40652007-08-30 20:10:57 +000018313/* Override any GCC internal prototype to avoid an error.
18314 Use char because int might match the return type of a GCC
18315 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018316#ifdef __cplusplus
18317extern "C"
18318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018319char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018320/* The GNU C library defines this for functions which it implements
18321 to always fail with ENOSYS. Some functions are actually named
18322 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018323#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018324choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018325#endif
18326
Skip Montanaro6dead952003-09-25 14:50:04 +000018327int
18328main ()
18329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018330return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 ;
18332 return 0;
18333}
18334_ACEOF
18335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018336if { (ac_try="$ac_link"
18337case "(($ac_try" in
18338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18339 *) ac_try_echo=$ac_try;;
18340esac
18341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018344 grep -v '^ *+' conftest.er1 >conftest.err
18345 rm -f conftest.er1
18346 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018348 (exit $ac_status); } && {
18349 test -z "$ac_c_werror_flag" ||
18350 test ! -s conftest.err
18351 } && test -s conftest$ac_exeext &&
18352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018353 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018354else
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018356sed 's/^/| /' conftest.$ac_ext >&5
18357
Martin v. Löwiseba40652007-08-30 20:10:57 +000018358 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018360
18361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018362 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018364ac_res=`eval echo '${'$as_ac_var'}'`
18365 { echo "$as_me:$LINENO: result: $ac_res" >&5
18366echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018367if test `eval echo '${'$as_ac_var'}'` = yes; then
18368 cat >>confdefs.h <<_ACEOF
18369#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18370_ACEOF
18371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018372/* confdefs.h. */
18373_ACEOF
18374cat confdefs.h >>conftest.$ac_ext
18375cat >>conftest.$ac_ext <<_ACEOF
18376/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018377#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018378int
18379main ()
18380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018381getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018382 ;
18383 return 0;
18384}
18385_ACEOF
18386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018387if { (ac_try="$ac_compile"
18388case "(($ac_try" in
18389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18390 *) ac_try_echo=$ac_try;;
18391esac
18392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018395 grep -v '^ *+' conftest.er1 >conftest.err
18396 rm -f conftest.er1
18397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018399 (exit $ac_status); } && {
18400 test -z "$ac_c_werror_flag" ||
18401 test ! -s conftest.err
18402 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018403
18404cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018405#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018406_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018407
Martin v. Löwis11437992002-04-12 09:54:03 +000018408
Guido van Rossumf78abae1997-01-21 22:02:36 +000018409else
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018411sed 's/^/| /' conftest.$ac_ext >&5
18412
Martin v. Löwiseba40652007-08-30 20:10:57 +000018413
Guido van Rossum627b2d71993-12-24 10:39:16 +000018414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018415
18416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018417
Guido van Rossum627b2d71993-12-24 10:39:16 +000018418fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018419done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018420
Jack Jansen150753c2003-03-29 22:07:47 +000018421
18422for ac_func in setpgrp
18423do
18424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018425{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18427if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018429else
Martin v. Löwis11437992002-04-12 09:54:03 +000018430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018431/* confdefs.h. */
18432_ACEOF
18433cat confdefs.h >>conftest.$ac_ext
18434cat >>conftest.$ac_ext <<_ACEOF
18435/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018436/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18437 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18438#define $ac_func innocuous_$ac_func
18439
Jack Jansen150753c2003-03-29 22:07:47 +000018440/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018441 which can conflict with char $ac_func (); below.
18442 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018443 <limits.h> exists even on freestanding compilers. */
18444
18445#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018446# include <limits.h>
18447#else
18448# include <assert.h>
18449#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018450
18451#undef $ac_func
18452
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453/* Override any GCC internal prototype to avoid an error.
18454 Use char because int might match the return type of a GCC
18455 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018456#ifdef __cplusplus
18457extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018458#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018459char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018460/* The GNU C library defines this for functions which it implements
18461 to always fail with ENOSYS. Some functions are actually named
18462 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018463#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018464choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018465#endif
18466
Skip Montanaro6dead952003-09-25 14:50:04 +000018467int
18468main ()
18469{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018471 ;
18472 return 0;
18473}
18474_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018475rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018476if { (ac_try="$ac_link"
18477case "(($ac_try" in
18478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18479 *) ac_try_echo=$ac_try;;
18480esac
18481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18482 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018484 grep -v '^ *+' conftest.er1 >conftest.err
18485 rm -f conftest.er1
18486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018488 (exit $ac_status); } && {
18489 test -z "$ac_c_werror_flag" ||
18490 test ! -s conftest.err
18491 } && test -s conftest$ac_exeext &&
18492 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018493 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018494else
Jack Jansen150753c2003-03-29 22:07:47 +000018495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018496sed 's/^/| /' conftest.$ac_ext >&5
18497
Martin v. Löwiseba40652007-08-30 20:10:57 +000018498 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018500
18501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018504ac_res=`eval echo '${'$as_ac_var'}'`
18505 { echo "$as_me:$LINENO: result: $ac_res" >&5
18506echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018507if test `eval echo '${'$as_ac_var'}'` = yes; then
18508 cat >>confdefs.h <<_ACEOF
18509#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18510_ACEOF
18511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018512/* confdefs.h. */
18513_ACEOF
18514cat confdefs.h >>conftest.$ac_ext
18515cat >>conftest.$ac_ext <<_ACEOF
18516/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018517#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018518int
18519main ()
18520{
18521setpgrp(0,0);
18522 ;
18523 return 0;
18524}
18525_ACEOF
18526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018527if { (ac_try="$ac_compile"
18528case "(($ac_try" in
18529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18530 *) ac_try_echo=$ac_try;;
18531esac
18532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18533 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018535 grep -v '^ *+' conftest.er1 >conftest.err
18536 rm -f conftest.er1
18537 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018539 (exit $ac_status); } && {
18540 test -z "$ac_c_werror_flag" ||
18541 test ! -s conftest.err
18542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018543
18544cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018545#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018546_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018547
Jack Jansen150753c2003-03-29 22:07:47 +000018548
18549else
18550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018551sed 's/^/| /' conftest.$ac_ext >&5
18552
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018555
18556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018557
18558fi
18559done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018560
Martin v. Löwis11437992002-04-12 09:54:03 +000018561
Thomas Wouters3a584202000-08-05 23:28:51 +000018562for ac_func in gettimeofday
18563do
Martin v. Löwis11437992002-04-12 09:54:03 +000018564as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018565{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18566echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18567if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018569else
Martin v. Löwis11437992002-04-12 09:54:03 +000018570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018571/* confdefs.h. */
18572_ACEOF
18573cat confdefs.h >>conftest.$ac_ext
18574cat >>conftest.$ac_ext <<_ACEOF
18575/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018576/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18577 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18578#define $ac_func innocuous_$ac_func
18579
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018580/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018581 which can conflict with char $ac_func (); below.
18582 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018583 <limits.h> exists even on freestanding compilers. */
18584
18585#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018586# include <limits.h>
18587#else
18588# include <assert.h>
18589#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018590
18591#undef $ac_func
18592
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593/* Override any GCC internal prototype to avoid an error.
18594 Use char because int might match the return type of a GCC
18595 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018596#ifdef __cplusplus
18597extern "C"
18598#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018599char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018600/* The GNU C library defines this for functions which it implements
18601 to always fail with ENOSYS. Some functions are actually named
18602 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018603#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018604choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018605#endif
18606
Skip Montanaro6dead952003-09-25 14:50:04 +000018607int
18608main ()
18609{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018610return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018611 ;
18612 return 0;
18613}
18614_ACEOF
18615rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018616if { (ac_try="$ac_link"
18617case "(($ac_try" in
18618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18619 *) ac_try_echo=$ac_try;;
18620esac
18621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18622 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018624 grep -v '^ *+' conftest.er1 >conftest.err
18625 rm -f conftest.er1
18626 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628 (exit $ac_status); } && {
18629 test -z "$ac_c_werror_flag" ||
18630 test ! -s conftest.err
18631 } && test -s conftest$ac_exeext &&
18632 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018633 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018634else
Martin v. Löwis11437992002-04-12 09:54:03 +000018635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018636sed 's/^/| /' conftest.$ac_ext >&5
18637
Martin v. Löwiseba40652007-08-30 20:10:57 +000018638 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018640
18641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018642 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018644ac_res=`eval echo '${'$as_ac_var'}'`
18645 { echo "$as_me:$LINENO: result: $ac_res" >&5
18646echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018647if test `eval echo '${'$as_ac_var'}'` = yes; then
18648 cat >>confdefs.h <<_ACEOF
18649#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18650_ACEOF
18651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018652/* confdefs.h. */
18653_ACEOF
18654cat confdefs.h >>conftest.$ac_ext
18655cat >>conftest.$ac_ext <<_ACEOF
18656/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018657#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018658int
18659main ()
18660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018661gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 ;
18663 return 0;
18664}
18665_ACEOF
18666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018667if { (ac_try="$ac_compile"
18668case "(($ac_try" in
18669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18670 *) ac_try_echo=$ac_try;;
18671esac
18672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018675 grep -v '^ *+' conftest.er1 >conftest.err
18676 rm -f conftest.er1
18677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018679 (exit $ac_status); } && {
18680 test -z "$ac_c_werror_flag" ||
18681 test ! -s conftest.err
18682 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018683 :
18684else
Martin v. Löwis11437992002-04-12 09:54:03 +000018685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018686sed 's/^/| /' conftest.$ac_ext >&5
18687
Martin v. Löwis11437992002-04-12 09:54:03 +000018688
18689cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018690#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018691_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018692
Martin v. Löwis11437992002-04-12 09:54:03 +000018693
Guido van Rossum627b2d71993-12-24 10:39:16 +000018694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018695
18696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018697
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018698fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018699done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018700
Michael W. Hudson54241132001-12-07 15:38:26 +000018701
Martin v. Löwiseba40652007-08-30 20:10:57 +000018702{ echo "$as_me:$LINENO: checking for major" >&5
18703echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018705/* confdefs.h. */
18706_ACEOF
18707cat confdefs.h >>conftest.$ac_ext
18708cat >>conftest.$ac_ext <<_ACEOF
18709/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018710
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018711#if defined(MAJOR_IN_MKDEV)
18712#include <sys/mkdev.h>
18713#elif defined(MAJOR_IN_SYSMACROS)
18714#include <sys/sysmacros.h>
18715#else
18716#include <sys/types.h>
18717#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018718
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018719int
18720main ()
18721{
18722
18723 makedev(major(0),minor(0));
18724
18725 ;
18726 return 0;
18727}
18728_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018729rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018730if { (ac_try="$ac_link"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
18735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18736 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018738 grep -v '^ *+' conftest.er1 >conftest.err
18739 rm -f conftest.er1
18740 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018742 (exit $ac_status); } && {
18743 test -z "$ac_c_werror_flag" ||
18744 test ! -s conftest.err
18745 } && test -s conftest$ac_exeext &&
18746 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018747
18748
18749cat >>confdefs.h <<\_ACEOF
18750#define HAVE_DEVICE_MACROS 1
18751_ACEOF
18752
Martin v. Löwiseba40652007-08-30 20:10:57 +000018753 { echo "$as_me:$LINENO: result: yes" >&5
18754echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018755
18756else
18757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018758sed 's/^/| /' conftest.$ac_ext >&5
18759
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018760
Martin v. Löwiseba40652007-08-30 20:10:57 +000018761 { echo "$as_me:$LINENO: result: no" >&5
18762echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018763
18764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018765
18766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018767 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018768
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018769# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018770# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018771{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18772echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018774/* confdefs.h. */
18775_ACEOF
18776cat confdefs.h >>conftest.$ac_ext
18777cat >>conftest.$ac_ext <<_ACEOF
18778/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018779
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018780#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018781#include <sys/socket.h>
18782#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018783#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018784
Martin v. Löwis11437992002-04-12 09:54:03 +000018785int
18786main ()
18787{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018788
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018789getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018790
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 ;
18792 return 0;
18793}
18794_ACEOF
18795rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796if { (ac_try="$ac_link"
18797case "(($ac_try" in
18798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799 *) ac_try_echo=$ac_try;;
18800esac
18801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018804 grep -v '^ *+' conftest.er1 >conftest.err
18805 rm -f conftest.er1
18806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018808 (exit $ac_status); } && {
18809 test -z "$ac_c_werror_flag" ||
18810 test ! -s conftest.err
18811 } && test -s conftest$ac_exeext &&
18812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018813
Martin v. Löwiseba40652007-08-30 20:10:57 +000018814{ echo "$as_me:$LINENO: result: yes" >&5
18815echo "${ECHO_T}yes" >&6; }
18816{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18817echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018818if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819 { echo "$as_me:$LINENO: result: buggy" >&5
18820echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018821buggygetaddrinfo=yes
18822else
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018824/* confdefs.h. */
18825_ACEOF
18826cat confdefs.h >>conftest.$ac_ext
18827cat >>conftest.$ac_ext <<_ACEOF
18828/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018829
18830#include <sys/types.h>
18831#include <netdb.h>
18832#include <string.h>
18833#include <sys/socket.h>
18834#include <netinet/in.h>
18835
18836main()
18837{
18838 int passive, gaierr, inet4 = 0, inet6 = 0;
18839 struct addrinfo hints, *ai, *aitop;
18840 char straddr[INET6_ADDRSTRLEN], strport[16];
18841
18842 for (passive = 0; passive <= 1; passive++) {
18843 memset(&hints, 0, sizeof(hints));
18844 hints.ai_family = AF_UNSPEC;
18845 hints.ai_flags = passive ? AI_PASSIVE : 0;
18846 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018847 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018848 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18849 (void)gai_strerror(gaierr);
18850 goto bad;
18851 }
18852 for (ai = aitop; ai; ai = ai->ai_next) {
18853 if (ai->ai_addr == NULL ||
18854 ai->ai_addrlen == 0 ||
18855 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18856 straddr, sizeof(straddr), strport, sizeof(strport),
18857 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18858 goto bad;
18859 }
18860 switch (ai->ai_family) {
18861 case AF_INET:
18862 if (strcmp(strport, "54321") != 0) {
18863 goto bad;
18864 }
18865 if (passive) {
18866 if (strcmp(straddr, "0.0.0.0") != 0) {
18867 goto bad;
18868 }
18869 } else {
18870 if (strcmp(straddr, "127.0.0.1") != 0) {
18871 goto bad;
18872 }
18873 }
18874 inet4++;
18875 break;
18876 case AF_INET6:
18877 if (strcmp(strport, "54321") != 0) {
18878 goto bad;
18879 }
18880 if (passive) {
18881 if (strcmp(straddr, "::") != 0) {
18882 goto bad;
18883 }
18884 } else {
18885 if (strcmp(straddr, "::1") != 0) {
18886 goto bad;
18887 }
18888 }
18889 inet6++;
18890 break;
18891 case AF_UNSPEC:
18892 goto bad;
18893 break;
18894 default:
18895 /* another family support? */
18896 break;
18897 }
18898 }
18899 }
18900
18901 if (!(inet4 == 0 || inet4 == 2))
18902 goto bad;
18903 if (!(inet6 == 0 || inet6 == 2))
18904 goto bad;
18905
18906 if (aitop)
18907 freeaddrinfo(aitop);
18908 exit(0);
18909
18910 bad:
18911 if (aitop)
18912 freeaddrinfo(aitop);
18913 exit(1);
18914}
18915
Martin v. Löwis11437992002-04-12 09:54:03 +000018916_ACEOF
18917rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018918if { (ac_try="$ac_link"
18919case "(($ac_try" in
18920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18921 *) ac_try_echo=$ac_try;;
18922esac
18923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18924 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018925 ac_status=$?
18926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018928 { (case "(($ac_try" in
18929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18930 *) ac_try_echo=$ac_try;;
18931esac
18932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18933 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018934 ac_status=$?
18935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18936 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937 { echo "$as_me:$LINENO: result: good" >&5
18938echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018939buggygetaddrinfo=no
18940else
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 echo "$as_me: program exited with status $ac_status" >&5
18942echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018943sed 's/^/| /' conftest.$ac_ext >&5
18944
Martin v. Löwis11437992002-04-12 09:54:03 +000018945( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018946{ echo "$as_me:$LINENO: result: buggy" >&5
18947echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018948buggygetaddrinfo=yes
18949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018950rm -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 +000018951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952
18953
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018954else
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 echo "$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
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959{ echo "$as_me:$LINENO: result: no" >&5
18960echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018961buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018962
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964
18965rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018967
18968if test "$buggygetaddrinfo" = "yes"; then
18969 if test "$ipv6" = "yes"; then
18970 echo 'Fatal: You must get working getaddrinfo() function.'
18971 echo ' or you can specify "--disable-ipv6"'.
18972 exit 1
18973 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018974else
Martin v. Löwis11437992002-04-12 09:54:03 +000018975
18976cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018977#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018978_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018979
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018981
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018982for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018983do
Martin v. Löwis11437992002-04-12 09:54:03 +000018984as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018985{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18986echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18987if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018989else
Martin v. Löwis11437992002-04-12 09:54:03 +000018990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018991/* confdefs.h. */
18992_ACEOF
18993cat confdefs.h >>conftest.$ac_ext
18994cat >>conftest.$ac_ext <<_ACEOF
18995/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018996/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18997 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18998#define $ac_func innocuous_$ac_func
18999
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019000/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019001 which can conflict with char $ac_func (); below.
19002 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019003 <limits.h> exists even on freestanding compilers. */
19004
19005#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019006# include <limits.h>
19007#else
19008# include <assert.h>
19009#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019010
19011#undef $ac_func
19012
Martin v. Löwiseba40652007-08-30 20:10:57 +000019013/* Override any GCC internal prototype to avoid an error.
19014 Use char because int might match the return type of a GCC
19015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019016#ifdef __cplusplus
19017extern "C"
19018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019019char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019020/* The GNU C library defines this for functions which it implements
19021 to always fail with ENOSYS. Some functions are actually named
19022 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019024choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019025#endif
19026
Skip Montanaro6dead952003-09-25 14:50:04 +000019027int
19028main ()
19029{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019031 ;
19032 return 0;
19033}
19034_ACEOF
19035rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019036if { (ac_try="$ac_link"
19037case "(($ac_try" in
19038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19039 *) ac_try_echo=$ac_try;;
19040esac
19041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19042 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019044 grep -v '^ *+' conftest.er1 >conftest.err
19045 rm -f conftest.er1
19046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048 (exit $ac_status); } && {
19049 test -z "$ac_c_werror_flag" ||
19050 test ! -s conftest.err
19051 } && test -s conftest$ac_exeext &&
19052 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019054else
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019056sed 's/^/| /' conftest.$ac_ext >&5
19057
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019060
19061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019062 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019064ac_res=`eval echo '${'$as_ac_var'}'`
19065 { echo "$as_me:$LINENO: result: $ac_res" >&5
19066echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019067if test `eval echo '${'$as_ac_var'}'` = yes; then
19068 cat >>confdefs.h <<_ACEOF
19069#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19070_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019071
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019072fi
19073done
19074
Michael W. Hudson54241132001-12-07 15:38:26 +000019075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019076# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019077{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19078echo $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 +000019079if test "${ac_cv_header_time+set}" = set; then
19080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019081else
Martin v. Löwis11437992002-04-12 09:54:03 +000019082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019083/* confdefs.h. */
19084_ACEOF
19085cat confdefs.h >>conftest.$ac_ext
19086cat >>conftest.$ac_ext <<_ACEOF
19087/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019088#include <sys/types.h>
19089#include <sys/time.h>
19090#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019091
Martin v. Löwis11437992002-04-12 09:54:03 +000019092int
19093main ()
19094{
19095if ((struct tm *) 0)
19096return 0;
19097 ;
19098 return 0;
19099}
19100_ACEOF
19101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019102if { (ac_try="$ac_compile"
19103case "(($ac_try" in
19104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19105 *) ac_try_echo=$ac_try;;
19106esac
19107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019110 grep -v '^ *+' conftest.er1 >conftest.err
19111 rm -f conftest.er1
19112 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019114 (exit $ac_status); } && {
19115 test -z "$ac_c_werror_flag" ||
19116 test ! -s conftest.err
19117 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019118 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019119else
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019121sed 's/^/| /' conftest.$ac_ext >&5
19122
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019125
19126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019128{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19129echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019130if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019131
19132cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019133#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019135
19136fi
19137
Martin v. Löwiseba40652007-08-30 20:10:57 +000019138{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19139echo $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 +000019140if test "${ac_cv_struct_tm+set}" = set; then
19141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019142else
Martin v. Löwis11437992002-04-12 09:54:03 +000019143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019144/* confdefs.h. */
19145_ACEOF
19146cat confdefs.h >>conftest.$ac_ext
19147cat >>conftest.$ac_ext <<_ACEOF
19148/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019149#include <sys/types.h>
19150#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019151
Martin v. Löwis11437992002-04-12 09:54:03 +000019152int
19153main ()
19154{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019155struct tm tm;
19156 int *p = &tm.tm_sec;
19157 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019158 ;
19159 return 0;
19160}
19161_ACEOF
19162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019163if { (ac_try="$ac_compile"
19164case "(($ac_try" in
19165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19166 *) ac_try_echo=$ac_try;;
19167esac
19168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019171 grep -v '^ *+' conftest.er1 >conftest.err
19172 rm -f conftest.er1
19173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019175 (exit $ac_status); } && {
19176 test -z "$ac_c_werror_flag" ||
19177 test ! -s conftest.err
19178 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019179 ac_cv_struct_tm=time.h
19180else
Martin v. Löwis11437992002-04-12 09:54:03 +000019181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019182sed 's/^/| /' conftest.$ac_ext >&5
19183
Martin v. Löwiseba40652007-08-30 20:10:57 +000019184 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019186
19187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019189{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19190echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019191if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019192
19193cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019194#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019195_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019196
19197fi
19198
Martin v. Löwiseba40652007-08-30 20:10:57 +000019199{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19200echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019201if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19202 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019203else
Martin v. Löwis11437992002-04-12 09:54:03 +000019204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019205/* confdefs.h. */
19206_ACEOF
19207cat confdefs.h >>conftest.$ac_ext
19208cat >>conftest.$ac_ext <<_ACEOF
19209/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019210#include <sys/types.h>
19211#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019212
19213
Martin v. Löwis11437992002-04-12 09:54:03 +000019214int
19215main ()
19216{
19217static struct tm ac_aggr;
19218if (ac_aggr.tm_zone)
19219return 0;
19220 ;
19221 return 0;
19222}
19223_ACEOF
19224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019225if { (ac_try="$ac_compile"
19226case "(($ac_try" in
19227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19228 *) ac_try_echo=$ac_try;;
19229esac
19230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019233 grep -v '^ *+' conftest.er1 >conftest.err
19234 rm -f conftest.er1
19235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019237 (exit $ac_status); } && {
19238 test -z "$ac_c_werror_flag" ||
19239 test ! -s conftest.err
19240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019242else
Martin v. Löwis11437992002-04-12 09:54:03 +000019243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019244sed 's/^/| /' conftest.$ac_ext >&5
19245
Martin v. Löwiseba40652007-08-30 20:10:57 +000019246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019247/* confdefs.h. */
19248_ACEOF
19249cat confdefs.h >>conftest.$ac_ext
19250cat >>conftest.$ac_ext <<_ACEOF
19251/* end confdefs.h. */
19252#include <sys/types.h>
19253#include <$ac_cv_struct_tm>
19254
19255
19256int
19257main ()
19258{
19259static struct tm ac_aggr;
19260if (sizeof ac_aggr.tm_zone)
19261return 0;
19262 ;
19263 return 0;
19264}
19265_ACEOF
19266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019267if { (ac_try="$ac_compile"
19268case "(($ac_try" in
19269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19270 *) ac_try_echo=$ac_try;;
19271esac
19272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19273 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019275 grep -v '^ *+' conftest.er1 >conftest.err
19276 rm -f conftest.er1
19277 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019279 (exit $ac_status); } && {
19280 test -z "$ac_c_werror_flag" ||
19281 test ! -s conftest.err
19282 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019283 ac_cv_member_struct_tm_tm_zone=yes
19284else
19285 echo "$as_me: failed program was:" >&5
19286sed 's/^/| /' conftest.$ac_ext >&5
19287
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019290
19291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019293
19294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019296{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19297echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019298if test $ac_cv_member_struct_tm_tm_zone = yes; then
19299
19300cat >>confdefs.h <<_ACEOF
19301#define HAVE_STRUCT_TM_TM_ZONE 1
19302_ACEOF
19303
19304
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019305fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019306
Martin v. Löwis11437992002-04-12 09:54:03 +000019307if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19308
19309cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019310#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019311_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019312
19313else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019314 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19315echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19316if test "${ac_cv_have_decl_tzname+set}" = set; then
19317 echo $ECHO_N "(cached) $ECHO_C" >&6
19318else
19319 cat >conftest.$ac_ext <<_ACEOF
19320/* confdefs.h. */
19321_ACEOF
19322cat confdefs.h >>conftest.$ac_ext
19323cat >>conftest.$ac_ext <<_ACEOF
19324/* end confdefs.h. */
19325#include <time.h>
19326
19327int
19328main ()
19329{
19330#ifndef tzname
19331 (void) tzname;
19332#endif
19333
19334 ;
19335 return 0;
19336}
19337_ACEOF
19338rm -f conftest.$ac_objext
19339if { (ac_try="$ac_compile"
19340case "(($ac_try" in
19341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19342 *) ac_try_echo=$ac_try;;
19343esac
19344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19345 (eval "$ac_compile") 2>conftest.er1
19346 ac_status=$?
19347 grep -v '^ *+' conftest.er1 >conftest.err
19348 rm -f conftest.er1
19349 cat conftest.err >&5
19350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19351 (exit $ac_status); } && {
19352 test -z "$ac_c_werror_flag" ||
19353 test ! -s conftest.err
19354 } && test -s conftest.$ac_objext; then
19355 ac_cv_have_decl_tzname=yes
19356else
19357 echo "$as_me: failed program was:" >&5
19358sed 's/^/| /' conftest.$ac_ext >&5
19359
19360 ac_cv_have_decl_tzname=no
19361fi
19362
19363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19364fi
19365{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19366echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19367if test $ac_cv_have_decl_tzname = yes; then
19368
19369cat >>confdefs.h <<_ACEOF
19370#define HAVE_DECL_TZNAME 1
19371_ACEOF
19372
19373
19374else
19375 cat >>confdefs.h <<_ACEOF
19376#define HAVE_DECL_TZNAME 0
19377_ACEOF
19378
19379
19380fi
19381
19382
19383 { echo "$as_me:$LINENO: checking for tzname" >&5
19384echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019385if test "${ac_cv_var_tzname+set}" = set; then
19386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019387else
Martin v. Löwis11437992002-04-12 09:54:03 +000019388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019389/* confdefs.h. */
19390_ACEOF
19391cat confdefs.h >>conftest.$ac_ext
19392cat >>conftest.$ac_ext <<_ACEOF
19393/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019394#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019395#if !HAVE_DECL_TZNAME
19396extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019398
Martin v. Löwis11437992002-04-12 09:54:03 +000019399int
19400main ()
19401{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019402return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019403 ;
19404 return 0;
19405}
19406_ACEOF
19407rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019408if { (ac_try="$ac_link"
19409case "(($ac_try" in
19410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19411 *) ac_try_echo=$ac_try;;
19412esac
19413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19414 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019416 grep -v '^ *+' conftest.er1 >conftest.err
19417 rm -f conftest.er1
19418 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019420 (exit $ac_status); } && {
19421 test -z "$ac_c_werror_flag" ||
19422 test ! -s conftest.err
19423 } && test -s conftest$ac_exeext &&
19424 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019425 ac_cv_var_tzname=yes
19426else
Martin v. Löwis11437992002-04-12 09:54:03 +000019427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019428sed 's/^/| /' conftest.$ac_ext >&5
19429
Martin v. Löwiseba40652007-08-30 20:10:57 +000019430 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019432
19433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019434 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019436{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19437echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019438 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019439
19440cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019441#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019442_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019443
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019444 fi
19445fi
19446
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19448echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019449if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19450 echo $ECHO_N "(cached) $ECHO_C" >&6
19451else
19452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019453/* confdefs.h. */
19454_ACEOF
19455cat confdefs.h >>conftest.$ac_ext
19456cat >>conftest.$ac_ext <<_ACEOF
19457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019458$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019459int
19460main ()
19461{
19462static struct stat ac_aggr;
19463if (ac_aggr.st_rdev)
19464return 0;
19465 ;
19466 return 0;
19467}
19468_ACEOF
19469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019470if { (ac_try="$ac_compile"
19471case "(($ac_try" in
19472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19473 *) ac_try_echo=$ac_try;;
19474esac
19475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019478 grep -v '^ *+' conftest.er1 >conftest.err
19479 rm -f conftest.er1
19480 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019482 (exit $ac_status); } && {
19483 test -z "$ac_c_werror_flag" ||
19484 test ! -s conftest.err
19485 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019486 ac_cv_member_struct_stat_st_rdev=yes
19487else
19488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019489sed 's/^/| /' conftest.$ac_ext >&5
19490
Martin v. Löwiseba40652007-08-30 20:10:57 +000019491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019492/* confdefs.h. */
19493_ACEOF
19494cat confdefs.h >>conftest.$ac_ext
19495cat >>conftest.$ac_ext <<_ACEOF
19496/* end confdefs.h. */
19497$ac_includes_default
19498int
19499main ()
19500{
19501static struct stat ac_aggr;
19502if (sizeof ac_aggr.st_rdev)
19503return 0;
19504 ;
19505 return 0;
19506}
19507_ACEOF
19508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509if { (ac_try="$ac_compile"
19510case "(($ac_try" in
19511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19512 *) ac_try_echo=$ac_try;;
19513esac
19514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19515 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019517 grep -v '^ *+' conftest.er1 >conftest.err
19518 rm -f conftest.er1
19519 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521 (exit $ac_status); } && {
19522 test -z "$ac_c_werror_flag" ||
19523 test ! -s conftest.err
19524 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019525 ac_cv_member_struct_stat_st_rdev=yes
19526else
19527 echo "$as_me: failed program was:" >&5
19528sed 's/^/| /' conftest.$ac_ext >&5
19529
Martin v. Löwiseba40652007-08-30 20:10:57 +000019530 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532
19533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019535
19536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019538{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19539echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019540if test $ac_cv_member_struct_stat_st_rdev = yes; then
19541
19542cat >>confdefs.h <<_ACEOF
19543#define HAVE_STRUCT_STAT_ST_RDEV 1
19544_ACEOF
19545
19546
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019547fi
19548
Martin v. Löwiseba40652007-08-30 20:10:57 +000019549{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19550echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019551if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019553else
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019555/* confdefs.h. */
19556_ACEOF
19557cat confdefs.h >>conftest.$ac_ext
19558cat >>conftest.$ac_ext <<_ACEOF
19559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019560$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019561int
19562main ()
19563{
19564static struct stat ac_aggr;
19565if (ac_aggr.st_blksize)
19566return 0;
19567 ;
19568 return 0;
19569}
19570_ACEOF
19571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019572if { (ac_try="$ac_compile"
19573case "(($ac_try" in
19574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19575 *) ac_try_echo=$ac_try;;
19576esac
19577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019580 grep -v '^ *+' conftest.er1 >conftest.err
19581 rm -f conftest.er1
19582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584 (exit $ac_status); } && {
19585 test -z "$ac_c_werror_flag" ||
19586 test ! -s conftest.err
19587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019588 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019589else
Martin v. Löwis11437992002-04-12 09:54:03 +000019590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019591sed 's/^/| /' conftest.$ac_ext >&5
19592
Martin v. Löwiseba40652007-08-30 20:10:57 +000019593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019594/* confdefs.h. */
19595_ACEOF
19596cat confdefs.h >>conftest.$ac_ext
19597cat >>conftest.$ac_ext <<_ACEOF
19598/* end confdefs.h. */
19599$ac_includes_default
19600int
19601main ()
19602{
19603static struct stat ac_aggr;
19604if (sizeof ac_aggr.st_blksize)
19605return 0;
19606 ;
19607 return 0;
19608}
19609_ACEOF
19610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019611if { (ac_try="$ac_compile"
19612case "(($ac_try" in
19613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19614 *) ac_try_echo=$ac_try;;
19615esac
19616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19617 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019619 grep -v '^ *+' conftest.er1 >conftest.err
19620 rm -f conftest.er1
19621 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623 (exit $ac_status); } && {
19624 test -z "$ac_c_werror_flag" ||
19625 test ! -s conftest.err
19626 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019627 ac_cv_member_struct_stat_st_blksize=yes
19628else
19629 echo "$as_me: failed program was:" >&5
19630sed 's/^/| /' conftest.$ac_ext >&5
19631
Martin v. Löwiseba40652007-08-30 20:10:57 +000019632 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019634
19635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637
19638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19641echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019642if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019643
Martin v. Löwis11437992002-04-12 09:54:03 +000019644cat >>confdefs.h <<_ACEOF
19645#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19646_ACEOF
19647
19648
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019649fi
19650
Martin v. Löwiseba40652007-08-30 20:10:57 +000019651{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19652echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019653if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19654 echo $ECHO_N "(cached) $ECHO_C" >&6
19655else
19656 cat >conftest.$ac_ext <<_ACEOF
19657/* confdefs.h. */
19658_ACEOF
19659cat confdefs.h >>conftest.$ac_ext
19660cat >>conftest.$ac_ext <<_ACEOF
19661/* end confdefs.h. */
19662$ac_includes_default
19663int
19664main ()
19665{
19666static struct stat ac_aggr;
19667if (ac_aggr.st_flags)
19668return 0;
19669 ;
19670 return 0;
19671}
19672_ACEOF
19673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019674if { (ac_try="$ac_compile"
19675case "(($ac_try" in
19676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19677 *) ac_try_echo=$ac_try;;
19678esac
19679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19680 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019681 ac_status=$?
19682 grep -v '^ *+' conftest.er1 >conftest.err
19683 rm -f conftest.er1
19684 cat conftest.err >&5
19685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686 (exit $ac_status); } && {
19687 test -z "$ac_c_werror_flag" ||
19688 test ! -s conftest.err
19689 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019690 ac_cv_member_struct_stat_st_flags=yes
19691else
19692 echo "$as_me: failed program was:" >&5
19693sed 's/^/| /' conftest.$ac_ext >&5
19694
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019696/* confdefs.h. */
19697_ACEOF
19698cat confdefs.h >>conftest.$ac_ext
19699cat >>conftest.$ac_ext <<_ACEOF
19700/* end confdefs.h. */
19701$ac_includes_default
19702int
19703main ()
19704{
19705static struct stat ac_aggr;
19706if (sizeof ac_aggr.st_flags)
19707return 0;
19708 ;
19709 return 0;
19710}
19711_ACEOF
19712rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019713if { (ac_try="$ac_compile"
19714case "(($ac_try" in
19715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19716 *) ac_try_echo=$ac_try;;
19717esac
19718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19719 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019720 ac_status=$?
19721 grep -v '^ *+' conftest.er1 >conftest.err
19722 rm -f conftest.er1
19723 cat conftest.err >&5
19724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019725 (exit $ac_status); } && {
19726 test -z "$ac_c_werror_flag" ||
19727 test ! -s conftest.err
19728 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019729 ac_cv_member_struct_stat_st_flags=yes
19730else
19731 echo "$as_me: failed program was:" >&5
19732sed 's/^/| /' conftest.$ac_ext >&5
19733
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019736
19737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019739
19740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019742{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19743echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019744if test $ac_cv_member_struct_stat_st_flags = yes; then
19745
19746cat >>confdefs.h <<_ACEOF
19747#define HAVE_STRUCT_STAT_ST_FLAGS 1
19748_ACEOF
19749
19750
19751fi
19752
Martin v. Löwiseba40652007-08-30 20:10:57 +000019753{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19754echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019755if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19756 echo $ECHO_N "(cached) $ECHO_C" >&6
19757else
19758 cat >conftest.$ac_ext <<_ACEOF
19759/* confdefs.h. */
19760_ACEOF
19761cat confdefs.h >>conftest.$ac_ext
19762cat >>conftest.$ac_ext <<_ACEOF
19763/* end confdefs.h. */
19764$ac_includes_default
19765int
19766main ()
19767{
19768static struct stat ac_aggr;
19769if (ac_aggr.st_gen)
19770return 0;
19771 ;
19772 return 0;
19773}
19774_ACEOF
19775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019776if { (ac_try="$ac_compile"
19777case "(($ac_try" in
19778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19779 *) ac_try_echo=$ac_try;;
19780esac
19781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019783 ac_status=$?
19784 grep -v '^ *+' conftest.er1 >conftest.err
19785 rm -f conftest.er1
19786 cat conftest.err >&5
19787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019788 (exit $ac_status); } && {
19789 test -z "$ac_c_werror_flag" ||
19790 test ! -s conftest.err
19791 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019792 ac_cv_member_struct_stat_st_gen=yes
19793else
19794 echo "$as_me: failed program was:" >&5
19795sed 's/^/| /' conftest.$ac_ext >&5
19796
Martin v. Löwiseba40652007-08-30 20:10:57 +000019797 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019798/* confdefs.h. */
19799_ACEOF
19800cat confdefs.h >>conftest.$ac_ext
19801cat >>conftest.$ac_ext <<_ACEOF
19802/* end confdefs.h. */
19803$ac_includes_default
19804int
19805main ()
19806{
19807static struct stat ac_aggr;
19808if (sizeof ac_aggr.st_gen)
19809return 0;
19810 ;
19811 return 0;
19812}
19813_ACEOF
19814rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815if { (ac_try="$ac_compile"
19816case "(($ac_try" in
19817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19818 *) ac_try_echo=$ac_try;;
19819esac
19820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019822 ac_status=$?
19823 grep -v '^ *+' conftest.er1 >conftest.err
19824 rm -f conftest.er1
19825 cat conftest.err >&5
19826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019827 (exit $ac_status); } && {
19828 test -z "$ac_c_werror_flag" ||
19829 test ! -s conftest.err
19830 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019831 ac_cv_member_struct_stat_st_gen=yes
19832else
19833 echo "$as_me: failed program was:" >&5
19834sed 's/^/| /' conftest.$ac_ext >&5
19835
Martin v. Löwiseba40652007-08-30 20:10:57 +000019836 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838
19839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841
19842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019844{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19845echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019846if test $ac_cv_member_struct_stat_st_gen = yes; then
19847
19848cat >>confdefs.h <<_ACEOF
19849#define HAVE_STRUCT_STAT_ST_GEN 1
19850_ACEOF
19851
19852
19853fi
19854
Martin v. Löwiseba40652007-08-30 20:10:57 +000019855{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19856echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019857if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19858 echo $ECHO_N "(cached) $ECHO_C" >&6
19859else
19860 cat >conftest.$ac_ext <<_ACEOF
19861/* confdefs.h. */
19862_ACEOF
19863cat confdefs.h >>conftest.$ac_ext
19864cat >>conftest.$ac_ext <<_ACEOF
19865/* end confdefs.h. */
19866$ac_includes_default
19867int
19868main ()
19869{
19870static struct stat ac_aggr;
19871if (ac_aggr.st_birthtime)
19872return 0;
19873 ;
19874 return 0;
19875}
19876_ACEOF
19877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019878if { (ac_try="$ac_compile"
19879case "(($ac_try" in
19880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881 *) ac_try_echo=$ac_try;;
19882esac
19883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019885 ac_status=$?
19886 grep -v '^ *+' conftest.er1 >conftest.err
19887 rm -f conftest.er1
19888 cat conftest.err >&5
19889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019890 (exit $ac_status); } && {
19891 test -z "$ac_c_werror_flag" ||
19892 test ! -s conftest.err
19893 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019894 ac_cv_member_struct_stat_st_birthtime=yes
19895else
19896 echo "$as_me: failed program was:" >&5
19897sed 's/^/| /' conftest.$ac_ext >&5
19898
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019900/* confdefs.h. */
19901_ACEOF
19902cat confdefs.h >>conftest.$ac_ext
19903cat >>conftest.$ac_ext <<_ACEOF
19904/* end confdefs.h. */
19905$ac_includes_default
19906int
19907main ()
19908{
19909static struct stat ac_aggr;
19910if (sizeof ac_aggr.st_birthtime)
19911return 0;
19912 ;
19913 return 0;
19914}
19915_ACEOF
19916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917if { (ac_try="$ac_compile"
19918case "(($ac_try" in
19919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19920 *) ac_try_echo=$ac_try;;
19921esac
19922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019924 ac_status=$?
19925 grep -v '^ *+' conftest.er1 >conftest.err
19926 rm -f conftest.er1
19927 cat conftest.err >&5
19928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929 (exit $ac_status); } && {
19930 test -z "$ac_c_werror_flag" ||
19931 test ! -s conftest.err
19932 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019933 ac_cv_member_struct_stat_st_birthtime=yes
19934else
19935 echo "$as_me: failed program was:" >&5
19936sed 's/^/| /' conftest.$ac_ext >&5
19937
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019940
19941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943
19944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019946{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19947echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019948if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19949
19950cat >>confdefs.h <<_ACEOF
19951#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19952_ACEOF
19953
19954
19955fi
19956
Martin v. Löwiseba40652007-08-30 20:10:57 +000019957{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19958echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019959if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19960 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019961else
Martin v. Löwis11437992002-04-12 09:54:03 +000019962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019963/* confdefs.h. */
19964_ACEOF
19965cat confdefs.h >>conftest.$ac_ext
19966cat >>conftest.$ac_ext <<_ACEOF
19967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019968$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019969int
19970main ()
19971{
19972static struct stat ac_aggr;
19973if (ac_aggr.st_blocks)
19974return 0;
19975 ;
19976 return 0;
19977}
19978_ACEOF
19979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019980if { (ac_try="$ac_compile"
19981case "(($ac_try" in
19982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19983 *) ac_try_echo=$ac_try;;
19984esac
19985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019988 grep -v '^ *+' conftest.er1 >conftest.err
19989 rm -f conftest.er1
19990 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019992 (exit $ac_status); } && {
19993 test -z "$ac_c_werror_flag" ||
19994 test ! -s conftest.err
19995 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019997else
Martin v. Löwis11437992002-04-12 09:54:03 +000019998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019999sed 's/^/| /' conftest.$ac_ext >&5
20000
Martin v. Löwiseba40652007-08-30 20:10:57 +000020001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020002/* confdefs.h. */
20003_ACEOF
20004cat confdefs.h >>conftest.$ac_ext
20005cat >>conftest.$ac_ext <<_ACEOF
20006/* end confdefs.h. */
20007$ac_includes_default
20008int
20009main ()
20010{
20011static struct stat ac_aggr;
20012if (sizeof ac_aggr.st_blocks)
20013return 0;
20014 ;
20015 return 0;
20016}
20017_ACEOF
20018rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020019if { (ac_try="$ac_compile"
20020case "(($ac_try" in
20021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20022 *) ac_try_echo=$ac_try;;
20023esac
20024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20025 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020027 grep -v '^ *+' conftest.er1 >conftest.err
20028 rm -f conftest.er1
20029 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020031 (exit $ac_status); } && {
20032 test -z "$ac_c_werror_flag" ||
20033 test ! -s conftest.err
20034 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020035 ac_cv_member_struct_stat_st_blocks=yes
20036else
20037 echo "$as_me: failed program was:" >&5
20038sed 's/^/| /' conftest.$ac_ext >&5
20039
Martin v. Löwiseba40652007-08-30 20:10:57 +000020040 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020042
20043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045
20046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020048{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20049echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020050if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020051
Martin v. Löwis11437992002-04-12 09:54:03 +000020052cat >>confdefs.h <<_ACEOF
20053#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20054_ACEOF
20055
20056
20057cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020058#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020059_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020060
20061else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020062 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020063 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020064 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20065 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020066esac
20067
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020068fi
20069
Michael W. Hudson54241132001-12-07 15:38:26 +000020070
Martin v. Löwis11437992002-04-12 09:54:03 +000020071
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20073echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020074if test "${ac_cv_header_time_altzone+set}" = set; then
20075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020076else
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020078/* confdefs.h. */
20079_ACEOF
20080cat confdefs.h >>conftest.$ac_ext
20081cat >>conftest.$ac_ext <<_ACEOF
20082/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020083#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020084int
20085main ()
20086{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020087return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020088 ;
20089 return 0;
20090}
20091_ACEOF
20092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020093if { (ac_try="$ac_compile"
20094case "(($ac_try" in
20095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20096 *) ac_try_echo=$ac_try;;
20097esac
20098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020101 grep -v '^ *+' conftest.er1 >conftest.err
20102 rm -f conftest.er1
20103 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020105 (exit $ac_status); } && {
20106 test -z "$ac_c_werror_flag" ||
20107 test ! -s conftest.err
20108 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020109 ac_cv_header_time_altzone=yes
20110else
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020112sed 's/^/| /' conftest.$ac_ext >&5
20113
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020115fi
20116
Martin v. Löwiseba40652007-08-30 20:10:57 +000020117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20118fi
20119
20120{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20121echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020122if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020123
20124cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020125#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020127
20128fi
20129
Guido van Rossumda88dad1995-01-26 00:46:29 +000020130was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020131{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20132echo $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 +000020133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020134/* confdefs.h. */
20135_ACEOF
20136cat confdefs.h >>conftest.$ac_ext
20137cat >>conftest.$ac_ext <<_ACEOF
20138/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020139
20140#include <sys/types.h>
20141#include <sys/select.h>
20142#include <sys/time.h>
20143
Martin v. Löwis11437992002-04-12 09:54:03 +000020144int
20145main ()
20146{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020147;
Martin v. Löwis11437992002-04-12 09:54:03 +000020148 ;
20149 return 0;
20150}
20151_ACEOF
20152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020153if { (ac_try="$ac_compile"
20154case "(($ac_try" in
20155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20156 *) ac_try_echo=$ac_try;;
20157esac
20158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020161 grep -v '^ *+' conftest.er1 >conftest.err
20162 rm -f conftest.er1
20163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020165 (exit $ac_status); } && {
20166 test -z "$ac_c_werror_flag" ||
20167 test ! -s conftest.err
20168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020169
20170
20171cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020172#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020173_ACEOF
20174
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020175 was_it_defined=yes
20176
Guido van Rossumf78abae1997-01-21 22:02:36 +000020177else
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020179sed 's/^/| /' conftest.$ac_ext >&5
20180
Brett Cannon19fab762007-06-02 03:02:29 +000020181
Martin v. Löwiseba40652007-08-30 20:10:57 +000020182fi
20183
20184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20185{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20186echo "${ECHO_T}$was_it_defined" >&6; }
20187
20188{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20189echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020190if test "${ac_cv_struct_addrinfo+set}" = set; then
20191 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020192else
Martin v. Löwis11437992002-04-12 09:54:03 +000020193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020194/* confdefs.h. */
20195_ACEOF
20196cat confdefs.h >>conftest.$ac_ext
20197cat >>conftest.$ac_ext <<_ACEOF
20198/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020199
20200# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020201int
20202main ()
20203{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020204struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020205 ;
20206 return 0;
20207}
20208_ACEOF
20209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020210if { (ac_try="$ac_compile"
20211case "(($ac_try" in
20212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20213 *) ac_try_echo=$ac_try;;
20214esac
20215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020218 grep -v '^ *+' conftest.er1 >conftest.err
20219 rm -f conftest.er1
20220 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222 (exit $ac_status); } && {
20223 test -z "$ac_c_werror_flag" ||
20224 test ! -s conftest.err
20225 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020226 ac_cv_struct_addrinfo=yes
20227else
Martin v. Löwis11437992002-04-12 09:54:03 +000020228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020229sed 's/^/| /' conftest.$ac_ext >&5
20230
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020232fi
20233
Martin v. Löwiseba40652007-08-30 20:10:57 +000020234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20235fi
20236
20237{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20238echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020239if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020240
20241cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020242#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020243_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020244
20245fi
20246
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20248echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020249if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20250 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020251else
Martin v. Löwis11437992002-04-12 09:54:03 +000020252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020253/* confdefs.h. */
20254_ACEOF
20255cat confdefs.h >>conftest.$ac_ext
20256cat >>conftest.$ac_ext <<_ACEOF
20257/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020258
20259# include <sys/types.h>
20260# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020261int
20262main ()
20263{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020264struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 ;
20266 return 0;
20267}
20268_ACEOF
20269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020270if { (ac_try="$ac_compile"
20271case "(($ac_try" in
20272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20273 *) ac_try_echo=$ac_try;;
20274esac
20275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020278 grep -v '^ *+' conftest.er1 >conftest.err
20279 rm -f conftest.er1
20280 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282 (exit $ac_status); } && {
20283 test -z "$ac_c_werror_flag" ||
20284 test ! -s conftest.err
20285 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020286 ac_cv_struct_sockaddr_storage=yes
20287else
Martin v. Löwis11437992002-04-12 09:54:03 +000020288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020289sed 's/^/| /' conftest.$ac_ext >&5
20290
Martin v. Löwiseba40652007-08-30 20:10:57 +000020291 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020292fi
20293
Martin v. Löwiseba40652007-08-30 20:10:57 +000020294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20295fi
20296
20297{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20298echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020299if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020300
20301cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020302#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020303_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020304
20305fi
20306
Guido van Rossum627b2d71993-12-24 10:39:16 +000020307# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020308
Michael W. Hudson54241132001-12-07 15:38:26 +000020309
Martin v. Löwiseba40652007-08-30 20:10:57 +000020310{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20311echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020312if test "${ac_cv_c_char_unsigned+set}" = set; then
20313 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020314else
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020316/* confdefs.h. */
20317_ACEOF
20318cat confdefs.h >>conftest.$ac_ext
20319cat >>conftest.$ac_ext <<_ACEOF
20320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020321$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020322int
20323main ()
20324{
20325static int test_array [1 - 2 * !(((char) -1) < 0)];
20326test_array [0] = 0
20327
20328 ;
20329 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020330}
Martin v. Löwis11437992002-04-12 09:54:03 +000020331_ACEOF
20332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333if { (ac_try="$ac_compile"
20334case "(($ac_try" in
20335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20336 *) ac_try_echo=$ac_try;;
20337esac
20338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020341 grep -v '^ *+' conftest.er1 >conftest.err
20342 rm -f conftest.er1
20343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020345 (exit $ac_status); } && {
20346 test -z "$ac_c_werror_flag" ||
20347 test ! -s conftest.err
20348 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020349 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020350else
20351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020352sed 's/^/| /' conftest.$ac_ext >&5
20353
Martin v. Löwiseba40652007-08-30 20:10:57 +000020354 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020356
20357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020359{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20360echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020361if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020363#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020364_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020365
20366fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020367
Martin v. Löwiseba40652007-08-30 20:10:57 +000020368{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20369echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020370if test "${ac_cv_c_const+set}" = set; then
20371 echo $ECHO_N "(cached) $ECHO_C" >&6
20372else
20373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020374/* confdefs.h. */
20375_ACEOF
20376cat confdefs.h >>conftest.$ac_ext
20377cat >>conftest.$ac_ext <<_ACEOF
20378/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020379
Martin v. Löwis11437992002-04-12 09:54:03 +000020380int
20381main ()
20382{
20383/* FIXME: Include the comments suggested by Paul. */
20384#ifndef __cplusplus
20385 /* Ultrix mips cc rejects this. */
20386 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020388 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020389 char const *const *pcpcc;
20390 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 /* NEC SVR4.0.2 mips cc rejects this. */
20392 struct point {int x, y;};
20393 static struct point const zero = {0,0};
20394 /* AIX XL C 1.02.0.0 rejects this.
20395 It does not let you subtract one const X* pointer from another in
20396 an arm of an if-expression whose if-part is not a constant
20397 expression */
20398 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020399 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020401 ++pcpcc;
20402 ppc = (char**) pcpcc;
20403 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020404 { /* SCO 3.2v4 cc rejects this. */
20405 char *t;
20406 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020407
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020409 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020410 }
20411 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20412 int x[] = {25, 17};
20413 const int *foo = &x[0];
20414 ++foo;
20415 }
20416 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20417 typedef const int *iptr;
20418 iptr p = 0;
20419 ++p;
20420 }
20421 { /* AIX XL C 1.02.0.0 rejects this saying
20422 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20423 struct s { int j; const int *ap[3]; };
20424 struct s *b; b->j = 5;
20425 }
20426 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20427 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020429 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020431#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020432
Martin v. Löwis11437992002-04-12 09:54:03 +000020433 ;
20434 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020435}
Martin v. Löwis11437992002-04-12 09:54:03 +000020436_ACEOF
20437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020438if { (ac_try="$ac_compile"
20439case "(($ac_try" in
20440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20441 *) ac_try_echo=$ac_try;;
20442esac
20443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020446 grep -v '^ *+' conftest.er1 >conftest.err
20447 rm -f conftest.er1
20448 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020450 (exit $ac_status); } && {
20451 test -z "$ac_c_werror_flag" ||
20452 test ! -s conftest.err
20453 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020454 ac_cv_c_const=yes
20455else
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020457sed 's/^/| /' conftest.$ac_ext >&5
20458
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461
20462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020464{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20465echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020466if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020467
20468cat >>confdefs.h <<\_ACEOF
20469#define const
20470_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020471
20472fi
20473
Michael W. Hudson54241132001-12-07 15:38:26 +000020474
Guido van Rossumda88dad1995-01-26 00:46:29 +000020475works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020476{ echo "$as_me:$LINENO: checking for working volatile" >&5
20477echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020479/* confdefs.h. */
20480_ACEOF
20481cat confdefs.h >>conftest.$ac_ext
20482cat >>conftest.$ac_ext <<_ACEOF
20483/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020484
Martin v. Löwis11437992002-04-12 09:54:03 +000020485int
20486main ()
20487{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020488volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020489 ;
20490 return 0;
20491}
20492_ACEOF
20493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020494if { (ac_try="$ac_compile"
20495case "(($ac_try" in
20496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20497 *) ac_try_echo=$ac_try;;
20498esac
20499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020502 grep -v '^ *+' conftest.er1 >conftest.err
20503 rm -f conftest.er1
20504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020506 (exit $ac_status); } && {
20507 test -z "$ac_c_werror_flag" ||
20508 test ! -s conftest.err
20509 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020510 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020511else
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020513sed 's/^/| /' conftest.$ac_ext >&5
20514
Martin v. Löwis11437992002-04-12 09:54:03 +000020515
20516cat >>confdefs.h <<\_ACEOF
20517#define volatile
20518_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020519
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020520
Guido van Rossum627b2d71993-12-24 10:39:16 +000020521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020522
20523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20524{ echo "$as_me:$LINENO: result: $works" >&5
20525echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020526
Guido van Rossumda88dad1995-01-26 00:46:29 +000020527works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528{ echo "$as_me:$LINENO: checking for working signed char" >&5
20529echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020531/* confdefs.h. */
20532_ACEOF
20533cat confdefs.h >>conftest.$ac_ext
20534cat >>conftest.$ac_ext <<_ACEOF
20535/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020536
Martin v. Löwis11437992002-04-12 09:54:03 +000020537int
20538main ()
20539{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020540signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020541 ;
20542 return 0;
20543}
20544_ACEOF
20545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020546if { (ac_try="$ac_compile"
20547case "(($ac_try" in
20548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20549 *) ac_try_echo=$ac_try;;
20550esac
20551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020554 grep -v '^ *+' conftest.er1 >conftest.err
20555 rm -f conftest.er1
20556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020558 (exit $ac_status); } && {
20559 test -z "$ac_c_werror_flag" ||
20560 test ! -s conftest.err
20561 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020562 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020563else
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020565sed 's/^/| /' conftest.$ac_ext >&5
20566
Martin v. Löwis11437992002-04-12 09:54:03 +000020567
20568cat >>confdefs.h <<\_ACEOF
20569#define signed
20570_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020571
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020572
Guido van Rossum7f43da71994-08-01 12:15:30 +000020573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020574
20575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20576{ echo "$as_me:$LINENO: result: $works" >&5
20577echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020578
Guido van Rossumda88dad1995-01-26 00:46:29 +000020579have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020580{ echo "$as_me:$LINENO: checking for prototypes" >&5
20581echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020583/* confdefs.h. */
20584_ACEOF
20585cat confdefs.h >>conftest.$ac_ext
20586cat >>conftest.$ac_ext <<_ACEOF
20587/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020588int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020589int
20590main ()
20591{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020592return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020593 ;
20594 return 0;
20595}
20596_ACEOF
20597rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020598if { (ac_try="$ac_compile"
20599case "(($ac_try" in
20600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20601 *) ac_try_echo=$ac_try;;
20602esac
20603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020606 grep -v '^ *+' conftest.er1 >conftest.err
20607 rm -f conftest.er1
20608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020610 (exit $ac_status); } && {
20611 test -z "$ac_c_werror_flag" ||
20612 test ! -s conftest.err
20613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020614
20615
20616cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020617#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020618_ACEOF
20619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020620 have_prototypes=yes
20621
Guido van Rossumf78abae1997-01-21 22:02:36 +000020622else
Martin v. Löwis11437992002-04-12 09:54:03 +000020623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020624sed 's/^/| /' conftest.$ac_ext >&5
20625
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626
Guido van Rossum7f43da71994-08-01 12:15:30 +000020627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020628
20629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20630{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20631echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020632
Guido van Rossumda88dad1995-01-26 00:46:29 +000020633works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20635echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020637/* confdefs.h. */
20638_ACEOF
20639cat confdefs.h >>conftest.$ac_ext
20640cat >>conftest.$ac_ext <<_ACEOF
20641/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020642
20643#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020644int foo(int x, ...) {
20645 va_list va;
20646 va_start(va, x);
20647 va_arg(va, int);
20648 va_arg(va, char *);
20649 va_arg(va, double);
20650 return 0;
20651}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020652
Martin v. Löwis11437992002-04-12 09:54:03 +000020653int
20654main ()
20655{
Guido van Rossum90eea071996-08-30 20:58:57 +000020656return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020657 ;
20658 return 0;
20659}
20660_ACEOF
20661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020662if { (ac_try="$ac_compile"
20663case "(($ac_try" in
20664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20665 *) ac_try_echo=$ac_try;;
20666esac
20667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020670 grep -v '^ *+' conftest.er1 >conftest.err
20671 rm -f conftest.er1
20672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020674 (exit $ac_status); } && {
20675 test -z "$ac_c_werror_flag" ||
20676 test ! -s conftest.err
20677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020678
20679
20680cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020681#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682_ACEOF
20683
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020684 works=yes
20685
Guido van Rossumf78abae1997-01-21 22:02:36 +000020686else
Martin v. Löwis11437992002-04-12 09:54:03 +000020687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020688sed 's/^/| /' conftest.$ac_ext >&5
20689
Martin v. Löwiseba40652007-08-30 20:10:57 +000020690
Guido van Rossum627b2d71993-12-24 10:39:16 +000020691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020692
20693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20694{ echo "$as_me:$LINENO: result: $works" >&5
20695echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020696
Martin v. Löwisd6320502004-08-12 13:45:08 +000020697# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020698{ echo "$as_me:$LINENO: checking for socketpair" >&5
20699echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020700cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020701/* confdefs.h. */
20702_ACEOF
20703cat confdefs.h >>conftest.$ac_ext
20704cat >>conftest.$ac_ext <<_ACEOF
20705/* end confdefs.h. */
20706
20707#include <sys/types.h>
20708#include <sys/socket.h>
20709
20710int
20711main ()
20712{
20713void *x=socketpair
20714 ;
20715 return 0;
20716}
20717_ACEOF
20718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020719if { (ac_try="$ac_compile"
20720case "(($ac_try" in
20721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20722 *) ac_try_echo=$ac_try;;
20723esac
20724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020727 grep -v '^ *+' conftest.er1 >conftest.err
20728 rm -f conftest.er1
20729 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020731 (exit $ac_status); } && {
20732 test -z "$ac_c_werror_flag" ||
20733 test ! -s conftest.err
20734 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020735
20736cat >>confdefs.h <<\_ACEOF
20737#define HAVE_SOCKETPAIR 1
20738_ACEOF
20739
Martin v. Löwiseba40652007-08-30 20:10:57 +000020740 { echo "$as_me:$LINENO: result: yes" >&5
20741echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020742else
20743 echo "$as_me: failed program was:" >&5
20744sed 's/^/| /' conftest.$ac_ext >&5
20745
Martin v. Löwiseba40652007-08-30 20:10:57 +000020746 { echo "$as_me:$LINENO: result: no" >&5
20747echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020748
20749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750
20751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020752
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020753# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020754{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20755echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020757/* confdefs.h. */
20758_ACEOF
20759cat confdefs.h >>conftest.$ac_ext
20760cat >>conftest.$ac_ext <<_ACEOF
20761/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020762#include <sys/types.h>
20763#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020764int
20765main ()
20766{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020767struct sockaddr x;
20768x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020769 ;
20770 return 0;
20771}
20772_ACEOF
20773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020774if { (ac_try="$ac_compile"
20775case "(($ac_try" in
20776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20777 *) ac_try_echo=$ac_try;;
20778esac
20779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020782 grep -v '^ *+' conftest.er1 >conftest.err
20783 rm -f conftest.er1
20784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786 (exit $ac_status); } && {
20787 test -z "$ac_c_werror_flag" ||
20788 test ! -s conftest.err
20789 } && test -s conftest.$ac_objext; then
20790 { echo "$as_me:$LINENO: result: yes" >&5
20791echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020792
20793cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020794#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020795_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020796
20797else
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020799sed 's/^/| /' conftest.$ac_ext >&5
20800
Martin v. Löwiseba40652007-08-30 20:10:57 +000020801 { echo "$as_me:$LINENO: result: no" >&5
20802echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804
20805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020806
Guido van Rossumda88dad1995-01-26 00:46:29 +000020807va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20809echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020811/* confdefs.h. */
20812_ACEOF
20813cat confdefs.h >>conftest.$ac_ext
20814cat >>conftest.$ac_ext <<_ACEOF
20815/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020816
20817#ifdef HAVE_STDARG_PROTOTYPES
20818#include <stdarg.h>
20819#else
20820#include <varargs.h>
20821#endif
20822
Martin v. Löwis11437992002-04-12 09:54:03 +000020823int
20824main ()
20825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020826va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020827 ;
20828 return 0;
20829}
20830_ACEOF
20831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832if { (ac_try="$ac_compile"
20833case "(($ac_try" in
20834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20835 *) ac_try_echo=$ac_try;;
20836esac
20837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020840 grep -v '^ *+' conftest.er1 >conftest.err
20841 rm -f conftest.er1
20842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020844 (exit $ac_status); } && {
20845 test -z "$ac_c_werror_flag" ||
20846 test ! -s conftest.err
20847 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020848 :
20849else
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020851sed 's/^/| /' conftest.$ac_ext >&5
20852
Martin v. Löwis11437992002-04-12 09:54:03 +000020853
20854
20855cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020856#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020857_ACEOF
20858
Guido van Rossumda88dad1995-01-26 00:46:29 +000020859 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862
20863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20864{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20865echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020866
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020867# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020868
20869
20870
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20872echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020873if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020875else
Martin v. Löwis11437992002-04-12 09:54:03 +000020876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020877/* confdefs.h. */
20878_ACEOF
20879cat confdefs.h >>conftest.$ac_ext
20880cat >>conftest.$ac_ext <<_ACEOF
20881/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020882/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20883 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20884#define gethostbyname_r innocuous_gethostbyname_r
20885
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020886/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020887 which can conflict with char gethostbyname_r (); below.
20888 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020889 <limits.h> exists even on freestanding compilers. */
20890
20891#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020892# include <limits.h>
20893#else
20894# include <assert.h>
20895#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020896
20897#undef gethostbyname_r
20898
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899/* Override any GCC internal prototype to avoid an error.
20900 Use char because int might match the return type of a GCC
20901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020902#ifdef __cplusplus
20903extern "C"
20904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020905char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020906/* The GNU C library defines this for functions which it implements
20907 to always fail with ENOSYS. Some functions are actually named
20908 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020909#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020910choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020911#endif
20912
Skip Montanaro6dead952003-09-25 14:50:04 +000020913int
20914main ()
20915{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020916return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 ;
20918 return 0;
20919}
20920_ACEOF
20921rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922if { (ac_try="$ac_link"
20923case "(($ac_try" in
20924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20925 *) ac_try_echo=$ac_try;;
20926esac
20927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20928 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020930 grep -v '^ *+' conftest.er1 >conftest.err
20931 rm -f conftest.er1
20932 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020934 (exit $ac_status); } && {
20935 test -z "$ac_c_werror_flag" ||
20936 test ! -s conftest.err
20937 } && test -s conftest$ac_exeext &&
20938 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020939 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020940else
Martin v. Löwis11437992002-04-12 09:54:03 +000020941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020942sed 's/^/| /' conftest.$ac_ext >&5
20943
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020946
20947rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020948 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020950{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20951echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020952if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020953
Martin v. Löwis11437992002-04-12 09:54:03 +000020954 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020955#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020956_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020957
Martin v. Löwiseba40652007-08-30 20:10:57 +000020958 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20959echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020960 OLD_CFLAGS=$CFLAGS
20961 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020963/* confdefs.h. */
20964_ACEOF
20965cat confdefs.h >>conftest.$ac_ext
20966cat >>conftest.$ac_ext <<_ACEOF
20967/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020968
20969# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020970
Martin v. Löwis11437992002-04-12 09:54:03 +000020971int
20972main ()
20973{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020974
20975 char *name;
20976 struct hostent *he, *res;
20977 char buffer[2048];
20978 int buflen = 2048;
20979 int h_errnop;
20980
20981 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020982
20983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020988if { (ac_try="$ac_compile"
20989case "(($ac_try" in
20990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20991 *) ac_try_echo=$ac_try;;
20992esac
20993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020996 grep -v '^ *+' conftest.er1 >conftest.err
20997 rm -f conftest.er1
20998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021000 (exit $ac_status); } && {
21001 test -z "$ac_c_werror_flag" ||
21002 test ! -s conftest.err
21003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021004
21005 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021006#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021007_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021008
Martin v. Löwis11437992002-04-12 09:54:03 +000021009
21010cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021011#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021012_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021013
Martin v. Löwiseba40652007-08-30 20:10:57 +000021014 { echo "$as_me:$LINENO: result: yes" >&5
21015echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021016
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021017else
Martin v. Löwis11437992002-04-12 09:54:03 +000021018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021019sed 's/^/| /' conftest.$ac_ext >&5
21020
Martin v. Löwis11437992002-04-12 09:54:03 +000021021
Martin v. Löwiseba40652007-08-30 20:10:57 +000021022 { echo "$as_me:$LINENO: result: no" >&5
21023echo "${ECHO_T}no" >&6; }
21024 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21025echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021027/* confdefs.h. */
21028_ACEOF
21029cat confdefs.h >>conftest.$ac_ext
21030cat >>conftest.$ac_ext <<_ACEOF
21031/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021032
21033# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021034
Martin v. Löwis11437992002-04-12 09:54:03 +000021035int
21036main ()
21037{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021038
21039 char *name;
21040 struct hostent *he;
21041 char buffer[2048];
21042 int buflen = 2048;
21043 int h_errnop;
21044
21045 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021046
21047 ;
21048 return 0;
21049}
21050_ACEOF
21051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021052if { (ac_try="$ac_compile"
21053case "(($ac_try" in
21054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21055 *) ac_try_echo=$ac_try;;
21056esac
21057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021060 grep -v '^ *+' conftest.er1 >conftest.err
21061 rm -f conftest.er1
21062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064 (exit $ac_status); } && {
21065 test -z "$ac_c_werror_flag" ||
21066 test ! -s conftest.err
21067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021068
21069 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021070#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021071_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021072
Martin v. Löwis11437992002-04-12 09:54:03 +000021073
21074cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021075#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021076_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021077
Martin v. Löwiseba40652007-08-30 20:10:57 +000021078 { echo "$as_me:$LINENO: result: yes" >&5
21079echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021080
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021081else
Martin v. Löwis11437992002-04-12 09:54:03 +000021082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021083sed 's/^/| /' conftest.$ac_ext >&5
21084
Martin v. Löwis11437992002-04-12 09:54:03 +000021085
Martin v. Löwiseba40652007-08-30 20:10:57 +000021086 { echo "$as_me:$LINENO: result: no" >&5
21087echo "${ECHO_T}no" >&6; }
21088 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21089echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021091/* confdefs.h. */
21092_ACEOF
21093cat confdefs.h >>conftest.$ac_ext
21094cat >>conftest.$ac_ext <<_ACEOF
21095/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021096
21097# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021098
Martin v. Löwis11437992002-04-12 09:54:03 +000021099int
21100main ()
21101{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021102
21103 char *name;
21104 struct hostent *he;
21105 struct hostent_data data;
21106
21107 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021108
21109 ;
21110 return 0;
21111}
21112_ACEOF
21113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021114if { (ac_try="$ac_compile"
21115case "(($ac_try" in
21116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21117 *) ac_try_echo=$ac_try;;
21118esac
21119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021122 grep -v '^ *+' conftest.er1 >conftest.err
21123 rm -f conftest.er1
21124 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021126 (exit $ac_status); } && {
21127 test -z "$ac_c_werror_flag" ||
21128 test ! -s conftest.err
21129 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021130
21131 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021132#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021133_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021134
Martin v. Löwis11437992002-04-12 09:54:03 +000021135
21136cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021137#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021138_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021139
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140 { echo "$as_me:$LINENO: result: yes" >&5
21141echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021142
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021143else
Martin v. Löwis11437992002-04-12 09:54:03 +000021144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021145sed 's/^/| /' conftest.$ac_ext >&5
21146
Martin v. Löwis11437992002-04-12 09:54:03 +000021147
Martin v. Löwiseba40652007-08-30 20:10:57 +000021148 { echo "$as_me:$LINENO: result: no" >&5
21149echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021150
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021152
21153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021154
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021156
21157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021158
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021160
21161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021162 CFLAGS=$OLD_CFLAGS
21163
21164else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021165
Martin v. Löwis11437992002-04-12 09:54:03 +000021166
21167for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021168do
Martin v. Löwis11437992002-04-12 09:54:03 +000021169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021170{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21172if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021174else
Martin v. Löwis11437992002-04-12 09:54:03 +000021175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021176/* confdefs.h. */
21177_ACEOF
21178cat confdefs.h >>conftest.$ac_ext
21179cat >>conftest.$ac_ext <<_ACEOF
21180/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021181/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21183#define $ac_func innocuous_$ac_func
21184
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021185/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021186 which can conflict with char $ac_func (); below.
21187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021188 <limits.h> exists even on freestanding compilers. */
21189
21190#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021191# include <limits.h>
21192#else
21193# include <assert.h>
21194#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021195
21196#undef $ac_func
21197
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198/* Override any GCC internal prototype to avoid an error.
21199 Use char because int might match the return type of a GCC
21200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021201#ifdef __cplusplus
21202extern "C"
21203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021204char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021205/* The GNU C library defines this for functions which it implements
21206 to always fail with ENOSYS. Some functions are actually named
21207 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021208#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021209choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021210#endif
21211
Skip Montanaro6dead952003-09-25 14:50:04 +000021212int
21213main ()
21214{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 ;
21217 return 0;
21218}
21219_ACEOF
21220rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221if { (ac_try="$ac_link"
21222case "(($ac_try" in
21223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21224 *) ac_try_echo=$ac_try;;
21225esac
21226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21227 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021229 grep -v '^ *+' conftest.er1 >conftest.err
21230 rm -f conftest.er1
21231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 (exit $ac_status); } && {
21234 test -z "$ac_c_werror_flag" ||
21235 test ! -s conftest.err
21236 } && test -s conftest$ac_exeext &&
21237 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021238 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021239else
Martin v. Löwis11437992002-04-12 09:54:03 +000021240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021241sed 's/^/| /' conftest.$ac_ext >&5
21242
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245
21246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021247 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021249ac_res=`eval echo '${'$as_ac_var'}'`
21250 { echo "$as_me:$LINENO: result: $ac_res" >&5
21251echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021252if test `eval echo '${'$as_ac_var'}'` = yes; then
21253 cat >>confdefs.h <<_ACEOF
21254#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21255_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021256
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021257fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021258done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021259
Michael W. Hudson54241132001-12-07 15:38:26 +000021260
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021261fi
21262
Michael W. Hudson54241132001-12-07 15:38:26 +000021263
21264
21265
21266
21267
21268
Guido van Rossum627b2d71993-12-24 10:39:16 +000021269# checks for system services
21270# (none yet)
21271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021272# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021273{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21274echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021275if test "${ac_cv_func___fpu_control+set}" = set; then
21276 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021277else
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021279/* confdefs.h. */
21280_ACEOF
21281cat confdefs.h >>conftest.$ac_ext
21282cat >>conftest.$ac_ext <<_ACEOF
21283/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021284/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21285 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21286#define __fpu_control innocuous___fpu_control
21287
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021288/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021289 which can conflict with char __fpu_control (); below.
21290 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021291 <limits.h> exists even on freestanding compilers. */
21292
21293#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021294# include <limits.h>
21295#else
21296# include <assert.h>
21297#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021298
21299#undef __fpu_control
21300
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301/* Override any GCC internal prototype to avoid an error.
21302 Use char because int might match the return type of a GCC
21303 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021304#ifdef __cplusplus
21305extern "C"
21306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021307char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021308/* The GNU C library defines this for functions which it implements
21309 to always fail with ENOSYS. Some functions are actually named
21310 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021311#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021312choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021313#endif
21314
Skip Montanaro6dead952003-09-25 14:50:04 +000021315int
21316main ()
21317{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021319 ;
21320 return 0;
21321}
21322_ACEOF
21323rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324if { (ac_try="$ac_link"
21325case "(($ac_try" in
21326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21327 *) ac_try_echo=$ac_try;;
21328esac
21329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21330 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021332 grep -v '^ *+' conftest.er1 >conftest.err
21333 rm -f conftest.er1
21334 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021336 (exit $ac_status); } && {
21337 test -z "$ac_c_werror_flag" ||
21338 test ! -s conftest.err
21339 } && test -s conftest$ac_exeext &&
21340 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021342else
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021344sed 's/^/| /' conftest.$ac_ext >&5
21345
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348
21349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021350 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021352{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21353echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021354if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021355 :
21356else
Martin v. Löwis11437992002-04-12 09:54:03 +000021357
Martin v. Löwiseba40652007-08-30 20:10:57 +000021358{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21359echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021360if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021362else
Martin v. Löwis11437992002-04-12 09:54:03 +000021363 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021364LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021366/* confdefs.h. */
21367_ACEOF
21368cat confdefs.h >>conftest.$ac_ext
21369cat >>conftest.$ac_ext <<_ACEOF
21370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021371
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372/* Override any GCC internal prototype to avoid an error.
21373 Use char because int might match the return type of a GCC
21374 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021375#ifdef __cplusplus
21376extern "C"
21377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021378char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021379int
21380main ()
21381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021383 ;
21384 return 0;
21385}
21386_ACEOF
21387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388if { (ac_try="$ac_link"
21389case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
21393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021396 grep -v '^ *+' conftest.er1 >conftest.err
21397 rm -f conftest.er1
21398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400 (exit $ac_status); } && {
21401 test -z "$ac_c_werror_flag" ||
21402 test ! -s conftest.err
21403 } && test -s conftest$ac_exeext &&
21404 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021406else
Martin v. Löwis11437992002-04-12 09:54:03 +000021407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021408sed 's/^/| /' conftest.$ac_ext >&5
21409
Martin v. Löwiseba40652007-08-30 20:10:57 +000021410 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021412
21413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021415LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21418echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021419if test $ac_cv_lib_ieee___fpu_control = yes; then
21420 cat >>confdefs.h <<_ACEOF
21421#define HAVE_LIBIEEE 1
21422_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021423
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021424 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021425
Guido van Rossum627b2d71993-12-24 10:39:16 +000021426fi
21427
Michael W. Hudson54241132001-12-07 15:38:26 +000021428
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021429fi
21430
Michael W. Hudson54241132001-12-07 15:38:26 +000021431
Guido van Rossum7f253911997-05-09 02:42:48 +000021432# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021433{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21434echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021435
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021437if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021438 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021439if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021440then
21441
21442cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021443#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021444_ACEOF
21445
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446 { echo "$as_me:$LINENO: result: yes" >&5
21447echo "${ECHO_T}yes" >&6; }
21448else { echo "$as_me:$LINENO: result: no" >&5
21449echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021450fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021451else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452 { echo "$as_me:$LINENO: result: no" >&5
21453echo "${ECHO_T}no" >&6; }
21454fi
21455
Guido van Rossum7f253911997-05-09 02:42:48 +000021456
Guido van Rossum7f43da71994-08-01 12:15:30 +000021457# check for --with-libm=...
21458
Guido van Rossum563e7081996-09-10 18:20:48 +000021459case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021460Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021461BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021462*) LIBM=-lm
21463esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21465echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021466
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021468if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021469 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021470if test "$withval" = no
21471then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21473echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021474elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021475then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021476 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21477echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021478else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21479echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21480 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021481fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021482else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21484echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21485fi
21486
Guido van Rossum7f43da71994-08-01 12:15:30 +000021487
21488# check for --with-libc=...
21489
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21491echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021492
Martin v. Löwiseba40652007-08-30 20:10:57 +000021493# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021494if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021496if test "$withval" = no
21497then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021498 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21499echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021500elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021501then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21503echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021504else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21505echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21506 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021507fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021508else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21510echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21511fi
21512
Guido van Rossum7f43da71994-08-01 12:15:30 +000021513
Christian Heimes0a8143f2007-12-18 23:22:54 +000021514# ************************************
21515# * Check for mathematical functions *
21516# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021517
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021518LIBS_SAVE=$LIBS
21519LIBS="$LIBS $LIBM"
21520
Mark Dickinson265d7382008-04-21 22:32:24 +000021521# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21522# -0. on some architectures.
21523{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21524echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21525if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21526 echo $ECHO_N "(cached) $ECHO_C" >&6
21527else
21528
21529if test "$cross_compiling" = yes; then
21530 ac_cv_tanh_preserves_zero_sign=no
21531else
21532 cat >conftest.$ac_ext <<_ACEOF
21533/* confdefs.h. */
21534_ACEOF
21535cat confdefs.h >>conftest.$ac_ext
21536cat >>conftest.$ac_ext <<_ACEOF
21537/* end confdefs.h. */
21538
21539#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021540#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021541int main() {
21542 /* return 0 if either negative zeros don't exist
21543 on this platform or if negative zeros exist
21544 and tanh(-0.) == -0. */
21545 if (atan2(0., -1.) == atan2(-0., -1.) ||
21546 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21547 else exit(1);
21548}
21549
21550_ACEOF
21551rm -f conftest$ac_exeext
21552if { (ac_try="$ac_link"
21553case "(($ac_try" in
21554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21555 *) ac_try_echo=$ac_try;;
21556esac
21557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21558 (eval "$ac_link") 2>&5
21559 ac_status=$?
21560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21562 { (case "(($ac_try" in
21563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21564 *) ac_try_echo=$ac_try;;
21565esac
21566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21567 (eval "$ac_try") 2>&5
21568 ac_status=$?
21569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21570 (exit $ac_status); }; }; then
21571 ac_cv_tanh_preserves_zero_sign=yes
21572else
21573 echo "$as_me: program exited with status $ac_status" >&5
21574echo "$as_me: failed program was:" >&5
21575sed 's/^/| /' conftest.$ac_ext >&5
21576
21577( exit $ac_status )
21578ac_cv_tanh_preserves_zero_sign=no
21579fi
21580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21581fi
21582
21583
21584fi
21585
21586{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21587echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21588if test "$ac_cv_tanh_preserves_zero_sign" = yes
21589then
21590
21591cat >>confdefs.h <<\_ACEOF
21592#define TANH_PRESERVES_ZERO_SIGN 1
21593_ACEOF
21594
21595fi
21596
Martin v. Löwis11437992002-04-12 09:54:03 +000021597
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021598for ac_func in hypot
21599do
Martin v. Löwis11437992002-04-12 09:54:03 +000021600as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021601{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21602echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21603if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021604 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021605else
Martin v. Löwis11437992002-04-12 09:54:03 +000021606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021607/* confdefs.h. */
21608_ACEOF
21609cat confdefs.h >>conftest.$ac_ext
21610cat >>conftest.$ac_ext <<_ACEOF
21611/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021612/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21613 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21614#define $ac_func innocuous_$ac_func
21615
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021616/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021617 which can conflict with char $ac_func (); below.
21618 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021619 <limits.h> exists even on freestanding compilers. */
21620
21621#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021622# include <limits.h>
21623#else
21624# include <assert.h>
21625#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021626
21627#undef $ac_func
21628
Martin v. Löwiseba40652007-08-30 20:10:57 +000021629/* Override any GCC internal prototype to avoid an error.
21630 Use char because int might match the return type of a GCC
21631 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021632#ifdef __cplusplus
21633extern "C"
21634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021635char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021636/* The GNU C library defines this for functions which it implements
21637 to always fail with ENOSYS. Some functions are actually named
21638 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021639#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021640choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021641#endif
21642
Skip Montanaro6dead952003-09-25 14:50:04 +000021643int
21644main ()
21645{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021647 ;
21648 return 0;
21649}
21650_ACEOF
21651rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652if { (ac_try="$ac_link"
21653case "(($ac_try" in
21654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21655 *) ac_try_echo=$ac_try;;
21656esac
21657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21658 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021660 grep -v '^ *+' conftest.er1 >conftest.err
21661 rm -f conftest.er1
21662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021664 (exit $ac_status); } && {
21665 test -z "$ac_c_werror_flag" ||
21666 test ! -s conftest.err
21667 } && test -s conftest$ac_exeext &&
21668 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021670else
Martin v. Löwis11437992002-04-12 09:54:03 +000021671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021672sed 's/^/| /' conftest.$ac_ext >&5
21673
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021676
21677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021678 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021680ac_res=`eval echo '${'$as_ac_var'}'`
21681 { echo "$as_me:$LINENO: result: $ac_res" >&5
21682echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021683if test `eval echo '${'$as_ac_var'}'` = yes; then
21684 cat >>confdefs.h <<_ACEOF
21685#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21686_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021687
Michael W. Hudson54241132001-12-07 15:38:26 +000021688else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021689 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021690 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021691 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21692 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021693esac
21694
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021695fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021696done
21697
Michael W. Hudson54241132001-12-07 15:38:26 +000021698
Christian Heimes0a8143f2007-12-18 23:22:54 +000021699
21700
21701
21702
21703
Christian Heimes48723512008-01-20 14:28:28 +000021704
21705
21706
21707
21708
21709for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021710do
21711as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21712{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21713echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21714if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21715 echo $ECHO_N "(cached) $ECHO_C" >&6
21716else
21717 cat >conftest.$ac_ext <<_ACEOF
21718/* confdefs.h. */
21719_ACEOF
21720cat confdefs.h >>conftest.$ac_ext
21721cat >>conftest.$ac_ext <<_ACEOF
21722/* end confdefs.h. */
21723/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21725#define $ac_func innocuous_$ac_func
21726
21727/* System header to define __stub macros and hopefully few prototypes,
21728 which can conflict with char $ac_func (); below.
21729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21730 <limits.h> exists even on freestanding compilers. */
21731
21732#ifdef __STDC__
21733# include <limits.h>
21734#else
21735# include <assert.h>
21736#endif
21737
21738#undef $ac_func
21739
21740/* Override any GCC internal prototype to avoid an error.
21741 Use char because int might match the return type of a GCC
21742 builtin and then its argument prototype would still apply. */
21743#ifdef __cplusplus
21744extern "C"
21745#endif
21746char $ac_func ();
21747/* The GNU C library defines this for functions which it implements
21748 to always fail with ENOSYS. Some functions are actually named
21749 something starting with __ and the normal name is an alias. */
21750#if defined __stub_$ac_func || defined __stub___$ac_func
21751choke me
21752#endif
21753
21754int
21755main ()
21756{
21757return $ac_func ();
21758 ;
21759 return 0;
21760}
21761_ACEOF
21762rm -f conftest.$ac_objext conftest$ac_exeext
21763if { (ac_try="$ac_link"
21764case "(($ac_try" in
21765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21766 *) ac_try_echo=$ac_try;;
21767esac
21768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21769 (eval "$ac_link") 2>conftest.er1
21770 ac_status=$?
21771 grep -v '^ *+' conftest.er1 >conftest.err
21772 rm -f conftest.er1
21773 cat conftest.err >&5
21774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21775 (exit $ac_status); } && {
21776 test -z "$ac_c_werror_flag" ||
21777 test ! -s conftest.err
21778 } && test -s conftest$ac_exeext &&
21779 $as_test_x conftest$ac_exeext; then
21780 eval "$as_ac_var=yes"
21781else
21782 echo "$as_me: failed program was:" >&5
21783sed 's/^/| /' conftest.$ac_ext >&5
21784
21785 eval "$as_ac_var=no"
21786fi
21787
21788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21789 conftest$ac_exeext conftest.$ac_ext
21790fi
21791ac_res=`eval echo '${'$as_ac_var'}'`
21792 { echo "$as_me:$LINENO: result: $ac_res" >&5
21793echo "${ECHO_T}$ac_res" >&6; }
21794if test `eval echo '${'$as_ac_var'}'` = yes; then
21795 cat >>confdefs.h <<_ACEOF
21796#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21797_ACEOF
21798
21799fi
21800done
21801
21802
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021803LIBS=$LIBS_SAVE
21804
Guido van Rossumef2255b2000-03-10 22:30:29 +000021805# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021806if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21808echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021809if test "${ac_cv_header_wchar_h+set}" = set; then
21810 echo $ECHO_N "(cached) $ECHO_C" >&6
21811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21813echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021814else
Martin v. Löwis11437992002-04-12 09:54:03 +000021815 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21817echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021818cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021819/* confdefs.h. */
21820_ACEOF
21821cat confdefs.h >>conftest.$ac_ext
21822cat >>conftest.$ac_ext <<_ACEOF
21823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021824$ac_includes_default
21825#include <wchar.h>
21826_ACEOF
21827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021828if { (ac_try="$ac_compile"
21829case "(($ac_try" in
21830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21831 *) ac_try_echo=$ac_try;;
21832esac
21833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021836 grep -v '^ *+' conftest.er1 >conftest.err
21837 rm -f conftest.er1
21838 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840 (exit $ac_status); } && {
21841 test -z "$ac_c_werror_flag" ||
21842 test ! -s conftest.err
21843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 ac_header_compiler=yes
21845else
21846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021847sed 's/^/| /' conftest.$ac_ext >&5
21848
Martin v. Löwiseba40652007-08-30 20:10:57 +000021849 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851
21852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21853{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21854echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021855
21856# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21858echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021860/* confdefs.h. */
21861_ACEOF
21862cat confdefs.h >>conftest.$ac_ext
21863cat >>conftest.$ac_ext <<_ACEOF
21864/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021865#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021866_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867if { (ac_try="$ac_cpp conftest.$ac_ext"
21868case "(($ac_try" in
21869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870 *) ac_try_echo=$ac_try;;
21871esac
21872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21873 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021875 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021876 rm -f conftest.er1
21877 cat conftest.err >&5
21878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021879 (exit $ac_status); } >/dev/null && {
21880 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21881 test ! -s conftest.err
21882 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021883 ac_header_preproc=yes
21884else
21885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021886sed 's/^/| /' conftest.$ac_ext >&5
21887
Martin v. Löwis11437992002-04-12 09:54:03 +000021888 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890
Martin v. Löwis11437992002-04-12 09:54:03 +000021891rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021892{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21893echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021894
21895# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21897 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021898 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21899echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021900 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21901echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21902 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021903 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021904 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021905 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21906echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021907 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21908echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21909 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21910echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21911 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21912echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021913 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21914echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021915 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21916echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021917 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021918## ------------------------------------------------ ##
21919## Report this to http://www.python.org/python-bugs ##
21920## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021921_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021922 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021923 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021924esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021925{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21926echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021927if test "${ac_cv_header_wchar_h+set}" = set; then
21928 echo $ECHO_N "(cached) $ECHO_C" >&6
21929else
21930 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21933echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021934
21935fi
21936if test $ac_cv_header_wchar_h = yes; then
21937
21938
21939cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021940#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021941_ACEOF
21942
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021943 wchar_h="yes"
21944
Guido van Rossumef2255b2000-03-10 22:30:29 +000021945else
Martin v. Löwis11437992002-04-12 09:54:03 +000021946 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021947
21948fi
21949
Michael W. Hudson54241132001-12-07 15:38:26 +000021950
Martin v. Löwis11437992002-04-12 09:54:03 +000021951
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021952# determine wchar_t size
21953if test "$wchar_h" = yes
21954then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021955 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21956echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021957if test "${ac_cv_type_wchar_t+set}" = set; then
21958 echo $ECHO_N "(cached) $ECHO_C" >&6
21959else
21960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021961/* confdefs.h. */
21962_ACEOF
21963cat confdefs.h >>conftest.$ac_ext
21964cat >>conftest.$ac_ext <<_ACEOF
21965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021966#include <wchar.h>
21967
Martin v. Löwiseba40652007-08-30 20:10:57 +000021968typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021969int
21970main ()
21971{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021973 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021974if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021975 return 0;
21976 ;
21977 return 0;
21978}
21979_ACEOF
21980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021981if { (ac_try="$ac_compile"
21982case "(($ac_try" in
21983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21984 *) ac_try_echo=$ac_try;;
21985esac
21986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021989 grep -v '^ *+' conftest.er1 >conftest.err
21990 rm -f conftest.er1
21991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021993 (exit $ac_status); } && {
21994 test -z "$ac_c_werror_flag" ||
21995 test ! -s conftest.err
21996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021997 ac_cv_type_wchar_t=yes
21998else
21999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022000sed 's/^/| /' conftest.$ac_ext >&5
22001
Martin v. Löwiseba40652007-08-30 20:10:57 +000022002 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022003fi
Brett Cannon19fab762007-06-02 03:02:29 +000022004
Martin v. Löwiseba40652007-08-30 20:10:57 +000022005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22006fi
22007{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22008echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22009
22010# The cast to long int works around a bug in the HP C Compiler
22011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22013# This bug is HP SR number 8606223364.
22014{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22015echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022016if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22017 echo $ECHO_N "(cached) $ECHO_C" >&6
22018else
Martin v. Löwis11437992002-04-12 09:54:03 +000022019 if test "$cross_compiling" = yes; then
22020 # Depending upon the size, compute the lo and hi bounds.
22021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022022/* confdefs.h. */
22023_ACEOF
22024cat confdefs.h >>conftest.$ac_ext
22025cat >>conftest.$ac_ext <<_ACEOF
22026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022027#include <wchar.h>
22028
Martin v. Löwiseba40652007-08-30 20:10:57 +000022029 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022030int
22031main ()
22032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022034test_array [0] = 0
22035
22036 ;
22037 return 0;
22038}
22039_ACEOF
22040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022041if { (ac_try="$ac_compile"
22042case "(($ac_try" in
22043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22044 *) ac_try_echo=$ac_try;;
22045esac
22046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022049 grep -v '^ *+' conftest.er1 >conftest.err
22050 rm -f conftest.er1
22051 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022053 (exit $ac_status); } && {
22054 test -z "$ac_c_werror_flag" ||
22055 test ! -s conftest.err
22056 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 ac_lo=0 ac_mid=0
22058 while :; do
22059 cat >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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022065#include <wchar.h>
22066
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022068int
22069main ()
22070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022072test_array [0] = 0
22073
22074 ;
22075 return 0;
22076}
22077_ACEOF
22078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022079if { (ac_try="$ac_compile"
22080case "(($ac_try" in
22081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22082 *) ac_try_echo=$ac_try;;
22083esac
22084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022087 grep -v '^ *+' conftest.er1 >conftest.err
22088 rm -f conftest.er1
22089 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022091 (exit $ac_status); } && {
22092 test -z "$ac_c_werror_flag" ||
22093 test ! -s conftest.err
22094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022095 ac_hi=$ac_mid; break
22096else
22097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022098sed 's/^/| /' conftest.$ac_ext >&5
22099
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100 ac_lo=`expr $ac_mid + 1`
22101 if test $ac_lo -le $ac_mid; then
22102 ac_lo= ac_hi=
22103 break
22104 fi
22105 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022107
22108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022109 done
22110else
22111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022112sed 's/^/| /' conftest.$ac_ext >&5
22113
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022115/* confdefs.h. */
22116_ACEOF
22117cat confdefs.h >>conftest.$ac_ext
22118cat >>conftest.$ac_ext <<_ACEOF
22119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022120#include <wchar.h>
22121
Martin v. Löwiseba40652007-08-30 20:10:57 +000022122 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022123int
22124main ()
22125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022127test_array [0] = 0
22128
22129 ;
22130 return 0;
22131}
22132_ACEOF
22133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134if { (ac_try="$ac_compile"
22135case "(($ac_try" in
22136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22137 *) ac_try_echo=$ac_try;;
22138esac
22139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022142 grep -v '^ *+' conftest.er1 >conftest.err
22143 rm -f conftest.er1
22144 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022146 (exit $ac_status); } && {
22147 test -z "$ac_c_werror_flag" ||
22148 test ! -s conftest.err
22149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022150 ac_hi=-1 ac_mid=-1
22151 while :; do
22152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022153/* confdefs.h. */
22154_ACEOF
22155cat confdefs.h >>conftest.$ac_ext
22156cat >>conftest.$ac_ext <<_ACEOF
22157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022158#include <wchar.h>
22159
Martin v. Löwiseba40652007-08-30 20:10:57 +000022160 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022161int
22162main ()
22163{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022164static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022165test_array [0] = 0
22166
22167 ;
22168 return 0;
22169}
22170_ACEOF
22171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172if { (ac_try="$ac_compile"
22173case "(($ac_try" in
22174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22175 *) ac_try_echo=$ac_try;;
22176esac
22177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022180 grep -v '^ *+' conftest.er1 >conftest.err
22181 rm -f conftest.er1
22182 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184 (exit $ac_status); } && {
22185 test -z "$ac_c_werror_flag" ||
22186 test ! -s conftest.err
22187 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022188 ac_lo=$ac_mid; break
22189else
22190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022191sed 's/^/| /' conftest.$ac_ext >&5
22192
Martin v. Löwiseba40652007-08-30 20:10:57 +000022193 ac_hi=`expr '(' $ac_mid ')' - 1`
22194 if test $ac_mid -le $ac_hi; then
22195 ac_lo= ac_hi=
22196 break
22197 fi
22198 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022200
22201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022202 done
22203else
22204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022205sed 's/^/| /' conftest.$ac_ext >&5
22206
Martin v. Löwiseba40652007-08-30 20:10:57 +000022207 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022209
22210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022212
22213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022214# Binary search between lo and hi bounds.
22215while test "x$ac_lo" != "x$ac_hi"; do
22216 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022218/* confdefs.h. */
22219_ACEOF
22220cat confdefs.h >>conftest.$ac_ext
22221cat >>conftest.$ac_ext <<_ACEOF
22222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022223#include <wchar.h>
22224
Martin v. Löwiseba40652007-08-30 20:10:57 +000022225 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022226int
22227main ()
22228{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022229static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022230test_array [0] = 0
22231
22232 ;
22233 return 0;
22234}
22235_ACEOF
22236rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022237if { (ac_try="$ac_compile"
22238case "(($ac_try" in
22239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22240 *) ac_try_echo=$ac_try;;
22241esac
22242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022245 grep -v '^ *+' conftest.er1 >conftest.err
22246 rm -f conftest.er1
22247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022249 (exit $ac_status); } && {
22250 test -z "$ac_c_werror_flag" ||
22251 test ! -s conftest.err
22252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022253 ac_hi=$ac_mid
22254else
22255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022256sed 's/^/| /' conftest.$ac_ext >&5
22257
Martin v. Löwiseba40652007-08-30 20:10:57 +000022258 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260
22261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022262done
22263case $ac_lo in
22264?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265'') if test "$ac_cv_type_wchar_t" = yes; then
22266 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022267See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022268echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022269See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270 { (exit 77); exit 77; }; }
22271 else
22272 ac_cv_sizeof_wchar_t=0
22273 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022274esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022275else
Martin v. Löwis11437992002-04-12 09:54:03 +000022276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022277/* confdefs.h. */
22278_ACEOF
22279cat confdefs.h >>conftest.$ac_ext
22280cat >>conftest.$ac_ext <<_ACEOF
22281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022282#include <wchar.h>
22283
Martin v. Löwiseba40652007-08-30 20:10:57 +000022284 typedef wchar_t ac__type_sizeof_;
22285static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22286static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022287#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022288#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022289int
22290main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022291{
Martin v. Löwis11437992002-04-12 09:54:03 +000022292
22293 FILE *f = fopen ("conftest.val", "w");
22294 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022295 return 1;
22296 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022298 long int i = longval ();
22299 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22300 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 fprintf (f, "%ld\n", i);
22302 }
22303 else
22304 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022305 unsigned long int i = ulongval ();
22306 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22307 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 fprintf (f, "%lu\n", i);
22309 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022310 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022311
22312 ;
22313 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022314}
Martin v. Löwis11437992002-04-12 09:54:03 +000022315_ACEOF
22316rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317if { (ac_try="$ac_link"
22318case "(($ac_try" in
22319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22320 *) ac_try_echo=$ac_try;;
22321esac
22322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22323 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022324 ac_status=$?
22325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022327 { (case "(($ac_try" in
22328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22329 *) ac_try_echo=$ac_try;;
22330esac
22331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22332 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022333 ac_status=$?
22334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22335 (exit $ac_status); }; }; then
22336 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022337else
Martin v. Löwis11437992002-04-12 09:54:03 +000022338 echo "$as_me: program exited with status $ac_status" >&5
22339echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022340sed 's/^/| /' conftest.$ac_ext >&5
22341
Martin v. Löwis11437992002-04-12 09:54:03 +000022342( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343if test "$ac_cv_type_wchar_t" = yes; then
22344 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022345See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022347See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022348 { (exit 77); exit 77; }; }
22349 else
22350 ac_cv_sizeof_wchar_t=0
22351 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022353rm -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 +000022354fi
22355rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022357{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22358echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22359
22360
22361
Martin v. Löwis11437992002-04-12 09:54:03 +000022362cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022363#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022364_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022365
Michael W. Hudson54241132001-12-07 15:38:26 +000022366
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022367fi
22368
Martin v. Löwiseba40652007-08-30 20:10:57 +000022369{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22370echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022371have_ucs4_tcl=no
22372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022373/* confdefs.h. */
22374_ACEOF
22375cat confdefs.h >>conftest.$ac_ext
22376cat >>conftest.$ac_ext <<_ACEOF
22377/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022378
22379#include <tcl.h>
22380#if TCL_UTF_MAX != 6
22381# error "NOT UCS4_TCL"
22382#endif
22383int
22384main ()
22385{
22386
22387 ;
22388 return 0;
22389}
22390_ACEOF
22391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022392if { (ac_try="$ac_compile"
22393case "(($ac_try" in
22394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22395 *) ac_try_echo=$ac_try;;
22396esac
22397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22398 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022400 grep -v '^ *+' conftest.er1 >conftest.err
22401 rm -f conftest.er1
22402 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022404 (exit $ac_status); } && {
22405 test -z "$ac_c_werror_flag" ||
22406 test ! -s conftest.err
22407 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022408
22409
22410cat >>confdefs.h <<\_ACEOF
22411#define HAVE_UCS4_TCL 1
22412_ACEOF
22413
22414 have_ucs4_tcl=yes
22415
22416else
22417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022418sed 's/^/| /' conftest.$ac_ext >&5
22419
Martin v. Löwiseba40652007-08-30 20:10:57 +000022420
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022422
22423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22424{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22425echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022426
Skip Montanaro6dead952003-09-25 14:50:04 +000022427# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022428if test "$wchar_h" = yes
22429then
22430 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022431 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22432echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022433 if test "${ac_cv_wchar_t_signed+set}" = set; then
22434 echo $ECHO_N "(cached) $ECHO_C" >&6
22435else
22436
22437 if test "$cross_compiling" = yes; then
22438 ac_cv_wchar_t_signed=yes
22439else
22440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022441/* confdefs.h. */
22442_ACEOF
22443cat confdefs.h >>conftest.$ac_ext
22444cat >>conftest.$ac_ext <<_ACEOF
22445/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022446
22447 #include <wchar.h>
22448 int main()
22449 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022450 /* Success: exit code 0 */
22451 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022452 }
22453
22454_ACEOF
22455rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456if { (ac_try="$ac_link"
22457case "(($ac_try" in
22458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22459 *) ac_try_echo=$ac_try;;
22460esac
22461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22462 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022463 ac_status=$?
22464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022466 { (case "(($ac_try" in
22467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22468 *) ac_try_echo=$ac_try;;
22469esac
22470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22471 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022472 ac_status=$?
22473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22474 (exit $ac_status); }; }; then
22475 ac_cv_wchar_t_signed=yes
22476else
22477 echo "$as_me: program exited with status $ac_status" >&5
22478echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022479sed 's/^/| /' conftest.$ac_ext >&5
22480
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022481( exit $ac_status )
22482ac_cv_wchar_t_signed=no
22483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484rm -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 +000022485fi
22486
Martin v. Löwiseba40652007-08-30 20:10:57 +000022487
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022488fi
22489
Martin v. Löwiseba40652007-08-30 20:10:57 +000022490 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22491echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22492fi
22493
22494{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22495echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22496# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022497if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022498 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022499else
22500 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501fi
22502
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022503
22504if test $enable_unicode = yes
22505then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022506 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022507 case "$have_ucs4_tcl" in
22508 yes) enable_unicode="ucs4"
22509 ;;
22510 *) enable_unicode="ucs2"
22511 ;;
22512 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022513fi
22514
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022515
22516
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022517case "$enable_unicode" in
22518ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022519 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022520#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022521_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022522
22523 ;;
22524ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022525 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022526#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022527_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022528
22529 ;;
22530esac
22531
Michael W. Hudson54241132001-12-07 15:38:26 +000022532
Martin v. Löwis11437992002-04-12 09:54:03 +000022533
22534
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022535
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022536if test "$enable_unicode" = "no"
22537then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022538 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022539 { echo "$as_me:$LINENO: result: not used" >&5
22540echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022541else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022542 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022543
22544cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022545#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022546_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022547
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022548
22549 # wchar_t is only usable if it maps to an unsigned type
22550 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022551 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022552 then
22553 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022554
Martin v. Löwis11437992002-04-12 09:54:03 +000022555cat >>confdefs.h <<\_ACEOF
22556#define HAVE_USABLE_WCHAR_T 1
22557_ACEOF
22558
22559 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022560#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022561_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022562
22563 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22564 then
22565 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022566 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022567#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022568_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022569
22570 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22571 then
22572 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022573 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022574#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022575_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022576
22577 else
22578 PY_UNICODE_TYPE="no type found"
22579 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22581echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022582fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022583
22584# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022585{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22586echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022587if test "${ac_cv_c_bigendian+set}" = set; then
22588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022589else
Martin v. Löwis11437992002-04-12 09:54:03 +000022590 # See if sys/param.h defines the BYTE_ORDER macro.
22591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022592/* confdefs.h. */
22593_ACEOF
22594cat confdefs.h >>conftest.$ac_ext
22595cat >>conftest.$ac_ext <<_ACEOF
22596/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022597#include <sys/types.h>
22598#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022599
Martin v. Löwis11437992002-04-12 09:54:03 +000022600int
22601main ()
22602{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022603#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22604 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022605 bogus endian macros
22606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022607
22608 ;
22609 return 0;
22610}
22611_ACEOF
22612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022613if { (ac_try="$ac_compile"
22614case "(($ac_try" in
22615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22616 *) ac_try_echo=$ac_try;;
22617esac
22618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022621 grep -v '^ *+' conftest.er1 >conftest.err
22622 rm -f conftest.er1
22623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022625 (exit $ac_status); } && {
22626 test -z "$ac_c_werror_flag" ||
22627 test ! -s conftest.err
22628 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022629 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022631/* confdefs.h. */
22632_ACEOF
22633cat confdefs.h >>conftest.$ac_ext
22634cat >>conftest.$ac_ext <<_ACEOF
22635/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022636#include <sys/types.h>
22637#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022638
Martin v. Löwis11437992002-04-12 09:54:03 +000022639int
22640main ()
22641{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022642#if BYTE_ORDER != BIG_ENDIAN
22643 not big endian
22644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022645
22646 ;
22647 return 0;
22648}
22649_ACEOF
22650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022651if { (ac_try="$ac_compile"
22652case "(($ac_try" in
22653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22654 *) ac_try_echo=$ac_try;;
22655esac
22656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022659 grep -v '^ *+' conftest.er1 >conftest.err
22660 rm -f conftest.er1
22661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022663 (exit $ac_status); } && {
22664 test -z "$ac_c_werror_flag" ||
22665 test ! -s conftest.err
22666 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022667 ac_cv_c_bigendian=yes
22668else
Martin v. Löwis11437992002-04-12 09:54:03 +000022669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022670sed 's/^/| /' conftest.$ac_ext >&5
22671
Martin v. Löwiseba40652007-08-30 20:10:57 +000022672 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674
22675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022676else
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022678sed 's/^/| /' conftest.$ac_ext >&5
22679
Martin v. Löwiseba40652007-08-30 20:10:57 +000022680 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022681if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022682 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 ac_cv_c_bigendian=unknown
22684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022685/* confdefs.h. */
22686_ACEOF
22687cat confdefs.h >>conftest.$ac_ext
22688cat >>conftest.$ac_ext <<_ACEOF
22689/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22691short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022692void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022693short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22694short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022695void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022696int
22697main ()
22698{
22699 _ascii (); _ebcdic ();
22700 ;
22701 return 0;
22702}
22703_ACEOF
22704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022705if { (ac_try="$ac_compile"
22706case "(($ac_try" in
22707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22708 *) ac_try_echo=$ac_try;;
22709esac
22710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022713 grep -v '^ *+' conftest.er1 >conftest.err
22714 rm -f conftest.er1
22715 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022717 (exit $ac_status); } && {
22718 test -z "$ac_c_werror_flag" ||
22719 test ! -s conftest.err
22720 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022721 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022722 ac_cv_c_bigendian=yes
22723fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022724if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022725 if test "$ac_cv_c_bigendian" = unknown; then
22726 ac_cv_c_bigendian=no
22727 else
22728 # finding both strings is unlikely to happen, but who knows?
22729 ac_cv_c_bigendian=unknown
22730 fi
22731fi
22732else
22733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022734sed 's/^/| /' conftest.$ac_ext >&5
22735
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736
Martin v. Löwis11437992002-04-12 09:54:03 +000022737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738
22739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022740else
22741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022742/* confdefs.h. */
22743_ACEOF
22744cat confdefs.h >>conftest.$ac_ext
22745cat >>conftest.$ac_ext <<_ACEOF
22746/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022747$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022748int
22749main ()
22750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022751
Guido van Rossumef2255b2000-03-10 22:30:29 +000022752 /* Are we little or big endian? From Harbison&Steele. */
22753 union
22754 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022755 long int l;
22756 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022757 } u;
22758 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022759 return u.c[sizeof (long int) - 1] == 1;
22760
22761 ;
22762 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022763}
Martin v. Löwis11437992002-04-12 09:54:03 +000022764_ACEOF
22765rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022766if { (ac_try="$ac_link"
22767case "(($ac_try" in
22768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22769 *) ac_try_echo=$ac_try;;
22770esac
22771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22772 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022773 ac_status=$?
22774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22775 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022776 { (case "(($ac_try" in
22777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22778 *) ac_try_echo=$ac_try;;
22779esac
22780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22781 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022782 ac_status=$?
22783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22784 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022785 ac_cv_c_bigendian=no
22786else
Martin v. Löwis11437992002-04-12 09:54:03 +000022787 echo "$as_me: program exited with status $ac_status" >&5
22788echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022789sed 's/^/| /' conftest.$ac_ext >&5
22790
Martin v. Löwis11437992002-04-12 09:54:03 +000022791( exit $ac_status )
22792ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022794rm -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 +000022795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796
22797
Martin v. Löwis11437992002-04-12 09:54:03 +000022798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799
22800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022802{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22803echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022804case $ac_cv_c_bigendian in
22805 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022806
Martin v. Löwis11437992002-04-12 09:54:03 +000022807cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022808#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022809_ACEOF
22810 ;;
22811 no)
22812 ;;
22813 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022814 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022815presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022816echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022817presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22818 { (exit 1); exit 1; }; } ;;
22819esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022820
Michael W. Hudson54241132001-12-07 15:38:26 +000022821
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022822# Check whether right shifting a negative integer extends the sign bit
22823# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022824{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22825echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022826if test "${ac_cv_rshift_extends_sign+set}" = set; then
22827 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022828else
Martin v. Löwis11437992002-04-12 09:54:03 +000022829
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022830if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022831 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022832else
Martin v. Löwis11437992002-04-12 09:54:03 +000022833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022834/* confdefs.h. */
22835_ACEOF
22836cat confdefs.h >>conftest.$ac_ext
22837cat >>conftest.$ac_ext <<_ACEOF
22838/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022839
22840int main()
22841{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022842 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022843}
22844
Martin v. Löwis11437992002-04-12 09:54:03 +000022845_ACEOF
22846rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022847if { (ac_try="$ac_link"
22848case "(($ac_try" in
22849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22850 *) ac_try_echo=$ac_try;;
22851esac
22852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22853 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022854 ac_status=$?
22855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022857 { (case "(($ac_try" in
22858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22859 *) ac_try_echo=$ac_try;;
22860esac
22861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22862 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022863 ac_status=$?
22864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22865 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022866 ac_cv_rshift_extends_sign=yes
22867else
Martin v. Löwis11437992002-04-12 09:54:03 +000022868 echo "$as_me: program exited with status $ac_status" >&5
22869echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022870sed 's/^/| /' conftest.$ac_ext >&5
22871
Martin v. Löwis11437992002-04-12 09:54:03 +000022872( exit $ac_status )
22873ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875rm -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 +000022876fi
22877
Martin v. Löwiseba40652007-08-30 20:10:57 +000022878
22879fi
22880
22881{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22882echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022883if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022884then
Martin v. Löwis11437992002-04-12 09:54:03 +000022885
22886cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022887#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022888_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022889
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022890fi
22891
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022892# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022893{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22894echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022895if test "${ac_cv_have_getc_unlocked+set}" = set; then
22896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022897else
Martin v. Löwis11437992002-04-12 09:54:03 +000022898
22899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022900/* confdefs.h. */
22901_ACEOF
22902cat confdefs.h >>conftest.$ac_ext
22903cat >>conftest.$ac_ext <<_ACEOF
22904/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022905#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022906int
22907main ()
22908{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022909
22910 FILE *f = fopen("/dev/null", "r");
22911 flockfile(f);
22912 getc_unlocked(f);
22913 funlockfile(f);
22914
Martin v. Löwis11437992002-04-12 09:54:03 +000022915 ;
22916 return 0;
22917}
22918_ACEOF
22919rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022920if { (ac_try="$ac_link"
22921case "(($ac_try" in
22922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22923 *) ac_try_echo=$ac_try;;
22924esac
22925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22926 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022928 grep -v '^ *+' conftest.er1 >conftest.err
22929 rm -f conftest.er1
22930 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022932 (exit $ac_status); } && {
22933 test -z "$ac_c_werror_flag" ||
22934 test ! -s conftest.err
22935 } && test -s conftest$ac_exeext &&
22936 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022937 ac_cv_have_getc_unlocked=yes
22938else
Martin v. Löwis11437992002-04-12 09:54:03 +000022939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022940sed 's/^/| /' conftest.$ac_ext >&5
22941
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022944
22945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022946 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022947fi
22948
Martin v. Löwiseba40652007-08-30 20:10:57 +000022949{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22950echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022951if test "$ac_cv_have_getc_unlocked" = yes
22952then
Martin v. Löwis11437992002-04-12 09:54:03 +000022953
22954cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022955#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022956_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022957
22958fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022959
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022960# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022961# save the value of LIBS so we don't actually link Python with readline
22962LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022963
Martin v. Löwiseba40652007-08-30 20:10:57 +000022964{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22965echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022966if test "${ac_cv_lib_readline_readline+set}" = set; then
22967 echo $ECHO_N "(cached) $ECHO_C" >&6
22968else
22969 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000022970LIBS="-lreadline $READLINE_LIBS $LIBS"
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022971cat >conftest.$ac_ext <<_ACEOF
22972/* confdefs.h. */
22973_ACEOF
22974cat confdefs.h >>conftest.$ac_ext
22975cat >>conftest.$ac_ext <<_ACEOF
22976/* end confdefs.h. */
22977
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978/* Override any GCC internal prototype to avoid an error.
22979 Use char because int might match the return type of a GCC
22980 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022981#ifdef __cplusplus
22982extern "C"
22983#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022984char readline ();
22985int
22986main ()
22987{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022988return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022989 ;
22990 return 0;
22991}
22992_ACEOF
22993rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994if { (ac_try="$ac_link"
22995case "(($ac_try" in
22996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22997 *) ac_try_echo=$ac_try;;
22998esac
22999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23000 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023001 ac_status=$?
23002 grep -v '^ *+' conftest.er1 >conftest.err
23003 rm -f conftest.er1
23004 cat conftest.err >&5
23005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023006 (exit $ac_status); } && {
23007 test -z "$ac_c_werror_flag" ||
23008 test ! -s conftest.err
23009 } && test -s conftest$ac_exeext &&
23010 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023011 ac_cv_lib_readline_readline=yes
23012else
23013 echo "$as_me: failed program was:" >&5
23014sed 's/^/| /' conftest.$ac_ext >&5
23015
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018
23019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023020 conftest$ac_exeext conftest.$ac_ext
23021LIBS=$ac_check_lib_save_LIBS
23022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023023{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
23024echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023025if test $ac_cv_lib_readline_readline = yes; then
23026 cat >>confdefs.h <<_ACEOF
23027#define HAVE_LIBREADLINE 1
23028_ACEOF
23029
23030 LIBS="-lreadline $LIBS"
23031
23032fi
23033
23034if test "$ac_cv_have_readline_readline" = no
23035then
23036
Martin v. Löwiseba40652007-08-30 20:10:57 +000023037{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
23038echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023039if test "${ac_cv_lib_termcap_readline+set}" = set; then
23040 echo $ECHO_N "(cached) $ECHO_C" >&6
23041else
23042 ac_check_lib_save_LIBS=$LIBS
23043LIBS="-ltermcap $LIBS"
23044cat >conftest.$ac_ext <<_ACEOF
23045/* confdefs.h. */
23046_ACEOF
23047cat confdefs.h >>conftest.$ac_ext
23048cat >>conftest.$ac_ext <<_ACEOF
23049/* end confdefs.h. */
23050
Martin v. Löwiseba40652007-08-30 20:10:57 +000023051/* Override any GCC internal prototype to avoid an error.
23052 Use char because int might match the return type of a GCC
23053 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023054#ifdef __cplusplus
23055extern "C"
23056#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023057char readline ();
23058int
23059main ()
23060{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023061return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023062 ;
23063 return 0;
23064}
23065_ACEOF
23066rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023067if { (ac_try="$ac_link"
23068case "(($ac_try" in
23069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23070 *) ac_try_echo=$ac_try;;
23071esac
23072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23073 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023074 ac_status=$?
23075 grep -v '^ *+' conftest.er1 >conftest.err
23076 rm -f conftest.er1
23077 cat conftest.err >&5
23078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023079 (exit $ac_status); } && {
23080 test -z "$ac_c_werror_flag" ||
23081 test ! -s conftest.err
23082 } && test -s conftest$ac_exeext &&
23083 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023084 ac_cv_lib_termcap_readline=yes
23085else
23086 echo "$as_me: failed program was:" >&5
23087sed 's/^/| /' conftest.$ac_ext >&5
23088
Martin v. Löwiseba40652007-08-30 20:10:57 +000023089 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023091
23092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023093 conftest$ac_exeext conftest.$ac_ext
23094LIBS=$ac_check_lib_save_LIBS
23095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
23097echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023098if test $ac_cv_lib_termcap_readline = yes; then
23099 cat >>confdefs.h <<_ACEOF
23100#define HAVE_LIBTERMCAP 1
23101_ACEOF
23102
23103 LIBS="-ltermcap $LIBS"
23104
23105fi
23106
23107fi
23108
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023109# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023110{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23111echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023112if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23113 echo $ECHO_N "(cached) $ECHO_C" >&6
23114else
23115 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023116LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023117cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023118/* confdefs.h. */
23119_ACEOF
23120cat confdefs.h >>conftest.$ac_ext
23121cat >>conftest.$ac_ext <<_ACEOF
23122/* end confdefs.h. */
23123
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124/* Override any GCC internal prototype to avoid an error.
23125 Use char because int might match the return type of a GCC
23126 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023127#ifdef __cplusplus
23128extern "C"
23129#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023130char rl_callback_handler_install ();
23131int
23132main ()
23133{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023134return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023135 ;
23136 return 0;
23137}
23138_ACEOF
23139rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023140if { (ac_try="$ac_link"
23141case "(($ac_try" in
23142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23143 *) ac_try_echo=$ac_try;;
23144esac
23145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23146 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023148 grep -v '^ *+' conftest.er1 >conftest.err
23149 rm -f conftest.er1
23150 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023152 (exit $ac_status); } && {
23153 test -z "$ac_c_werror_flag" ||
23154 test ! -s conftest.err
23155 } && test -s conftest$ac_exeext &&
23156 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023157 ac_cv_lib_readline_rl_callback_handler_install=yes
23158else
23159 echo "$as_me: failed program was:" >&5
23160sed 's/^/| /' conftest.$ac_ext >&5
23161
Martin v. Löwiseba40652007-08-30 20:10:57 +000023162 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023164
23165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023166 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023167LIBS=$ac_check_lib_save_LIBS
23168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023169{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23170echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023171if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23172
23173cat >>confdefs.h <<\_ACEOF
23174#define HAVE_RL_CALLBACK 1
23175_ACEOF
23176
23177fi
23178
23179
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023180# check for readline 2.2
23181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023182/* confdefs.h. */
23183_ACEOF
23184cat confdefs.h >>conftest.$ac_ext
23185cat >>conftest.$ac_ext <<_ACEOF
23186/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023187#include <readline/readline.h>
23188_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023189if { (ac_try="$ac_cpp conftest.$ac_ext"
23190case "(($ac_try" in
23191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23192 *) ac_try_echo=$ac_try;;
23193esac
23194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23195 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023196 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023197 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023198 rm -f conftest.er1
23199 cat conftest.err >&5
23200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201 (exit $ac_status); } >/dev/null && {
23202 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23203 test ! -s conftest.err
23204 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023205 have_readline=yes
23206else
23207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023208sed 's/^/| /' conftest.$ac_ext >&5
23209
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023210 have_readline=no
23211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023212
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023213rm -f conftest.err conftest.$ac_ext
23214if test $have_readline = yes
23215then
23216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023217/* confdefs.h. */
23218_ACEOF
23219cat confdefs.h >>conftest.$ac_ext
23220cat >>conftest.$ac_ext <<_ACEOF
23221/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023222#include <readline/readline.h>
23223
23224_ACEOF
23225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023226 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023227
23228cat >>confdefs.h <<\_ACEOF
23229#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23230_ACEOF
23231
23232fi
23233rm -f conftest*
23234
23235fi
23236
Martin v. Löwis0daad592001-09-30 21:09:59 +000023237# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023238{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23239echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023240if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023242else
Martin v. Löwis11437992002-04-12 09:54:03 +000023243 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023244LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023246/* confdefs.h. */
23247_ACEOF
23248cat confdefs.h >>conftest.$ac_ext
23249cat >>conftest.$ac_ext <<_ACEOF
23250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023251
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252/* Override any GCC internal prototype to avoid an error.
23253 Use char because int might match the return type of a GCC
23254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023255#ifdef __cplusplus
23256extern "C"
23257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023258char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023259int
23260main ()
23261{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023262return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023263 ;
23264 return 0;
23265}
23266_ACEOF
23267rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268if { (ac_try="$ac_link"
23269case "(($ac_try" in
23270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23271 *) ac_try_echo=$ac_try;;
23272esac
23273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023276 grep -v '^ *+' conftest.er1 >conftest.err
23277 rm -f conftest.er1
23278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280 (exit $ac_status); } && {
23281 test -z "$ac_c_werror_flag" ||
23282 test ! -s conftest.err
23283 } && test -s conftest$ac_exeext &&
23284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023285 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023286else
Martin v. Löwis11437992002-04-12 09:54:03 +000023287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023288sed 's/^/| /' conftest.$ac_ext >&5
23289
Martin v. Löwiseba40652007-08-30 20:10:57 +000023290 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023292
23293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023295LIBS=$ac_check_lib_save_LIBS
23296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023297{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23298echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023299if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023300
Martin v. Löwis11437992002-04-12 09:54:03 +000023301cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023302#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023303_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023304
Martin v. Löwis0daad592001-09-30 21:09:59 +000023305fi
23306
Michael W. Hudson54241132001-12-07 15:38:26 +000023307
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023308# also in 4.0
23309{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23310echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23311if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23312 echo $ECHO_N "(cached) $ECHO_C" >&6
23313else
23314 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023315LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023316cat >conftest.$ac_ext <<_ACEOF
23317/* confdefs.h. */
23318_ACEOF
23319cat confdefs.h >>conftest.$ac_ext
23320cat >>conftest.$ac_ext <<_ACEOF
23321/* end confdefs.h. */
23322
23323/* Override any GCC internal prototype to avoid an error.
23324 Use char because int might match the return type of a GCC
23325 builtin and then its argument prototype would still apply. */
23326#ifdef __cplusplus
23327extern "C"
23328#endif
23329char rl_completion_display_matches_hook ();
23330int
23331main ()
23332{
23333return rl_completion_display_matches_hook ();
23334 ;
23335 return 0;
23336}
23337_ACEOF
23338rm -f conftest.$ac_objext conftest$ac_exeext
23339if { (ac_try="$ac_link"
23340case "(($ac_try" in
23341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23342 *) ac_try_echo=$ac_try;;
23343esac
23344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23345 (eval "$ac_link") 2>conftest.er1
23346 ac_status=$?
23347 grep -v '^ *+' conftest.er1 >conftest.err
23348 rm -f conftest.er1
23349 cat conftest.err >&5
23350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23351 (exit $ac_status); } && {
23352 test -z "$ac_c_werror_flag" ||
23353 test ! -s conftest.err
23354 } && test -s conftest$ac_exeext &&
23355 $as_test_x conftest$ac_exeext; then
23356 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23357else
23358 echo "$as_me: failed program was:" >&5
23359sed 's/^/| /' conftest.$ac_ext >&5
23360
23361 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23362fi
23363
23364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23365 conftest$ac_exeext conftest.$ac_ext
23366LIBS=$ac_check_lib_save_LIBS
23367fi
23368{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23369echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23370if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23371
23372cat >>confdefs.h <<\_ACEOF
23373#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23374_ACEOF
23375
23376fi
23377
23378
Martin v. Löwis0daad592001-09-30 21:09:59 +000023379# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023380{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23381echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023382if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23383 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023384else
Martin v. Löwis11437992002-04-12 09:54:03 +000023385 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023386LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023388/* confdefs.h. */
23389_ACEOF
23390cat confdefs.h >>conftest.$ac_ext
23391cat >>conftest.$ac_ext <<_ACEOF
23392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023393
Martin v. Löwiseba40652007-08-30 20:10:57 +000023394/* Override any GCC internal prototype to avoid an error.
23395 Use char because int might match the return type of a GCC
23396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023397#ifdef __cplusplus
23398extern "C"
23399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023400char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023401int
23402main ()
23403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023404return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023405 ;
23406 return 0;
23407}
23408_ACEOF
23409rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410if { (ac_try="$ac_link"
23411case "(($ac_try" in
23412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23413 *) ac_try_echo=$ac_try;;
23414esac
23415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023418 grep -v '^ *+' conftest.er1 >conftest.err
23419 rm -f conftest.er1
23420 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023422 (exit $ac_status); } && {
23423 test -z "$ac_c_werror_flag" ||
23424 test ! -s conftest.err
23425 } && test -s conftest$ac_exeext &&
23426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023427 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023428else
Martin v. Löwis11437992002-04-12 09:54:03 +000023429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023430sed 's/^/| /' conftest.$ac_ext >&5
23431
Martin v. Löwiseba40652007-08-30 20:10:57 +000023432 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434
23435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023437LIBS=$ac_check_lib_save_LIBS
23438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023439{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23440echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023441if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023442
Martin v. Löwis11437992002-04-12 09:54:03 +000023443cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023444#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023445_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023446
Guido van Rossum353ae582001-07-10 16:45:32 +000023447fi
23448
Jack Jansendd19cf82001-12-06 22:36:17 +000023449
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023450# also in readline 4.2
23451cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023452/* confdefs.h. */
23453_ACEOF
23454cat confdefs.h >>conftest.$ac_ext
23455cat >>conftest.$ac_ext <<_ACEOF
23456/* end confdefs.h. */
23457#include <readline/readline.h>
23458_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023459if { (ac_try="$ac_cpp conftest.$ac_ext"
23460case "(($ac_try" in
23461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23462 *) ac_try_echo=$ac_try;;
23463esac
23464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23465 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023466 ac_status=$?
23467 grep -v '^ *+' conftest.er1 >conftest.err
23468 rm -f conftest.er1
23469 cat conftest.err >&5
23470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023471 (exit $ac_status); } >/dev/null && {
23472 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23473 test ! -s conftest.err
23474 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023475 have_readline=yes
23476else
23477 echo "$as_me: failed program was:" >&5
23478sed 's/^/| /' conftest.$ac_ext >&5
23479
23480 have_readline=no
23481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023482
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023483rm -f conftest.err conftest.$ac_ext
23484if test $have_readline = yes
23485then
23486 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023487/* confdefs.h. */
23488_ACEOF
23489cat confdefs.h >>conftest.$ac_ext
23490cat >>conftest.$ac_ext <<_ACEOF
23491/* end confdefs.h. */
23492#include <readline/readline.h>
23493
23494_ACEOF
23495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23496 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23497
23498cat >>confdefs.h <<\_ACEOF
23499#define HAVE_RL_CATCH_SIGNAL 1
23500_ACEOF
23501
23502fi
23503rm -f conftest*
23504
23505fi
23506
Martin v. Löwis82bca632006-02-10 20:49:30 +000023507# End of readline checks: restore LIBS
23508LIBS=$LIBS_no_readline
23509
Martin v. Löwiseba40652007-08-30 20:10:57 +000023510{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23511echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023512if test "${ac_cv_broken_nice+set}" = set; then
23513 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023514else
Martin v. Löwis11437992002-04-12 09:54:03 +000023515
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023516if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023517 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023518else
Martin v. Löwis11437992002-04-12 09:54:03 +000023519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023520/* confdefs.h. */
23521_ACEOF
23522cat confdefs.h >>conftest.$ac_ext
23523cat >>conftest.$ac_ext <<_ACEOF
23524/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023525
23526int main()
23527{
23528 int val1 = nice(1);
23529 if (val1 != -1 && val1 == nice(2))
23530 exit(0);
23531 exit(1);
23532}
23533
Martin v. Löwis11437992002-04-12 09:54:03 +000023534_ACEOF
23535rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536if { (ac_try="$ac_link"
23537case "(($ac_try" in
23538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23539 *) ac_try_echo=$ac_try;;
23540esac
23541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23542 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023543 ac_status=$?
23544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023546 { (case "(($ac_try" in
23547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23548 *) ac_try_echo=$ac_try;;
23549esac
23550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23551 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023552 ac_status=$?
23553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23554 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023555 ac_cv_broken_nice=yes
23556else
Martin v. Löwis11437992002-04-12 09:54:03 +000023557 echo "$as_me: program exited with status $ac_status" >&5
23558echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023559sed 's/^/| /' conftest.$ac_ext >&5
23560
Martin v. Löwis11437992002-04-12 09:54:03 +000023561( exit $ac_status )
23562ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023564rm -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 +000023565fi
23566
Martin v. Löwiseba40652007-08-30 20:10:57 +000023567
23568fi
23569
23570{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23571echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023572if test "$ac_cv_broken_nice" = yes
23573then
Martin v. Löwis11437992002-04-12 09:54:03 +000023574
23575cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023576#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023577_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023578
23579fi
23580
Martin v. Löwiseba40652007-08-30 20:10:57 +000023581{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23582echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023583if test "$cross_compiling" = yes; then
23584 ac_cv_broken_poll=no
23585else
23586 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023587/* confdefs.h. */
23588_ACEOF
23589cat confdefs.h >>conftest.$ac_ext
23590cat >>conftest.$ac_ext <<_ACEOF
23591/* end confdefs.h. */
23592
23593#include <poll.h>
23594
23595int main (void)
23596 {
23597 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23598
23599 close (42);
23600
23601 int poll_test = poll (&poll_struct, 1, 0);
23602
23603 if (poll_test < 0)
23604 {
23605 exit(0);
23606 }
23607 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23608 {
23609 exit(0);
23610 }
23611 else
23612 {
23613 exit(1);
23614 }
23615 }
23616
23617_ACEOF
23618rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619if { (ac_try="$ac_link"
23620case "(($ac_try" in
23621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23622 *) ac_try_echo=$ac_try;;
23623esac
23624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23625 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023626 ac_status=$?
23627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023629 { (case "(($ac_try" in
23630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23631 *) ac_try_echo=$ac_try;;
23632esac
23633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23634 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023635 ac_status=$?
23636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23637 (exit $ac_status); }; }; then
23638 ac_cv_broken_poll=yes
23639else
23640 echo "$as_me: program exited with status $ac_status" >&5
23641echo "$as_me: failed program was:" >&5
23642sed 's/^/| /' conftest.$ac_ext >&5
23643
23644( exit $ac_status )
23645ac_cv_broken_poll=no
23646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023647rm -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 +000023648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023649
23650
23651{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23652echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023653if test "$ac_cv_broken_poll" = yes
23654then
23655
23656cat >>confdefs.h <<\_ACEOF
23657#define HAVE_BROKEN_POLL 1
23658_ACEOF
23659
23660fi
23661
Brett Cannon43802422005-02-10 20:48:03 +000023662# 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 +000023663# (which is not required by ISO C or UNIX spec) and/or if we support
23664# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023665{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23666echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023667if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23668 echo $ECHO_N "(cached) $ECHO_C" >&6
23669else
23670 cat >conftest.$ac_ext <<_ACEOF
23671/* confdefs.h. */
23672_ACEOF
23673cat confdefs.h >>conftest.$ac_ext
23674cat >>conftest.$ac_ext <<_ACEOF
23675/* end confdefs.h. */
23676#include <sys/types.h>
23677#include <$ac_cv_struct_tm>
23678
23679
23680int
23681main ()
23682{
23683static struct tm ac_aggr;
23684if (ac_aggr.tm_zone)
23685return 0;
23686 ;
23687 return 0;
23688}
23689_ACEOF
23690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691if { (ac_try="$ac_compile"
23692case "(($ac_try" in
23693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23694 *) ac_try_echo=$ac_try;;
23695esac
23696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23697 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023698 ac_status=$?
23699 grep -v '^ *+' conftest.er1 >conftest.err
23700 rm -f conftest.er1
23701 cat conftest.err >&5
23702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703 (exit $ac_status); } && {
23704 test -z "$ac_c_werror_flag" ||
23705 test ! -s conftest.err
23706 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023707 ac_cv_member_struct_tm_tm_zone=yes
23708else
23709 echo "$as_me: failed program was:" >&5
23710sed 's/^/| /' conftest.$ac_ext >&5
23711
Martin v. Löwiseba40652007-08-30 20:10:57 +000023712 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023713/* confdefs.h. */
23714_ACEOF
23715cat confdefs.h >>conftest.$ac_ext
23716cat >>conftest.$ac_ext <<_ACEOF
23717/* end confdefs.h. */
23718#include <sys/types.h>
23719#include <$ac_cv_struct_tm>
23720
23721
23722int
23723main ()
23724{
23725static struct tm ac_aggr;
23726if (sizeof ac_aggr.tm_zone)
23727return 0;
23728 ;
23729 return 0;
23730}
23731_ACEOF
23732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023733if { (ac_try="$ac_compile"
23734case "(($ac_try" in
23735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23736 *) ac_try_echo=$ac_try;;
23737esac
23738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23739 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023740 ac_status=$?
23741 grep -v '^ *+' conftest.er1 >conftest.err
23742 rm -f conftest.er1
23743 cat conftest.err >&5
23744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023745 (exit $ac_status); } && {
23746 test -z "$ac_c_werror_flag" ||
23747 test ! -s conftest.err
23748 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023749 ac_cv_member_struct_tm_tm_zone=yes
23750else
23751 echo "$as_me: failed program was:" >&5
23752sed 's/^/| /' conftest.$ac_ext >&5
23753
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023756
23757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023759
23760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023762{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23763echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023764if test $ac_cv_member_struct_tm_tm_zone = yes; then
23765
23766cat >>confdefs.h <<_ACEOF
23767#define HAVE_STRUCT_TM_TM_ZONE 1
23768_ACEOF
23769
23770
23771fi
23772
23773if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23774
23775cat >>confdefs.h <<\_ACEOF
23776#define HAVE_TM_ZONE 1
23777_ACEOF
23778
23779else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023780 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23781echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23782if test "${ac_cv_have_decl_tzname+set}" = set; then
23783 echo $ECHO_N "(cached) $ECHO_C" >&6
23784else
23785 cat >conftest.$ac_ext <<_ACEOF
23786/* confdefs.h. */
23787_ACEOF
23788cat confdefs.h >>conftest.$ac_ext
23789cat >>conftest.$ac_ext <<_ACEOF
23790/* end confdefs.h. */
23791#include <time.h>
23792
23793int
23794main ()
23795{
23796#ifndef tzname
23797 (void) tzname;
23798#endif
23799
23800 ;
23801 return 0;
23802}
23803_ACEOF
23804rm -f conftest.$ac_objext
23805if { (ac_try="$ac_compile"
23806case "(($ac_try" in
23807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23808 *) ac_try_echo=$ac_try;;
23809esac
23810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23811 (eval "$ac_compile") 2>conftest.er1
23812 ac_status=$?
23813 grep -v '^ *+' conftest.er1 >conftest.err
23814 rm -f conftest.er1
23815 cat conftest.err >&5
23816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23817 (exit $ac_status); } && {
23818 test -z "$ac_c_werror_flag" ||
23819 test ! -s conftest.err
23820 } && test -s conftest.$ac_objext; then
23821 ac_cv_have_decl_tzname=yes
23822else
23823 echo "$as_me: failed program was:" >&5
23824sed 's/^/| /' conftest.$ac_ext >&5
23825
23826 ac_cv_have_decl_tzname=no
23827fi
23828
23829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23830fi
23831{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23832echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23833if test $ac_cv_have_decl_tzname = yes; then
23834
23835cat >>confdefs.h <<_ACEOF
23836#define HAVE_DECL_TZNAME 1
23837_ACEOF
23838
23839
23840else
23841 cat >>confdefs.h <<_ACEOF
23842#define HAVE_DECL_TZNAME 0
23843_ACEOF
23844
23845
23846fi
23847
23848
23849 { echo "$as_me:$LINENO: checking for tzname" >&5
23850echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023851if test "${ac_cv_var_tzname+set}" = set; then
23852 echo $ECHO_N "(cached) $ECHO_C" >&6
23853else
23854 cat >conftest.$ac_ext <<_ACEOF
23855/* confdefs.h. */
23856_ACEOF
23857cat confdefs.h >>conftest.$ac_ext
23858cat >>conftest.$ac_ext <<_ACEOF
23859/* end confdefs.h. */
23860#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023861#if !HAVE_DECL_TZNAME
23862extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023863#endif
23864
23865int
23866main ()
23867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023868return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023869 ;
23870 return 0;
23871}
23872_ACEOF
23873rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023874if { (ac_try="$ac_link"
23875case "(($ac_try" in
23876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23877 *) ac_try_echo=$ac_try;;
23878esac
23879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23880 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023881 ac_status=$?
23882 grep -v '^ *+' conftest.er1 >conftest.err
23883 rm -f conftest.er1
23884 cat conftest.err >&5
23885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886 (exit $ac_status); } && {
23887 test -z "$ac_c_werror_flag" ||
23888 test ! -s conftest.err
23889 } && test -s conftest$ac_exeext &&
23890 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023891 ac_cv_var_tzname=yes
23892else
23893 echo "$as_me: failed program was:" >&5
23894sed 's/^/| /' conftest.$ac_ext >&5
23895
Martin v. Löwiseba40652007-08-30 20:10:57 +000023896 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023898
23899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023900 conftest$ac_exeext conftest.$ac_ext
23901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023902{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23903echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023904 if test $ac_cv_var_tzname = yes; then
23905
23906cat >>confdefs.h <<\_ACEOF
23907#define HAVE_TZNAME 1
23908_ACEOF
23909
23910 fi
23911fi
23912
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023913
Martin v. Löwis1d459062005-03-14 21:23:33 +000023914# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023915{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23916echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023917if test "${ac_cv_working_tzset+set}" = set; then
23918 echo $ECHO_N "(cached) $ECHO_C" >&6
23919else
23920
23921if test "$cross_compiling" = yes; then
23922 ac_cv_working_tzset=no
23923else
23924 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023925/* confdefs.h. */
23926_ACEOF
23927cat confdefs.h >>conftest.$ac_ext
23928cat >>conftest.$ac_ext <<_ACEOF
23929/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023930
23931#include <stdlib.h>
23932#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023933#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023934
23935#if HAVE_TZNAME
23936extern char *tzname[];
23937#endif
23938
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023939int main()
23940{
Brett Cannon18367812003-09-19 00:59:16 +000023941 /* Note that we need to ensure that not only does tzset(3)
23942 do 'something' with localtime, but it works as documented
23943 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023944 This includes making sure that tzname is set properly if
23945 tm->tm_zone does not exist since it is the alternative way
23946 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023947
23948 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023949 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023950 */
23951
Martin v. Löwis1d459062005-03-14 21:23:33 +000023952 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023953 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23954
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023955 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023956 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023957 if (localtime(&groundhogday)->tm_hour != 0)
23958 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023959#if HAVE_TZNAME
23960 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23961 if (strcmp(tzname[0], "UTC") ||
23962 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23963 exit(1);
23964#endif
Brett Cannon18367812003-09-19 00:59:16 +000023965
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023966 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023967 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023968 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023969 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023970#if HAVE_TZNAME
23971 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23972 exit(1);
23973#endif
Brett Cannon18367812003-09-19 00:59:16 +000023974
23975 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23976 tzset();
23977 if (localtime(&groundhogday)->tm_hour != 11)
23978 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023979#if HAVE_TZNAME
23980 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23981 exit(1);
23982#endif
23983
23984#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023985 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23986 exit(1);
23987 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23988 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023989#endif
Brett Cannon18367812003-09-19 00:59:16 +000023990
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023991 exit(0);
23992}
23993
23994_ACEOF
23995rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023996if { (ac_try="$ac_link"
23997case "(($ac_try" in
23998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23999 *) ac_try_echo=$ac_try;;
24000esac
24001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24002 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024003 ac_status=$?
24004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024006 { (case "(($ac_try" in
24007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24008 *) ac_try_echo=$ac_try;;
24009esac
24010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24011 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024012 ac_status=$?
24013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24014 (exit $ac_status); }; }; then
24015 ac_cv_working_tzset=yes
24016else
24017 echo "$as_me: program exited with status $ac_status" >&5
24018echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024019sed 's/^/| /' conftest.$ac_ext >&5
24020
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024021( exit $ac_status )
24022ac_cv_working_tzset=no
24023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024024rm -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 +000024025fi
24026
Martin v. Löwiseba40652007-08-30 20:10:57 +000024027
24028fi
24029
24030{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24031echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024032if test "$ac_cv_working_tzset" = yes
24033then
24034
24035cat >>confdefs.h <<\_ACEOF
24036#define HAVE_WORKING_TZSET 1
24037_ACEOF
24038
24039fi
24040
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024041# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024042{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24043echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024044if test "${ac_cv_stat_tv_nsec+set}" = set; then
24045 echo $ECHO_N "(cached) $ECHO_C" >&6
24046else
24047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024048/* confdefs.h. */
24049_ACEOF
24050cat confdefs.h >>conftest.$ac_ext
24051cat >>conftest.$ac_ext <<_ACEOF
24052/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024053#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024054int
24055main ()
24056{
24057
24058struct stat st;
24059st.st_mtim.tv_nsec = 1;
24060
24061 ;
24062 return 0;
24063}
24064_ACEOF
24065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066if { (ac_try="$ac_compile"
24067case "(($ac_try" in
24068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24069 *) ac_try_echo=$ac_try;;
24070esac
24071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024074 grep -v '^ *+' conftest.er1 >conftest.err
24075 rm -f conftest.er1
24076 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024078 (exit $ac_status); } && {
24079 test -z "$ac_c_werror_flag" ||
24080 test ! -s conftest.err
24081 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024082 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024083else
24084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024085sed 's/^/| /' conftest.$ac_ext >&5
24086
Martin v. Löwiseba40652007-08-30 20:10:57 +000024087 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024088fi
24089
Martin v. Löwiseba40652007-08-30 20:10:57 +000024090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24091fi
24092
24093{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24094echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024095if test "$ac_cv_stat_tv_nsec" = yes
24096then
24097
24098cat >>confdefs.h <<\_ACEOF
24099#define HAVE_STAT_TV_NSEC 1
24100_ACEOF
24101
24102fi
24103
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024104# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024105{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24106echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024107if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24108 echo $ECHO_N "(cached) $ECHO_C" >&6
24109else
24110 cat >conftest.$ac_ext <<_ACEOF
24111/* confdefs.h. */
24112_ACEOF
24113cat confdefs.h >>conftest.$ac_ext
24114cat >>conftest.$ac_ext <<_ACEOF
24115/* end confdefs.h. */
24116#include <sys/stat.h>
24117int
24118main ()
24119{
24120
24121struct stat st;
24122st.st_mtimespec.tv_nsec = 1;
24123
24124 ;
24125 return 0;
24126}
24127_ACEOF
24128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024129if { (ac_try="$ac_compile"
24130case "(($ac_try" in
24131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24132 *) ac_try_echo=$ac_try;;
24133esac
24134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024136 ac_status=$?
24137 grep -v '^ *+' conftest.er1 >conftest.err
24138 rm -f conftest.er1
24139 cat conftest.err >&5
24140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024141 (exit $ac_status); } && {
24142 test -z "$ac_c_werror_flag" ||
24143 test ! -s conftest.err
24144 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024145 ac_cv_stat_tv_nsec2=yes
24146else
24147 echo "$as_me: failed program was:" >&5
24148sed 's/^/| /' conftest.$ac_ext >&5
24149
Martin v. Löwiseba40652007-08-30 20:10:57 +000024150 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024151fi
24152
Martin v. Löwiseba40652007-08-30 20:10:57 +000024153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24154fi
24155
24156{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24157echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024158if test "$ac_cv_stat_tv_nsec2" = yes
24159then
24160
24161cat >>confdefs.h <<\_ACEOF
24162#define HAVE_STAT_TV_NSEC2 1
24163_ACEOF
24164
24165fi
24166
Jack Jansen666b1e72001-10-31 12:11:48 +000024167# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024168{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24169echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024170if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24171 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024172else
Martin v. Löwis11437992002-04-12 09:54:03 +000024173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024174/* confdefs.h. */
24175_ACEOF
24176cat confdefs.h >>conftest.$ac_ext
24177cat >>conftest.$ac_ext <<_ACEOF
24178/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024179#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024180int
24181main ()
24182{
Jack Jansen666b1e72001-10-31 12:11:48 +000024183
24184 int rtn;
24185 rtn = mvwdelch(0,0,0);
24186
Martin v. Löwis11437992002-04-12 09:54:03 +000024187 ;
24188 return 0;
24189}
24190_ACEOF
24191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024192if { (ac_try="$ac_compile"
24193case "(($ac_try" in
24194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24195 *) ac_try_echo=$ac_try;;
24196esac
24197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024200 grep -v '^ *+' conftest.er1 >conftest.err
24201 rm -f conftest.er1
24202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024204 (exit $ac_status); } && {
24205 test -z "$ac_c_werror_flag" ||
24206 test ! -s conftest.err
24207 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024208 ac_cv_mvwdelch_is_expression=yes
24209else
Martin v. Löwis11437992002-04-12 09:54:03 +000024210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024211sed 's/^/| /' conftest.$ac_ext >&5
24212
Martin v. Löwiseba40652007-08-30 20:10:57 +000024213 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024214fi
24215
Martin v. Löwiseba40652007-08-30 20:10:57 +000024216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24217fi
24218
24219{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24220echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024221
24222if test "$ac_cv_mvwdelch_is_expression" = yes
24223then
Martin v. Löwis11437992002-04-12 09:54:03 +000024224
24225cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024226#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024227_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024228
24229fi
24230
Martin v. Löwiseba40652007-08-30 20:10:57 +000024231{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24232echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024233if test "${ac_cv_window_has_flags+set}" = set; then
24234 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024235else
Martin v. Löwis11437992002-04-12 09:54:03 +000024236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024237/* confdefs.h. */
24238_ACEOF
24239cat confdefs.h >>conftest.$ac_ext
24240cat >>conftest.$ac_ext <<_ACEOF
24241/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024242#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024243int
24244main ()
24245{
Jack Jansen666b1e72001-10-31 12:11:48 +000024246
24247 WINDOW *w;
24248 w->_flags = 0;
24249
Martin v. Löwis11437992002-04-12 09:54:03 +000024250 ;
24251 return 0;
24252}
24253_ACEOF
24254rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024255if { (ac_try="$ac_compile"
24256case "(($ac_try" in
24257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24258 *) ac_try_echo=$ac_try;;
24259esac
24260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024263 grep -v '^ *+' conftest.er1 >conftest.err
24264 rm -f conftest.er1
24265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024267 (exit $ac_status); } && {
24268 test -z "$ac_c_werror_flag" ||
24269 test ! -s conftest.err
24270 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024271 ac_cv_window_has_flags=yes
24272else
Martin v. Löwis11437992002-04-12 09:54:03 +000024273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024274sed 's/^/| /' conftest.$ac_ext >&5
24275
Martin v. Löwiseba40652007-08-30 20:10:57 +000024276 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024277fi
24278
Martin v. Löwiseba40652007-08-30 20:10:57 +000024279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24280fi
24281
24282{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24283echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024284
Jack Jansen666b1e72001-10-31 12:11:48 +000024285
24286if test "$ac_cv_window_has_flags" = yes
24287then
Martin v. Löwis11437992002-04-12 09:54:03 +000024288
24289cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024290#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024291_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024292
24293fi
24294
Martin v. Löwiseba40652007-08-30 20:10:57 +000024295{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24296echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024297cat >conftest.$ac_ext <<_ACEOF
24298/* confdefs.h. */
24299_ACEOF
24300cat confdefs.h >>conftest.$ac_ext
24301cat >>conftest.$ac_ext <<_ACEOF
24302/* end confdefs.h. */
24303#include <curses.h>
24304int
24305main ()
24306{
24307void *x=is_term_resized
24308 ;
24309 return 0;
24310}
24311_ACEOF
24312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024313if { (ac_try="$ac_compile"
24314case "(($ac_try" in
24315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24316 *) ac_try_echo=$ac_try;;
24317esac
24318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24319 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024320 ac_status=$?
24321 grep -v '^ *+' conftest.er1 >conftest.err
24322 rm -f conftest.er1
24323 cat conftest.err >&5
24324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024325 (exit $ac_status); } && {
24326 test -z "$ac_c_werror_flag" ||
24327 test ! -s conftest.err
24328 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024329
24330cat >>confdefs.h <<\_ACEOF
24331#define HAVE_CURSES_IS_TERM_RESIZED 1
24332_ACEOF
24333
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334 { echo "$as_me:$LINENO: result: yes" >&5
24335echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024336else
24337 echo "$as_me: failed program was:" >&5
24338sed 's/^/| /' conftest.$ac_ext >&5
24339
Martin v. Löwiseba40652007-08-30 20:10:57 +000024340 { echo "$as_me:$LINENO: result: no" >&5
24341echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024342
24343fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024344
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24346
24347{ echo "$as_me:$LINENO: checking for resize_term" >&5
24348echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024349cat >conftest.$ac_ext <<_ACEOF
24350/* confdefs.h. */
24351_ACEOF
24352cat confdefs.h >>conftest.$ac_ext
24353cat >>conftest.$ac_ext <<_ACEOF
24354/* end confdefs.h. */
24355#include <curses.h>
24356int
24357main ()
24358{
24359void *x=resize_term
24360 ;
24361 return 0;
24362}
24363_ACEOF
24364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024365if { (ac_try="$ac_compile"
24366case "(($ac_try" in
24367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24368 *) ac_try_echo=$ac_try;;
24369esac
24370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24371 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024372 ac_status=$?
24373 grep -v '^ *+' conftest.er1 >conftest.err
24374 rm -f conftest.er1
24375 cat conftest.err >&5
24376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024377 (exit $ac_status); } && {
24378 test -z "$ac_c_werror_flag" ||
24379 test ! -s conftest.err
24380 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024381
24382cat >>confdefs.h <<\_ACEOF
24383#define HAVE_CURSES_RESIZE_TERM 1
24384_ACEOF
24385
Martin v. Löwiseba40652007-08-30 20:10:57 +000024386 { echo "$as_me:$LINENO: result: yes" >&5
24387echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024388else
24389 echo "$as_me: failed program was:" >&5
24390sed 's/^/| /' conftest.$ac_ext >&5
24391
Martin v. Löwiseba40652007-08-30 20:10:57 +000024392 { echo "$as_me:$LINENO: result: no" >&5
24393echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024394
24395fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024396
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24398
24399{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24400echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024401cat >conftest.$ac_ext <<_ACEOF
24402/* confdefs.h. */
24403_ACEOF
24404cat confdefs.h >>conftest.$ac_ext
24405cat >>conftest.$ac_ext <<_ACEOF
24406/* end confdefs.h. */
24407#include <curses.h>
24408int
24409main ()
24410{
24411void *x=resizeterm
24412 ;
24413 return 0;
24414}
24415_ACEOF
24416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417if { (ac_try="$ac_compile"
24418case "(($ac_try" in
24419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24420 *) ac_try_echo=$ac_try;;
24421esac
24422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24423 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024424 ac_status=$?
24425 grep -v '^ *+' conftest.er1 >conftest.err
24426 rm -f conftest.er1
24427 cat conftest.err >&5
24428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024429 (exit $ac_status); } && {
24430 test -z "$ac_c_werror_flag" ||
24431 test ! -s conftest.err
24432 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024433
24434cat >>confdefs.h <<\_ACEOF
24435#define HAVE_CURSES_RESIZETERM 1
24436_ACEOF
24437
Martin v. Löwiseba40652007-08-30 20:10:57 +000024438 { echo "$as_me:$LINENO: result: yes" >&5
24439echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024440else
24441 echo "$as_me: failed program was:" >&5
24442sed 's/^/| /' conftest.$ac_ext >&5
24443
Martin v. Löwiseba40652007-08-30 20:10:57 +000024444 { echo "$as_me:$LINENO: result: no" >&5
24445echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024446
24447fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024448
Martin v. Löwiseba40652007-08-30 20:10:57 +000024449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24450
24451{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24452echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024453
24454if test -r /dev/ptmx
24455then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024456 { echo "$as_me:$LINENO: result: yes" >&5
24457echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024458
24459cat >>confdefs.h <<\_ACEOF
24460#define HAVE_DEV_PTMX 1
24461_ACEOF
24462
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024463else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024464 { echo "$as_me:$LINENO: result: no" >&5
24465echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024466fi
24467
Martin v. Löwiseba40652007-08-30 20:10:57 +000024468{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24469echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024470
24471if test -r /dev/ptc
24472then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024473 { echo "$as_me:$LINENO: result: yes" >&5
24474echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024475
24476cat >>confdefs.h <<\_ACEOF
24477#define HAVE_DEV_PTC 1
24478_ACEOF
24479
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024480else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024481 { echo "$as_me:$LINENO: result: no" >&5
24482echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024483fi
24484
Martin v. Löwiseba40652007-08-30 20:10:57 +000024485{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24486echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024487if test "$cross_compiling" = yes; then
24488 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24489See \`config.log' for more details." >&5
24490echo "$as_me: error: cannot run test program while cross compiling
24491See \`config.log' for more details." >&2;}
24492 { (exit 1); exit 1; }; }
24493else
24494 cat >conftest.$ac_ext <<_ACEOF
24495/* confdefs.h. */
24496_ACEOF
24497cat confdefs.h >>conftest.$ac_ext
24498cat >>conftest.$ac_ext <<_ACEOF
24499/* end confdefs.h. */
24500#include <stdio.h>
24501#include <stddef.h>
24502#include <string.h>
24503
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024504#ifdef HAVE_SYS_TYPES_H
24505#include <sys/types.h>
24506#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024507
24508#ifdef HAVE_SSIZE_T
24509typedef ssize_t Py_ssize_t;
24510#elif SIZEOF_VOID_P == SIZEOF_LONG
24511typedef long Py_ssize_t;
24512#else
24513typedef int Py_ssize_t;
24514#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024515
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024516int main()
24517{
24518 char buffer[256];
24519
Brett Cannon09d12362006-05-11 05:11:33 +000024520 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24521 return 1;
24522
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024523 if (strcmp(buffer, "123"))
24524 return 1;
24525
24526 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24527 return 1;
24528
24529 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024530 return 1;
24531
24532 return 0;
24533}
24534_ACEOF
24535rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024536if { (ac_try="$ac_link"
24537case "(($ac_try" in
24538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24539 *) ac_try_echo=$ac_try;;
24540esac
24541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24542 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024543 ac_status=$?
24544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024546 { (case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
24550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24551 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024552 ac_status=$?
24553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24554 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024555 { echo "$as_me:$LINENO: result: yes" >&5
24556echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024557
24558cat >>confdefs.h <<\_ACEOF
24559#define PY_FORMAT_SIZE_T "z"
24560_ACEOF
24561
24562else
24563 echo "$as_me: program exited with status $ac_status" >&5
24564echo "$as_me: failed program was:" >&5
24565sed 's/^/| /' conftest.$ac_ext >&5
24566
24567( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568{ echo "$as_me:$LINENO: result: no" >&5
24569echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024571rm -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 +000024572fi
24573
Martin v. Löwiseba40652007-08-30 20:10:57 +000024574
24575
24576{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24577echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024578if test "${ac_cv_type_socklen_t+set}" = set; then
24579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024580else
Martin v. Löwis11437992002-04-12 09:54:03 +000024581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024582/* confdefs.h. */
24583_ACEOF
24584cat confdefs.h >>conftest.$ac_ext
24585cat >>conftest.$ac_ext <<_ACEOF
24586/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024587
24588#ifdef HAVE_SYS_TYPES_H
24589#include <sys/types.h>
24590#endif
24591#ifdef HAVE_SYS_SOCKET_H
24592#include <sys/socket.h>
24593#endif
24594
24595
Martin v. Löwiseba40652007-08-30 20:10:57 +000024596typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024597int
24598main ()
24599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024600if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024601 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024602if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024603 return 0;
24604 ;
24605 return 0;
24606}
24607_ACEOF
24608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024609if { (ac_try="$ac_compile"
24610case "(($ac_try" in
24611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24612 *) ac_try_echo=$ac_try;;
24613esac
24614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024617 grep -v '^ *+' conftest.er1 >conftest.err
24618 rm -f conftest.er1
24619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024621 (exit $ac_status); } && {
24622 test -z "$ac_c_werror_flag" ||
24623 test ! -s conftest.err
24624 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024625 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024626else
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024628sed 's/^/| /' conftest.$ac_ext >&5
24629
Martin v. Löwiseba40652007-08-30 20:10:57 +000024630 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024632
24633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024635{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24636echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024637if test $ac_cv_type_socklen_t = yes; then
24638 :
24639else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024640
Martin v. Löwis01c04012002-11-11 14:58:44 +000024641cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024642#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024643_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024644
24645fi
24646
Michael W. Hudson54241132001-12-07 15:38:26 +000024647
Michael W. Hudson54241132001-12-07 15:38:26 +000024648
24649
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024650for h in `(cd $srcdir;echo Python/thread_*.h)`
24651do
24652 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24653done
24654
Michael W. Hudson54241132001-12-07 15:38:26 +000024655
Neal Norwitzd24499d2005-12-18 21:36:39 +000024656SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024657{ echo "$as_me:$LINENO: checking for build directories" >&5
24658echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024659for dir in $SRCDIRS; do
24660 if test ! -d $dir; then
24661 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024662 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024663done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024664{ echo "$as_me:$LINENO: result: done" >&5
24665echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024666
Guido van Rossum627b2d71993-12-24 10:39:16 +000024667# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024668ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024669
Martin v. Löwis11437992002-04-12 09:54:03 +000024670cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024671# This file is a shell script that caches the results of configure
24672# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024673# scripts and configure runs, see configure's option --config-cache.
24674# It is not useful on other systems. If it contains results you don't
24675# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024676#
Martin v. Löwis11437992002-04-12 09:54:03 +000024677# config.status only pays attention to the cache file if you give it
24678# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024679#
Skip Montanaro6dead952003-09-25 14:50:04 +000024680# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024681# loading this file, other *unset* `ac_cv_foo' will be assigned the
24682# following values.
24683
24684_ACEOF
24685
Guido van Rossumf78abae1997-01-21 22:02:36 +000024686# The following way of writing the cache mishandles newlines in values,
24687# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024688# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024689# Ultrix sh set writes to stderr and can't be redirected directly,
24690# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024691(
24692 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24693 eval ac_val=\$$ac_var
24694 case $ac_val in #(
24695 *${as_nl}*)
24696 case $ac_var in #(
24697 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24698echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24699 esac
24700 case $ac_var in #(
24701 _ | IFS | as_nl) ;; #(
24702 *) $as_unset $ac_var ;;
24703 esac ;;
24704 esac
24705 done
24706
Martin v. Löwis11437992002-04-12 09:54:03 +000024707 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24709 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024710 # `set' does not quote correctly, so add quotes (double-quote
24711 # substitution turns \\\\ into \\, and sed turns \\ into \).
24712 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024713 "s/'/'\\\\''/g;
24714 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024715 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024716 *)
24717 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024718 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024719 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024720 esac |
24721 sort
24722) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024723 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024725 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024726 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024727 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24728 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024729 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24730 :end' >>confcache
24731if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24732 if test -w "$cache_file"; then
24733 test "x$cache_file" != "x/dev/null" &&
24734 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24735echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024736 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024737 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024738 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24739echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024740 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024741fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024742rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024744test "x$prefix" = xNONE && prefix=$ac_default_prefix
24745# Let make expand exec_prefix.
24746test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024748DEFS=-DHAVE_CONFIG_H
24749
Skip Montanaro6dead952003-09-25 14:50:04 +000024750ac_libobjs=
24751ac_ltlibobjs=
24752for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24753 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024754 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24755 ac_i=`echo "$ac_i" | sed "$ac_script"`
24756 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24757 # will be set to the directory where LIBOBJS objects are built.
24758 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24759 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024760done
24761LIBOBJS=$ac_libobjs
24762
24763LTLIBOBJS=$ac_ltlibobjs
24764
24765
Martin v. Löwis11437992002-04-12 09:54:03 +000024766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024767: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024768ac_clean_files_save=$ac_clean_files
24769ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24770{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24771echo "$as_me: creating $CONFIG_STATUS" >&6;}
24772cat >$CONFIG_STATUS <<_ACEOF
24773#! $SHELL
24774# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024775# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024776# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024777# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024778
Martin v. Löwis11437992002-04-12 09:54:03 +000024779debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024780ac_cs_recheck=false
24781ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024782SHELL=\${CONFIG_SHELL-$SHELL}
24783_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024784
Martin v. Löwis11437992002-04-12 09:54:03 +000024785cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024786## --------------------- ##
24787## M4sh Initialization. ##
24788## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024789
Martin v. Löwiseba40652007-08-30 20:10:57 +000024790# Be more Bourne compatible
24791DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024792if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24793 emulate sh
24794 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024795 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24796 # is contrary to our usage. Disable this feature.
24797 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024798 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024799else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024800 case `(set -o) 2>/dev/null` in
24801 *posix*) set -o posix ;;
24802esac
24803
Martin v. Löwis11437992002-04-12 09:54:03 +000024804fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024805
Skip Montanaro6dead952003-09-25 14:50:04 +000024806
Martin v. Löwis11437992002-04-12 09:54:03 +000024807
24808
Martin v. Löwiseba40652007-08-30 20:10:57 +000024809# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024810# Avoid depending upon Character Ranges.
24811as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24812as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24813as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24814as_cr_digits='0123456789'
24815as_cr_alnum=$as_cr_Letters$as_cr_digits
24816
24817# The user is always right.
24818if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024819 echo "#! /bin/sh" >conf$$.sh
24820 echo "exit 0" >>conf$$.sh
24821 chmod +x conf$$.sh
24822 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024823 PATH_SEPARATOR=';'
24824 else
24825 PATH_SEPARATOR=:
24826 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024827 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024828fi
24829
Martin v. Löwiseba40652007-08-30 20:10:57 +000024830# Support unset when possible.
24831if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24832 as_unset=unset
24833else
24834 as_unset=false
24835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024836
Martin v. Löwiseba40652007-08-30 20:10:57 +000024837
24838# IFS
24839# We need space, tab and new line, in precisely that order. Quoting is
24840# there to prevent editors from complaining about space-tab.
24841# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24842# splitting by setting IFS to empty value.)
24843as_nl='
24844'
24845IFS=" "" $as_nl"
24846
24847# Find who we are. Look in the path if we contain no directory separator.
24848case $0 in
24849 *[\\/]* ) as_myself=$0 ;;
24850 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024851for as_dir in $PATH
24852do
24853 IFS=$as_save_IFS
24854 test -z "$as_dir" && as_dir=.
24855 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24856done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024858
Martin v. Löwiseba40652007-08-30 20:10:57 +000024859 ;;
24860esac
24861# We did not find ourselves, most probably we were run as `sh COMMAND'
24862# in which case we are not to be found in the path.
24863if test "x$as_myself" = x; then
24864 as_myself=$0
24865fi
24866if test ! -f "$as_myself"; then
24867 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24868 { (exit 1); exit 1; }
24869fi
24870
24871# Work around bugs in pre-3.0 UWIN ksh.
24872for as_var in ENV MAIL MAILPATH
24873do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24874done
24875PS1='$ '
24876PS2='> '
24877PS4='+ '
24878
24879# NLS nuisances.
24880for as_var in \
24881 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24882 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24883 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024884do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024885 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24886 eval $as_var=C; export $as_var
24887 else
24888 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24889 fi
24890done
24891
24892# Required to use basename.
24893if expr a : '\(a\)' >/dev/null 2>&1 &&
24894 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24895 as_expr=expr
24896else
24897 as_expr=false
24898fi
24899
24900if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24901 as_basename=basename
24902else
24903 as_basename=false
24904fi
24905
24906
24907# Name of the executable.
24908as_me=`$as_basename -- "$0" ||
24909$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24910 X"$0" : 'X\(//\)$' \| \
24911 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24912echo X/"$0" |
24913 sed '/^.*\/\([^/][^/]*\)\/*$/{
24914 s//\1/
24915 q
24916 }
24917 /^X\/\(\/\/\)$/{
24918 s//\1/
24919 q
24920 }
24921 /^X\/\(\/\).*/{
24922 s//\1/
24923 q
24924 }
24925 s/.*/./; q'`
24926
24927# CDPATH.
24928$as_unset CDPATH
24929
24930
24931
Martin v. Löwis11437992002-04-12 09:54:03 +000024932 as_lineno_1=$LINENO
24933 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024934 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024936
Martin v. Löwis11437992002-04-12 09:54:03 +000024937 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24938 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024939 # line-number line after each line using $LINENO; the second 'sed'
24940 # does the real work. The second script uses 'N' to pair each
24941 # line-number line with the line containing $LINENO, and appends
24942 # trailing '-' during substitution so that $LINENO is not a special
24943 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024944 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024945 # scripts with optimization help from Paolo Bonzini. Blame Lee
24946 # E. McMahon (1931-1989) for sed's syntax. :-)
24947 sed -n '
24948 p
24949 /[$]LINENO/=
24950 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024951 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024952 s/[$]LINENO.*/&-/
24953 t lineno
24954 b
24955 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024956 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024957 :loop
24958 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024959 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024960 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024961 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024962 chmod +x "$as_me.lineno" ||
24963 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024964 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024965
Martin v. Löwis11437992002-04-12 09:54:03 +000024966 # Don't try to exec as it changes $[0], causing all sort of problems
24967 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024968 # original and so on. Autoconf is especially sensitive to this).
24969 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024970 # Exit status is that of the last command.
24971 exit
24972}
24973
24974
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24976 as_dirname=dirname
24977else
24978 as_dirname=false
24979fi
24980
24981ECHO_C= ECHO_N= ECHO_T=
24982case `echo -n x` in
24983-n*)
24984 case `echo 'x\c'` in
24985 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24986 *) ECHO_C='\c';;
24987 esac;;
24988*)
24989 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024990esac
24991
Martin v. Löwiseba40652007-08-30 20:10:57 +000024992if expr a : '\(a\)' >/dev/null 2>&1 &&
24993 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024994 as_expr=expr
24995else
24996 as_expr=false
24997fi
24998
24999rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000if test -d conf$$.dir; then
25001 rm -f conf$$.dir/conf$$.file
25002else
25003 rm -f conf$$.dir
25004 mkdir conf$$.dir
25005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025006echo >conf$$.file
25007if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008 as_ln_s='ln -s'
25009 # ... but there are two gotchas:
25010 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25011 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25012 # In both cases, we have to default to `cp -p'.
25013 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025014 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025015elif ln conf$$.file conf$$ 2>/dev/null; then
25016 as_ln_s=ln
25017else
25018 as_ln_s='cp -p'
25019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25021rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025022
Skip Montanaro6dead952003-09-25 14:50:04 +000025023if mkdir -p . 2>/dev/null; then
25024 as_mkdir_p=:
25025else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025026 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025027 as_mkdir_p=false
25028fi
25029
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030if test -x / >/dev/null 2>&1; then
25031 as_test_x='test -x'
25032else
25033 if ls -dL / >/dev/null 2>&1; then
25034 as_ls_L_option=L
25035 else
25036 as_ls_L_option=
25037 fi
25038 as_test_x='
25039 eval sh -c '\''
25040 if test -d "$1"; then
25041 test -d "$1/.";
25042 else
25043 case $1 in
25044 -*)set "./$1";;
25045 esac;
25046 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25047 ???[sx]*):;;*)false;;esac;fi
25048 '\'' sh
25049 '
25050fi
25051as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025052
25053# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025054as_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 +000025055
25056# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025057as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025058
25059
Martin v. Löwis11437992002-04-12 09:54:03 +000025060exec 6>&1
25061
Martin v. Löwiseba40652007-08-30 20:10:57 +000025062# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025063# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025064# values after options handling.
25065ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025066This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025067generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025068
25069 CONFIG_FILES = $CONFIG_FILES
25070 CONFIG_HEADERS = $CONFIG_HEADERS
25071 CONFIG_LINKS = $CONFIG_LINKS
25072 CONFIG_COMMANDS = $CONFIG_COMMANDS
25073 $ $0 $@
25074
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075on `(hostname || uname -n) 2>/dev/null | sed 1q`
25076"
25077
Martin v. Löwis11437992002-04-12 09:54:03 +000025078_ACEOF
25079
Martin v. Löwiseba40652007-08-30 20:10:57 +000025080cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025081# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025082config_files="$ac_config_files"
25083config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025084
Martin v. Löwiseba40652007-08-30 20:10:57 +000025085_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025086
25087cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025088ac_cs_usage="\
25089\`$as_me' instantiates files from templates according to the
25090current configuration.
25091
25092Usage: $0 [OPTIONS] [FILE]...
25093
25094 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025095 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025096 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025097 -d, --debug don't remove temporary files
25098 --recheck update $as_me by reconfiguring in the same conditions
25099 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025100 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025101 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025102 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025103
25104Configuration files:
25105$config_files
25106
25107Configuration headers:
25108$config_headers
25109
25110Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025111
Martin v. Löwiseba40652007-08-30 20:10:57 +000025112_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025113cat >>$CONFIG_STATUS <<_ACEOF
25114ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025115python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025116configured by $0, generated by GNU Autoconf 2.61,
25117 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025118
Martin v. Löwiseba40652007-08-30 20:10:57 +000025119Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025120This config.status script is free software; the Free Software Foundation
25121gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122
25123ac_pwd='$ac_pwd'
25124srcdir='$srcdir'
25125INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025126_ACEOF
25127
25128cat >>$CONFIG_STATUS <<\_ACEOF
25129# If no file are specified by the user, then we need to provide default
25130# value. By we need to know if files were specified by the user.
25131ac_need_defaults=:
25132while test $# != 0
25133do
25134 case $1 in
25135 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025136 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25137 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025138 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025139 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025141 ac_option=$1
25142 ac_optarg=$2
25143 ac_shift=shift
25144 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025145 esac
25146
Skip Montanaro6dead952003-09-25 14:50:04 +000025147 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025148 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025149 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25150 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25152 echo "$ac_cs_version"; exit ;;
25153 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025154 debug=: ;;
25155 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025156 $ac_shift
25157 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025158 ac_need_defaults=false;;
25159 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025160 $ac_shift
25161 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025162 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 --he | --h)
25164 # Conflict between --help and --header
25165 { echo "$as_me: error: ambiguous option: $1
25166Try \`$0 --help' for more information." >&2
25167 { (exit 1); exit 1; }; };;
25168 --help | --hel | -h )
25169 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025170 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25171 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25172 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025173
25174 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025175 -*) { echo "$as_me: error: unrecognized option: $1
25176Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025177 { (exit 1); exit 1; }; } ;;
25178
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179 *) ac_config_targets="$ac_config_targets $1"
25180 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025181
25182 esac
25183 shift
25184done
25185
Skip Montanaro6dead952003-09-25 14:50:04 +000025186ac_configure_extra_args=
25187
25188if $ac_cs_silent; then
25189 exec 6>/dev/null
25190 ac_configure_extra_args="$ac_configure_extra_args --silent"
25191fi
25192
25193_ACEOF
25194cat >>$CONFIG_STATUS <<_ACEOF
25195if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025196 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25197 CONFIG_SHELL=$SHELL
25198 export CONFIG_SHELL
25199 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025200fi
25201
Martin v. Löwis11437992002-04-12 09:54:03 +000025202_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025203cat >>$CONFIG_STATUS <<\_ACEOF
25204exec 5>>config.log
25205{
25206 echo
25207 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25208## Running $as_me. ##
25209_ASBOX
25210 echo "$ac_log"
25211} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025212
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213_ACEOF
25214cat >>$CONFIG_STATUS <<_ACEOF
25215_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025216
25217cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025218
25219# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025220for ac_config_target in $ac_config_targets
25221do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222 case $ac_config_target in
25223 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25224 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25225 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25226 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025227 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25228 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025229 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25230 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25231
Martin v. Löwis11437992002-04-12 09:54:03 +000025232 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25233echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25234 { (exit 1); exit 1; }; };;
25235 esac
25236done
25237
Martin v. Löwiseba40652007-08-30 20:10:57 +000025238
Martin v. Löwis11437992002-04-12 09:54:03 +000025239# If the user did not use the arguments to specify the items to instantiate,
25240# then the envvar interface is used. Set only those that are not.
25241# We use the long form for the default assignment because of an extremely
25242# bizarre bug on SunOS 4.1.3.
25243if $ac_need_defaults; then
25244 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25245 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25246fi
25247
Skip Montanaro6dead952003-09-25 14:50:04 +000025248# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025249# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025250# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025251# Hook for its removal unless debugging.
25252# Note that there is a small window in which the directory will not be cleaned:
25253# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025254$debug ||
25255{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025256 tmp=
25257 trap 'exit_status=$?
25258 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25259' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 trap '{ (exit 1); exit 1; }' 1 2 13 15
25261}
Martin v. Löwis11437992002-04-12 09:54:03 +000025262# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025263
Martin v. Löwis11437992002-04-12 09:54:03 +000025264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025266 test -n "$tmp" && test -d "$tmp"
25267} ||
25268{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269 tmp=./conf$$-$RANDOM
25270 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025271} ||
25272{
Skip Montanaro6dead952003-09-25 14:50:04 +000025273 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025274 { (exit 1); exit 1; }
25275}
25276
Martin v. Löwis11437992002-04-12 09:54:03 +000025277#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025278# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025279#
25280
25281# No need to generate the scripts if there are no CONFIG_FILES.
25282# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025283if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025284
25285_ACEOF
25286
Martin v. Löwiseba40652007-08-30 20:10:57 +000025287
25288
25289ac_delim='%!_!# '
25290for ac_last_try in false false false false false :; do
25291 cat >conf$$subs.sed <<_ACEOF
25292SHELL!$SHELL$ac_delim
25293PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25294PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25295PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25296PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25297PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25298PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25299exec_prefix!$exec_prefix$ac_delim
25300prefix!$prefix$ac_delim
25301program_transform_name!$program_transform_name$ac_delim
25302bindir!$bindir$ac_delim
25303sbindir!$sbindir$ac_delim
25304libexecdir!$libexecdir$ac_delim
25305datarootdir!$datarootdir$ac_delim
25306datadir!$datadir$ac_delim
25307sysconfdir!$sysconfdir$ac_delim
25308sharedstatedir!$sharedstatedir$ac_delim
25309localstatedir!$localstatedir$ac_delim
25310includedir!$includedir$ac_delim
25311oldincludedir!$oldincludedir$ac_delim
25312docdir!$docdir$ac_delim
25313infodir!$infodir$ac_delim
25314htmldir!$htmldir$ac_delim
25315dvidir!$dvidir$ac_delim
25316pdfdir!$pdfdir$ac_delim
25317psdir!$psdir$ac_delim
25318libdir!$libdir$ac_delim
25319localedir!$localedir$ac_delim
25320mandir!$mandir$ac_delim
25321DEFS!$DEFS$ac_delim
25322ECHO_C!$ECHO_C$ac_delim
25323ECHO_N!$ECHO_N$ac_delim
25324ECHO_T!$ECHO_T$ac_delim
25325LIBS!$LIBS$ac_delim
25326build_alias!$build_alias$ac_delim
25327host_alias!$host_alias$ac_delim
25328target_alias!$target_alias$ac_delim
25329VERSION!$VERSION$ac_delim
25330SOVERSION!$SOVERSION$ac_delim
25331CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25332UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025333ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025335PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025336PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25337PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25338PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25339FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25340FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25341FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25342FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25343FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25344MACHDEP!$MACHDEP$ac_delim
25345SGI_ABI!$SGI_ABI$ac_delim
25346EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25347EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25348CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25349EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25350CC!$CC$ac_delim
25351CFLAGS!$CFLAGS$ac_delim
25352LDFLAGS!$LDFLAGS$ac_delim
25353CPPFLAGS!$CPPFLAGS$ac_delim
25354ac_ct_CC!$ac_ct_CC$ac_delim
25355EXEEXT!$EXEEXT$ac_delim
25356OBJEXT!$OBJEXT$ac_delim
25357CXX!$CXX$ac_delim
25358MAINCC!$MAINCC$ac_delim
25359CPP!$CPP$ac_delim
25360GREP!$GREP$ac_delim
25361EGREP!$EGREP$ac_delim
25362BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25363LIBRARY!$LIBRARY$ac_delim
25364LDLIBRARY!$LDLIBRARY$ac_delim
25365DLLLIBRARY!$DLLLIBRARY$ac_delim
25366BLDLIBRARY!$BLDLIBRARY$ac_delim
25367LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25368INSTSONAME!$INSTSONAME$ac_delim
25369RUNSHARED!$RUNSHARED$ac_delim
25370LINKCC!$LINKCC$ac_delim
25371RANLIB!$RANLIB$ac_delim
25372AR!$AR$ac_delim
25373SVNVERSION!$SVNVERSION$ac_delim
25374INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25375INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25376INSTALL_DATA!$INSTALL_DATA$ac_delim
25377LN!$LN$ac_delim
25378OPT!$OPT$ac_delim
25379BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025380UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025381OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25382LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25383SO!$SO$ac_delim
25384LDSHARED!$LDSHARED$ac_delim
25385BLDSHARED!$BLDSHARED$ac_delim
25386CCSHARED!$CCSHARED$ac_delim
25387LINKFORSHARED!$LINKFORSHARED$ac_delim
25388CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025389_ACEOF
25390
25391 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25392 break
25393 elif $ac_last_try; then
25394 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25395echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25396 { (exit 1); exit 1; }; }
25397 else
25398 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025399 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025400done
25401
25402ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25403if test -n "$ac_eof"; then
25404 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25405 ac_eof=`expr $ac_eof + 1`
25406fi
25407
25408cat >>$CONFIG_STATUS <<_ACEOF
25409cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25410/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25411_ACEOF
25412sed '
25413s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25414s/^/s,@/; s/!/@,|#_!!_#|/
25415:n
25416t n
25417s/'"$ac_delim"'$/,g/; t
25418s/$/\\/; p
25419N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25420' >>$CONFIG_STATUS <conf$$subs.sed
25421rm -f conf$$subs.sed
25422cat >>$CONFIG_STATUS <<_ACEOF
25423CEOF$ac_eof
25424_ACEOF
25425
25426
25427ac_delim='%!_!# '
25428for ac_last_try in false false false false false :; do
25429 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025430SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025431USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025432SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025433USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25434LDLAST!$LDLAST$ac_delim
25435THREADOBJ!$THREADOBJ$ac_delim
25436DLINCLDIR!$DLINCLDIR$ac_delim
25437DYNLOADFILE!$DYNLOADFILE$ac_delim
25438MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25439TRUE!$TRUE$ac_delim
25440LIBOBJS!$LIBOBJS$ac_delim
25441HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25442HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25443HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25444HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25445HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25446LIBM!$LIBM$ac_delim
25447LIBC!$LIBC$ac_delim
25448UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25449THREADHEADERS!$THREADHEADERS$ac_delim
25450SRCDIRS!$SRCDIRS$ac_delim
25451LTLIBOBJS!$LTLIBOBJS$ac_delim
25452_ACEOF
25453
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025454 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 +000025455 break
25456 elif $ac_last_try; then
25457 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25458echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25459 { (exit 1); exit 1; }; }
25460 else
25461 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25462 fi
25463done
25464
25465ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25466if test -n "$ac_eof"; then
25467 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25468 ac_eof=`expr $ac_eof + 1`
25469fi
25470
25471cat >>$CONFIG_STATUS <<_ACEOF
25472cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25473/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25474_ACEOF
25475sed '
25476s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25477s/^/s,@/; s/!/@,|#_!!_#|/
25478:n
25479t n
25480s/'"$ac_delim"'$/,g/; t
25481s/$/\\/; p
25482N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25483' >>$CONFIG_STATUS <conf$$subs.sed
25484rm -f conf$$subs.sed
25485cat >>$CONFIG_STATUS <<_ACEOF
25486:end
25487s/|#_!!_#|//g
25488CEOF$ac_eof
25489_ACEOF
25490
25491
25492# VPATH may cause trouble with some makes, so we remove $(srcdir),
25493# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25494# trailing colons and then remove the whole line if VPATH becomes empty
25495# (actually we leave an empty line to preserve line numbers).
25496if test "x$srcdir" = x.; then
25497 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25498s/:*\$(srcdir):*/:/
25499s/:*\${srcdir}:*/:/
25500s/:*@srcdir@:*/:/
25501s/^\([^=]*=[ ]*\):*/\1/
25502s/:*$//
25503s/^[^=]*=[ ]*$//
25504}'
25505fi
25506
25507cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025508fi # test -n "$CONFIG_FILES"
25509
Martin v. Löwiseba40652007-08-30 20:10:57 +000025510
25511for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25512do
25513 case $ac_tag in
25514 :[FHLC]) ac_mode=$ac_tag; continue;;
25515 esac
25516 case $ac_mode$ac_tag in
25517 :[FHL]*:*);;
25518 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25519echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25520 { (exit 1); exit 1; }; };;
25521 :[FH]-) ac_tag=-:-;;
25522 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25523 esac
25524 ac_save_IFS=$IFS
25525 IFS=:
25526 set x $ac_tag
25527 IFS=$ac_save_IFS
25528 shift
25529 ac_file=$1
25530 shift
25531
25532 case $ac_mode in
25533 :L) ac_source=$1;;
25534 :[FH])
25535 ac_file_inputs=
25536 for ac_f
25537 do
25538 case $ac_f in
25539 -) ac_f="$tmp/stdin";;
25540 *) # Look for the file first in the build tree, then in the source tree
25541 # (if the path is not absolute). The absolute path cannot be DOS-style,
25542 # because $ac_f cannot contain `:'.
25543 test -f "$ac_f" ||
25544 case $ac_f in
25545 [\\/$]*) false;;
25546 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25547 esac ||
25548 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25549echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25550 { (exit 1); exit 1; }; };;
25551 esac
25552 ac_file_inputs="$ac_file_inputs $ac_f"
25553 done
25554
25555 # Let's still pretend it is `configure' which instantiates (i.e., don't
25556 # use $as_me), people would be surprised to read:
25557 # /* config.h. Generated by config.status. */
25558 configure_input="Generated from "`IFS=:
25559 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25560 if test x"$ac_file" != x-; then
25561 configure_input="$ac_file. $configure_input"
25562 { echo "$as_me:$LINENO: creating $ac_file" >&5
25563echo "$as_me: creating $ac_file" >&6;}
25564 fi
25565
25566 case $ac_tag in
25567 *:-:* | *:-) cat >"$tmp/stdin";;
25568 esac
25569 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025570 esac
25571
Martin v. Löwiseba40652007-08-30 20:10:57 +000025572 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025573$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025574 X"$ac_file" : 'X\(//\)[^/]' \| \
25575 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025576 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025577echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025578 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25579 s//\1/
25580 q
25581 }
25582 /^X\(\/\/\)[^/].*/{
25583 s//\1/
25584 q
25585 }
25586 /^X\(\/\/\)$/{
25587 s//\1/
25588 q
25589 }
25590 /^X\(\/\).*/{
25591 s//\1/
25592 q
25593 }
25594 s/.*/./; q'`
25595 { as_dir="$ac_dir"
25596 case $as_dir in #(
25597 -*) as_dir=./$as_dir;;
25598 esac
25599 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025600 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025601 while :; do
25602 case $as_dir in #(
25603 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25604 *) as_qdir=$as_dir;;
25605 esac
25606 as_dirs="'$as_qdir' $as_dirs"
25607 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025608$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025609 X"$as_dir" : 'X\(//\)[^/]' \| \
25610 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025612echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025613 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25614 s//\1/
25615 q
25616 }
25617 /^X\(\/\/\)[^/].*/{
25618 s//\1/
25619 q
25620 }
25621 /^X\(\/\/\)$/{
25622 s//\1/
25623 q
25624 }
25625 /^X\(\/\).*/{
25626 s//\1/
25627 q
25628 }
25629 s/.*/./; q'`
25630 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025631 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632 test -z "$as_dirs" || eval "mkdir $as_dirs"
25633 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25634echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025635 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025636 ac_builddir=.
25637
Martin v. Löwiseba40652007-08-30 20:10:57 +000025638case "$ac_dir" in
25639.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25640*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025641 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025642 # A ".." for each directory in $ac_dir_suffix.
25643 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25644 case $ac_top_builddir_sub in
25645 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25646 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25647 esac ;;
25648esac
25649ac_abs_top_builddir=$ac_pwd
25650ac_abs_builddir=$ac_pwd$ac_dir_suffix
25651# for backward compatibility:
25652ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025653
25654case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025655 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025656 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025657 ac_top_srcdir=$ac_top_builddir_sub
25658 ac_abs_top_srcdir=$ac_pwd ;;
25659 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025660 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661 ac_top_srcdir=$srcdir
25662 ac_abs_top_srcdir=$srcdir ;;
25663 *) # Relative name.
25664 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25665 ac_top_srcdir=$ac_top_build_prefix$srcdir
25666 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025667esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025668ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025669
Martin v. Löwis11437992002-04-12 09:54:03 +000025670
Martin v. Löwiseba40652007-08-30 20:10:57 +000025671 case $ac_mode in
25672 :F)
25673 #
25674 # CONFIG_FILE
25675 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025676
25677 case $INSTALL in
25678 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025679 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025680 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025681_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025682
25683cat >>$CONFIG_STATUS <<\_ACEOF
25684# If the template does not know about datarootdir, expand it.
25685# FIXME: This hack should be removed a few years after 2.60.
25686ac_datarootdir_hack=; ac_datarootdir_seen=
25687
25688case `sed -n '/datarootdir/ {
25689 p
25690 q
25691}
25692/@datadir@/p
25693/@docdir@/p
25694/@infodir@/p
25695/@localedir@/p
25696/@mandir@/p
25697' $ac_file_inputs` in
25698*datarootdir*) ac_datarootdir_seen=yes;;
25699*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25700 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25701echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25702_ACEOF
25703cat >>$CONFIG_STATUS <<_ACEOF
25704 ac_datarootdir_hack='
25705 s&@datadir@&$datadir&g
25706 s&@docdir@&$docdir&g
25707 s&@infodir@&$infodir&g
25708 s&@localedir@&$localedir&g
25709 s&@mandir@&$mandir&g
25710 s&\\\${datarootdir}&$datarootdir&g' ;;
25711esac
25712_ACEOF
25713
25714# Neutralize VPATH when `$srcdir' = `.'.
25715# Shell code in configure.ac might set extrasub.
25716# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025717cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025718 sed "$ac_vpsub
25719$extrasub
25720_ACEOF
25721cat >>$CONFIG_STATUS <<\_ACEOF
25722:t
25723/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025724s&@configure_input@&$configure_input&;t t
25725s&@top_builddir@&$ac_top_builddir_sub&;t t
25726s&@srcdir@&$ac_srcdir&;t t
25727s&@abs_srcdir@&$ac_abs_srcdir&;t t
25728s&@top_srcdir@&$ac_top_srcdir&;t t
25729s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25730s&@builddir@&$ac_builddir&;t t
25731s&@abs_builddir@&$ac_abs_builddir&;t t
25732s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25733s&@INSTALL@&$ac_INSTALL&;t t
25734$ac_datarootdir_hack
25735" $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 +000025736
Martin v. Löwiseba40652007-08-30 20:10:57 +000025737test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25738 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25739 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25740 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25741which seems to be undefined. Please make sure it is defined." >&5
25742echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25743which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025744
Martin v. Löwiseba40652007-08-30 20:10:57 +000025745 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025746 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025747 -) cat "$tmp/out"; rm -f "$tmp/out";;
25748 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025749 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025750 ;;
25751 :H)
25752 #
25753 # CONFIG_HEADER
25754 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025755_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025756
Martin v. Löwiseba40652007-08-30 20:10:57 +000025757# Transform confdefs.h into a sed script `conftest.defines', that
25758# substitutes the proper values into config.h.in to produce config.h.
25759rm -f conftest.defines conftest.tail
25760# First, append a space to every undef/define line, to ease matching.
25761echo 's/$/ /' >conftest.defines
25762# Then, protect against being on the right side of a sed subst, or in
25763# an unquoted here document, in config.status. If some macros were
25764# called several times there might be several #defines for the same
25765# symbol, which is useless. But do not sort them, since the last
25766# AC_DEFINE must be honored.
25767ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25768# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25769# NAME is the cpp macro being defined, VALUE is the value it is being given.
25770# PARAMS is the parameter list in the macro definition--in most cases, it's
25771# just an empty string.
25772ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25773ac_dB='\\)[ (].*,\\1define\\2'
25774ac_dC=' '
25775ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025776
Martin v. Löwiseba40652007-08-30 20:10:57 +000025777uniq confdefs.h |
25778 sed -n '
25779 t rset
25780 :rset
25781 s/^[ ]*#[ ]*define[ ][ ]*//
25782 t ok
25783 d
25784 :ok
25785 s/[\\&,]/\\&/g
25786 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25787 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25788 ' >>conftest.defines
25789
25790# Remove the space that was appended to ease matching.
25791# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025792# example, in the case of _POSIX_SOURCE, which is predefined and required
25793# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025794# (The regexp can be short, since the line contains either #define or #undef.)
25795echo 's/ $//
25796s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025797
Martin v. Löwiseba40652007-08-30 20:10:57 +000025798# Break up conftest.defines:
25799ac_max_sed_lines=50
25800
25801# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25802# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25803# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25804# et cetera.
25805ac_in='$ac_file_inputs'
25806ac_out='"$tmp/out1"'
25807ac_nxt='"$tmp/out2"'
25808
25809while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025810do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025811 # Write a here document:
25812 cat >>$CONFIG_STATUS <<_ACEOF
25813 # First, check the format of the line:
25814 cat >"\$tmp/defines.sed" <<\\CEOF
25815/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25816/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25817b
25818:def
25819_ACEOF
25820 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025821 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025822 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25823 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25824 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25825 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025826 rm -f conftest.defines
25827 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025828done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025829rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025830
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025832cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025833 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025834 echo "/* $configure_input */" >"$tmp/config.h"
25835 cat "$ac_result" >>"$tmp/config.h"
25836 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025837 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25838echo "$as_me: $ac_file is unchanged" >&6;}
25839 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025840 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025841 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025842 fi
25843 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025844 echo "/* $configure_input */"
25845 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025846 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025847 rm -f "$tmp/out12"
25848 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025849
Martin v. Löwiseba40652007-08-30 20:10:57 +000025850
25851 esac
25852
25853done # for ac_tag
25854
Guido van Rossum627b2d71993-12-24 10:39:16 +000025855
Martin v. Löwis11437992002-04-12 09:54:03 +000025856{ (exit 0); exit 0; }
25857_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025858chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025859ac_clean_files=$ac_clean_files_save
25860
25861
25862# configure is writing to config.log, and then calls config.status.
25863# config.status does its own redirection, appending to config.log.
25864# Unfortunately, on DOS this fails, as config.log is still kept open
25865# by configure, so config.status won't be able to write to it; its
25866# output is simply discarded. So we exec the FD to /dev/null,
25867# effectively closing config.log, so it can be properly (re)opened and
25868# appended to by config.status. When coming back to configure, we
25869# need to make the FD available again.
25870if test "$no_create" != yes; then
25871 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025872 ac_config_status_args=
25873 test "$silent" = yes &&
25874 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025875 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025876 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025877 exec 5>>config.log
25878 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25879 # would make configure fail if this is the last instruction.
25880 $ac_cs_success || { (exit 1); exit 1; }
25881fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025882
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025883
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025884echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025885if test ! -f Modules/Setup
25886then
25887 cp $srcdir/Modules/Setup.dist Modules/Setup
25888fi
25889
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025890echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025891if test ! -f Modules/Setup.local
25892then
25893 echo "# Edit this file for local setup changes" >Modules/Setup.local
25894fi
25895
25896echo "creating Makefile"
25897$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25898 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025899 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025900
25901case $ac_sys_system in
25902BeOS)
25903 { echo "$as_me:$LINENO: WARNING:
25904
25905 Support for BeOS is deprecated as of Python 2.6.
25906 See PEP 11 for the gory details.
25907 " >&5
25908echo "$as_me: WARNING:
25909
25910 Support for BeOS is deprecated as of Python 2.6.
25911 See PEP 11 for the gory details.
25912 " >&2;}
25913 ;;
25914*) ;;
25915esac
25916
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025917mv config.c Modules