blob: 0cac33b6b2963eeca90f5f553d34410a0197839b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinsondc1688a2008-06-27 22:20:14 +00002# From configure.in Revision: 64002 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000661PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000662PYTHONFRAMEWORKDIR
663PYTHONFRAMEWORKPREFIX
664PYTHONFRAMEWORKINSTALLDIR
665FRAMEWORKINSTALLFIRST
666FRAMEWORKINSTALLLAST
667FRAMEWORKALTINSTALLFIRST
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKUNIXTOOLSPREFIX
670MACHDEP
671SGI_ABI
672EXTRAPLATDIR
673EXTRAMACHDEPPATH
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697RANLIB
698AR
699SVNVERSION
700INSTALL_PROGRAM
701INSTALL_SCRIPT
702INSTALL_DATA
703LN
704OPT
705BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000706UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000707OTHER_LIBTOOL_OPT
708LIBTOOL_CRUFT
709SO
710LDSHARED
711BLDSHARED
712CCSHARED
713LINKFORSHARED
714CFLAGSFORSHARED
715SHLIBS
716USE_SIGNAL_MODULE
717SIGNAL_OBJS
718USE_THREAD_MODULE
719LDLAST
720THREADOBJ
721DLINCLDIR
722DYNLOADFILE
723MACHDEP_OBJS
724TRUE
725LIBOBJS
726HAVE_GETHOSTBYNAME_R_6_ARG
727HAVE_GETHOSTBYNAME_R_5_ARG
728HAVE_GETHOSTBYNAME_R_3_ARG
729HAVE_GETHOSTBYNAME_R
730HAVE_GETHOSTBYNAME
731LIBM
732LIBC
733UNICODE_OBJS
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Martin v. Löwiseba40652007-08-30 20:10:57 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
854 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
873 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Martin v. Löwiseba40652007-08-30 20:10:57 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Martin v. Löwiseba40652007-08-30 20:10:57 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 { echo "$as_me: error: invalid package name: $ac_package" >&2
1070 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 { echo "$as_me: error: invalid package name: $ac_package" >&2
1079 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
1102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1111 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
1117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1128 { echo "$as_me: error: missing argument to $ac_option" >&2
1129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Martin v. Löwiseba40652007-08-30 20:10:57 +00001132# Be sure to have absolute directory names.
1133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
1158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Martin v. Löwiseba40652007-08-30 20:10:57 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1174 { echo "$as_me: error: Working directory cannot be determined" >&2
1175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1177 { echo "$as_me: error: pwd does not report name of working directory" >&2
1178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001184 # Try the directory containing this script, then the parent directory.
1185 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001190echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
1222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001223 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001249\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
1283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001310 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001317 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1324 --enable-ipv6 Enable ipv6 (with ipv4) support
1325 --disable-ipv6 Disable ipv6 support
1326 --enable-unicode[=ucs[24]]
1327 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Optional Packages:
1330 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1331 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001332 --with-universal-archs=ARCH
1333 select architectures for universal build ("32-bit",
1334 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001335 --with-framework-name=FRAMEWORK
1336 specify an alternate name of the framework built
1337 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001339 --with-cxx-main=<compiler>
1340 compile main() and link python executable with C++
1341 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-suffix=.exe set executable suffix
1343 --with-pydebug build with Py_DEBUG defined
1344 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001345 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001346 --with-signal-module disable/enable signal module
1347 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1348 --with(out)-threads[=DIRECTORY]
1349 disable/enable thread support
1350 --with(out)-thread[=DIRECTORY]
1351 deprecated; use --with(out)-threads
1352 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001354 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with(out)-pymalloc disable/enable specialized mallocs
1356 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001357 --with-fpectl enable SIGFPE catching
1358 --with-libm=STRING math library
1359 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001360
1361Some influential environment variables:
1362 CC C compiler command
1363 CFLAGS C compiler flags
1364 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1365 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001366 LIBS libraries to pass to the linker, e.g. -l<library>
1367 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1368 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 CPP C preprocessor
1370
1371Use these variables to override the choices made by `configure' or to help
1372it to find libraries and programs with nonstandard names/locations.
1373
Martin v. Löwis1d459062005-03-14 21:23:33 +00001374Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001375_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001376ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001377fi
1378
1379if test "$ac_init_help" = "recursive"; then
1380 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001382 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 ac_builddir=.
1384
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385case "$ac_dir" in
1386.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1387*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001389 # A ".." for each directory in $ac_dir_suffix.
1390 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1391 case $ac_top_builddir_sub in
1392 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1394 esac ;;
1395esac
1396ac_abs_top_builddir=$ac_pwd
1397ac_abs_builddir=$ac_pwd$ac_dir_suffix
1398# for backward compatibility:
1399ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001402 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 ac_top_srcdir=$ac_top_builddir_sub
1405 ac_abs_top_srcdir=$ac_pwd ;;
1406 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001408 ac_top_srcdir=$srcdir
1409 ac_abs_top_srcdir=$srcdir ;;
1410 *) # Relative name.
1411 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1412 ac_top_srcdir=$ac_top_build_prefix$srcdir
1413 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001414esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001415ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001416
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 cd "$ac_dir" || { ac_status=$?; continue; }
1418 # Check for guested configure.
1419 if test -f "$ac_srcdir/configure.gnu"; then
1420 echo &&
1421 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1422 elif test -f "$ac_srcdir/configure"; then
1423 echo &&
1424 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 else
1426 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001427 fi || ac_status=$?
1428 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 done
1430fi
1431
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001433if $ac_init_version; then
1434 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001435python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
Martin v. Löwiseba40652007-08-30 20:10:57 +00001438Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14392002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001440This configure script is free software; the Free Software Foundation
1441gives unlimited permission to copy, distribute and modify it.
1442_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001445cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This file contains any messages produced by compilers while
1447running configure, to aid debugging if configure makes a mistake.
1448
Neal Norwitz9be57322006-08-18 05:39:20 +00001449It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001450generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001451
1452 $ $0 $@
1453
1454_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001455exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001456{
1457cat <<_ASUNAME
1458## --------- ##
1459## Platform. ##
1460## --------- ##
1461
1462hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1463uname -m = `(uname -m) 2>/dev/null || echo unknown`
1464uname -r = `(uname -r) 2>/dev/null || echo unknown`
1465uname -s = `(uname -s) 2>/dev/null || echo unknown`
1466uname -v = `(uname -v) 2>/dev/null || echo unknown`
1467
1468/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1469/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1470
1471/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1472/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1473/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001474/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001475/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1476/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1477/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1478
1479_ASUNAME
1480
1481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1482for as_dir in $PATH
1483do
1484 IFS=$as_save_IFS
1485 test -z "$as_dir" && as_dir=.
1486 echo "PATH: $as_dir"
1487done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001488IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490} >&5
1491
1492cat >&5 <<_ACEOF
1493
1494
1495## ----------- ##
1496## Core tests. ##
1497## ----------- ##
1498
1499_ACEOF
1500
1501
1502# Keep a trace of the command line.
1503# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001504# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001506# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001507ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001508ac_configure_args0=
1509ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001510ac_must_keep_next=false
1511for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001512do
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 for ac_arg
1514 do
1515 case $ac_arg in
1516 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1518 | -silent | --silent | --silen | --sile | --sil)
1519 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1522 esac
1523 case $ac_pass in
1524 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1525 2)
1526 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1527 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001528 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001530 case $ac_arg in
1531 *=* | --config-cache | -C | -disable-* | --disable-* \
1532 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1533 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1534 | -with-* | --with-* | -without-* | --without-* | --x)
1535 case "$ac_configure_args0 " in
1536 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1537 esac
1538 ;;
1539 -* ) ac_must_keep_next=true ;;
1540 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001541 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001542 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001543 ;;
1544 esac
1545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001546done
Skip Montanaro6dead952003-09-25 14:50:04 +00001547$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1548$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 +00001549
1550# When interrupted or exit'd, cleanup temporary files, and complete
1551# config.log. We remove comments because anyway the quotes in there
1552# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553# WARNING: Use '\'' to represent an apostrophe within the trap.
1554# 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 +00001555trap 'exit_status=$?
1556 # Save into config.log some information that might help in debugging.
1557 {
1558 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001559
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 cat <<\_ASBOX
1561## ---------------- ##
1562## Cache variables. ##
1563## ---------------- ##
1564_ASBOX
1565 echo
1566 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001567(
1568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1569 eval ac_val=\$$ac_var
1570 case $ac_val in #(
1571 *${as_nl}*)
1572 case $ac_var in #(
1573 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1574echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1575 esac
1576 case $ac_var in #(
1577 _ | IFS | as_nl) ;; #(
1578 *) $as_unset $ac_var ;;
1579 esac ;;
1580 esac
1581 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1584 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 "s/'\''/'\''\\\\'\'''\''/g;
1587 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1588 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001589 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001591 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 esac |
1593 sort
1594)
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001596
1597 cat <<\_ASBOX
1598## ----------------- ##
1599## Output variables. ##
1600## ----------------- ##
1601_ASBOX
1602 echo
1603 for ac_var in $ac_subst_vars
1604 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605 eval ac_val=\$$ac_var
1606 case $ac_val in
1607 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1608 esac
1609 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001610 done | sort
1611 echo
1612
1613 if test -n "$ac_subst_files"; then
1614 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001615## ------------------- ##
1616## File substitutions. ##
1617## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001618_ASBOX
1619 echo
1620 for ac_var in $ac_subst_files
1621 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001622 eval ac_val=\$$ac_var
1623 case $ac_val in
1624 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1625 esac
1626 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001627 done | sort
1628 echo
1629 fi
1630
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 if test -s confdefs.h; then
1632 cat <<\_ASBOX
1633## ----------- ##
1634## confdefs.h. ##
1635## ----------- ##
1636_ASBOX
1637 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 echo
1640 fi
1641 test "$ac_signal" != 0 &&
1642 echo "$as_me: caught signal $ac_signal"
1643 echo "$as_me: exit $exit_status"
1644 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001645 rm -f core *.core core.conftest.* &&
1646 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001648' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001649for ac_signal in 1 2 13 15; do
1650 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1651done
1652ac_signal=0
1653
1654# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001655rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001656
1657# Predefined preprocessor variables.
1658
1659cat >>confdefs.h <<_ACEOF
1660#define PACKAGE_NAME "$PACKAGE_NAME"
1661_ACEOF
1662
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_VERSION "$PACKAGE_VERSION"
1671_ACEOF
1672
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_STRING "$PACKAGE_STRING"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1681_ACEOF
1682
1683
1684# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686if test -n "$CONFIG_SITE"; then
1687 set x "$CONFIG_SITE"
1688elif test "x$prefix" != xNONE; then
1689 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1690else
1691 set x "$ac_default_prefix/share/config.site" \
1692 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001694shift
1695for ac_site_file
1696do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1699echo "$as_me: loading site script $ac_site_file" >&6;}
1700 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701 . "$ac_site_file"
1702 fi
1703done
1704
1705if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 # Some versions of bash will fail to source /dev/null (special
1707 # files actually), so we avoid doing that.
1708 if test -f "$cache_file"; then
1709 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1710echo "$as_me: loading cache $cache_file" >&6;}
1711 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001712 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1713 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001714 esac
1715 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716else
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1718echo "$as_me: creating cache $cache_file" >&6;}
1719 >$cache_file
1720fi
1721
1722# Check that the precious variables saved in the cache have kept the same
1723# value.
1724ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001725for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1727 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1729 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 case $ac_old_set,$ac_new_set in
1731 set,)
1732 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1733echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1734 ac_cache_corrupted=: ;;
1735 ,set)
1736 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1737echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1738 ac_cache_corrupted=: ;;
1739 ,);;
1740 *)
1741 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001743echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001744 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001745echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001746 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001747echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001748 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 fi;;
1750 esac
1751 # Pass precious variables to config.status.
1752 if test "$ac_new_set" = set; then
1753 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001754 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 *) ac_arg=$ac_var=$ac_new_val ;;
1756 esac
1757 case " $ac_configure_args " in
1758 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1759 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1760 esac
1761 fi
1762done
1763if $ac_cache_corrupted; then
1764 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1765echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1766 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1767echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1768 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001769fi
1770
Martin v. Löwiseba40652007-08-30 20:10:57 +00001771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
Guido van Rossum7f43da71994-08-01 12:15:30 +00001795ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001797ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1798ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1799ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800
Guido van Rossum627b2d71993-12-24 10:39:16 +00001801
Michael W. Hudson54241132001-12-07 15:38:26 +00001802
Martin v. Löwiseba40652007-08-30 20:10:57 +00001803ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001804
1805
Martin v. Löwis11437992002-04-12 09:54:03 +00001806
1807
1808
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001809
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001810
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001811# We don't use PACKAGE_ variables, and they cause conflicts
1812# with other autoconf-based packages that include Python.h
1813grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1814rm confdefs.h
1815mv confdefs.h.new confdefs.h
1816
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001817
Neal Norwitz9be57322006-08-18 05:39:20 +00001818VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001819
Martin v. Löwis1142de32002-03-29 16:28:31 +00001820
1821SOVERSION=1.0
1822
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001823# The later defininition of _XOPEN_SOURCE disables certain features
1824# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1825
1826cat >>confdefs.h <<\_ACEOF
1827#define _GNU_SOURCE 1
1828_ACEOF
1829
1830
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001831# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1832# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1833# them.
1834
1835cat >>confdefs.h <<\_ACEOF
1836#define _NETBSD_SOURCE 1
1837_ACEOF
1838
1839
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001840# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1841# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1842# them.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define __BSD_VISIBLE 1
1846_ACEOF
1847
1848
Martin v. Löwisd6320502004-08-12 13:45:08 +00001849# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1850# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define _BSD_TYPES 1
1854_ACEOF
1855
1856
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001857# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1858# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1859# them.
1860
1861cat >>confdefs.h <<\_ACEOF
1862#define _DARWIN_C_SOURCE 1
1863_ACEOF
1864
1865
1866
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001867define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001868
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001869# Arguments passed to configure.
1870
1871CONFIG_ARGS="$ac_configure_args"
1872
Martin v. Löwiseba40652007-08-30 20:10:57 +00001873# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001874if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001875 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001876 case $enableval in
1877 yes)
1878 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1879 ;;
1880 esac
1881 case $enableval in
1882 no)
1883 UNIVERSALSDK=
1884 enable_universalsdk=
1885 ;;
1886 *)
1887 UNIVERSALSDK=$enableval
1888 ;;
1889 esac
1890
1891else
1892
1893 UNIVERSALSDK=
1894 enable_universalsdk=
1895
Martin v. Löwiseba40652007-08-30 20:10:57 +00001896fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001897
1898
Martin v. Löwiseba40652007-08-30 20:10:57 +00001899
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001900UNIVERSAL_ARCHS="32-bit"
1901{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1902echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1903
1904# Check whether --with-universal-archs was given.
1905if test "${with_universal_archs+set}" = set; then
1906 withval=$with_universal_archs;
1907 { echo "$as_me:$LINENO: result: $withval" >&5
1908echo "${ECHO_T}$withval" >&6; }
1909 UNIVERSAL_ARCHS="$withval"
1910
1911else
1912
1913 { echo "$as_me:$LINENO: result: 32-bit" >&5
1914echo "${ECHO_T}32-bit" >&6; }
1915
1916fi
1917
1918
1919
1920
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001921
1922# Check whether --with-framework-name was given.
1923if test "${with_framework_name+set}" = set; then
1924 withval=$with_framework_name;
1925 PYTHONFRAMEWORK=${withval}
1926 PYTHONFRAMEWORKDIR=${withval}.framework
1927 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1928
1929else
1930
1931 PYTHONFRAMEWORK=Python
1932 PYTHONFRAMEWORKDIR=Python.framework
1933 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1934
1935fi
1936
Martin v. Löwiseba40652007-08-30 20:10:57 +00001937# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001938if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001939 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001940 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001942 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001943 esac
1944 case $enableval in
1945 no)
1946 PYTHONFRAMEWORK=
1947 PYTHONFRAMEWORKDIR=no-framework
1948 PYTHONFRAMEWORKPREFIX=
1949 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001950 FRAMEWORKINSTALLFIRST=
1951 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001952 FRAMEWORKALTINSTALLFIRST=
1953 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001954 if test "x${prefix}" = "xNONE"; then
1955 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1956 else
1957 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1958 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001959 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001960 ;;
1961 *)
1962 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001963 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001964 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001965 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1966 if test "$UNIVERSAL_ARCHS" = "all"
1967 then
1968 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
1969 else
1970 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1971 fi
1972
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001973 if test "x${prefix}" = "xNONE" ; then
1974 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1975 else
1976 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1977 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001979
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001980 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001981 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001982 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001983
Martin v. Löwiseba40652007-08-30 20:10:57 +00001984 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985
Martin v. Löwiseba40652007-08-30 20:10:57 +00001986 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001988 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1989
1990 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1991
Jack Jansene578a632001-08-15 01:27:14 +00001992 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001993
Guido van Rossum563e7081996-09-10 18:20:48 +00001994else
Martin v. Löwis11437992002-04-12 09:54:03 +00001995
Jack Jansene578a632001-08-15 01:27:14 +00001996 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001998 PYTHONFRAMEWORKPREFIX=
1999 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002000 FRAMEWORKINSTALLFIRST=
2001 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002002 FRAMEWORKALTINSTALLFIRST=
2003 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002004 if test "x${prefix}" = "xNONE" ; then
2005 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2006 else
2007 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2008 fi
Jack Jansene578a632001-08-15 01:27:14 +00002009 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002010
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002011 if test "$UNIVERSAL_ARCHS" = "all"
2012 then
2013 FRAMEWORKINSTALLLAST=update4wayuniversal
2014 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2015 fi
2016
Martin v. Löwiseba40652007-08-30 20:10:57 +00002017fi
2018
Michael W. Hudson54241132001-12-07 15:38:26 +00002019
2020
2021
2022
Jack Jansene578a632001-08-15 01:27:14 +00002023
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002024
2025
Ronald Oussoren5b787322006-06-06 19:50:24 +00002026
2027
2028
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002031## AC_HELP_STRING(--with-dyld,
2032## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002033##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002034# Set name for machine-dependent library files
2035
Martin v. Löwiseba40652007-08-30 20:10:57 +00002036{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2037echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002038if test -z "$MACHDEP"
2039then
Guido van Rossum563e7081996-09-10 18:20:48 +00002040 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002041 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2042 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002043 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002045 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002046 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002047 ac_md_system=`echo $ac_sys_system |
2048 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2049 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002050 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002051 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002052
Guido van Rossum07397971997-04-29 21:49:50 +00002053 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002054 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002055 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002056 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002057 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002058 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 esac
2060fi
Guido van Rossum91922671997-10-09 20:24:13 +00002061
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002062# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2063# disable features if it is defined, without any means to access these
2064# features as extensions. For these systems, we skip the definition of
2065# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2066# some feature, make sure there is no alternative way to access this
2067# feature. Also, when using wildcards, make sure you have verified the
2068# need for not defining _XOPEN_SOURCE on all systems matching the
2069# wildcard, and that the wildcard does not include future systems
2070# (which may remove their limitations).
2071case $ac_sys_system/$ac_sys_release in
2072 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2073 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002074 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz2a3e3d02008-06-06 04:47:01 +00002075 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002076 define_xopen_source=no
2077 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2078 # also defined. This can be overridden by defining _BSD_SOURCE
2079 # As this has a different meaning on Linux, only define it on OpenBSD
2080
2081cat >>confdefs.h <<\_ACEOF
2082#define _BSD_SOURCE 1
2083_ACEOF
2084
2085 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002086 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2087 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2088 # Marc Recht
2089 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2090 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002091 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2092 # of union __?sigval. Reported by Stuart Bishop.
2093 SunOS/5.6)
2094 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002095 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2096 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002097 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002098 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002099 define_xopen_source=no;;
2100 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002101 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002102 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002103 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002104 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2105 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2106 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2107 # This should hopefully be fixed in FreeBSD 4.9
2108 FreeBSD/4.8* | Darwin/6* )
2109 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002110 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2111 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2112 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002113 AIX/4)
2114 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002115 AIX/5)
2116 if test `uname -r` -eq 1; then
2117 define_xopen_source=no
2118 fi
2119 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002120 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2121 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002122 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002123 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002124 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002125 define_xopen_source=no
2126 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002127 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2128 # defining NI_NUMERICHOST.
2129 QNX/6.3.2)
2130 define_xopen_source=no
2131 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002132
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002133esac
2134
2135if test $define_xopen_source = yes
2136then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002137 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2138 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002139 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2140 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002141 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002142 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002143
2144cat >>confdefs.h <<\_ACEOF
2145#define _XOPEN_SOURCE 500
2146_ACEOF
2147
2148 ;;
2149 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002150
2151cat >>confdefs.h <<\_ACEOF
2152#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002153_ACEOF
2154
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 ;;
2156 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002157
2158 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2159 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2160 # several APIs are not declared. Since this is also needed in some
2161 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002162 # except for Solaris 10, where it must not be defined,
2163 # as it implies XPG4.2
2164 case $ac_sys_system/$ac_sys_release in
2165 SunOS/5.10)
2166 ;;
2167 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169cat >>confdefs.h <<\_ACEOF
2170#define _XOPEN_SOURCE_EXTENDED 1
2171_ACEOF
2172
Martin v. Löwis7dece662005-11-26 11:38:24 +00002173 ;;
2174 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002176
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002177cat >>confdefs.h <<\_ACEOF
2178#define _POSIX_C_SOURCE 200112L
2179_ACEOF
2180
2181
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002182fi
2183
Guido van Rossum91922671997-10-09 20:24:13 +00002184#
2185# SGI compilers allow the specification of the both the ABI and the
2186# ISA on the command line. Depending on the values of these switches,
2187# different and often incompatable code will be generated.
2188#
2189# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2190# thus supply support for various ABI/ISA combinations. The MACHDEP
2191# variable is also adjusted.
2192#
2193
2194if test ! -z "$SGI_ABI"
2195then
2196 CC="cc $SGI_ABI"
2197 LDFLAGS="$SGI_ABI $LDFLAGS"
2198 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002200{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2201echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002202
Jack Jansen83f898c2002-12-30 22:23:40 +00002203# And add extra plat-mac for darwin
2204
Jack Jansen7b59b422003-03-17 15:44:10 +00002205
Martin v. Löwiseba40652007-08-30 20:10:57 +00002206{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2207echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002208if test -z "$EXTRAPLATDIR"
2209then
2210 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002211 darwin)
2212 EXTRAPLATDIR="\$(PLATMACDIRS)"
2213 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2214 ;;
2215 *)
2216 EXTRAPLATDIR=""
2217 EXTRAMACHDEPPATH=""
2218 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002219 esac
2220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002221{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2222echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002223
Jack Jansen6b08a402004-06-03 12:41:45 +00002224# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2225# it may influence the way we can build extensions, so distutils
2226# needs to check it
2227
Ronald Oussoren988117f2006-04-29 11:31:35 +00002228
Jack Jansen6b08a402004-06-03 12:41:45 +00002229CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002230EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002231
Mark Dickinson65134662008-04-25 16:11:04 +00002232{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2233echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2234ac_sys_machine=`uname -m`
2235{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2236echo "${ECHO_T}$ac_sys_machine" >&6; }
2237
Guido van Rossum627b2d71993-12-24 10:39:16 +00002238# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002239
2240# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2241# for debug/optimization stuff. BASECFLAGS is for flags that are required
2242# just to get things to compile and link. Users are free to override OPT
2243# when running configure or make. The build should not break if they do.
2244# BASECFLAGS should generally not be messed with, however.
2245
2246# XXX shouldn't some/most/all of this code be merged with the stuff later
2247# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002248{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2249echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002250
Martin v. Löwiseba40652007-08-30 20:10:57 +00002251# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002252if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002253 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002255 no) CC=cc
2256 without_gcc=yes;;
2257 yes) CC=gcc
2258 without_gcc=no;;
2259 *) CC=$withval
2260 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002262else
Martin v. Löwis11437992002-04-12 09:54:03 +00002263
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002264 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002265 AIX*) CC=cc_r
2266 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002267 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002268 case $BE_HOST_CPU in
2269 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002270 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002271 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002272 BASECFLAGS="$BASECFLAGS -export pragma"
2273 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002274 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002275 ;;
2276 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002277 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002278 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002279 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 ;;
2281 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002282 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2283echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2284 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 ;;
2286 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002287 AR="\$(srcdir)/Modules/ar_beos"
2288 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002290 Monterey*)
2291 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002292 without_gcc=;;
2293 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002294 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002295fi
2296
2297{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2298echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002299
Guido van Rossum8b131c51995-03-09 14:10:13 +00002300# If the user switches compilers, we can't believe the cache
2301if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2302then
Martin v. Löwis11437992002-04-12 09:54:03 +00002303 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2304(it is also a good idea to do 'make clean' before compiling)" >&5
2305echo "$as_me: error: cached CC is different -- throw away $cache_file
2306(it is also a good idea to do 'make clean' before compiling)" >&2;}
2307 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002308fi
2309
Martin v. Löwis11437992002-04-12 09:54:03 +00002310ac_ext=c
2311ac_cpp='$CPP $CPPFLAGS'
2312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2314ac_compiler_gnu=$ac_cv_c_compiler_gnu
2315if test -n "$ac_tool_prefix"; then
2316 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2317set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002320if test "${ac_cv_prog_CC+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002322else
2323 if test -n "$CC"; then
2324 ac_cv_prog_CC="$CC" # Let the user override the test.
2325else
Martin v. Löwis11437992002-04-12 09:54:03 +00002326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2327for as_dir in $PATH
2328do
2329 IFS=$as_save_IFS
2330 test -z "$as_dir" && as_dir=.
2331 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 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 +00002333 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2335 break 2
2336 fi
2337done
2338done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002339IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
Jack Jansendd19cf82001-12-06 22:36:17 +00002341fi
2342fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002343CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002344if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002345 { echo "$as_me:$LINENO: result: $CC" >&5
2346echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002347else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348 { echo "$as_me:$LINENO: result: no" >&5
2349echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002350fi
2351
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352
Martin v. Löwis11437992002-04-12 09:54:03 +00002353fi
2354if test -z "$ac_cv_prog_CC"; then
2355 ac_ct_CC=$CC
2356 # Extract the first word of "gcc", so it can be a program name with args.
2357set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002360if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363 if test -n "$ac_ct_CC"; then
2364 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2365else
2366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2367for as_dir in $PATH
2368do
2369 IFS=$as_save_IFS
2370 test -z "$as_dir" && as_dir=.
2371 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002372 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 +00002373 ac_cv_prog_ac_ct_CC="gcc"
2374 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2375 break 2
2376 fi
2377done
2378done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381fi
2382fi
2383ac_ct_CC=$ac_cv_prog_ac_ct_CC
2384if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2386echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002388 { echo "$as_me:$LINENO: result: no" >&5
2389echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002390fi
2391
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392 if test "x$ac_ct_CC" = x; then
2393 CC=""
2394 else
2395 case $cross_compiling:$ac_tool_warned in
2396yes:)
2397{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2398whose name does not start with the host triplet. If you think this
2399configuration is useful to you, please write to autoconf@gnu.org." >&5
2400echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2401whose name does not start with the host triplet. If you think this
2402configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2403ac_tool_warned=yes ;;
2404esac
2405 CC=$ac_ct_CC
2406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002407else
2408 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002409fi
2410
Jack Jansendd19cf82001-12-06 22:36:17 +00002411if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002412 if test -n "$ac_tool_prefix"; then
2413 # 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 +00002414set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002415{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417if test "${ac_cv_prog_CC+set}" = set; then
2418 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002419else
2420 if test -n "$CC"; then
2421 ac_cv_prog_CC="$CC" # Let the user override the test.
2422else
Martin v. Löwis11437992002-04-12 09:54:03 +00002423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2424for as_dir in $PATH
2425do
2426 IFS=$as_save_IFS
2427 test -z "$as_dir" && as_dir=.
2428 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002429 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 +00002430 ac_cv_prog_CC="${ac_tool_prefix}cc"
2431 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2432 break 2
2433 fi
2434done
2435done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002436IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002437
2438fi
2439fi
2440CC=$ac_cv_prog_CC
2441if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442 { echo "$as_me:$LINENO: result: $CC" >&5
2443echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002444else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002445 { echo "$as_me:$LINENO: result: no" >&5
2446echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002447fi
2448
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002451fi
2452if test -z "$CC"; then
2453 # Extract the first word of "cc", so it can be a program name with args.
2454set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2456echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002457if test "${ac_cv_prog_CC+set}" = set; then
2458 echo $ECHO_N "(cached) $ECHO_C" >&6
2459else
2460 if test -n "$CC"; then
2461 ac_cv_prog_CC="$CC" # Let the user override the test.
2462else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2465for as_dir in $PATH
2466do
2467 IFS=$as_save_IFS
2468 test -z "$as_dir" && as_dir=.
2469 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470 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 +00002471 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2472 ac_prog_rejected=yes
2473 continue
2474 fi
2475 ac_cv_prog_CC="cc"
2476 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2477 break 2
2478 fi
2479done
2480done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002481IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002482
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002483if test $ac_prog_rejected = yes; then
2484 # We found a bogon in the path, so make sure we never use it.
2485 set dummy $ac_cv_prog_CC
2486 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488 # We chose a different compiler from the bogus one.
2489 # However, it has the same basename, so the bogon will be chosen
2490 # first if we set CC to just the basename; use the full file name.
2491 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493 fi
2494fi
2495fi
2496fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499 { echo "$as_me:$LINENO: result: $CC" >&5
2500echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002501else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002502 { echo "$as_me:$LINENO: result: no" >&5
2503echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002504fi
2505
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506
Martin v. Löwis11437992002-04-12 09:54:03 +00002507fi
2508if test -z "$CC"; then
2509 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 do
2512 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2513set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2515echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002516if test "${ac_cv_prog_CC+set}" = set; then
2517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002518else
2519 if test -n "$CC"; then
2520 ac_cv_prog_CC="$CC" # Let the user override the test.
2521else
Martin v. Löwis11437992002-04-12 09:54:03 +00002522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523for as_dir in $PATH
2524do
2525 IFS=$as_save_IFS
2526 test -z "$as_dir" && as_dir=.
2527 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002528 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 +00002529 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2530 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2531 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002536
2537fi
2538fi
2539CC=$ac_cv_prog_CC
2540if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541 { echo "$as_me:$LINENO: result: $CC" >&5
2542echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002543else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544 { echo "$as_me:$LINENO: result: no" >&5
2545echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002546fi
2547
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 test -n "$CC" && break
2550 done
2551fi
2552if test -z "$CC"; then
2553 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002555do
2556 # Extract the first word of "$ac_prog", so it can be a program name with args.
2557set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002560if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2561 echo $ECHO_N "(cached) $ECHO_C" >&6
2562else
2563 if test -n "$ac_ct_CC"; then
2564 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2565else
2566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2567for as_dir in $PATH
2568do
2569 IFS=$as_save_IFS
2570 test -z "$as_dir" && as_dir=.
2571 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 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 +00002573 ac_cv_prog_ac_ct_CC="$ac_prog"
2574 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2575 break 2
2576 fi
2577done
2578done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581fi
2582fi
2583ac_ct_CC=$ac_cv_prog_ac_ct_CC
2584if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2586echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 { echo "$as_me:$LINENO: result: no" >&5
2589echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002590fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002591
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 test -n "$ac_ct_CC" && break
2594done
Michael W. Hudson54241132001-12-07 15:38:26 +00002595
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 if test "x$ac_ct_CC" = x; then
2597 CC=""
2598 else
2599 case $cross_compiling:$ac_tool_warned in
2600yes:)
2601{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2602whose name does not start with the host triplet. If you think this
2603configuration is useful to you, please write to autoconf@gnu.org." >&5
2604echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2605whose name does not start with the host triplet. If you think this
2606configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2607ac_tool_warned=yes ;;
2608esac
2609 CC=$ac_ct_CC
2610 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002611fi
2612
2613fi
2614
2615
Skip Montanaro6dead952003-09-25 14:50:04 +00002616test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2617See \`config.log' for more details." >&5
2618echo "$as_me: error: no acceptable C compiler found in \$PATH
2619See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 { (exit 1); exit 1; }; }
2621
2622# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002624ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625{ (ac_try="$ac_compiler --version >&5"
2626case "(($ac_try" in
2627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2628 *) ac_try_echo=$ac_try;;
2629esac
2630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2631 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_status=$?
2633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2634 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002635{ (ac_try="$ac_compiler -v >&5"
2636case "(($ac_try" in
2637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2638 *) ac_try_echo=$ac_try;;
2639esac
2640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2641 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 ac_status=$?
2643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2644 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002645{ (ac_try="$ac_compiler -V >&5"
2646case "(($ac_try" in
2647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2648 *) ac_try_echo=$ac_try;;
2649esac
2650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2651 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 ac_status=$?
2653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654 (exit $ac_status); }
2655
2656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002657/* confdefs.h. */
2658_ACEOF
2659cat confdefs.h >>conftest.$ac_ext
2660cat >>conftest.$ac_ext <<_ACEOF
2661/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663int
2664main ()
2665{
2666
2667 ;
2668 return 0;
2669}
2670_ACEOF
2671ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002672ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002673# Try to create an executable without -o first, disregard a.out.
2674# It will help us diagnose broken compilers, and finding out an intuition
2675# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002676{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2677echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002678ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679#
2680# List of possible output files, starting from the most likely.
2681# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2682# only as a last resort. b.out is created by i960 compilers.
2683ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2684#
2685# The IRIX 6 linker writes into existing files which may not be
2686# executable, retaining their permissions. Remove them first so a
2687# subsequent execution test works.
2688ac_rmfiles=
2689for ac_file in $ac_files
2690do
2691 case $ac_file in
2692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2693 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2694 esac
2695done
2696rm -f $ac_rmfiles
2697
2698if { (ac_try="$ac_link_default"
2699case "(($ac_try" in
2700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2701 *) ac_try_echo=$ac_try;;
2702esac
2703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2704 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 ac_status=$?
2706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2707 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2709# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2710# in a Makefile. We should not override ac_cv_exeext if it was cached,
2711# so that the user can short-circuit this test for compilers unknown to
2712# Autoconf.
2713for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002714do
2715 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002718 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002719 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002720 # We found the default executable, but exeext='' is most
2721 # certainly right.
2722 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002723 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2725 then :; else
2726 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2727 fi
2728 # We set ac_cv_exeext here because the later test for it is not
2729 # safe: cross compilers may not add the suffix if given an `-o'
2730 # argument, so we may need to know it at that point already.
2731 # Even if this section looks crufty: it has the advantage of
2732 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002734 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 esac
2737done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002738test "$ac_cv_exeext" = no && ac_cv_exeext=
2739
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002740else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002741 ac_file=''
2742fi
2743
2744{ echo "$as_me:$LINENO: result: $ac_file" >&5
2745echo "${ECHO_T}$ac_file" >&6; }
2746if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002748sed 's/^/| /' conftest.$ac_ext >&5
2749
2750{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2751See \`config.log' for more details." >&5
2752echo "$as_me: error: C compiler cannot create executables
2753See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002755fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002756
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002758
Martin v. Löwiseba40652007-08-30 20:10:57 +00002759# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002760# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2762echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002763# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2764# If not cross compiling, check that we can run a simple program.
2765if test "$cross_compiling" != yes; then
2766 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767 { (case "(($ac_try" in
2768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2769 *) ac_try_echo=$ac_try;;
2770esac
2771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2772 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 ac_status=$?
2774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2775 (exit $ac_status); }; }; then
2776 cross_compiling=no
2777 else
2778 if test "$cross_compiling" = maybe; then
2779 cross_compiling=yes
2780 else
2781 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002782If you meant to cross compile, use \`--host'.
2783See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002784echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002785If you meant to cross compile, use \`--host'.
2786See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 { (exit 1); exit 1; }; }
2788 fi
2789 fi
2790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002791{ echo "$as_me:$LINENO: result: yes" >&5
2792echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002793
Skip Montanaro6dead952003-09-25 14:50:04 +00002794rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002795ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002797# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002798{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2799echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2800{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2801echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002802
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2804echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2805if { (ac_try="$ac_link"
2806case "(($ac_try" in
2807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2808 *) ac_try_echo=$ac_try;;
2809esac
2810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2811 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002812 ac_status=$?
2813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2814 (exit $ac_status); }; then
2815 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2816# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2817# work properly (i.e., refer to `conftest.exe'), while it won't with
2818# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002819for ac_file in conftest.exe conftest conftest.*; do
2820 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002822 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002823 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 * ) break;;
2826 esac
2827done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002828else
Skip Montanaro6dead952003-09-25 14:50:04 +00002829 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2830See \`config.log' for more details." >&5
2831echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2832See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002834fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002835
Martin v. Löwis11437992002-04-12 09:54:03 +00002836rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002837{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2838echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840rm -f conftest.$ac_ext
2841EXEEXT=$ac_cv_exeext
2842ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2844echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002845if test "${ac_cv_objext+set}" = set; then
2846 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002847else
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002849/* confdefs.h. */
2850_ACEOF
2851cat confdefs.h >>conftest.$ac_ext
2852cat >>conftest.$ac_ext <<_ACEOF
2853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
Martin v. Löwis11437992002-04-12 09:54:03 +00002855int
2856main ()
2857{
2858
2859 ;
2860 return 0;
2861}
2862_ACEOF
2863rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864if { (ac_try="$ac_compile"
2865case "(($ac_try" in
2866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2867 *) ac_try_echo=$ac_try;;
2868esac
2869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2870 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 ac_status=$?
2872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2873 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002874 for ac_file in conftest.o conftest.obj conftest.*; do
2875 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002877 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2879 break;;
2880 esac
2881done
2882else
2883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002884sed 's/^/| /' conftest.$ac_ext >&5
2885
2886{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2887See \`config.log' for more details." >&5
2888echo "$as_me: error: cannot compute suffix of object files: cannot compile
2889See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 { (exit 1); exit 1; }; }
2891fi
2892
2893rm -f conftest.$ac_cv_objext conftest.$ac_ext
2894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2896echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002897OBJEXT=$ac_cv_objext
2898ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2900echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901if test "${ac_cv_c_compiler_gnu+set}" = set; then
2902 echo $ECHO_N "(cached) $ECHO_C" >&6
2903else
2904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
Martin v. Löwis11437992002-04-12 09:54:03 +00002911int
2912main ()
2913{
2914#ifndef __GNUC__
2915 choke me
2916#endif
2917
2918 ;
2919 return 0;
2920}
2921_ACEOF
2922rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002923if { (ac_try="$ac_compile"
2924case "(($ac_try" in
2925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2926 *) ac_try_echo=$ac_try;;
2927esac
2928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002931 grep -v '^ *+' conftest.er1 >conftest.err
2932 rm -f conftest.er1
2933 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002935 (exit $ac_status); } && {
2936 test -z "$ac_c_werror_flag" ||
2937 test ! -s conftest.err
2938 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 ac_compiler_gnu=yes
2940else
2941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002942sed 's/^/| /' conftest.$ac_ext >&5
2943
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002946
2947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002948ac_cv_c_compiler_gnu=$ac_compiler_gnu
2949
2950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002951{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2952echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953GCC=`test $ac_compiler_gnu = yes && echo yes`
2954ac_test_CFLAGS=${CFLAGS+set}
2955ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002956{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2957echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002958if test "${ac_cv_prog_cc_g+set}" = set; then
2959 echo $ECHO_N "(cached) $ECHO_C" >&6
2960else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961 ac_save_c_werror_flag=$ac_c_werror_flag
2962 ac_c_werror_flag=yes
2963 ac_cv_prog_cc_g=no
2964 CFLAGS="-g"
2965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002966/* confdefs.h. */
2967_ACEOF
2968cat confdefs.h >>conftest.$ac_ext
2969cat >>conftest.$ac_ext <<_ACEOF
2970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002971
Martin v. Löwis11437992002-04-12 09:54:03 +00002972int
2973main ()
2974{
2975
2976 ;
2977 return 0;
2978}
2979_ACEOF
2980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002981if { (ac_try="$ac_compile"
2982case "(($ac_try" in
2983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2984 *) ac_try_echo=$ac_try;;
2985esac
2986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002989 grep -v '^ *+' conftest.er1 >conftest.err
2990 rm -f conftest.er1
2991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002993 (exit $ac_status); } && {
2994 test -z "$ac_c_werror_flag" ||
2995 test ! -s conftest.err
2996 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002997 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002998else
Martin v. Löwis11437992002-04-12 09:54:03 +00002999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003000sed 's/^/| /' conftest.$ac_ext >&5
3001
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 CFLAGS=""
3003 cat >conftest.$ac_ext <<_ACEOF
3004/* confdefs.h. */
3005_ACEOF
3006cat confdefs.h >>conftest.$ac_ext
3007cat >>conftest.$ac_ext <<_ACEOF
3008/* end confdefs.h. */
3009
3010int
3011main ()
3012{
3013
3014 ;
3015 return 0;
3016}
3017_ACEOF
3018rm -f conftest.$ac_objext
3019if { (ac_try="$ac_compile"
3020case "(($ac_try" in
3021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3022 *) ac_try_echo=$ac_try;;
3023esac
3024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3025 (eval "$ac_compile") 2>conftest.er1
3026 ac_status=$?
3027 grep -v '^ *+' conftest.er1 >conftest.err
3028 rm -f conftest.er1
3029 cat conftest.err >&5
3030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3031 (exit $ac_status); } && {
3032 test -z "$ac_c_werror_flag" ||
3033 test ! -s conftest.err
3034 } && test -s conftest.$ac_objext; then
3035 :
3036else
3037 echo "$as_me: failed program was:" >&5
3038sed 's/^/| /' conftest.$ac_ext >&5
3039
3040 ac_c_werror_flag=$ac_save_c_werror_flag
3041 CFLAGS="-g"
3042 cat >conftest.$ac_ext <<_ACEOF
3043/* confdefs.h. */
3044_ACEOF
3045cat confdefs.h >>conftest.$ac_ext
3046cat >>conftest.$ac_ext <<_ACEOF
3047/* end confdefs.h. */
3048
3049int
3050main ()
3051{
3052
3053 ;
3054 return 0;
3055}
3056_ACEOF
3057rm -f conftest.$ac_objext
3058if { (ac_try="$ac_compile"
3059case "(($ac_try" in
3060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3061 *) ac_try_echo=$ac_try;;
3062esac
3063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3064 (eval "$ac_compile") 2>conftest.er1
3065 ac_status=$?
3066 grep -v '^ *+' conftest.er1 >conftest.err
3067 rm -f conftest.er1
3068 cat conftest.err >&5
3069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070 (exit $ac_status); } && {
3071 test -z "$ac_c_werror_flag" ||
3072 test ! -s conftest.err
3073 } && test -s conftest.$ac_objext; then
3074 ac_cv_prog_cc_g=yes
3075else
3076 echo "$as_me: failed program was:" >&5
3077sed 's/^/| /' conftest.$ac_ext >&5
3078
3079
Guido van Rossum627b2d71993-12-24 10:39:16 +00003080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003081
3082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003084
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086fi
3087
3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3089 ac_c_werror_flag=$ac_save_c_werror_flag
3090fi
3091{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3092echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003093if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003094 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003095elif test $ac_cv_prog_cc_g = yes; then
3096 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003097 CFLAGS="-g -O2"
3098 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003100 fi
3101else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003102 if test "$GCC" = yes; then
3103 CFLAGS="-O2"
3104 else
3105 CFLAGS=
3106 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003108{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3109echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3110if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003111 echo $ECHO_N "(cached) $ECHO_C" >&6
3112else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003114ac_save_CC=$CC
3115cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003116/* confdefs.h. */
3117_ACEOF
3118cat confdefs.h >>conftest.$ac_ext
3119cat >>conftest.$ac_ext <<_ACEOF
3120/* end confdefs.h. */
3121#include <stdarg.h>
3122#include <stdio.h>
3123#include <sys/types.h>
3124#include <sys/stat.h>
3125/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3126struct buf { int x; };
3127FILE * (*rcsopen) (struct buf *, struct stat *, int);
3128static char *e (p, i)
3129 char **p;
3130 int i;
3131{
3132 return p[i];
3133}
3134static char *f (char * (*g) (char **, int), char **p, ...)
3135{
3136 char *s;
3137 va_list v;
3138 va_start (v,p);
3139 s = g (p, va_arg (v,int));
3140 va_end (v);
3141 return s;
3142}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003143
3144/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3145 function prototypes and stuff, but not '\xHH' hex character constants.
3146 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003147 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003148 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3149 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003150 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003151int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3152
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3154 inside strings and character constants. */
3155#define FOO(x) 'x'
3156int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3157
Skip Montanaro6dead952003-09-25 14:50:04 +00003158int test (int i, double x);
3159struct s1 {int (*f) (int a);};
3160struct s2 {int (*f) (double a);};
3161int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3162int argc;
3163char **argv;
3164int
3165main ()
3166{
3167return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3168 ;
3169 return 0;
3170}
3171_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3173 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003174do
3175 CC="$ac_save_CC $ac_arg"
3176 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177if { (ac_try="$ac_compile"
3178case "(($ac_try" in
3179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3180 *) ac_try_echo=$ac_try;;
3181esac
3182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3183 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003185 grep -v '^ *+' conftest.er1 >conftest.err
3186 rm -f conftest.er1
3187 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003189 (exit $ac_status); } && {
3190 test -z "$ac_c_werror_flag" ||
3191 test ! -s conftest.err
3192 } && test -s conftest.$ac_objext; then
3193 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003194else
3195 echo "$as_me: failed program was:" >&5
3196sed 's/^/| /' conftest.$ac_ext >&5
3197
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198
Skip Montanaro6dead952003-09-25 14:50:04 +00003199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003200
3201rm -f core conftest.err conftest.$ac_objext
3202 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003203done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003205CC=$ac_save_CC
3206
3207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208# AC_CACHE_VAL
3209case "x$ac_cv_prog_cc_c89" in
3210 x)
3211 { echo "$as_me:$LINENO: result: none needed" >&5
3212echo "${ECHO_T}none needed" >&6; } ;;
3213 xno)
3214 { echo "$as_me:$LINENO: result: unsupported" >&5
3215echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003216 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217 CC="$CC $ac_cv_prog_cc_c89"
3218 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3219echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003220esac
3221
Skip Montanaro6dead952003-09-25 14:50:04 +00003222
Martin v. Löwis11437992002-04-12 09:54:03 +00003223ac_ext=c
3224ac_cpp='$CPP $CPPFLAGS'
3225ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3226ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3227ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003228
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003229
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230
3231
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3233echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003234
Martin v. Löwiseba40652007-08-30 20:10:57 +00003235# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003236if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003238
3239 case $withval in
3240 no) with_cxx_main=no
3241 MAINCC='$(CC)';;
3242 yes) with_cxx_main=yes
3243 MAINCC='$(CXX)';;
3244 *) with_cxx_main=yes
3245 MAINCC=$withval
3246 if test -z "$CXX"
3247 then
3248 CXX=$withval
3249 fi;;
3250 esac
3251else
3252
3253 with_cxx_main=no
3254 MAINCC='$(CC)'
3255
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256fi
3257
3258{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3259echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003260
3261preset_cxx="$CXX"
3262if test -z "$CXX"
3263then
3264 case "$CC" in
3265 gcc) # Extract the first word of "g++", so it can be a program name with args.
3266set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003267{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3268echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003269if test "${ac_cv_path_CXX+set}" = set; then
3270 echo $ECHO_N "(cached) $ECHO_C" >&6
3271else
3272 case $CXX in
3273 [\\/]* | ?:[\\/]*)
3274 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3275 ;;
3276 *)
3277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3278for as_dir in notfound
3279do
3280 IFS=$as_save_IFS
3281 test -z "$as_dir" && as_dir=.
3282 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003283 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 +00003284 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3285 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3286 break 2
3287 fi
3288done
3289done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003290IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003291
3292 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3293 ;;
3294esac
3295fi
3296CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003297if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298 { echo "$as_me:$LINENO: result: $CXX" >&5
3299echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003300else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003301 { echo "$as_me:$LINENO: result: no" >&5
3302echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003304
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003305 ;;
3306 cc) # Extract the first word of "c++", so it can be a program name with args.
3307set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310if test "${ac_cv_path_CXX+set}" = set; then
3311 echo $ECHO_N "(cached) $ECHO_C" >&6
3312else
3313 case $CXX in
3314 [\\/]* | ?:[\\/]*)
3315 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3316 ;;
3317 *)
3318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3319for as_dir in notfound
3320do
3321 IFS=$as_save_IFS
3322 test -z "$as_dir" && as_dir=.
3323 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003324 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 +00003325 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3326 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3327 break 2
3328 fi
3329done
3330done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003331IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332
3333 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3334 ;;
3335esac
3336fi
3337CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003338if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 { echo "$as_me:$LINENO: result: $CXX" >&5
3340echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003341else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003342 { echo "$as_me:$LINENO: result: no" >&5
3343echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003346 ;;
3347 esac
3348 if test "$CXX" = "notfound"
3349 then
3350 CXX=""
3351 fi
3352fi
3353if test -z "$CXX"
3354then
3355 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3356do
3357 # Extract the first word of "$ac_prog", so it can be a program name with args.
3358set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361if test "${ac_cv_prog_CXX+set}" = set; then
3362 echo $ECHO_N "(cached) $ECHO_C" >&6
3363else
3364 if test -n "$CXX"; then
3365 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3366else
3367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3368for as_dir in $PATH
3369do
3370 IFS=$as_save_IFS
3371 test -z "$as_dir" && as_dir=.
3372 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003373 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 +00003374 ac_cv_prog_CXX="$ac_prog"
3375 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3376 break 2
3377 fi
3378done
3379done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003381
3382fi
3383fi
3384CXX=$ac_cv_prog_CXX
3385if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386 { echo "$as_me:$LINENO: result: $CXX" >&5
3387echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003388else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003389 { echo "$as_me:$LINENO: result: no" >&5
3390echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003391fi
3392
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003394 test -n "$CXX" && break
3395done
3396test -n "$CXX" || CXX="notfound"
3397
3398 if test "$CXX" = "notfound"
3399 then
3400 CXX=""
3401 fi
3402fi
3403if test "$preset_cxx" != "$CXX"
3404then
3405 { echo "$as_me:$LINENO: WARNING:
3406
3407 By default, distutils will build C++ extension modules with \"$CXX\".
3408 If this is not intended, then set CXX on the configure command line.
3409 " >&5
3410echo "$as_me: WARNING:
3411
3412 By default, distutils will build C++ extension modules with \"$CXX\".
3413 If this is not intended, then set CXX on the configure command line.
3414 " >&2;}
3415fi
3416
3417
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003418# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003419
3420ac_ext=c
3421ac_cpp='$CPP $CPPFLAGS'
3422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3424ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003425{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3426echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003427# On Suns, sometimes $CPP names a directory.
3428if test -n "$CPP" && test -d "$CPP"; then
3429 CPP=
3430fi
3431if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 if test "${ac_cv_prog_CPP+set}" = set; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434else
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 # Double quotes because CPP needs to be expanded
3436 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3437 do
3438 ac_preproc_ok=false
3439for ac_c_preproc_warn_flag in '' yes
3440do
3441 # Use a header file that comes with gcc, so configuring glibc
3442 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003443 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3444 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003445 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # not just through cpp. "Syntax error" is here to catch this case.
3447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003448/* confdefs.h. */
3449_ACEOF
3450cat confdefs.h >>conftest.$ac_ext
3451cat >>conftest.$ac_ext <<_ACEOF
3452/* end confdefs.h. */
3453#ifdef __STDC__
3454# include <limits.h>
3455#else
3456# include <assert.h>
3457#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003458 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003459_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003460if { (ac_try="$ac_cpp conftest.$ac_ext"
3461case "(($ac_try" in
3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463 *) ac_try_echo=$ac_try;;
3464esac
3465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3466 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 rm -f conftest.er1
3470 cat conftest.err >&5
3471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003472 (exit $ac_status); } >/dev/null && {
3473 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3474 test ! -s conftest.err
3475 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003476 :
3477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003479sed 's/^/| /' conftest.$ac_ext >&5
3480
Martin v. Löwis11437992002-04-12 09:54:03 +00003481 # Broken: fails on valid input.
3482continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003486
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # can be detected and how.
3489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003490/* confdefs.h. */
3491_ACEOF
3492cat confdefs.h >>conftest.$ac_ext
3493cat >>conftest.$ac_ext <<_ACEOF
3494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003495#include <ac_nonexistent.h>
3496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497if { (ac_try="$ac_cpp conftest.$ac_ext"
3498case "(($ac_try" in
3499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3500 *) ac_try_echo=$ac_try;;
3501esac
3502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3503 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003505 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 rm -f conftest.er1
3507 cat conftest.err >&5
3508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509 (exit $ac_status); } >/dev/null && {
3510 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3511 test ! -s conftest.err
3512 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # Broken: success on invalid input.
3514continue
3515else
3516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003517sed 's/^/| /' conftest.$ac_ext >&5
3518
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # Passes both tests.
3520ac_preproc_ok=:
3521break
3522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523
Martin v. Löwis11437992002-04-12 09:54:03 +00003524rm -f conftest.err conftest.$ac_ext
3525
3526done
3527# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3528rm -f conftest.err conftest.$ac_ext
3529if $ac_preproc_ok; then
3530 break
3531fi
3532
3533 done
3534 ac_cv_prog_CPP=$CPP
3535
3536fi
3537 CPP=$ac_cv_prog_CPP
3538else
3539 ac_cv_prog_CPP=$CPP
3540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003541{ echo "$as_me:$LINENO: result: $CPP" >&5
3542echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003543ac_preproc_ok=false
3544for ac_c_preproc_warn_flag in '' yes
3545do
3546 # Use a header file that comes with gcc, so configuring glibc
3547 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003548 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3549 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # On the NeXT, cc -E runs the code through the compiler's parser,
3551 # not just through cpp. "Syntax error" is here to catch this case.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
3558#ifdef __STDC__
3559# include <limits.h>
3560#else
3561# include <assert.h>
3562#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003563 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003564_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003565if { (ac_try="$ac_cpp conftest.$ac_ext"
3566case "(($ac_try" in
3567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3568 *) ac_try_echo=$ac_try;;
3569esac
3570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003573 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 rm -f conftest.er1
3575 cat conftest.err >&5
3576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003577 (exit $ac_status); } >/dev/null && {
3578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3579 test ! -s conftest.err
3580 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 :
3582else
3583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003584sed 's/^/| /' conftest.$ac_ext >&5
3585
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 # Broken: fails on valid input.
3587continue
3588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590rm -f conftest.err conftest.$ac_ext
3591
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # can be detected and how.
3594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003595/* confdefs.h. */
3596_ACEOF
3597cat confdefs.h >>conftest.$ac_ext
3598cat >>conftest.$ac_ext <<_ACEOF
3599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003600#include <ac_nonexistent.h>
3601_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602if { (ac_try="$ac_cpp conftest.$ac_ext"
3603case "(($ac_try" in
3604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3605 *) ac_try_echo=$ac_try;;
3606esac
3607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003610 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 rm -f conftest.er1
3612 cat conftest.err >&5
3613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614 (exit $ac_status); } >/dev/null && {
3615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3616 test ! -s conftest.err
3617 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 # Broken: success on invalid input.
3619continue
3620else
3621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003622sed 's/^/| /' conftest.$ac_ext >&5
3623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 # Passes both tests.
3625ac_preproc_ok=:
3626break
3627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629rm -f conftest.err conftest.$ac_ext
3630
3631done
3632# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3633rm -f conftest.err conftest.$ac_ext
3634if $ac_preproc_ok; then
3635 :
3636else
Skip Montanaro6dead952003-09-25 14:50:04 +00003637 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3638See \`config.log' for more details." >&5
3639echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3640See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 { (exit 1); exit 1; }; }
3642fi
3643
3644ac_ext=c
3645ac_cpp='$CPP $CPPFLAGS'
3646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3648ac_compiler_gnu=$ac_cv_c_compiler_gnu
3649
3650
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3652echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3653if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003654 echo $ECHO_N "(cached) $ECHO_C" >&6
3655else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003656 # Extract the first word of "grep ggrep" to use in msg output
3657if test -z "$GREP"; then
3658set dummy grep ggrep; ac_prog_name=$2
3659if test "${ac_cv_path_GREP+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
3661else
3662 ac_path_GREP_found=false
3663# Loop through the user's path and test for each of PROGNAME-LIST
3664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3665for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3666do
3667 IFS=$as_save_IFS
3668 test -z "$as_dir" && as_dir=.
3669 for ac_prog in grep ggrep; do
3670 for ac_exec_ext in '' $ac_executable_extensions; do
3671 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3672 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3673 # Check for GNU ac_path_GREP and select it if it is found.
3674 # Check for GNU $ac_path_GREP
3675case `"$ac_path_GREP" --version 2>&1` in
3676*GNU*)
3677 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3678*)
3679 ac_count=0
3680 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3681 while :
3682 do
3683 cat "conftest.in" "conftest.in" >"conftest.tmp"
3684 mv "conftest.tmp" "conftest.in"
3685 cp "conftest.in" "conftest.nl"
3686 echo 'GREP' >> "conftest.nl"
3687 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3688 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3689 ac_count=`expr $ac_count + 1`
3690 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3691 # Best one so far, save it but keep looking for a better one
3692 ac_cv_path_GREP="$ac_path_GREP"
3693 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003694 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003695 # 10*(2^10) chars as input seems more than enough
3696 test $ac_count -gt 10 && break
3697 done
3698 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3699esac
3700
3701
3702 $ac_path_GREP_found && break 3
3703 done
3704done
3705
3706done
3707IFS=$as_save_IFS
3708
3709
Skip Montanaro6dead952003-09-25 14:50:04 +00003710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003711
3712GREP="$ac_cv_path_GREP"
3713if test -z "$GREP"; then
3714 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3715echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3716 { (exit 1); exit 1; }; }
3717fi
3718
3719else
3720 ac_cv_path_GREP=$GREP
3721fi
3722
3723
3724fi
3725{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3726echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3727 GREP="$ac_cv_path_GREP"
3728
3729
3730{ echo "$as_me:$LINENO: checking for egrep" >&5
3731echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3732if test "${ac_cv_path_EGREP+set}" = set; then
3733 echo $ECHO_N "(cached) $ECHO_C" >&6
3734else
3735 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3736 then ac_cv_path_EGREP="$GREP -E"
3737 else
3738 # Extract the first word of "egrep" to use in msg output
3739if test -z "$EGREP"; then
3740set dummy egrep; ac_prog_name=$2
3741if test "${ac_cv_path_EGREP+set}" = set; then
3742 echo $ECHO_N "(cached) $ECHO_C" >&6
3743else
3744 ac_path_EGREP_found=false
3745# Loop through the user's path and test for each of PROGNAME-LIST
3746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3748do
3749 IFS=$as_save_IFS
3750 test -z "$as_dir" && as_dir=.
3751 for ac_prog in egrep; do
3752 for ac_exec_ext in '' $ac_executable_extensions; do
3753 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3754 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3755 # Check for GNU ac_path_EGREP and select it if it is found.
3756 # Check for GNU $ac_path_EGREP
3757case `"$ac_path_EGREP" --version 2>&1` in
3758*GNU*)
3759 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3760*)
3761 ac_count=0
3762 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3763 while :
3764 do
3765 cat "conftest.in" "conftest.in" >"conftest.tmp"
3766 mv "conftest.tmp" "conftest.in"
3767 cp "conftest.in" "conftest.nl"
3768 echo 'EGREP' >> "conftest.nl"
3769 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3770 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3771 ac_count=`expr $ac_count + 1`
3772 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3773 # Best one so far, save it but keep looking for a better one
3774 ac_cv_path_EGREP="$ac_path_EGREP"
3775 ac_path_EGREP_max=$ac_count
3776 fi
3777 # 10*(2^10) chars as input seems more than enough
3778 test $ac_count -gt 10 && break
3779 done
3780 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3781esac
3782
3783
3784 $ac_path_EGREP_found && break 3
3785 done
3786done
3787
3788done
3789IFS=$as_save_IFS
3790
3791
3792fi
3793
3794EGREP="$ac_cv_path_EGREP"
3795if test -z "$EGREP"; then
3796 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3797echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3798 { (exit 1); exit 1; }; }
3799fi
3800
3801else
3802 ac_cv_path_EGREP=$EGREP
3803fi
3804
3805
3806 fi
3807fi
3808{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3809echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3810 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003811
3812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814{ echo "$as_me:$LINENO: checking for AIX" >&5
3815echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003817/* confdefs.h. */
3818_ACEOF
3819cat confdefs.h >>conftest.$ac_ext
3820cat >>conftest.$ac_ext <<_ACEOF
3821/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003822#ifdef _AIX
3823 yes
3824#endif
3825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003828 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 { echo "$as_me:$LINENO: result: yes" >&5
3830echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003831cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003832#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003833_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003834
3835else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836 { echo "$as_me:$LINENO: result: no" >&5
3837echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003838fi
3839rm -f conftest*
3840
Michael W. Hudson54241132001-12-07 15:38:26 +00003841
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003842
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003843# Check for unsupported systems
3844case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003845atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003846 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3847 echo See README for details.
3848 exit 1;;
3849esac
3850
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Martin v. Löwiseba40652007-08-30 20:10:57 +00003852{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3853echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Martin v. Löwiseba40652007-08-30 20:10:57 +00003855# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003856if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003858 case $withval in
3859 no) EXEEXT=;;
3860 yes) EXEEXT=.exe;;
3861 *) EXEEXT=$withval;;
3862 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863fi
3864
3865{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3866echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003867
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003868# Test whether we're running on a non-case-sensitive system, in which
3869# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003870
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3872echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003873if test ! -d CaseSensitiveTestDir; then
3874mkdir CaseSensitiveTestDir
3875fi
3876
3877if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003878then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879 { echo "$as_me:$LINENO: result: yes" >&5
3880echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003881 BUILDEXEEXT=.exe
3882else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883 { echo "$as_me:$LINENO: result: no" >&5
3884echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003885 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003886fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003887rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003888
Guido van Rossumdd997f71998-10-07 19:58:26 +00003889case $MACHDEP in
3890bsdos*)
3891 case $CC in
3892 gcc) CC="$CC -D_HAVE_BSDI";;
3893 esac;;
3894esac
3895
Guido van Rossum24b1e751997-08-21 02:29:16 +00003896case $ac_sys_system in
3897hp*|HP*)
3898 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003899 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003900 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003901Monterey*)
3902 case $CC in
3903 cc) CC="$CC -Wl,-Bexport";;
3904 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003905SunOS*)
3906 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003907
3908cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003909#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003910_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003911
3912 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003913esac
3914
Michael W. Hudson54241132001-12-07 15:38:26 +00003915
3916
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3918echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003919if test -z "$LIBRARY"
3920then
3921 LIBRARY='libpython$(VERSION).a'
3922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3924echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003925
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003926# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003927# name of the library into which to insert object files). BLDLIBRARY is also
3928# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3929# is blank as the main program is not linked directly against LDLIBRARY.
3930# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3931# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3932# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3933# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003934#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003935# RUNSHARED is used to run shared python without installed libraries
3936#
3937# INSTSONAME is the name of the shared library that will be use to install
3938# on the system - some systems like version suffix, others don't
3939
3940
Michael W. Hudson54241132001-12-07 15:38:26 +00003941
3942
3943
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003944
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003945LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003946BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003947INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003948DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003949LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003950RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003951
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003952# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003953# If CXX is set, and if it is needed to link a main function that was
3954# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3955# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003956# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003957# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003958
Martin v. Löwiseba40652007-08-30 20:10:57 +00003959{ echo "$as_me:$LINENO: checking LINKCC" >&5
3960echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003961if test -z "$LINKCC"
3962then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003963 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003964 case $ac_sys_system in
3965 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003966 exp_extra="\"\""
3967 if test $ac_sys_release -ge 5 -o \
3968 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3969 exp_extra="."
3970 fi
3971 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003972 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003973 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003974 QNX*)
3975 # qcc must be used because the other compilers do not
3976 # support -N.
3977 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003978 esac
3979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003980{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3981echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003982
Martin v. Löwiseba40652007-08-30 20:10:57 +00003983{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3984echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3985# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003986if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987 enableval=$enable_shared;
3988fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003989
Martin v. Löwis1142de32002-03-29 16:28:31 +00003990
3991if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003992then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003993 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003994 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003995 enable_shared="yes";;
3996 *)
3997 enable_shared="no";;
3998 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4001echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004002
Martin v. Löwiseba40652007-08-30 20:10:57 +00004003{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4004echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4005# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004006if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004008 CC="$CC -pg"
4009 if test "$cross_compiling" = yes; then
4010 ac_enable_profiling="no"
4011else
4012 cat >conftest.$ac_ext <<_ACEOF
4013/* confdefs.h. */
4014_ACEOF
4015cat confdefs.h >>conftest.$ac_ext
4016cat >>conftest.$ac_ext <<_ACEOF
4017/* end confdefs.h. */
4018int main() { return 0; }
4019_ACEOF
4020rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004021if { (ac_try="$ac_link"
4022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
4026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4027 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004028 ac_status=$?
4029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004031 { (case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
4035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4036 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004037 ac_status=$?
4038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4039 (exit $ac_status); }; }; then
4040 ac_enable_profiling="yes"
4041else
4042 echo "$as_me: program exited with status $ac_status" >&5
4043echo "$as_me: failed program was:" >&5
4044sed 's/^/| /' conftest.$ac_ext >&5
4045
4046( exit $ac_status )
4047ac_enable_profiling="no"
4048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004049rm -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 +00004050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004051
4052
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004053 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004054fi
4055
4056{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4057echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004058
4059case "$ac_enable_profiling" in
4060 "yes")
4061 BASECFLAGS="-pg $BASECFLAGS"
4062 LDFLAGS="-pg $LDFLAGS"
4063 ;;
4064esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004065
Martin v. Löwiseba40652007-08-30 20:10:57 +00004066{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4067echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004068
Guido van Rossumb8552162001-09-05 14:58:11 +00004069# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4070# library that we build, but we do not want to link against it (we
4071# will find it with a -framework option). For this reason there is an
4072# extra variable BLDLIBRARY against which Python and the extension
4073# modules are linked, BLDLIBRARY. This is normally the same as
4074# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004075if test "$enable_framework"
4076then
4077 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004078 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004079 BLDLIBRARY=''
4080else
4081 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004082fi
Jack Jansene578a632001-08-15 01:27:14 +00004083
Martin v. Löwis1142de32002-03-29 16:28:31 +00004084# Other platforms follow
4085if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004086
4087cat >>confdefs.h <<\_ACEOF
4088#define Py_ENABLE_SHARED 1
4089_ACEOF
4090
Martin v. Löwis1142de32002-03-29 16:28:31 +00004091 case $ac_sys_system in
4092 BeOS*)
4093 LDLIBRARY='libpython$(VERSION).so'
4094 ;;
4095 CYGWIN*)
4096 LDLIBRARY='libpython$(VERSION).dll.a'
4097 DLLLIBRARY='libpython$(VERSION).dll'
4098 ;;
4099 SunOS*)
4100 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004101 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004102 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004103 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004104 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004105 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004106 LDLIBRARY='libpython$(VERSION).so'
4107 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004108 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004109 case $ac_sys_system in
4110 FreeBSD*)
4111 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4112 ;;
4113 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004114 INSTSONAME="$LDLIBRARY".$SOVERSION
4115 ;;
4116 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004117 case `uname -m` in
4118 ia64)
4119 LDLIBRARY='libpython$(VERSION).so'
4120 ;;
4121 *)
4122 LDLIBRARY='libpython$(VERSION).sl'
4123 ;;
4124 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004125 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004126 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004127 ;;
4128 OSF*)
4129 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004130 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004131 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004132 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004133 atheos*)
4134 LDLIBRARY='libpython$(VERSION).so'
4135 BLDLIBRARY='-L. -lpython$(VERSION)'
4136 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4137 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138 esac
Jason Tishler30765592003-09-04 11:04:06 +00004139else # shared is disabled
4140 case $ac_sys_system in
4141 CYGWIN*)
4142 BLDLIBRARY='$(LIBRARY)'
4143 LDLIBRARY='libpython$(VERSION).dll.a'
4144 ;;
4145 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004146fi
4147
Martin v. Löwiseba40652007-08-30 20:10:57 +00004148{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4149echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004150
Martin v. Löwis11437992002-04-12 09:54:03 +00004151if test -n "$ac_tool_prefix"; then
4152 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4153set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004154{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4155echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004156if test "${ac_cv_prog_RANLIB+set}" = set; then
4157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158else
4159 if test -n "$RANLIB"; then
4160 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4161else
Martin v. Löwis11437992002-04-12 09:54:03 +00004162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163for as_dir in $PATH
4164do
4165 IFS=$as_save_IFS
4166 test -z "$as_dir" && as_dir=.
4167 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168 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 +00004169 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4170 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4171 break 2
4172 fi
4173done
4174done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004176
Guido van Rossum627b2d71993-12-24 10:39:16 +00004177fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004179RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4182echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184 { echo "$as_me:$LINENO: result: no" >&5
4185echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004186fi
4187
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189fi
4190if test -z "$ac_cv_prog_RANLIB"; then
4191 ac_ct_RANLIB=$RANLIB
4192 # Extract the first word of "ranlib", so it can be a program name with args.
4193set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004194{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004196if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4197 echo $ECHO_N "(cached) $ECHO_C" >&6
4198else
4199 if test -n "$ac_ct_RANLIB"; then
4200 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4201else
4202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4203for as_dir in $PATH
4204do
4205 IFS=$as_save_IFS
4206 test -z "$as_dir" && as_dir=.
4207 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208 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 +00004209 ac_cv_prog_ac_ct_RANLIB="ranlib"
4210 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4211 break 2
4212 fi
4213done
4214done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004215IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217fi
4218fi
4219ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4220if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4222echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004223else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 { echo "$as_me:$LINENO: result: no" >&5
4225echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004226fi
4227
Martin v. Löwiseba40652007-08-30 20:10:57 +00004228 if test "x$ac_ct_RANLIB" = x; then
4229 RANLIB=":"
4230 else
4231 case $cross_compiling:$ac_tool_warned in
4232yes:)
4233{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4234whose name does not start with the host triplet. If you think this
4235configuration is useful to you, please write to autoconf@gnu.org." >&5
4236echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4237whose name does not start with the host triplet. If you think this
4238configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4239ac_tool_warned=yes ;;
4240esac
4241 RANLIB=$ac_ct_RANLIB
4242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004243else
4244 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246
4247
Guido van Rossum7f43da71994-08-01 12:15:30 +00004248for ac_prog in ar aal
4249do
Martin v. Löwis11437992002-04-12 09:54:03 +00004250 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4253echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004254if test "${ac_cv_prog_AR+set}" = set; then
4255 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
4257 if test -n "$AR"; then
4258 ac_cv_prog_AR="$AR" # Let the user override the test.
4259else
Martin v. Löwis11437992002-04-12 09:54:03 +00004260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261for as_dir in $PATH
4262do
4263 IFS=$as_save_IFS
4264 test -z "$as_dir" && as_dir=.
4265 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266 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 +00004267 ac_cv_prog_AR="$ac_prog"
4268 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4269 break 2
4270 fi
4271done
4272done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004273IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004274
Guido van Rossum7f43da71994-08-01 12:15:30 +00004275fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004277AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { echo "$as_me:$LINENO: result: $AR" >&5
4280echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282 { echo "$as_me:$LINENO: result: no" >&5
4283echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004285
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004288done
4289test -n "$AR" || AR="ar"
4290
Michael W. Hudson54241132001-12-07 15:38:26 +00004291
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004292
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004293# Extract the first word of "svnversion", so it can be a program name with args.
4294set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004295{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004297if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4298 echo $ECHO_N "(cached) $ECHO_C" >&6
4299else
4300 if test -n "$SVNVERSION"; then
4301 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4302else
4303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
4308 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309 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 +00004310 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4312 break 2
4313 fi
4314done
4315done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004316IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004317
Martin v. Löwisff600232006-04-03 19:12:32 +00004318 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004319fi
4320fi
4321SVNVERSION=$ac_cv_prog_SVNVERSION
4322if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004323 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4324echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004325else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004326 { echo "$as_me:$LINENO: result: no" >&5
4327echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004328fi
4329
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004331if test $SVNVERSION = found
4332then
4333 SVNVERSION="svnversion \$(srcdir)"
4334else
4335 SVNVERSION="echo exported"
4336fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004337
Neil Schemenauera42c8272001-03-31 00:01:55 +00004338case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004339bsdos*|hp*|HP*)
4340 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004341 if test -z "$INSTALL"
4342 then
4343 INSTALL="${srcdir}/install-sh -c"
4344 fi
4345esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004346ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004347for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4348 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004349 ac_aux_dir=$ac_dir
4350 ac_install_sh="$ac_aux_dir/install-sh -c"
4351 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004352 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install.sh -c"
4355 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004356 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/shtool install -c"
4359 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361done
4362if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004363 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4364echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367
4368# These three variables are undocumented and unsupported,
4369# and are intended to be withdrawn in a future Autoconf release.
4370# They can cause serious problems if a builder's source tree is in a directory
4371# whose full name contains unusual characters.
4372ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4373ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4374ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4375
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004376
4377# Find a good install program. We prefer a C program (faster),
4378# so one script is as good as another. But avoid the broken or
4379# incompatible versions:
4380# SysV /etc/install, /usr/sbin/install
4381# SunOS /usr/etc/install
4382# IRIX /sbin/install
4383# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004384# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004385# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4386# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4387# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004388# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4391echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004392if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004393if test "${ac_cv_path_install+set}" = set; then
4394 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004395else
Martin v. Löwis11437992002-04-12 09:54:03 +00004396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399 IFS=$as_save_IFS
4400 test -z "$as_dir" && as_dir=.
4401 # Account for people who put trailing slashes in PATH elements.
4402case $as_dir/ in
4403 ./ | .// | /cC/* | \
4404 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004405 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004406 /usr/ucb/* ) ;;
4407 *)
4408 # OSF1 and SCO ODT 3.0 have their own names for install.
4409 # Don't use installbsd from OSF since it installs stuff as root
4410 # by default.
4411 for ac_prog in ginstall scoinst install; do
4412 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413 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 +00004414 if test $ac_prog = install &&
4415 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4416 # AIX install. It has an incompatible calling convention.
4417 :
4418 elif test $ac_prog = install &&
4419 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4420 # program-specific install script used by HP pwplus--don't use.
4421 :
4422 else
4423 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4424 break 3
4425 fi
4426 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004427 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004428 done
4429 ;;
4430esac
4431done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004433
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004434
4435fi
4436 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004437 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004438 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439 # As a last resort, use the slow shell script. Don't cache a
4440 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004441 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004442 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004444 fi
4445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004446{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4447echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004448
4449# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4450# It thinks the first close brace ends the variable substitution.
4451test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4452
Martin v. Löwis11437992002-04-12 09:54:03 +00004453test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004454
4455test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4456
Michael W. Hudson54241132001-12-07 15:38:26 +00004457
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004458# Not every filesystem supports hard links
4459
4460if test -z "$LN" ; then
4461 case $ac_sys_system in
4462 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004463 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004464 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004465 *) LN=ln;;
4466 esac
4467fi
4468
Fred Drake109d9862001-07-11 06:27:56 +00004469# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004470{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4471echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004472
Martin v. Löwiseba40652007-08-30 20:10:57 +00004473# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004474if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004476if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004477then
4478
4479cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004480#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004481_ACEOF
4482
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483 { echo "$as_me:$LINENO: result: yes" >&5
4484echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004485 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486else { echo "$as_me:$LINENO: result: no" >&5
4487echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004488fi
4489else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004490 { echo "$as_me:$LINENO: result: no" >&5
4491echo "${ECHO_T}no" >&6; }
4492fi
4493
Fred Drake109d9862001-07-11 06:27:56 +00004494
Skip Montanarodecc6a42003-01-01 20:07:49 +00004495# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4496# merged with this chunk of code?
4497
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004498# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499# ------------------------
4500# (The following bit of code is complicated enough - please keep things
4501# indented properly. Just pretend you're editing Python code. ;-)
4502
4503# There are two parallel sets of case statements below, one that checks to
4504# see if OPT was set and one that does BASECFLAGS setting based upon
4505# compiler and platform. BASECFLAGS tweaks need to be made even if the
4506# user set OPT.
4507
4508# tweak OPT based on compiler and platform, only if the user didn't set
4509# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004510
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004511if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004512then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004513 case $GCC in
4514 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004515 if test "$CC" != 'g++' ; then
4516 STRICT_PROTO="-Wstrict-prototypes"
4517 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004518 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4519 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4520 WRAP="-fwrapv"
4521 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004522 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004523 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004524 if test "$Py_DEBUG" = 'true' ; then
4525 # Optimization messes up debuggers, so turn it off for
4526 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004527 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004528 else
Thomas Hellere5529592007-12-13 21:20:29 +00004529 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004530 fi
4531 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004532 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004533 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004534 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004535 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004536 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004537 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4538 ;;
4539 esac
Fred Drake109d9862001-07-11 06:27:56 +00004540 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004542 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004543 OPT="-O"
4544 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004545 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546
4547 # The current (beta) Monterey compiler dies with optimizations
4548 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004549 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550 Monterey*)
4551 OPT=""
4552 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004553 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004554
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004555fi
4556
Skip Montanarodecc6a42003-01-01 20:07:49 +00004557
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004558
4559# The -arch flags for universal builds on OSX
4560UNIVERSAL_ARCH_FLAGS=
4561
4562
Skip Montanarodecc6a42003-01-01 20:07:49 +00004563# tweak BASECFLAGS based on compiler and platform
4564case $GCC in
4565yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004566 # Python violates C99 rules, by casting between incompatible
4567 # pointer types. GCC may generate bad code as a result of that,
4568 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004569 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4570echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004571 ac_save_cc="$CC"
4572 CC="$CC -fno-strict-aliasing"
4573 if test "$cross_compiling" = yes; then
4574 ac_cv_no_strict_aliasing_ok=no
4575else
4576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004582int main() { return 0; }
4583_ACEOF
4584rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004585if { (ac_try="$ac_link"
4586case "(($ac_try" in
4587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4588 *) ac_try_echo=$ac_try;;
4589esac
4590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4591 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004592 ac_status=$?
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004595 { (case "(($ac_try" in
4596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597 *) ac_try_echo=$ac_try;;
4598esac
4599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4600 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004601 ac_status=$?
4602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4603 (exit $ac_status); }; }; then
4604 ac_cv_no_strict_aliasing_ok=yes
4605else
4606 echo "$as_me: program exited with status $ac_status" >&5
4607echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004608sed 's/^/| /' conftest.$ac_ext >&5
4609
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004610( exit $ac_status )
4611ac_cv_no_strict_aliasing_ok=no
4612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004613rm -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 +00004614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615
4616
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004617 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004618 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4619echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004620 if test $ac_cv_no_strict_aliasing_ok = yes
4621 then
4622 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4623 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004624
4625 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4626 # support. Without this, treatment of subnormals doesn't follow
4627 # the standard.
4628 case $ac_sys_machine in
4629 alpha*)
4630 BASECFLAGS="$BASECFLAGS -mieee"
4631 ;;
4632 esac
4633
Skip Montanarodecc6a42003-01-01 20:07:49 +00004634 case $ac_sys_system in
4635 SCO_SV*)
4636 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4637 ;;
4638 # is there any other compiler on Darwin besides gcc?
4639 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004640 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4641 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004642 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004643 UNIVERSAL_ARCH_FLAGS=""
4644 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4645 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4646
4647 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4648 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4649
4650 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4652
4653 else
4654 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4655echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4656 { (exit 1); exit 1; }; }
4657
4658 fi
4659
4660
4661 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00004662 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004663 fi
4664
Skip Montanarodecc6a42003-01-01 20:07:49 +00004665 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004666 OSF*)
4667 BASECFLAGS="$BASECFLAGS -mieee"
4668 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004669 esac
4670 ;;
4671
4672*)
4673 case $ac_sys_system in
4674 OpenUNIX*|UnixWare*)
4675 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4676 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004677 OSF*)
4678 BASECFLAGS="$BASECFLAGS -ieee -std"
4679 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004680 SCO_SV*)
4681 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4682 ;;
4683 esac
4684 ;;
4685esac
4686
Fred Drakee1ceaa02001-12-04 20:55:47 +00004687if test "$Py_DEBUG" = 'true'; then
4688 :
4689else
4690 OPT="-DNDEBUG $OPT"
4691fi
4692
Guido van Rossum563e7081996-09-10 18:20:48 +00004693if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004694then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004695 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004696fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004697
Neal Norwitz020c46a2006-01-07 21:39:28 +00004698# disable check for icc since it seems to pass, but generates a warning
4699if test "$CC" = icc
4700then
4701 ac_cv_opt_olimit_ok=no
4702fi
4703
Martin v. Löwiseba40652007-08-30 20:10:57 +00004704{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4705echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004706if test "${ac_cv_opt_olimit_ok+set}" = set; then
4707 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004708else
4709 ac_save_cc="$CC"
4710CC="$CC -OPT:Olimit=0"
4711if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004712 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004713else
Martin v. Löwis11437992002-04-12 09:54:03 +00004714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004715/* confdefs.h. */
4716_ACEOF
4717cat confdefs.h >>conftest.$ac_ext
4718cat >>conftest.$ac_ext <<_ACEOF
4719/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004720int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004721_ACEOF
4722rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004723if { (ac_try="$ac_link"
4724case "(($ac_try" in
4725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4726 *) ac_try_echo=$ac_try;;
4727esac
4728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4729 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004730 ac_status=$?
4731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4732 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004733 { (case "(($ac_try" in
4734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735 *) ac_try_echo=$ac_try;;
4736esac
4737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004742 ac_cv_opt_olimit_ok=yes
4743else
Martin v. Löwis11437992002-04-12 09:54:03 +00004744 echo "$as_me: program exited with status $ac_status" >&5
4745echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004746sed 's/^/| /' conftest.$ac_ext >&5
4747
Martin v. Löwis11437992002-04-12 09:54:03 +00004748( exit $ac_status )
4749ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751rm -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 +00004752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004753
4754
Guido van Rossum91922671997-10-09 20:24:13 +00004755CC="$ac_save_cc"
4756fi
4757
Martin v. Löwiseba40652007-08-30 20:10:57 +00004758{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4759echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004760if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004761 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004762 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4763 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4764 # environment?
4765 Darwin*)
4766 ;;
4767 *)
4768 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4769 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004770 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004771else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004772 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4773echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 if test "${ac_cv_olimit_ok+set}" = set; then
4775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004776else
4777 ac_save_cc="$CC"
4778 CC="$CC -Olimit 1500"
4779 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004780 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004781else
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004788int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004789_ACEOF
4790rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791if { (ac_try="$ac_link"
4792case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795esac
4796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4797 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004798 ac_status=$?
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004801 { (case "(($ac_try" in
4802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4803 *) ac_try_echo=$ac_try;;
4804esac
4805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4806 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004810 ac_cv_olimit_ok=yes
4811else
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 echo "$as_me: program exited with status $ac_status" >&5
4813echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004814sed 's/^/| /' conftest.$ac_ext >&5
4815
Martin v. Löwis11437992002-04-12 09:54:03 +00004816( exit $ac_status )
4817ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819rm -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 +00004820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821
4822
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004823 CC="$ac_save_cc"
4824fi
4825
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4827echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004828 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004829 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004830 fi
4831fi
4832
Martin v. Löwisaac13162006-10-19 10:58:46 +00004833# Check whether GCC supports PyArg_ParseTuple format
4834if test "$GCC" = "yes"
4835then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004836 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4837echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004838 save_CFLAGS=$CFLAGS
4839 CFLAGS="$CFLAGS -Werror"
4840 cat >conftest.$ac_ext <<_ACEOF
4841/* confdefs.h. */
4842_ACEOF
4843cat confdefs.h >>conftest.$ac_ext
4844cat >>conftest.$ac_ext <<_ACEOF
4845/* end confdefs.h. */
4846
4847 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4848
4849int
4850main ()
4851{
4852
4853 ;
4854 return 0;
4855}
4856_ACEOF
4857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004858if { (ac_try="$ac_compile"
4859case "(($ac_try" in
4860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4861 *) ac_try_echo=$ac_try;;
4862esac
4863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004865 ac_status=$?
4866 grep -v '^ *+' conftest.er1 >conftest.err
4867 rm -f conftest.er1
4868 cat conftest.err >&5
4869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004870 (exit $ac_status); } && {
4871 test -z "$ac_c_werror_flag" ||
4872 test ! -s conftest.err
4873 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004874
4875cat >>confdefs.h <<\_ACEOF
4876#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4877_ACEOF
4878
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 { echo "$as_me:$LINENO: result: yes" >&5
4880echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004881else
4882 echo "$as_me: failed program was:" >&5
4883sed 's/^/| /' conftest.$ac_ext >&5
4884
Martin v. Löwiseba40652007-08-30 20:10:57 +00004885 { echo "$as_me:$LINENO: result: no" >&5
4886echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004887
4888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004889
4890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004891 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004892fi
4893
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004894# On some compilers, pthreads are available without further options
4895# (e.g. MacOS X). On some of these systems, the compiler will not
4896# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4897# So we have to see first whether pthreads are available without
4898# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4900echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004901if test "${ac_cv_pthread_is_default+set}" = set; then
4902 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004903else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004904 if test "$cross_compiling" = yes; then
4905 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004906else
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004908/* confdefs.h. */
4909_ACEOF
4910cat confdefs.h >>conftest.$ac_ext
4911cat >>conftest.$ac_ext <<_ACEOF
4912/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004913
Martin v. Löwis130fb172001-07-19 11:00:41 +00004914#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004915
4916void* routine(void* p){return NULL;}
4917
4918int main(){
4919 pthread_t p;
4920 if(pthread_create(&p,NULL,routine,NULL)!=0)
4921 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004922 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004923 return 0;
4924}
4925
Martin v. Löwis11437992002-04-12 09:54:03 +00004926_ACEOF
4927rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928if { (ac_try="$ac_link"
4929case "(($ac_try" in
4930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4931 *) ac_try_echo=$ac_try;;
4932esac
4933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4934 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 ac_status=$?
4936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 { (case "(($ac_try" in
4939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4940 *) ac_try_echo=$ac_try;;
4941esac
4942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4943 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004947
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004948 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004949 ac_cv_kthread=no
4950 ac_cv_pthread=no
4951
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 echo "$as_me: program exited with status $ac_status" >&5
4954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957( exit $ac_status )
4958ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004960rm -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 +00004961fi
4962
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963
4964
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004965fi
4966
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4968echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004969
Michael W. Hudson54241132001-12-07 15:38:26 +00004970
Martin v. Löwis11437992002-04-12 09:54:03 +00004971if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004972then
4973 ac_cv_kpthread=no
4974else
4975# -Kpthread, if available, provides the right #defines
4976# and linker options to make pthread_create available
4977# Some compilers won't report that they do not support -Kpthread,
4978# so we need to run a program to see whether it really made the
4979# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4981echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004982if test "${ac_cv_kpthread+set}" = set; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004984else
4985 ac_save_cc="$CC"
4986CC="$CC -Kpthread"
4987if test "$cross_compiling" = yes; then
4988 ac_cv_kpthread=no
4989else
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004991/* confdefs.h. */
4992_ACEOF
4993cat confdefs.h >>conftest.$ac_ext
4994cat >>conftest.$ac_ext <<_ACEOF
4995/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004996
4997#include <pthread.h>
4998
4999void* routine(void* p){return NULL;}
5000
5001int main(){
5002 pthread_t p;
5003 if(pthread_create(&p,NULL,routine,NULL)!=0)
5004 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005005 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005006 return 0;
5007}
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009_ACEOF
5010rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005011if { (ac_try="$ac_link"
5012case "(($ac_try" in
5013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5014 *) ac_try_echo=$ac_try;;
5015esac
5016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5017 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005018 ac_status=$?
5019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021 { (case "(($ac_try" in
5022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5023 *) ac_try_echo=$ac_try;;
5024esac
5025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5026 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005027 ac_status=$?
5028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005030 ac_cv_kpthread=yes
5031else
Martin v. Löwis11437992002-04-12 09:54:03 +00005032 echo "$as_me: program exited with status $ac_status" >&5
5033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005034sed 's/^/| /' conftest.$ac_ext >&5
5035
Martin v. Löwis11437992002-04-12 09:54:03 +00005036( exit $ac_status )
5037ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005039rm -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 +00005040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005041
5042
Martin v. Löwis130fb172001-07-19 11:00:41 +00005043CC="$ac_save_cc"
5044fi
5045
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5047echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005048fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005049
Skip Montanarod8d39a02003-07-10 20:44:10 +00005050if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005051then
5052# -Kthread, if available, provides the right #defines
5053# and linker options to make pthread_create available
5054# Some compilers won't report that they do not support -Kthread,
5055# so we need to run a program to see whether it really made the
5056# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005057{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5058echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005059if test "${ac_cv_kthread+set}" = set; then
5060 echo $ECHO_N "(cached) $ECHO_C" >&6
5061else
5062 ac_save_cc="$CC"
5063CC="$CC -Kthread"
5064if test "$cross_compiling" = yes; then
5065 ac_cv_kthread=no
5066else
5067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005068/* confdefs.h. */
5069_ACEOF
5070cat confdefs.h >>conftest.$ac_ext
5071cat >>conftest.$ac_ext <<_ACEOF
5072/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005073
5074#include <pthread.h>
5075
5076void* routine(void* p){return NULL;}
5077
5078int main(){
5079 pthread_t p;
5080 if(pthread_create(&p,NULL,routine,NULL)!=0)
5081 return 1;
5082 (void)pthread_detach(p);
5083 return 0;
5084}
5085
5086_ACEOF
5087rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005088if { (ac_try="$ac_link"
5089case "(($ac_try" in
5090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5091 *) ac_try_echo=$ac_try;;
5092esac
5093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5094 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005095 ac_status=$?
5096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005098 { (case "(($ac_try" in
5099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5100 *) ac_try_echo=$ac_try;;
5101esac
5102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5103 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); }; }; then
5107 ac_cv_kthread=yes
5108else
5109 echo "$as_me: program exited with status $ac_status" >&5
5110echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005111sed 's/^/| /' conftest.$ac_ext >&5
5112
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005113( exit $ac_status )
5114ac_cv_kthread=no
5115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005116rm -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 +00005117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005118
5119
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005120CC="$ac_save_cc"
5121fi
5122
Martin v. Löwiseba40652007-08-30 20:10:57 +00005123{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5124echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005125fi
5126
Skip Montanarod8d39a02003-07-10 20:44:10 +00005127if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005128then
5129# -pthread, if available, provides the right #defines
5130# and linker options to make pthread_create available
5131# Some compilers won't report that they do not support -pthread,
5132# so we need to run a program to see whether it really made the
5133# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005134{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5135echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005136if test "${ac_cv_thread+set}" = set; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
5139 ac_save_cc="$CC"
5140CC="$CC -pthread"
5141if test "$cross_compiling" = yes; then
5142 ac_cv_pthread=no
5143else
5144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005145/* confdefs.h. */
5146_ACEOF
5147cat confdefs.h >>conftest.$ac_ext
5148cat >>conftest.$ac_ext <<_ACEOF
5149/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005150
5151#include <pthread.h>
5152
5153void* routine(void* p){return NULL;}
5154
5155int main(){
5156 pthread_t p;
5157 if(pthread_create(&p,NULL,routine,NULL)!=0)
5158 return 1;
5159 (void)pthread_detach(p);
5160 return 0;
5161}
5162
5163_ACEOF
5164rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005165if { (ac_try="$ac_link"
5166case "(($ac_try" in
5167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5168 *) ac_try_echo=$ac_try;;
5169esac
5170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5171 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175 { (case "(($ac_try" in
5176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5177 *) ac_try_echo=$ac_try;;
5178esac
5179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5180 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); }; }; then
5184 ac_cv_pthread=yes
5185else
5186 echo "$as_me: program exited with status $ac_status" >&5
5187echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005188sed 's/^/| /' conftest.$ac_ext >&5
5189
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005190( exit $ac_status )
5191ac_cv_pthread=no
5192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005193rm -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 +00005194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005195
5196
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005197CC="$ac_save_cc"
5198fi
5199
Martin v. Löwiseba40652007-08-30 20:10:57 +00005200{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5201echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005202fi
5203
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005204# If we have set a CC compiler flag for thread support then
5205# check if it works for CXX, too.
5206ac_cv_cxx_thread=no
5207if test ! -z "$CXX"
5208then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005209{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5210echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005211ac_save_cxx="$CXX"
5212
5213if test "$ac_cv_kpthread" = "yes"
5214then
5215 CXX="$CXX -Kpthread"
5216 ac_cv_cxx_thread=yes
5217elif test "$ac_cv_kthread" = "yes"
5218then
5219 CXX="$CXX -Kthread"
5220 ac_cv_cxx_thread=yes
5221elif test "$ac_cv_pthread" = "yes"
5222then
5223 CXX="$CXX -pthread"
5224 ac_cv_cxx_thread=yes
5225fi
5226
5227if test $ac_cv_cxx_thread = yes
5228then
5229 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5230 $CXX -c conftest.$ac_ext 2>&5
5231 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5232 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5233 then
5234 ac_cv_cxx_thread=yes
5235 else
5236 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005237 fi
5238 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005240{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5241echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005242fi
5243CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005244
Michael W. Hudson54241132001-12-07 15:38:26 +00005245
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005246# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005247{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5248echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005249if test "${ac_cv_header_stdc+set}" = set; then
5250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251else
Martin v. Löwis11437992002-04-12 09:54:03 +00005252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005253/* confdefs.h. */
5254_ACEOF
5255cat confdefs.h >>conftest.$ac_ext
5256cat >>conftest.$ac_ext <<_ACEOF
5257/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005258#include <stdlib.h>
5259#include <stdarg.h>
5260#include <string.h>
5261#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005262
Skip Montanaro6dead952003-09-25 14:50:04 +00005263int
5264main ()
5265{
5266
5267 ;
5268 return 0;
5269}
Martin v. Löwis11437992002-04-12 09:54:03 +00005270_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005271rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005272if { (ac_try="$ac_compile"
5273case "(($ac_try" in
5274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5275 *) ac_try_echo=$ac_try;;
5276esac
5277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005280 grep -v '^ *+' conftest.er1 >conftest.err
5281 rm -f conftest.er1
5282 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005284 (exit $ac_status); } && {
5285 test -z "$ac_c_werror_flag" ||
5286 test ! -s conftest.err
5287 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005288 ac_cv_header_stdc=yes
5289else
Martin v. Löwis11437992002-04-12 09:54:03 +00005290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005291sed 's/^/| /' conftest.$ac_ext >&5
5292
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005295
5296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297
5298if test $ac_cv_header_stdc = yes; then
5299 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005301/* confdefs.h. */
5302_ACEOF
5303cat confdefs.h >>conftest.$ac_ext
5304cat >>conftest.$ac_ext <<_ACEOF
5305/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005306#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005307
5308_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005310 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311 :
5312else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313 ac_cv_header_stdc=no
5314fi
5315rm -f conftest*
5316
5317fi
5318
5319if test $ac_cv_header_stdc = yes; then
5320 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005328
5329_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005331 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005332 :
5333else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005334 ac_cv_header_stdc=no
5335fi
5336rm -f conftest*
5337
5338fi
5339
5340if test $ac_cv_header_stdc = yes; then
5341 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005342 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005343 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344else
Martin v. Löwis11437992002-04-12 09:54:03 +00005345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005346/* confdefs.h. */
5347_ACEOF
5348cat confdefs.h >>conftest.$ac_ext
5349cat >>conftest.$ac_ext <<_ACEOF
5350/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005351#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005352#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005353#if ((' ' & 0x0FF) == 0x020)
5354# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5355# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5356#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005357# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005358 (('a' <= (c) && (c) <= 'i') \
5359 || ('j' <= (c) && (c) <= 'r') \
5360 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005361# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5362#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005363
Martin v. Löwis11437992002-04-12 09:54:03 +00005364#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5365int
5366main ()
5367{
5368 int i;
5369 for (i = 0; i < 256; i++)
5370 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005371 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005372 return 2;
5373 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005374}
5375_ACEOF
5376rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005377if { (ac_try="$ac_link"
5378case "(($ac_try" in
5379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5380 *) ac_try_echo=$ac_try;;
5381esac
5382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5383 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005384 ac_status=$?
5385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005387 { (case "(($ac_try" in
5388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5389 *) ac_try_echo=$ac_try;;
5390esac
5391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5392 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005393 ac_status=$?
5394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5395 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396 :
5397else
Martin v. Löwis11437992002-04-12 09:54:03 +00005398 echo "$as_me: program exited with status $ac_status" >&5
5399echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005400sed 's/^/| /' conftest.$ac_ext >&5
5401
Martin v. Löwis11437992002-04-12 09:54:03 +00005402( exit $ac_status )
5403ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5406fi
5407
5408
Michael W. Hudson54241132001-12-07 15:38:26 +00005409fi
5410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005411{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5412echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005413if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005414
5415cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005417_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418
5419fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005420
Skip Montanarob9820a32004-01-17 00:16:12 +00005421# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005432 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005433do
5434as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5436echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5437if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439else
5440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005441/* confdefs.h. */
5442_ACEOF
5443cat confdefs.h >>conftest.$ac_ext
5444cat >>conftest.$ac_ext <<_ACEOF
5445/* end confdefs.h. */
5446$ac_includes_default
5447
5448#include <$ac_header>
5449_ACEOF
5450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005451if { (ac_try="$ac_compile"
5452case "(($ac_try" in
5453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5454 *) ac_try_echo=$ac_try;;
5455esac
5456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5457 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005459 grep -v '^ *+' conftest.er1 >conftest.err
5460 rm -f conftest.er1
5461 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005463 (exit $ac_status); } && {
5464 test -z "$ac_c_werror_flag" ||
5465 test ! -s conftest.err
5466 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005467 eval "$as_ac_Header=yes"
5468else
5469 echo "$as_me: failed program was:" >&5
5470sed 's/^/| /' conftest.$ac_ext >&5
5471
Martin v. Löwiseba40652007-08-30 20:10:57 +00005472 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005474
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005477ac_res=`eval echo '${'$as_ac_Header'}'`
5478 { echo "$as_me:$LINENO: result: $ac_res" >&5
5479echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005480if test `eval echo '${'$as_ac_Header'}'` = yes; then
5481 cat >>confdefs.h <<_ACEOF
5482#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5483_ACEOF
5484
5485fi
5486
5487done
5488
5489
Martin v. Löwis11437992002-04-12 09:54:03 +00005490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
Anthony Baxter8a560de2004-10-13 15:30:56 +00005526
Martin v. Löwisc3001752005-01-23 09:27:24 +00005527
Martin v. Löwis11017b12006-01-14 18:12:57 +00005528
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005529
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005530
5531
5532
5533
5534
5535
5536
5537
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005538
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005539
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005540
5541
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005542
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005543
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005544for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5545fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005546ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005547shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005548unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005549sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5550sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005551sys/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 +00005552sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005553sys/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 +00005554sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005555bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005556do
Martin v. Löwis11437992002-04-12 09:54:03 +00005557as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005558if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5559 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5560echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5561if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005562 echo $ECHO_N "(cached) $ECHO_C" >&6
5563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005564ac_res=`eval echo '${'$as_ac_Header'}'`
5565 { echo "$as_me:$LINENO: result: $ac_res" >&5
5566echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005567else
Martin v. Löwis11437992002-04-12 09:54:03 +00005568 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005569{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5570echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005572/* confdefs.h. */
5573_ACEOF
5574cat confdefs.h >>conftest.$ac_ext
5575cat >>conftest.$ac_ext <<_ACEOF
5576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005577$ac_includes_default
5578#include <$ac_header>
5579_ACEOF
5580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005581if { (ac_try="$ac_compile"
5582case "(($ac_try" in
5583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5584 *) ac_try_echo=$ac_try;;
5585esac
5586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005589 grep -v '^ *+' conftest.er1 >conftest.err
5590 rm -f conftest.er1
5591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005593 (exit $ac_status); } && {
5594 test -z "$ac_c_werror_flag" ||
5595 test ! -s conftest.err
5596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005597 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005598else
Martin v. Löwis11437992002-04-12 09:54:03 +00005599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005600sed 's/^/| /' conftest.$ac_ext >&5
5601
Martin v. Löwiseba40652007-08-30 20:10:57 +00005602 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005604
5605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5607echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005608
5609# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005610{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5611echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005613/* confdefs.h. */
5614_ACEOF
5615cat confdefs.h >>conftest.$ac_ext
5616cat >>conftest.$ac_ext <<_ACEOF
5617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005618#include <$ac_header>
5619_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005620if { (ac_try="$ac_cpp conftest.$ac_ext"
5621case "(($ac_try" in
5622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5623 *) ac_try_echo=$ac_try;;
5624esac
5625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005628 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 rm -f conftest.er1
5630 cat conftest.err >&5
5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005632 (exit $ac_status); } >/dev/null && {
5633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5634 test ! -s conftest.err
5635 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 ac_header_preproc=yes
5637else
5638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005639sed 's/^/| /' conftest.$ac_ext >&5
5640
Martin v. Löwis11437992002-04-12 09:54:03 +00005641 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005643
Martin v. Löwis11437992002-04-12 09:54:03 +00005644rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5646echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005647
5648# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5650 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005651 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5652echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005653 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5654echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5655 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005656 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005657 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005658 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5659echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005660 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5661echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5662 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5663echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5664 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5665echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005666 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5667echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005668 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5669echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005670 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005671## ------------------------------------------------ ##
5672## Report this to http://www.python.org/python-bugs ##
5673## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005674_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005675 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005676 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005677esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005678{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5679echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5680if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005681 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005682else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005685ac_res=`eval echo '${'$as_ac_Header'}'`
5686 { echo "$as_me:$LINENO: result: $ac_res" >&5
5687echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005688
5689fi
5690if test `eval echo '${'$as_ac_Header'}'` = yes; then
5691 cat >>confdefs.h <<_ACEOF
5692#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5693_ACEOF
5694
5695fi
5696
Guido van Rossum627b2d71993-12-24 10:39:16 +00005697done
5698
Martin v. Löwis11437992002-04-12 09:54:03 +00005699
5700
5701
5702
5703
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005705for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5706 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005707{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5708echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5709if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005711else
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005718#include <sys/types.h>
5719#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005720
Martin v. Löwis11437992002-04-12 09:54:03 +00005721int
5722main ()
5723{
5724if ((DIR *) 0)
5725return 0;
5726 ;
5727 return 0;
5728}
5729_ACEOF
5730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005731if { (ac_try="$ac_compile"
5732case "(($ac_try" in
5733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5734 *) ac_try_echo=$ac_try;;
5735esac
5736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005739 grep -v '^ *+' conftest.er1 >conftest.err
5740 rm -f conftest.er1
5741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005743 (exit $ac_status); } && {
5744 test -z "$ac_c_werror_flag" ||
5745 test ! -s conftest.err
5746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005747 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005748else
Martin v. Löwis11437992002-04-12 09:54:03 +00005749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005750sed 's/^/| /' conftest.$ac_ext >&5
5751
Martin v. Löwiseba40652007-08-30 20:10:57 +00005752 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754
5755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005757ac_res=`eval echo '${'$as_ac_Header'}'`
5758 { echo "$as_me:$LINENO: result: $ac_res" >&5
5759echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005760if test `eval echo '${'$as_ac_Header'}'` = yes; then
5761 cat >>confdefs.h <<_ACEOF
5762#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5763_ACEOF
5764
5765ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005766fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005767
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005768done
5769# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5770if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5772echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005773if test "${ac_cv_search_opendir+set}" = set; then
5774 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775else
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005778/* confdefs.h. */
5779_ACEOF
5780cat confdefs.h >>conftest.$ac_ext
5781cat >>conftest.$ac_ext <<_ACEOF
5782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005783
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784/* Override any GCC internal prototype to avoid an error.
5785 Use char because int might match the return type of a GCC
5786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005787#ifdef __cplusplus
5788extern "C"
5789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005790char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005791int
5792main ()
5793{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005794return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 ;
5796 return 0;
5797}
5798_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005799for ac_lib in '' dir; do
5800 if test -z "$ac_lib"; then
5801 ac_res="none required"
5802 else
5803 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005804 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805 fi
5806 rm -f conftest.$ac_objext conftest$ac_exeext
5807if { (ac_try="$ac_link"
5808case "(($ac_try" in
5809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5810 *) ac_try_echo=$ac_try;;
5811esac
5812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5813 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005814 ac_status=$?
5815 grep -v '^ *+' conftest.er1 >conftest.err
5816 rm -f conftest.er1
5817 cat conftest.err >&5
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819 (exit $ac_status); } && {
5820 test -z "$ac_c_werror_flag" ||
5821 test ! -s conftest.err
5822 } && test -s conftest$ac_exeext &&
5823 $as_test_x conftest$ac_exeext; then
5824 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005825else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005826 echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
Martin v. Löwiseba40652007-08-30 20:10:57 +00005829
Brett Cannon19fab762007-06-02 03:02:29 +00005830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831
5832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5833 conftest$ac_exeext
5834 if test "${ac_cv_search_opendir+set}" = set; then
5835 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837done
5838if test "${ac_cv_search_opendir+set}" = set; then
5839 :
5840else
5841 ac_cv_search_opendir=no
5842fi
5843rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005844LIBS=$ac_func_search_save_LIBS
5845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005846{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5847echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5848ac_res=$ac_cv_search_opendir
5849if test "$ac_res" != no; then
5850 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005851
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005853
Michael W. Hudson54241132001-12-07 15:38:26 +00005854else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005855 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5856echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005857if test "${ac_cv_search_opendir+set}" = set; then
5858 echo $ECHO_N "(cached) $ECHO_C" >&6
5859else
5860 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005862/* confdefs.h. */
5863_ACEOF
5864cat confdefs.h >>conftest.$ac_ext
5865cat >>conftest.$ac_ext <<_ACEOF
5866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005867
Martin v. Löwiseba40652007-08-30 20:10:57 +00005868/* Override any GCC internal prototype to avoid an error.
5869 Use char because int might match the return type of a GCC
5870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005871#ifdef __cplusplus
5872extern "C"
5873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005874char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005875int
5876main ()
5877{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005878return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 ;
5880 return 0;
5881}
5882_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005883for ac_lib in '' x; do
5884 if test -z "$ac_lib"; then
5885 ac_res="none required"
5886 else
5887 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005888 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005889 fi
5890 rm -f conftest.$ac_objext conftest$ac_exeext
5891if { (ac_try="$ac_link"
5892case "(($ac_try" in
5893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5894 *) ac_try_echo=$ac_try;;
5895esac
5896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5897 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005898 ac_status=$?
5899 grep -v '^ *+' conftest.er1 >conftest.err
5900 rm -f conftest.er1
5901 cat conftest.err >&5
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 (exit $ac_status); } && {
5904 test -z "$ac_c_werror_flag" ||
5905 test ! -s conftest.err
5906 } && test -s conftest$ac_exeext &&
5907 $as_test_x conftest$ac_exeext; then
5908 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005909else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005910 echo "$as_me: failed program was:" >&5
5911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913
Brett Cannon19fab762007-06-02 03:02:29 +00005914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915
5916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5917 conftest$ac_exeext
5918 if test "${ac_cv_search_opendir+set}" = set; then
5919 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921done
5922if test "${ac_cv_search_opendir+set}" = set; then
5923 :
5924else
5925 ac_cv_search_opendir=no
5926fi
5927rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005928LIBS=$ac_func_search_save_LIBS
5929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5931echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5932ac_res=$ac_cv_search_opendir
5933if test "$ac_res" != no; then
5934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005935
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936fi
5937
5938fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005939
Martin v. Löwiseba40652007-08-30 20:10:57 +00005940{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5941echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5943 echo $ECHO_N "(cached) $ECHO_C" >&6
5944else
5945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005946/* confdefs.h. */
5947_ACEOF
5948cat confdefs.h >>conftest.$ac_ext
5949cat >>conftest.$ac_ext <<_ACEOF
5950/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005951#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005952int
5953main ()
5954{
5955return makedev(0, 0);
5956 ;
5957 return 0;
5958}
5959_ACEOF
5960rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005961if { (ac_try="$ac_link"
5962case "(($ac_try" in
5963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5964 *) ac_try_echo=$ac_try;;
5965esac
5966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5967 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005969 grep -v '^ *+' conftest.er1 >conftest.err
5970 rm -f conftest.er1
5971 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973 (exit $ac_status); } && {
5974 test -z "$ac_c_werror_flag" ||
5975 test ! -s conftest.err
5976 } && test -s conftest$ac_exeext &&
5977 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978 ac_cv_header_sys_types_h_makedev=yes
5979else
5980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005981sed 's/^/| /' conftest.$ac_ext >&5
5982
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985
5986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988
5989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5991echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992
5993if test $ac_cv_header_sys_types_h_makedev = no; then
5994if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005995 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5996echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005997if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5998 echo $ECHO_N "(cached) $ECHO_C" >&6
5999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6001echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002else
6003 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6005echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006007/* confdefs.h. */
6008_ACEOF
6009cat confdefs.h >>conftest.$ac_ext
6010cat >>conftest.$ac_ext <<_ACEOF
6011/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012$ac_includes_default
6013#include <sys/mkdev.h>
6014_ACEOF
6015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016if { (ac_try="$ac_compile"
6017case "(($ac_try" in
6018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6019 *) ac_try_echo=$ac_try;;
6020esac
6021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006024 grep -v '^ *+' conftest.er1 >conftest.err
6025 rm -f conftest.er1
6026 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028 (exit $ac_status); } && {
6029 test -z "$ac_c_werror_flag" ||
6030 test ! -s conftest.err
6031 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032 ac_header_compiler=yes
6033else
6034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006035sed 's/^/| /' conftest.$ac_ext >&5
6036
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006039
6040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6041{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6042echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043
6044# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6046echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006048/* confdefs.h. */
6049_ACEOF
6050cat confdefs.h >>conftest.$ac_ext
6051cat >>conftest.$ac_ext <<_ACEOF
6052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053#include <sys/mkdev.h>
6054_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006055if { (ac_try="$ac_cpp conftest.$ac_ext"
6056case "(($ac_try" in
6057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6058 *) ac_try_echo=$ac_try;;
6059esac
6060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6061 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006063 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 rm -f conftest.er1
6065 cat conftest.err >&5
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067 (exit $ac_status); } >/dev/null && {
6068 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6069 test ! -s conftest.err
6070 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071 ac_header_preproc=yes
6072else
6073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006074sed 's/^/| /' conftest.$ac_ext >&5
6075
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076 ac_header_preproc=no
6077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006078
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6081echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082
6083# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006084case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6085 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6087echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6089echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6090 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006091 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006092 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006093 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6094echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006095 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6096echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6097 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6098echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6099 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6100echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006101 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6102echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006103 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6104echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006106## ------------------------------------------------ ##
6107## Report this to http://www.python.org/python-bugs ##
6108## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006109_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006111 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6114echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6116 echo $ECHO_N "(cached) $ECHO_C" >&6
6117else
6118 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006120{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6121echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122
6123fi
6124if test $ac_cv_header_sys_mkdev_h = yes; then
6125
6126cat >>confdefs.h <<\_ACEOF
6127#define MAJOR_IN_MKDEV 1
6128_ACEOF
6129
6130fi
6131
6132
6133
6134 if test $ac_cv_header_sys_mkdev_h = no; then
6135 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006136 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6137echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6139 echo $ECHO_N "(cached) $ECHO_C" >&6
6140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6142echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143else
6144 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006145{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6146echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006148/* confdefs.h. */
6149_ACEOF
6150cat confdefs.h >>conftest.$ac_ext
6151cat >>conftest.$ac_ext <<_ACEOF
6152/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153$ac_includes_default
6154#include <sys/sysmacros.h>
6155_ACEOF
6156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157if { (ac_try="$ac_compile"
6158case "(($ac_try" in
6159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6160 *) ac_try_echo=$ac_try;;
6161esac
6162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006165 grep -v '^ *+' conftest.er1 >conftest.err
6166 rm -f conftest.er1
6167 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006169 (exit $ac_status); } && {
6170 test -z "$ac_c_werror_flag" ||
6171 test ! -s conftest.err
6172 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173 ac_header_compiler=yes
6174else
6175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006176sed 's/^/| /' conftest.$ac_ext >&5
6177
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180
6181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6182{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6183echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184
6185# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006186{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6187echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* confdefs.h. */
6190_ACEOF
6191cat confdefs.h >>conftest.$ac_ext
6192cat >>conftest.$ac_ext <<_ACEOF
6193/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194#include <sys/sysmacros.h>
6195_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196if { (ac_try="$ac_cpp conftest.$ac_ext"
6197case "(($ac_try" in
6198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6199 *) ac_try_echo=$ac_try;;
6200esac
6201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6202 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006203 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006204 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205 rm -f conftest.er1
6206 cat conftest.err >&5
6207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006208 (exit $ac_status); } >/dev/null && {
6209 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6210 test ! -s conftest.err
6211 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212 ac_header_preproc=yes
6213else
6214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006215sed 's/^/| /' conftest.$ac_ext >&5
6216
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217 ac_header_preproc=no
6218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006219
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6222echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006225case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6226 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6228echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6230echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6231 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006234 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6235echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006236 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6237echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6238 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6239echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6240 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6241echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006242 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6243echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006244 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6245echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006247## ------------------------------------------------ ##
6248## Report this to http://www.python.org/python-bugs ##
6249## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006250_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6255echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6257 echo $ECHO_N "(cached) $ECHO_C" >&6
6258else
6259 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6262echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
6265if test $ac_cv_header_sys_sysmacros_h = yes; then
6266
6267cat >>confdefs.h <<\_ACEOF
6268#define MAJOR_IN_SYSMACROS 1
6269_ACEOF
6270
6271fi
6272
6273
6274 fi
6275fi
6276
Michael W. Hudson54241132001-12-07 15:38:26 +00006277
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006278# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006279
6280for ac_header in term.h
6281do
6282as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006283{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6284echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6285if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006286 echo $ECHO_N "(cached) $ECHO_C" >&6
6287else
6288 cat >conftest.$ac_ext <<_ACEOF
6289/* confdefs.h. */
6290_ACEOF
6291cat confdefs.h >>conftest.$ac_ext
6292cat >>conftest.$ac_ext <<_ACEOF
6293/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006294
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006295#ifdef HAVE_CURSES_H
6296#include <curses.h>
6297#endif
6298
6299
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006300#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006301_ACEOF
6302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303if { (ac_try="$ac_compile"
6304case "(($ac_try" in
6305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6306 *) ac_try_echo=$ac_try;;
6307esac
6308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006310 ac_status=$?
6311 grep -v '^ *+' conftest.er1 >conftest.err
6312 rm -f conftest.er1
6313 cat conftest.err >&5
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006315 (exit $ac_status); } && {
6316 test -z "$ac_c_werror_flag" ||
6317 test ! -s conftest.err
6318 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006319 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006320else
6321 echo "$as_me: failed program was:" >&5
6322sed 's/^/| /' conftest.$ac_ext >&5
6323
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006326
6327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006329ac_res=`eval echo '${'$as_ac_Header'}'`
6330 { echo "$as_me:$LINENO: result: $ac_res" >&5
6331echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006332if test `eval echo '${'$as_ac_Header'}'` = yes; then
6333 cat >>confdefs.h <<_ACEOF
6334#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6335_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006336
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006337fi
6338
6339done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006340
6341
Martin v. Löwis11017b12006-01-14 18:12:57 +00006342# On Linux, netlink.h requires asm/types.h
6343
6344for ac_header in linux/netlink.h
6345do
6346as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6348echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6349if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006350 echo $ECHO_N "(cached) $ECHO_C" >&6
6351else
6352 cat >conftest.$ac_ext <<_ACEOF
6353/* confdefs.h. */
6354_ACEOF
6355cat confdefs.h >>conftest.$ac_ext
6356cat >>conftest.$ac_ext <<_ACEOF
6357/* end confdefs.h. */
6358
6359#ifdef HAVE_ASM_TYPES_H
6360#include <asm/types.h>
6361#endif
6362#ifdef HAVE_SYS_SOCKET_H
6363#include <sys/socket.h>
6364#endif
6365
6366
6367#include <$ac_header>
6368_ACEOF
6369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370if { (ac_try="$ac_compile"
6371case "(($ac_try" in
6372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6373 *) ac_try_echo=$ac_try;;
6374esac
6375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006377 ac_status=$?
6378 grep -v '^ *+' conftest.er1 >conftest.err
6379 rm -f conftest.er1
6380 cat conftest.err >&5
6381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006382 (exit $ac_status); } && {
6383 test -z "$ac_c_werror_flag" ||
6384 test ! -s conftest.err
6385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386 eval "$as_ac_Header=yes"
6387else
6388 echo "$as_me: failed program was:" >&5
6389sed 's/^/| /' conftest.$ac_ext >&5
6390
Martin v. Löwiseba40652007-08-30 20:10:57 +00006391 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006393
6394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396ac_res=`eval echo '${'$as_ac_Header'}'`
6397 { echo "$as_me:$LINENO: result: $ac_res" >&5
6398echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006399if test `eval echo '${'$as_ac_Header'}'` = yes; then
6400 cat >>confdefs.h <<_ACEOF
6401#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6402_ACEOF
6403
6404fi
6405
6406done
6407
6408
Guido van Rossum627b2d71993-12-24 10:39:16 +00006409# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006410was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6412echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006414/* confdefs.h. */
6415_ACEOF
6416cat confdefs.h >>conftest.$ac_ext
6417cat >>conftest.$ac_ext <<_ACEOF
6418/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006419#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006420
6421_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006423 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006424 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006425else
Martin v. Löwis11437992002-04-12 09:54:03 +00006426
6427
6428cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006429#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006430_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006432
Guido van Rossum627b2d71993-12-24 10:39:16 +00006433fi
6434rm -f conftest*
6435
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6437echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006438
Neal Norwitz11690112002-07-30 01:08:28 +00006439# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006440{ echo "$as_me:$LINENO: checking for makedev" >&5
6441echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006443/* confdefs.h. */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006448#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006449int
6450main ()
6451{
6452 makedev(0, 0)
6453 ;
6454 return 0;
6455}
6456_ACEOF
6457rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006458if { (ac_try="$ac_link"
6459case "(($ac_try" in
6460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6461 *) ac_try_echo=$ac_try;;
6462esac
6463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6464 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006466 grep -v '^ *+' conftest.er1 >conftest.err
6467 rm -f conftest.er1
6468 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 (exit $ac_status); } && {
6471 test -z "$ac_c_werror_flag" ||
6472 test ! -s conftest.err
6473 } && test -s conftest$ac_exeext &&
6474 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006475 ac_cv_has_makedev=yes
6476else
6477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006478sed 's/^/| /' conftest.$ac_ext >&5
6479
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482
6483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006484 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006485if test "$ac_cv_has_makedev" = "no"; then
6486 # we didn't link, try if _OSF_SOURCE will allow us to link
6487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006488/* confdefs.h. */
6489_ACEOF
6490cat confdefs.h >>conftest.$ac_ext
6491cat >>conftest.$ac_ext <<_ACEOF
6492/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006493
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006494#define _OSF_SOURCE 1
6495#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006496
Neal Norwitz11690112002-07-30 01:08:28 +00006497int
6498main ()
6499{
6500 makedev(0, 0)
6501 ;
6502 return 0;
6503}
6504_ACEOF
6505rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506if { (ac_try="$ac_link"
6507case "(($ac_try" in
6508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6509 *) ac_try_echo=$ac_try;;
6510esac
6511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6512 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006514 grep -v '^ *+' conftest.er1 >conftest.err
6515 rm -f conftest.er1
6516 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518 (exit $ac_status); } && {
6519 test -z "$ac_c_werror_flag" ||
6520 test ! -s conftest.err
6521 } && test -s conftest$ac_exeext &&
6522 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006523 ac_cv_has_makedev=yes
6524else
6525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006526sed 's/^/| /' conftest.$ac_ext >&5
6527
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530
6531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006533 if test "$ac_cv_has_makedev" = "yes"; then
6534
6535cat >>confdefs.h <<\_ACEOF
6536#define _OSF_SOURCE 1
6537_ACEOF
6538
6539 fi
6540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006541{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6542echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006543if test "$ac_cv_has_makedev" = "yes"; then
6544
6545cat >>confdefs.h <<\_ACEOF
6546#define HAVE_MAKEDEV 1
6547_ACEOF
6548
6549fi
6550
Martin v. Löwis399a6892002-10-04 10:22:02 +00006551# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6552# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6553# defined, but the compiler does not support pragma redefine_extname,
6554# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6555# structures (such as rlimit64) without declaring them. As a
6556# work-around, disable LFS on such configurations
6557
6558use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6560echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006562/* confdefs.h. */
6563_ACEOF
6564cat confdefs.h >>conftest.$ac_ext
6565cat >>conftest.$ac_ext <<_ACEOF
6566/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006567
6568#define _LARGEFILE_SOURCE 1
6569#define _FILE_OFFSET_BITS 64
6570#include <sys/resource.h>
6571
Martin v. Löwis399a6892002-10-04 10:22:02 +00006572int
6573main ()
6574{
6575struct rlimit foo;
6576 ;
6577 return 0;
6578}
6579_ACEOF
6580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581if { (ac_try="$ac_compile"
6582case "(($ac_try" in
6583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6584 *) ac_try_echo=$ac_try;;
6585esac
6586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006589 grep -v '^ *+' conftest.er1 >conftest.err
6590 rm -f conftest.er1
6591 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593 (exit $ac_status); } && {
6594 test -z "$ac_c_werror_flag" ||
6595 test ! -s conftest.err
6596 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006597 sol_lfs_bug=no
6598else
6599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006600sed 's/^/| /' conftest.$ac_ext >&5
6601
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006604
6605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6606{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6607echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006608if test "$sol_lfs_bug" = "yes"; then
6609 use_lfs=no
6610fi
6611
6612if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006613# Two defines needed to enable largefile support on various platforms
6614# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006615
Martin v. Löwis11437992002-04-12 09:54:03 +00006616cat >>confdefs.h <<\_ACEOF
6617#define _LARGEFILE_SOURCE 1
6618_ACEOF
6619
6620
6621cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006622#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006623_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006624
Martin v. Löwis399a6892002-10-04 10:22:02 +00006625fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006626
Guido van Rossum84e7b241996-08-19 21:59:00 +00006627# Add some code to confdefs.h so that the test for off_t works on SCO
6628cat >> confdefs.h <<\EOF
6629#if defined(SCO_DS)
6630#undef _OFF_T
6631#endif
6632EOF
6633
Guido van Rossumef2255b2000-03-10 22:30:29 +00006634# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006635{ echo "$as_me:$LINENO: checking for mode_t" >&5
6636echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006637if test "${ac_cv_type_mode_t+set}" = set; then
6638 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006639else
Martin v. Löwis11437992002-04-12 09:54:03 +00006640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006641/* confdefs.h. */
6642_ACEOF
6643cat confdefs.h >>conftest.$ac_ext
6644cat >>conftest.$ac_ext <<_ACEOF
6645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006646$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006647typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006648int
6649main ()
6650{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006651if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006652 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 return 0;
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006660if { (ac_try="$ac_compile"
6661case "(($ac_try" in
6662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6663 *) ac_try_echo=$ac_try;;
6664esac
6665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006668 grep -v '^ *+' conftest.er1 >conftest.err
6669 rm -f conftest.er1
6670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672 (exit $ac_status); } && {
6673 test -z "$ac_c_werror_flag" ||
6674 test ! -s conftest.err
6675 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006676 ac_cv_type_mode_t=yes
6677else
Martin v. Löwis11437992002-04-12 09:54:03 +00006678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006679sed 's/^/| /' conftest.$ac_ext >&5
6680
Martin v. Löwiseba40652007-08-30 20:10:57 +00006681 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683
6684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6687echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006688if test $ac_cv_type_mode_t = yes; then
6689 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006690else
Martin v. Löwis11437992002-04-12 09:54:03 +00006691
6692cat >>confdefs.h <<_ACEOF
6693#define mode_t int
6694_ACEOF
6695
6696fi
6697
Martin v. Löwiseba40652007-08-30 20:10:57 +00006698{ echo "$as_me:$LINENO: checking for off_t" >&5
6699echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006700if test "${ac_cv_type_off_t+set}" = set; then
6701 echo $ECHO_N "(cached) $ECHO_C" >&6
6702else
6703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006704/* confdefs.h. */
6705_ACEOF
6706cat confdefs.h >>conftest.$ac_ext
6707cat >>conftest.$ac_ext <<_ACEOF
6708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006709$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006710typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006711int
6712main ()
6713{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006714if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 return 0;
6718 ;
6719 return 0;
6720}
6721_ACEOF
6722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006723if { (ac_try="$ac_compile"
6724case "(($ac_try" in
6725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6726 *) ac_try_echo=$ac_try;;
6727esac
6728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006731 grep -v '^ *+' conftest.er1 >conftest.err
6732 rm -f conftest.er1
6733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735 (exit $ac_status); } && {
6736 test -z "$ac_c_werror_flag" ||
6737 test ! -s conftest.err
6738 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006739 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006740else
Martin v. Löwis11437992002-04-12 09:54:03 +00006741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006742sed 's/^/| /' conftest.$ac_ext >&5
6743
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746
6747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6750echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006751if test $ac_cv_type_off_t = yes; then
6752 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006753else
Martin v. Löwis11437992002-04-12 09:54:03 +00006754
6755cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006756#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006757_ACEOF
6758
6759fi
6760
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761{ echo "$as_me:$LINENO: checking for pid_t" >&5
6762echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006763if test "${ac_cv_type_pid_t+set}" = set; then
6764 echo $ECHO_N "(cached) $ECHO_C" >&6
6765else
6766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006767/* confdefs.h. */
6768_ACEOF
6769cat confdefs.h >>conftest.$ac_ext
6770cat >>conftest.$ac_ext <<_ACEOF
6771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006774int
6775main ()
6776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 return 0;
6781 ;
6782 return 0;
6783}
6784_ACEOF
6785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786if { (ac_try="$ac_compile"
6787case "(($ac_try" in
6788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6789 *) ac_try_echo=$ac_try;;
6790esac
6791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006794 grep -v '^ *+' conftest.er1 >conftest.err
6795 rm -f conftest.er1
6796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798 (exit $ac_status); } && {
6799 test -z "$ac_c_werror_flag" ||
6800 test ! -s conftest.err
6801 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006802 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006803else
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006805sed 's/^/| /' conftest.$ac_ext >&5
6806
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6813echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006814if test $ac_cv_type_pid_t = yes; then
6815 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006816else
Martin v. Löwis11437992002-04-12 09:54:03 +00006817
6818cat >>confdefs.h <<_ACEOF
6819#define pid_t int
6820_ACEOF
6821
6822fi
6823
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6825echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006826if test "${ac_cv_type_signal+set}" = set; then
6827 echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006830/* confdefs.h. */
6831_ACEOF
6832cat confdefs.h >>conftest.$ac_ext
6833cat >>conftest.$ac_ext <<_ACEOF
6834/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835#include <sys/types.h>
6836#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838int
6839main ()
6840{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006842 ;
6843 return 0;
6844}
6845_ACEOF
6846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847if { (ac_try="$ac_compile"
6848case "(($ac_try" in
6849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6850 *) ac_try_echo=$ac_try;;
6851esac
6852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006855 grep -v '^ *+' conftest.er1 >conftest.err
6856 rm -f conftest.er1
6857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859 (exit $ac_status); } && {
6860 test -z "$ac_c_werror_flag" ||
6861 test ! -s conftest.err
6862 } && test -s conftest.$ac_objext; then
6863 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006866sed 's/^/| /' conftest.$ac_ext >&5
6867
Martin v. Löwiseba40652007-08-30 20:10:57 +00006868 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006870
6871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006873{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6874echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006877#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006879
Michael W. Hudson54241132001-12-07 15:38:26 +00006880
Martin v. Löwiseba40652007-08-30 20:10:57 +00006881{ echo "$as_me:$LINENO: checking for size_t" >&5
6882echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006883if test "${ac_cv_type_size_t+set}" = set; then
6884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006885else
Martin v. Löwis11437992002-04-12 09:54:03 +00006886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006887/* confdefs.h. */
6888_ACEOF
6889cat confdefs.h >>conftest.$ac_ext
6890cat >>conftest.$ac_ext <<_ACEOF
6891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006892$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006893typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006894int
6895main ()
6896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006898 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006900 return 0;
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906if { (ac_try="$ac_compile"
6907case "(($ac_try" in
6908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6909 *) ac_try_echo=$ac_try;;
6910esac
6911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006914 grep -v '^ *+' conftest.er1 >conftest.err
6915 rm -f conftest.er1
6916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918 (exit $ac_status); } && {
6919 test -z "$ac_c_werror_flag" ||
6920 test ! -s conftest.err
6921 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006922 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006923else
Martin v. Löwis11437992002-04-12 09:54:03 +00006924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006925sed 's/^/| /' conftest.$ac_ext >&5
6926
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929
6930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6933echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006934if test $ac_cv_type_size_t = yes; then
6935 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936else
Martin v. Löwis11437992002-04-12 09:54:03 +00006937
6938cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006940_ACEOF
6941
6942fi
6943
Martin v. Löwiseba40652007-08-30 20:10:57 +00006944{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6945echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006946if test "${ac_cv_type_uid_t+set}" = set; then
6947 echo $ECHO_N "(cached) $ECHO_C" >&6
6948else
6949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006950/* confdefs.h. */
6951_ACEOF
6952cat confdefs.h >>conftest.$ac_ext
6953cat >>conftest.$ac_ext <<_ACEOF
6954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006955#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006956
6957_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006959 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006960 ac_cv_type_uid_t=yes
6961else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962 ac_cv_type_uid_t=no
6963fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006964rm -f conftest*
6965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6968echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006969if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970
Martin v. Löwis11437992002-04-12 09:54:03 +00006971cat >>confdefs.h <<\_ACEOF
6972#define uid_t int
6973_ACEOF
6974
6975
6976cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006978_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979
6980fi
6981
Martin v. Löwiseba40652007-08-30 20:10:57 +00006982{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6983echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006984if test "${ac_cv_type_ssize_t+set}" = set; then
6985 echo $ECHO_N "(cached) $ECHO_C" >&6
6986else
6987 cat >conftest.$ac_ext <<_ACEOF
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
6993$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006994typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006995int
6996main ()
6997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006999 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007001 return 0;
7002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
7012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007014 ac_status=$?
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
7018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007023 ac_cv_type_ssize_t=yes
7024else
7025 echo "$as_me: failed program was:" >&5
7026sed 's/^/| /' conftest.$ac_ext >&5
7027
Martin v. Löwiseba40652007-08-30 20:10:57 +00007028 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7034echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007035if test $ac_cv_type_ssize_t = yes; then
7036
7037cat >>confdefs.h <<\_ACEOF
7038#define HAVE_SSIZE_T 1
7039_ACEOF
7040
7041fi
7042
Jack Jansendd19cf82001-12-06 22:36:17 +00007043
Michael W. Hudson54241132001-12-07 15:38:26 +00007044# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007045# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007046{ echo "$as_me:$LINENO: checking for int" >&5
7047echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007048if test "${ac_cv_type_int+set}" = set; then
7049 echo $ECHO_N "(cached) $ECHO_C" >&6
7050else
7051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007052/* confdefs.h. */
7053_ACEOF
7054cat confdefs.h >>conftest.$ac_ext
7055cat >>conftest.$ac_ext <<_ACEOF
7056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007058typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007059int
7060main ()
7061{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007063 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007064if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007065 return 0;
7066 ;
7067 return 0;
7068}
7069_ACEOF
7070rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007071if { (ac_try="$ac_compile"
7072case "(($ac_try" in
7073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7074 *) ac_try_echo=$ac_try;;
7075esac
7076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007079 grep -v '^ *+' conftest.er1 >conftest.err
7080 rm -f conftest.er1
7081 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007083 (exit $ac_status); } && {
7084 test -z "$ac_c_werror_flag" ||
7085 test ! -s conftest.err
7086 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007087 ac_cv_type_int=yes
7088else
7089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007090sed 's/^/| /' conftest.$ac_ext >&5
7091
Martin v. Löwiseba40652007-08-30 20:10:57 +00007092 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007093fi
Brett Cannon19fab762007-06-02 03:02:29 +00007094
Martin v. Löwiseba40652007-08-30 20:10:57 +00007095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7096fi
7097{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7098echo "${ECHO_T}$ac_cv_type_int" >&6; }
7099
7100# The cast to long int works around a bug in the HP C Compiler
7101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7103# This bug is HP SR number 8606223364.
7104{ echo "$as_me:$LINENO: checking size of int" >&5
7105echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007106if test "${ac_cv_sizeof_int+set}" = set; then
7107 echo $ECHO_N "(cached) $ECHO_C" >&6
7108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 if test "$cross_compiling" = yes; then
7110 # Depending upon the size, compute the lo and hi bounds.
7111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007112/* confdefs.h. */
7113_ACEOF
7114cat confdefs.h >>conftest.$ac_ext
7115cat >>conftest.$ac_ext <<_ACEOF
7116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007117$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007118 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007119int
7120main ()
7121{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007123test_array [0] = 0
7124
7125 ;
7126 return 0;
7127}
7128_ACEOF
7129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130if { (ac_try="$ac_compile"
7131case "(($ac_try" in
7132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7133 *) ac_try_echo=$ac_try;;
7134esac
7135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007138 grep -v '^ *+' conftest.er1 >conftest.err
7139 rm -f conftest.er1
7140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142 (exit $ac_status); } && {
7143 test -z "$ac_c_werror_flag" ||
7144 test ! -s conftest.err
7145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 ac_lo=0 ac_mid=0
7147 while :; do
7148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007149/* confdefs.h. */
7150_ACEOF
7151cat confdefs.h >>conftest.$ac_ext
7152cat >>conftest.$ac_ext <<_ACEOF
7153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007154$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007156int
7157main ()
7158{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007160test_array [0] = 0
7161
7162 ;
7163 return 0;
7164}
7165_ACEOF
7166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167if { (ac_try="$ac_compile"
7168case "(($ac_try" in
7169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7170 *) ac_try_echo=$ac_try;;
7171esac
7172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007175 grep -v '^ *+' conftest.er1 >conftest.err
7176 rm -f conftest.er1
7177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007179 (exit $ac_status); } && {
7180 test -z "$ac_c_werror_flag" ||
7181 test ! -s conftest.err
7182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007183 ac_hi=$ac_mid; break
7184else
7185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007186sed 's/^/| /' conftest.$ac_ext >&5
7187
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188 ac_lo=`expr $ac_mid + 1`
7189 if test $ac_lo -le $ac_mid; then
7190 ac_lo= ac_hi=
7191 break
7192 fi
7193 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195
7196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007197 done
7198else
7199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007200sed 's/^/| /' conftest.$ac_ext >&5
7201
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007209 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007210int
7211main ()
7212{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221if { (ac_try="$ac_compile"
7222case "(($ac_try" in
7223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7224 *) ac_try_echo=$ac_try;;
7225esac
7226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 ac_hi=-1 ac_mid=-1
7238 while :; do
7239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007247int
7248main ()
7249{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007251test_array [0] = 0
7252
7253 ;
7254 return 0;
7255}
7256_ACEOF
7257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007258if { (ac_try="$ac_compile"
7259case "(($ac_try" in
7260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7261 *) ac_try_echo=$ac_try;;
7262esac
7263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007266 grep -v '^ *+' conftest.er1 >conftest.err
7267 rm -f conftest.er1
7268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270 (exit $ac_status); } && {
7271 test -z "$ac_c_werror_flag" ||
7272 test ! -s conftest.err
7273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007274 ac_lo=$ac_mid; break
7275else
7276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007277sed 's/^/| /' conftest.$ac_ext >&5
7278
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279 ac_hi=`expr '(' $ac_mid ')' - 1`
7280 if test $ac_mid -le $ac_hi; then
7281 ac_lo= ac_hi=
7282 break
7283 fi
7284 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007286
7287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 done
7289else
7290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007291sed 's/^/| /' conftest.$ac_ext >&5
7292
Martin v. Löwiseba40652007-08-30 20:10:57 +00007293 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007295
7296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007298
7299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007300# Binary search between lo and hi bounds.
7301while test "x$ac_lo" != "x$ac_hi"; do
7302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* confdefs.h. */
7305_ACEOF
7306cat confdefs.h >>conftest.$ac_ext
7307cat >>conftest.$ac_ext <<_ACEOF
7308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007309$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311int
7312main ()
7313{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007315test_array [0] = 0
7316
7317 ;
7318 return 0;
7319}
7320_ACEOF
7321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322if { (ac_try="$ac_compile"
7323case "(($ac_try" in
7324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7325 *) ac_try_echo=$ac_try;;
7326esac
7327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334 (exit $ac_status); } && {
7335 test -z "$ac_c_werror_flag" ||
7336 test ! -s conftest.err
7337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007338 ac_hi=$ac_mid
7339else
7340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007341sed 's/^/| /' conftest.$ac_ext >&5
7342
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007345
7346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007347done
7348case $ac_lo in
7349?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350'') if test "$ac_cv_type_int" = yes; then
7351 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007352See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007353echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007354See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007355 { (exit 77); exit 77; }; }
7356 else
7357 ac_cv_sizeof_int=0
7358 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007359esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007360else
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007362/* confdefs.h. */
7363_ACEOF
7364cat confdefs.h >>conftest.$ac_ext
7365cat >>conftest.$ac_ext <<_ACEOF
7366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368 typedef int ac__type_sizeof_;
7369static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7370static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007371#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007372#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007373int
7374main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007375{
Martin v. Löwis11437992002-04-12 09:54:03 +00007376
7377 FILE *f = fopen ("conftest.val", "w");
7378 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007379 return 1;
7380 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007381 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382 long int i = longval ();
7383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7384 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007385 fprintf (f, "%ld\n", i);
7386 }
7387 else
7388 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007389 unsigned long int i = ulongval ();
7390 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7391 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007392 fprintf (f, "%lu\n", i);
7393 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007395
7396 ;
7397 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007398}
Martin v. Löwis11437992002-04-12 09:54:03 +00007399_ACEOF
7400rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007401if { (ac_try="$ac_link"
7402case "(($ac_try" in
7403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7404 *) ac_try_echo=$ac_try;;
7405esac
7406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7407 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411 { (case "(($ac_try" in
7412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7413 *) ac_try_echo=$ac_try;;
7414esac
7415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7416 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007417 ac_status=$?
7418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7419 (exit $ac_status); }; }; then
7420 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007421else
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 echo "$as_me: program exited with status $ac_status" >&5
7423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007424sed 's/^/| /' conftest.$ac_ext >&5
7425
Martin v. Löwis11437992002-04-12 09:54:03 +00007426( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427if test "$ac_cv_type_int" = yes; then
7428 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007429See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007431See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432 { (exit 77); exit 77; }; }
7433 else
7434 ac_cv_sizeof_int=0
7435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437rm -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 +00007438fi
7439rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7442echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7443
7444
7445
Martin v. Löwis11437992002-04-12 09:54:03 +00007446cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007447#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007448_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007449
7450
Martin v. Löwiseba40652007-08-30 20:10:57 +00007451{ echo "$as_me:$LINENO: checking for long" >&5
7452echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007453if test "${ac_cv_type_long+set}" = set; then
7454 echo $ECHO_N "(cached) $ECHO_C" >&6
7455else
7456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007457/* confdefs.h. */
7458_ACEOF
7459cat confdefs.h >>conftest.$ac_ext
7460cat >>conftest.$ac_ext <<_ACEOF
7461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007462$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007463typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007464int
7465main ()
7466{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007467if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007470 return 0;
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007476if { (ac_try="$ac_compile"
7477case "(($ac_try" in
7478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7479 *) ac_try_echo=$ac_try;;
7480esac
7481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007484 grep -v '^ *+' conftest.er1 >conftest.err
7485 rm -f conftest.er1
7486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007488 (exit $ac_status); } && {
7489 test -z "$ac_c_werror_flag" ||
7490 test ! -s conftest.err
7491 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007492 ac_cv_type_long=yes
7493else
7494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007495sed 's/^/| /' conftest.$ac_ext >&5
7496
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007498fi
Brett Cannon19fab762007-06-02 03:02:29 +00007499
Martin v. Löwiseba40652007-08-30 20:10:57 +00007500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7501fi
7502{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7503echo "${ECHO_T}$ac_cv_type_long" >&6; }
7504
7505# The cast to long int works around a bug in the HP C Compiler
7506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7508# This bug is HP SR number 8606223364.
7509{ echo "$as_me:$LINENO: checking size of long" >&5
7510echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007511if test "${ac_cv_sizeof_long+set}" = set; then
7512 echo $ECHO_N "(cached) $ECHO_C" >&6
7513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007522$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535if { (ac_try="$ac_compile"
7536case "(($ac_try" in
7537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538 *) ac_try_echo=$ac_try;;
7539esac
7540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007547 (exit $ac_status); } && {
7548 test -z "$ac_c_werror_flag" ||
7549 test ! -s conftest.err
7550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_lo=0 ac_mid=0
7552 while :; do
7553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007554/* confdefs.h. */
7555_ACEOF
7556cat confdefs.h >>conftest.$ac_ext
7557cat >>conftest.$ac_ext <<_ACEOF
7558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007559$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007560 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007561int
7562main ()
7563{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007565test_array [0] = 0
7566
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007572if { (ac_try="$ac_compile"
7573case "(($ac_try" in
7574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7575 *) ac_try_echo=$ac_try;;
7576esac
7577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007580 grep -v '^ *+' conftest.er1 >conftest.err
7581 rm -f conftest.er1
7582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007584 (exit $ac_status); } && {
7585 test -z "$ac_c_werror_flag" ||
7586 test ! -s conftest.err
7587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 ac_hi=$ac_mid; break
7589else
7590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007591sed 's/^/| /' conftest.$ac_ext >&5
7592
Martin v. Löwiseba40652007-08-30 20:10:57 +00007593 ac_lo=`expr $ac_mid + 1`
7594 if test $ac_lo -le $ac_mid; then
7595 ac_lo= ac_hi=
7596 break
7597 fi
7598 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600
7601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 done
7603else
7604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007605sed 's/^/| /' conftest.$ac_ext >&5
7606
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007608/* confdefs.h. */
7609_ACEOF
7610cat confdefs.h >>conftest.$ac_ext
7611cat >>conftest.$ac_ext <<_ACEOF
7612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007613$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007614 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007615int
7616main ()
7617{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007619test_array [0] = 0
7620
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626if { (ac_try="$ac_compile"
7627case "(($ac_try" in
7628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7629 *) ac_try_echo=$ac_try;;
7630esac
7631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007638 (exit $ac_status); } && {
7639 test -z "$ac_c_werror_flag" ||
7640 test ! -s conftest.err
7641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_hi=-1 ac_mid=-1
7643 while :; do
7644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* confdefs.h. */
7646_ACEOF
7647cat confdefs.h >>conftest.$ac_ext
7648cat >>conftest.$ac_ext <<_ACEOF
7649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007651 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
7654{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007656test_array [0] = 0
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007663if { (ac_try="$ac_compile"
7664case "(($ac_try" in
7665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7666 *) ac_try_echo=$ac_try;;
7667esac
7668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ac_lo=$ac_mid; break
7680else
7681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 ac_hi=`expr '(' $ac_mid ')' - 1`
7685 if test $ac_mid -le $ac_hi; then
7686 ac_lo= ac_hi=
7687 break
7688 fi
7689 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691
7692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 done
7694else
7695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007696sed 's/^/| /' conftest.$ac_ext >&5
7697
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700
7701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703
7704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007705# Binary search between lo and hi bounds.
7706while test "x$ac_lo" != "x$ac_hi"; do
7707 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007709/* confdefs.h. */
7710_ACEOF
7711cat confdefs.h >>conftest.$ac_ext
7712cat >>conftest.$ac_ext <<_ACEOF
7713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007716int
7717main ()
7718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007720test_array [0] = 0
7721
7722 ;
7723 return 0;
7724}
7725_ACEOF
7726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727if { (ac_try="$ac_compile"
7728case "(($ac_try" in
7729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7730 *) ac_try_echo=$ac_try;;
7731esac
7732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007735 grep -v '^ *+' conftest.er1 >conftest.err
7736 rm -f conftest.er1
7737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739 (exit $ac_status); } && {
7740 test -z "$ac_c_werror_flag" ||
7741 test ! -s conftest.err
7742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_hi=$ac_mid
7744else
7745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007746sed 's/^/| /' conftest.$ac_ext >&5
7747
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750
7751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007752done
7753case $ac_lo in
7754?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755'') if test "$ac_cv_type_long" = yes; then
7756 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007757See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 { (exit 77); exit 77; }; }
7761 else
7762 ac_cv_sizeof_long=0
7763 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007764esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007765else
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007767/* confdefs.h. */
7768_ACEOF
7769cat confdefs.h >>conftest.$ac_ext
7770cat >>conftest.$ac_ext <<_ACEOF
7771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 typedef long ac__type_sizeof_;
7774static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7775static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007776#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007780{
Martin v. Löwis11437992002-04-12 09:54:03 +00007781
7782 FILE *f = fopen ("conftest.val", "w");
7783 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007784 return 1;
7785 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787 long int i = longval ();
7788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7789 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 fprintf (f, "%ld\n", i);
7791 }
7792 else
7793 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794 unsigned long int i = ulongval ();
7795 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7796 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 fprintf (f, "%lu\n", i);
7798 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
7801 ;
7802 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803}
Martin v. Löwis11437992002-04-12 09:54:03 +00007804_ACEOF
7805rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806if { (ac_try="$ac_link"
7807case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
7811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7812 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ac_status=$?
7814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816 { (case "(($ac_try" in
7817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7818 *) ac_try_echo=$ac_try;;
7819esac
7820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7821 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; }; then
7825 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826else
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 echo "$as_me: program exited with status $ac_status" >&5
7828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007829sed 's/^/| /' conftest.$ac_ext >&5
7830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832if test "$ac_cv_type_long" = yes; then
7833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 { (exit 77); exit 77; }; }
7838 else
7839 ac_cv_sizeof_long=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842rm -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 +00007843fi
7844rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7847echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7848
7849
7850
Martin v. Löwis11437992002-04-12 09:54:03 +00007851cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007852#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007853_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854
7855
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856{ echo "$as_me:$LINENO: checking for void *" >&5
7857echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007858if test "${ac_cv_type_void_p+set}" = set; then
7859 echo $ECHO_N "(cached) $ECHO_C" >&6
7860else
7861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007867$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007869int
7870main ()
7871{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 return 0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881if { (ac_try="$ac_compile"
7882case "(($ac_try" in
7883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884 *) ac_try_echo=$ac_try;;
7885esac
7886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007889 grep -v '^ *+' conftest.er1 >conftest.err
7890 rm -f conftest.er1
7891 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893 (exit $ac_status); } && {
7894 test -z "$ac_c_werror_flag" ||
7895 test ! -s conftest.err
7896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_cv_type_void_p=yes
7898else
7899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007903fi
Brett Cannon19fab762007-06-02 03:02:29 +00007904
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7906fi
7907{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7908echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7909
7910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
7914{ echo "$as_me:$LINENO: checking size of void *" >&5
7915echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007916if test "${ac_cv_sizeof_void_p+set}" = set; then
7917 echo $ECHO_N "(cached) $ECHO_C" >&6
7918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 if test "$cross_compiling" = yes; then
7920 # Depending upon the size, compute the lo and hi bounds.
7921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007929int
7930main ()
7931{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007933test_array [0] = 0
7934
7935 ;
7936 return 0;
7937}
7938_ACEOF
7939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940if { (ac_try="$ac_compile"
7941case "(($ac_try" in
7942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7943 *) ac_try_echo=$ac_try;;
7944esac
7945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007948 grep -v '^ *+' conftest.er1 >conftest.err
7949 rm -f conftest.er1
7950 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 (exit $ac_status); } && {
7953 test -z "$ac_c_werror_flag" ||
7954 test ! -s conftest.err
7955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_lo=0 ac_mid=0
7957 while :; do
7958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007966int
7967main ()
7968{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007970test_array [0] = 0
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977if { (ac_try="$ac_compile"
7978case "(($ac_try" in
7979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7980 *) ac_try_echo=$ac_try;;
7981esac
7982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007985 grep -v '^ *+' conftest.er1 >conftest.err
7986 rm -f conftest.er1
7987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007989 (exit $ac_status); } && {
7990 test -z "$ac_c_werror_flag" ||
7991 test ! -s conftest.err
7992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_hi=$ac_mid; break
7994else
7995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998 ac_lo=`expr $ac_mid + 1`
7999 if test $ac_lo -le $ac_mid; then
8000 ac_lo= ac_hi=
8001 break
8002 fi
8003 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005
8006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 done
8008else
8009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008010sed 's/^/| /' conftest.$ac_ext >&5
8011
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008024test_array [0] = 0
8025
8026 ;
8027 return 0;
8028}
8029_ACEOF
8030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031if { (ac_try="$ac_compile"
8032case "(($ac_try" in
8033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8034 *) ac_try_echo=$ac_try;;
8035esac
8036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008039 grep -v '^ *+' conftest.er1 >conftest.err
8040 rm -f conftest.er1
8041 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008043 (exit $ac_status); } && {
8044 test -z "$ac_c_werror_flag" ||
8045 test ! -s conftest.err
8046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_hi=-1 ac_mid=-1
8048 while :; do
8049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008055$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008056 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008057int
8058main ()
8059{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008061test_array [0] = 0
8062
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008068if { (ac_try="$ac_compile"
8069case "(($ac_try" in
8070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8071 *) ac_try_echo=$ac_try;;
8072esac
8073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008076 grep -v '^ *+' conftest.er1 >conftest.err
8077 rm -f conftest.er1
8078 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080 (exit $ac_status); } && {
8081 test -z "$ac_c_werror_flag" ||
8082 test ! -s conftest.err
8083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_lo=$ac_mid; break
8085else
8086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008087sed 's/^/| /' conftest.$ac_ext >&5
8088
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 ac_hi=`expr '(' $ac_mid ')' - 1`
8090 if test $ac_mid -le $ac_hi; then
8091 ac_lo= ac_hi=
8092 break
8093 fi
8094 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008096
8097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 done
8099else
8100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008101sed 's/^/| /' conftest.$ac_ext >&5
8102
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105
8106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108
8109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008110# Binary search between lo and hi bounds.
8111while test "x$ac_lo" != "x$ac_hi"; do
8112 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008114/* confdefs.h. */
8115_ACEOF
8116cat confdefs.h >>conftest.$ac_ext
8117cat >>conftest.$ac_ext <<_ACEOF
8118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008125test_array [0] = 0
8126
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132if { (ac_try="$ac_compile"
8133case "(($ac_try" in
8134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8135 *) ac_try_echo=$ac_try;;
8136esac
8137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008140 grep -v '^ *+' conftest.er1 >conftest.err
8141 rm -f conftest.er1
8142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144 (exit $ac_status); } && {
8145 test -z "$ac_c_werror_flag" ||
8146 test ! -s conftest.err
8147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_hi=$ac_mid
8149else
8150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008151sed 's/^/| /' conftest.$ac_ext >&5
8152
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155
8156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008157done
8158case $ac_lo in
8159?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160'') if test "$ac_cv_type_void_p" = yes; then
8161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008162See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 { (exit 77); exit 77; }; }
8166 else
8167 ac_cv_sizeof_void_p=0
8168 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008169esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008177$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 typedef void * ac__type_sizeof_;
8179static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8180static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008181#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008182#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008185{
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187 FILE *f = fopen ("conftest.val", "w");
8188 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008189 return 1;
8190 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192 long int i = longval ();
8193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8194 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 fprintf (f, "%ld\n", i);
8196 }
8197 else
8198 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008199 unsigned long int i = ulongval ();
8200 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8201 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008202 fprintf (f, "%lu\n", i);
8203 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
8206 ;
8207 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008208}
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
8210rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008211if { (ac_try="$ac_link"
8212case "(($ac_try" in
8213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214 *) ac_try_echo=$ac_try;;
8215esac
8216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8217 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 { (case "(($ac_try" in
8222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8223 *) ac_try_echo=$ac_try;;
8224esac
8225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8226 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_status=$?
8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8229 (exit $ac_status); }; }; then
8230 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008231else
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 echo "$as_me: program exited with status $ac_status" >&5
8233echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008234sed 's/^/| /' conftest.$ac_ext >&5
8235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237if test "$ac_cv_type_void_p" = yes; then
8238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008240echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242 { (exit 77); exit 77; }; }
8243 else
8244 ac_cv_sizeof_void_p=0
8245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008247rm -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 +00008248fi
8249rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8252echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8253
8254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008257#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008259
8260
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261{ echo "$as_me:$LINENO: checking for short" >&5
8262echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008263if test "${ac_cv_type_short+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
8265else
8266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008272$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008273typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008274int
8275main ()
8276{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 return 0;
8281 ;
8282 return 0;
8283}
8284_ACEOF
8285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286if { (ac_try="$ac_compile"
8287case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
8291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008294 grep -v '^ *+' conftest.er1 >conftest.err
8295 rm -f conftest.er1
8296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298 (exit $ac_status); } && {
8299 test -z "$ac_c_werror_flag" ||
8300 test ! -s conftest.err
8301 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 ac_cv_type_short=yes
8303else
8304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008305sed 's/^/| /' conftest.$ac_ext >&5
8306
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008308fi
Brett Cannon19fab762007-06-02 03:02:29 +00008309
Martin v. Löwiseba40652007-08-30 20:10:57 +00008310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8311fi
8312{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8313echo "${ECHO_T}$ac_cv_type_short" >&6; }
8314
8315# The cast to long int works around a bug in the HP C Compiler
8316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8318# This bug is HP SR number 8606223364.
8319{ echo "$as_me:$LINENO: checking size of short" >&5
8320echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008321if test "${ac_cv_sizeof_short+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8323else
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 if test "$cross_compiling" = yes; then
8325 # Depending upon the size, compute the lo and hi bounds.
8326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008332$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008334int
8335main ()
8336{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008338test_array [0] = 0
8339
8340 ;
8341 return 0;
8342}
8343_ACEOF
8344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345if { (ac_try="$ac_compile"
8346case "(($ac_try" in
8347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8348 *) ac_try_echo=$ac_try;;
8349esac
8350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008353 grep -v '^ *+' conftest.er1 >conftest.err
8354 rm -f conftest.er1
8355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357 (exit $ac_status); } && {
8358 test -z "$ac_c_werror_flag" ||
8359 test ! -s conftest.err
8360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_lo=0 ac_mid=0
8362 while :; do
8363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* confdefs.h. */
8365_ACEOF
8366cat confdefs.h >>conftest.$ac_ext
8367cat >>conftest.$ac_ext <<_ACEOF
8368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008369$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008371int
8372main ()
8373{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008375test_array [0] = 0
8376
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382if { (ac_try="$ac_compile"
8383case "(($ac_try" in
8384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8385 *) ac_try_echo=$ac_try;;
8386esac
8387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008394 (exit $ac_status); } && {
8395 test -z "$ac_c_werror_flag" ||
8396 test ! -s conftest.err
8397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_hi=$ac_mid; break
8399else
8400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008401sed 's/^/| /' conftest.$ac_ext >&5
8402
Martin v. Löwiseba40652007-08-30 20:10:57 +00008403 ac_lo=`expr $ac_mid + 1`
8404 if test $ac_lo -le $ac_mid; then
8405 ac_lo= ac_hi=
8406 break
8407 fi
8408 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410
8411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 done
8413else
8414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008415sed 's/^/| /' conftest.$ac_ext >&5
8416
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008425int
8426main ()
8427{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008429test_array [0] = 0
8430
8431 ;
8432 return 0;
8433}
8434_ACEOF
8435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436if { (ac_try="$ac_compile"
8437case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440esac
8441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008444 grep -v '^ *+' conftest.er1 >conftest.err
8445 rm -f conftest.er1
8446 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448 (exit $ac_status); } && {
8449 test -z "$ac_c_werror_flag" ||
8450 test ! -s conftest.err
8451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_hi=-1 ac_mid=-1
8453 while :; do
8454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008461 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008466test_array [0] = 0
8467
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473if { (ac_try="$ac_compile"
8474case "(($ac_try" in
8475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8476 *) ac_try_echo=$ac_try;;
8477esac
8478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008481 grep -v '^ *+' conftest.er1 >conftest.err
8482 rm -f conftest.er1
8483 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485 (exit $ac_status); } && {
8486 test -z "$ac_c_werror_flag" ||
8487 test ! -s conftest.err
8488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_lo=$ac_mid; break
8490else
8491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 ac_hi=`expr '(' $ac_mid ')' - 1`
8495 if test $ac_mid -le $ac_hi; then
8496 ac_lo= ac_hi=
8497 break
8498 fi
8499 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501
8502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 done
8504else
8505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008506sed 's/^/| /' conftest.$ac_ext >&5
8507
Martin v. Löwiseba40652007-08-30 20:10:57 +00008508 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008515# Binary search between lo and hi bounds.
8516while test "x$ac_lo" != "x$ac_hi"; do
8517 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008519/* confdefs.h. */
8520_ACEOF
8521cat confdefs.h >>conftest.$ac_ext
8522cat >>conftest.$ac_ext <<_ACEOF
8523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008530test_array [0] = 0
8531
8532 ;
8533 return 0;
8534}
8535_ACEOF
8536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537if { (ac_try="$ac_compile"
8538case "(($ac_try" in
8539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8540 *) ac_try_echo=$ac_try;;
8541esac
8542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008545 grep -v '^ *+' conftest.er1 >conftest.err
8546 rm -f conftest.er1
8547 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549 (exit $ac_status); } && {
8550 test -z "$ac_c_werror_flag" ||
8551 test ! -s conftest.err
8552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_hi=$ac_mid
8554else
8555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008556sed 's/^/| /' conftest.$ac_ext >&5
8557
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560
8561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008562done
8563case $ac_lo in
8564?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565'') if test "$ac_cv_type_short" = yes; then
8566 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008567See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 { (exit 77); exit 77; }; }
8571 else
8572 ac_cv_sizeof_short=0
8573 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008574esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575else
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008577/* confdefs.h. */
8578_ACEOF
8579cat confdefs.h >>conftest.$ac_ext
8580cat >>conftest.$ac_ext <<_ACEOF
8581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008582$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 typedef short ac__type_sizeof_;
8584static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8585static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008586#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008587#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008590{
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
8592 FILE *f = fopen ("conftest.val", "w");
8593 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008594 return 1;
8595 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597 long int i = longval ();
8598 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8599 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 fprintf (f, "%ld\n", i);
8601 }
8602 else
8603 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604 unsigned long int i = ulongval ();
8605 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8606 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 fprintf (f, "%lu\n", i);
8608 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
8611 ;
8612 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008613}
Martin v. Löwis11437992002-04-12 09:54:03 +00008614_ACEOF
8615rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616if { (ac_try="$ac_link"
8617case "(($ac_try" in
8618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8619 *) ac_try_echo=$ac_try;;
8620esac
8621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8622 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_status=$?
8624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626 { (case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
8630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8631 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_status=$?
8633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8634 (exit $ac_status); }; }; then
8635 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008636else
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 echo "$as_me: program exited with status $ac_status" >&5
8638echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008639sed 's/^/| /' conftest.$ac_ext >&5
8640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642if test "$ac_cv_type_short" = yes; then
8643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647 { (exit 77); exit 77; }; }
8648 else
8649 ac_cv_sizeof_short=0
8650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652rm -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 +00008653fi
8654rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8657echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008662#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008664
8665
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666{ echo "$as_me:$LINENO: checking for float" >&5
8667echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008668if test "${ac_cv_type_float+set}" = set; then
8669 echo $ECHO_N "(cached) $ECHO_C" >&6
8670else
8671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* confdefs.h. */
8673_ACEOF
8674cat confdefs.h >>conftest.$ac_ext
8675cat >>conftest.$ac_ext <<_ACEOF
8676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 return 0;
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691if { (ac_try="$ac_compile"
8692case "(($ac_try" in
8693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8694 *) ac_try_echo=$ac_try;;
8695esac
8696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008699 grep -v '^ *+' conftest.er1 >conftest.err
8700 rm -f conftest.er1
8701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703 (exit $ac_status); } && {
8704 test -z "$ac_c_werror_flag" ||
8705 test ! -s conftest.err
8706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_cv_type_float=yes
8708else
8709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwiseba40652007-08-30 20:10:57 +00008712 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008713fi
Brett Cannon19fab762007-06-02 03:02:29 +00008714
Martin v. Löwiseba40652007-08-30 20:10:57 +00008715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8716fi
8717{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8718echo "${ECHO_T}$ac_cv_type_float" >&6; }
8719
8720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
8724{ echo "$as_me:$LINENO: checking size of float" >&5
8725echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008726if test "${ac_cv_sizeof_float+set}" = set; then
8727 echo $ECHO_N "(cached) $ECHO_C" >&6
8728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 if test "$cross_compiling" = yes; then
8730 # Depending upon the size, compute the lo and hi bounds.
8731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739int
8740main ()
8741{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008743test_array [0] = 0
8744
8745 ;
8746 return 0;
8747}
8748_ACEOF
8749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750if { (ac_try="$ac_compile"
8751case "(($ac_try" in
8752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8753 *) ac_try_echo=$ac_try;;
8754esac
8755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008758 grep -v '^ *+' conftest.er1 >conftest.err
8759 rm -f conftest.er1
8760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762 (exit $ac_status); } && {
8763 test -z "$ac_c_werror_flag" ||
8764 test ! -s conftest.err
8765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_lo=0 ac_mid=0
8767 while :; do
8768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* confdefs.h. */
8770_ACEOF
8771cat confdefs.h >>conftest.$ac_ext
8772cat >>conftest.$ac_ext <<_ACEOF
8773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008776int
8777main ()
8778{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008780test_array [0] = 0
8781
8782 ;
8783 return 0;
8784}
8785_ACEOF
8786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787if { (ac_try="$ac_compile"
8788case "(($ac_try" in
8789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8790 *) ac_try_echo=$ac_try;;
8791esac
8792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008795 grep -v '^ *+' conftest.er1 >conftest.err
8796 rm -f conftest.er1
8797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008799 (exit $ac_status); } && {
8800 test -z "$ac_c_werror_flag" ||
8801 test ! -s conftest.err
8802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_hi=$ac_mid; break
8804else
8805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808 ac_lo=`expr $ac_mid + 1`
8809 if test $ac_lo -le $ac_mid; then
8810 ac_lo= ac_hi=
8811 break
8812 fi
8813 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 done
8818else
8819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008820sed 's/^/| /' conftest.$ac_ext >&5
8821
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* confdefs.h. */
8824_ACEOF
8825cat confdefs.h >>conftest.$ac_ext
8826cat >>conftest.$ac_ext <<_ACEOF
8827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008828$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008829 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008834test_array [0] = 0
8835
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841if { (ac_try="$ac_compile"
8842case "(($ac_try" in
8843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8844 *) ac_try_echo=$ac_try;;
8845esac
8846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008849 grep -v '^ *+' conftest.er1 >conftest.err
8850 rm -f conftest.er1
8851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853 (exit $ac_status); } && {
8854 test -z "$ac_c_werror_flag" ||
8855 test ! -s conftest.err
8856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_hi=-1 ac_mid=-1
8858 while :; do
8859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867int
8868main ()
8869{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008871test_array [0] = 0
8872
8873 ;
8874 return 0;
8875}
8876_ACEOF
8877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878if { (ac_try="$ac_compile"
8879case "(($ac_try" in
8880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8881 *) ac_try_echo=$ac_try;;
8882esac
8883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890 (exit $ac_status); } && {
8891 test -z "$ac_c_werror_flag" ||
8892 test ! -s conftest.err
8893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_lo=$ac_mid; break
8895else
8896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 ac_hi=`expr '(' $ac_mid ')' - 1`
8900 if test $ac_mid -le $ac_hi; then
8901 ac_lo= ac_hi=
8902 break
8903 fi
8904 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906
8907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 done
8909else
8910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008911sed 's/^/| /' conftest.$ac_ext >&5
8912
Martin v. Löwiseba40652007-08-30 20:10:57 +00008913 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915
8916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918
8919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008920# Binary search between lo and hi bounds.
8921while test "x$ac_lo" != "x$ac_hi"; do
8922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* confdefs.h. */
8925_ACEOF
8926cat confdefs.h >>conftest.$ac_ext
8927cat >>conftest.$ac_ext <<_ACEOF
8928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008935test_array [0] = 0
8936
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008942if { (ac_try="$ac_compile"
8943case "(($ac_try" in
8944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8945 *) ac_try_echo=$ac_try;;
8946esac
8947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008950 grep -v '^ *+' conftest.er1 >conftest.err
8951 rm -f conftest.er1
8952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954 (exit $ac_status); } && {
8955 test -z "$ac_c_werror_flag" ||
8956 test ! -s conftest.err
8957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_hi=$ac_mid
8959else
8960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008961sed 's/^/| /' conftest.$ac_ext >&5
8962
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965
8966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008967done
8968case $ac_lo in
8969?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970'') if test "$ac_cv_type_float" = yes; then
8971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008972See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 { (exit 77); exit 77; }; }
8976 else
8977 ac_cv_sizeof_float=0
8978 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008979esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* confdefs.h. */
8983_ACEOF
8984cat confdefs.h >>conftest.$ac_ext
8985cat >>conftest.$ac_ext <<_ACEOF
8986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 typedef float ac__type_sizeof_;
8989static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8990static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008991#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008992#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008995{
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
8997 FILE *f = fopen ("conftest.val", "w");
8998 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008999 return 1;
9000 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002 long int i = longval ();
9003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9004 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009005 fprintf (f, "%ld\n", i);
9006 }
9007 else
9008 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009009 unsigned long int i = ulongval ();
9010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9011 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 fprintf (f, "%lu\n", i);
9013 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
9016 ;
9017 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018}
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
9020rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009021if { (ac_try="$ac_link"
9022case "(($ac_try" in
9023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9024 *) ac_try_echo=$ac_try;;
9025esac
9026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031 { (case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034esac
9035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_status=$?
9038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 (exit $ac_status); }; }; then
9040 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041else
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 echo "$as_me: program exited with status $ac_status" >&5
9043echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009044sed 's/^/| /' conftest.$ac_ext >&5
9045
Martin v. Löwis11437992002-04-12 09:54:03 +00009046( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047if test "$ac_cv_type_float" = yes; then
9048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009050echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052 { (exit 77); exit 77; }; }
9053 else
9054 ac_cv_sizeof_float=0
9055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009057rm -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 +00009058fi
9059rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9062echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9063
9064
9065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009067#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069
9070
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071{ echo "$as_me:$LINENO: checking for double" >&5
9072echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009073if test "${ac_cv_type_double+set}" = set; then
9074 echo $ECHO_N "(cached) $ECHO_C" >&6
9075else
9076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009082$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084int
9085main ()
9086{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 return 0;
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096if { (ac_try="$ac_compile"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
9101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9102 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009104 grep -v '^ *+' conftest.er1 >conftest.err
9105 rm -f conftest.er1
9106 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108 (exit $ac_status); } && {
9109 test -z "$ac_c_werror_flag" ||
9110 test ! -s conftest.err
9111 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 ac_cv_type_double=yes
9113else
9114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009118fi
Brett Cannon19fab762007-06-02 03:02:29 +00009119
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9121fi
9122{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9123echo "${ECHO_T}$ac_cv_type_double" >&6; }
9124
9125# The cast to long int works around a bug in the HP C Compiler
9126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9128# This bug is HP SR number 8606223364.
9129{ echo "$as_me:$LINENO: checking size of double" >&5
9130echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009131if test "${ac_cv_sizeof_double+set}" = set; then
9132 echo $ECHO_N "(cached) $ECHO_C" >&6
9133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 if test "$cross_compiling" = yes; then
9135 # Depending upon the size, compute the lo and hi bounds.
9136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* confdefs.h. */
9138_ACEOF
9139cat confdefs.h >>conftest.$ac_ext
9140cat >>conftest.$ac_ext <<_ACEOF
9141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009142$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009144int
9145main ()
9146{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009148test_array [0] = 0
9149
9150 ;
9151 return 0;
9152}
9153_ACEOF
9154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155if { (ac_try="$ac_compile"
9156case "(($ac_try" in
9157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9158 *) ac_try_echo=$ac_try;;
9159esac
9160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009163 grep -v '^ *+' conftest.er1 >conftest.err
9164 rm -f conftest.er1
9165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009167 (exit $ac_status); } && {
9168 test -z "$ac_c_werror_flag" ||
9169 test ! -s conftest.err
9170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_lo=0 ac_mid=0
9172 while :; do
9173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009174/* confdefs.h. */
9175_ACEOF
9176cat confdefs.h >>conftest.$ac_ext
9177cat >>conftest.$ac_ext <<_ACEOF
9178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009179$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009181int
9182main ()
9183{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009185test_array [0] = 0
9186
9187 ;
9188 return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192if { (ac_try="$ac_compile"
9193case "(($ac_try" in
9194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9195 *) ac_try_echo=$ac_try;;
9196esac
9197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009200 grep -v '^ *+' conftest.er1 >conftest.err
9201 rm -f conftest.er1
9202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009204 (exit $ac_status); } && {
9205 test -z "$ac_c_werror_flag" ||
9206 test ! -s conftest.err
9207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_hi=$ac_mid; break
9209else
9210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009211sed 's/^/| /' conftest.$ac_ext >&5
9212
Martin v. Löwiseba40652007-08-30 20:10:57 +00009213 ac_lo=`expr $ac_mid + 1`
9214 if test $ac_lo -le $ac_mid; then
9215 ac_lo= ac_hi=
9216 break
9217 fi
9218 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 done
9223else
9224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* confdefs.h. */
9229_ACEOF
9230cat confdefs.h >>conftest.$ac_ext
9231cat >>conftest.$ac_ext <<_ACEOF
9232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009239test_array [0] = 0
9240
9241 ;
9242 return 0;
9243}
9244_ACEOF
9245rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246if { (ac_try="$ac_compile"
9247case "(($ac_try" in
9248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9249 *) ac_try_echo=$ac_try;;
9250esac
9251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009254 grep -v '^ *+' conftest.er1 >conftest.err
9255 rm -f conftest.er1
9256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258 (exit $ac_status); } && {
9259 test -z "$ac_c_werror_flag" ||
9260 test ! -s conftest.err
9261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_hi=-1 ac_mid=-1
9263 while :; do
9264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* confdefs.h. */
9266_ACEOF
9267cat confdefs.h >>conftest.$ac_ext
9268cat >>conftest.$ac_ext <<_ACEOF
9269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009270$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009271 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009276test_array [0] = 0
9277
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009283if { (ac_try="$ac_compile"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
9288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295 (exit $ac_status); } && {
9296 test -z "$ac_c_werror_flag" ||
9297 test ! -s conftest.err
9298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ac_lo=$ac_mid; break
9300else
9301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009302sed 's/^/| /' conftest.$ac_ext >&5
9303
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 ac_hi=`expr '(' $ac_mid ')' - 1`
9305 if test $ac_mid -le $ac_hi; then
9306 ac_lo= ac_hi=
9307 break
9308 fi
9309 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311
9312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 done
9314else
9315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009316sed 's/^/| /' conftest.$ac_ext >&5
9317
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320
9321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323
9324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009325# Binary search between lo and hi bounds.
9326while test "x$ac_lo" != "x$ac_hi"; do
9327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009329/* confdefs.h. */
9330_ACEOF
9331cat confdefs.h >>conftest.$ac_ext
9332cat >>conftest.$ac_ext <<_ACEOF
9333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009334$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009336int
9337main ()
9338{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009340test_array [0] = 0
9341
9342 ;
9343 return 0;
9344}
9345_ACEOF
9346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347if { (ac_try="$ac_compile"
9348case "(($ac_try" in
9349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9350 *) ac_try_echo=$ac_try;;
9351esac
9352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009355 grep -v '^ *+' conftest.er1 >conftest.err
9356 rm -f conftest.er1
9357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359 (exit $ac_status); } && {
9360 test -z "$ac_c_werror_flag" ||
9361 test ! -s conftest.err
9362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_hi=$ac_mid
9364else
9365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009366sed 's/^/| /' conftest.$ac_ext >&5
9367
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370
9371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009372done
9373case $ac_lo in
9374?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375'') if test "$ac_cv_type_double" = yes; then
9376 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009377See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 { (exit 77); exit 77; }; }
9381 else
9382 ac_cv_sizeof_double=0
9383 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009385else
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 typedef double ac__type_sizeof_;
9394static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9395static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009396#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009397#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009400{
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
9402 FILE *f = fopen ("conftest.val", "w");
9403 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009404 return 1;
9405 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407 long int i = longval ();
9408 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9409 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 fprintf (f, "%ld\n", i);
9411 }
9412 else
9413 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414 unsigned long int i = ulongval ();
9415 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9416 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 fprintf (f, "%lu\n", i);
9418 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420
9421 ;
9422 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423}
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
9425rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426if { (ac_try="$ac_link"
9427case "(($ac_try" in
9428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9429 *) ac_try_echo=$ac_try;;
9430esac
9431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9432 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_status=$?
9434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 { (case "(($ac_try" in
9437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9438 *) ac_try_echo=$ac_try;;
9439esac
9440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9441 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_status=$?
9443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9444 (exit $ac_status); }; }; then
9445 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446else
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 echo "$as_me: program exited with status $ac_status" >&5
9448echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009449sed 's/^/| /' conftest.$ac_ext >&5
9450
Martin v. Löwis11437992002-04-12 09:54:03 +00009451( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452if test "$ac_cv_type_double" = yes; then
9453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 { (exit 77); exit 77; }; }
9458 else
9459 ac_cv_sizeof_double=0
9460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462rm -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 +00009463fi
9464rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9467echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9468
9469
9470
Martin v. Löwis11437992002-04-12 09:54:03 +00009471cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009472#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009473_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474
9475
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9477echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009478if test "${ac_cv_type_fpos_t+set}" = set; then
9479 echo $ECHO_N "(cached) $ECHO_C" >&6
9480else
9481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009482/* confdefs.h. */
9483_ACEOF
9484cat confdefs.h >>conftest.$ac_ext
9485cat >>conftest.$ac_ext <<_ACEOF
9486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009487$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 return 0;
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501if { (ac_try="$ac_compile"
9502case "(($ac_try" in
9503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9504 *) ac_try_echo=$ac_try;;
9505esac
9506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009509 grep -v '^ *+' conftest.er1 >conftest.err
9510 rm -f conftest.er1
9511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513 (exit $ac_status); } && {
9514 test -z "$ac_c_werror_flag" ||
9515 test ! -s conftest.err
9516 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_cv_type_fpos_t=yes
9518else
9519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009523fi
Brett Cannon19fab762007-06-02 03:02:29 +00009524
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526fi
9527{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9528echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9529
9530# The cast to long int works around a bug in the HP C Compiler
9531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9533# This bug is HP SR number 8606223364.
9534{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9535echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009536if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9537 echo $ECHO_N "(cached) $ECHO_C" >&6
9538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 if test "$cross_compiling" = yes; then
9540 # Depending upon the size, compute the lo and hi bounds.
9541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009542/* confdefs.h. */
9543_ACEOF
9544cat confdefs.h >>conftest.$ac_ext
9545cat >>conftest.$ac_ext <<_ACEOF
9546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009549int
9550main ()
9551{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009553test_array [0] = 0
9554
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560if { (ac_try="$ac_compile"
9561case "(($ac_try" in
9562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9563 *) ac_try_echo=$ac_try;;
9564esac
9565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009568 grep -v '^ *+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572 (exit $ac_status); } && {
9573 test -z "$ac_c_werror_flag" ||
9574 test ! -s conftest.err
9575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_lo=0 ac_mid=0
9577 while :; do
9578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009586int
9587main ()
9588{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009590test_array [0] = 0
9591
9592 ;
9593 return 0;
9594}
9595_ACEOF
9596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597if { (ac_try="$ac_compile"
9598case "(($ac_try" in
9599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9600 *) ac_try_echo=$ac_try;;
9601esac
9602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009605 grep -v '^ *+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009609 (exit $ac_status); } && {
9610 test -z "$ac_c_werror_flag" ||
9611 test ! -s conftest.err
9612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_hi=$ac_mid; break
9614else
9615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009616sed 's/^/| /' conftest.$ac_ext >&5
9617
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618 ac_lo=`expr $ac_mid + 1`
9619 if test $ac_lo -le $ac_mid; then
9620 ac_lo= ac_hi=
9621 break
9622 fi
9623 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 done
9628else
9629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009630sed 's/^/| /' conftest.$ac_ext >&5
9631
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* confdefs.h. */
9634_ACEOF
9635cat confdefs.h >>conftest.$ac_ext
9636cat >>conftest.$ac_ext <<_ACEOF
9637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009639 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009644test_array [0] = 0
9645
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651if { (ac_try="$ac_compile"
9652case "(($ac_try" in
9653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9654 *) ac_try_echo=$ac_try;;
9655esac
9656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009659 grep -v '^ *+' conftest.er1 >conftest.err
9660 rm -f conftest.er1
9661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663 (exit $ac_status); } && {
9664 test -z "$ac_c_werror_flag" ||
9665 test ! -s conftest.err
9666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_hi=-1 ac_mid=-1
9668 while :; do
9669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* confdefs.h. */
9671_ACEOF
9672cat confdefs.h >>conftest.$ac_ext
9673cat >>conftest.$ac_ext <<_ACEOF
9674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009676 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009677int
9678main ()
9679{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009681test_array [0] = 0
9682
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009688if { (ac_try="$ac_compile"
9689case "(($ac_try" in
9690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9691 *) ac_try_echo=$ac_try;;
9692esac
9693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696 grep -v '^ *+' conftest.er1 >conftest.err
9697 rm -f conftest.er1
9698 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700 (exit $ac_status); } && {
9701 test -z "$ac_c_werror_flag" ||
9702 test ! -s conftest.err
9703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_lo=$ac_mid; break
9705else
9706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 ac_hi=`expr '(' $ac_mid ')' - 1`
9710 if test $ac_mid -le $ac_hi; then
9711 ac_lo= ac_hi=
9712 break
9713 fi
9714 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716
9717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 done
9719else
9720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009721sed 's/^/| /' conftest.$ac_ext >&5
9722
Martin v. Löwiseba40652007-08-30 20:10:57 +00009723 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728
9729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730# Binary search between lo and hi bounds.
9731while test "x$ac_lo" != "x$ac_hi"; do
9732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* confdefs.h. */
9735_ACEOF
9736cat confdefs.h >>conftest.$ac_ext
9737cat >>conftest.$ac_ext <<_ACEOF
9738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009741int
9742main ()
9743{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009745test_array [0] = 0
9746
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752if { (ac_try="$ac_compile"
9753case "(($ac_try" in
9754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9755 *) ac_try_echo=$ac_try;;
9756esac
9757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760 grep -v '^ *+' conftest.er1 >conftest.err
9761 rm -f conftest.er1
9762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764 (exit $ac_status); } && {
9765 test -z "$ac_c_werror_flag" ||
9766 test ! -s conftest.err
9767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_hi=$ac_mid
9769else
9770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009771sed 's/^/| /' conftest.$ac_ext >&5
9772
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775
9776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009777done
9778case $ac_lo in
9779?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780'') if test "$ac_cv_type_fpos_t" = yes; then
9781 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009782See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 { (exit 77); exit 77; }; }
9786 else
9787 ac_cv_sizeof_fpos_t=0
9788 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009789esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009790else
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* confdefs.h. */
9793_ACEOF
9794cat confdefs.h >>conftest.$ac_ext
9795cat >>conftest.$ac_ext <<_ACEOF
9796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 typedef fpos_t ac__type_sizeof_;
9799static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9800static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009801#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009802#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009805{
Martin v. Löwis11437992002-04-12 09:54:03 +00009806
9807 FILE *f = fopen ("conftest.val", "w");
9808 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809 return 1;
9810 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812 long int i = longval ();
9813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9814 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 fprintf (f, "%ld\n", i);
9816 }
9817 else
9818 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819 unsigned long int i = ulongval ();
9820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9821 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 fprintf (f, "%lu\n", i);
9823 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
9826 ;
9827 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009828}
Martin v. Löwis11437992002-04-12 09:54:03 +00009829_ACEOF
9830rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009831if { (ac_try="$ac_link"
9832case "(($ac_try" in
9833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9834 *) ac_try_echo=$ac_try;;
9835esac
9836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_status=$?
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841 { (case "(($ac_try" in
9842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843 *) ac_try_echo=$ac_try;;
9844esac
9845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_status=$?
9848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849 (exit $ac_status); }; }; then
9850 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009851else
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 echo "$as_me: program exited with status $ac_status" >&5
9853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis11437992002-04-12 09:54:03 +00009856( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857if test "$ac_cv_type_fpos_t" = yes; then
9858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862 { (exit 77); exit 77; }; }
9863 else
9864 ac_cv_sizeof_fpos_t=0
9865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867rm -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 +00009868fi
9869rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9872echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9873
9874
9875
Martin v. Löwis11437992002-04-12 09:54:03 +00009876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009877#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009879
Michael W. Hudson54241132001-12-07 15:38:26 +00009880
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881{ echo "$as_me:$LINENO: checking for size_t" >&5
9882echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009883if test "${ac_cv_type_size_t+set}" = set; then
9884 echo $ECHO_N "(cached) $ECHO_C" >&6
9885else
9886 cat >conftest.$ac_ext <<_ACEOF
9887/* confdefs.h. */
9888_ACEOF
9889cat confdefs.h >>conftest.$ac_ext
9890cat >>conftest.$ac_ext <<_ACEOF
9891/* end confdefs.h. */
9892$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009894int
9895main ()
9896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009898 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009900 return 0;
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906if { (ac_try="$ac_compile"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
9911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009913 ac_status=$?
9914 grep -v '^ *+' conftest.er1 >conftest.err
9915 rm -f conftest.er1
9916 cat conftest.err >&5
9917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918 (exit $ac_status); } && {
9919 test -z "$ac_c_werror_flag" ||
9920 test ! -s conftest.err
9921 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009922 ac_cv_type_size_t=yes
9923else
9924 echo "$as_me: failed program was:" >&5
9925sed 's/^/| /' conftest.$ac_ext >&5
9926
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009928fi
Brett Cannon19fab762007-06-02 03:02:29 +00009929
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931fi
9932{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9933echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9934
9935# The cast to long int works around a bug in the HP C Compiler
9936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9938# This bug is HP SR number 8606223364.
9939{ echo "$as_me:$LINENO: checking size of size_t" >&5
9940echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009941if test "${ac_cv_sizeof_size_t+set}" = set; then
9942 echo $ECHO_N "(cached) $ECHO_C" >&6
9943else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009944 if test "$cross_compiling" = yes; then
9945 # Depending upon the size, compute the lo and hi bounds.
9946cat >conftest.$ac_ext <<_ACEOF
9947/* confdefs.h. */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h. */
9952$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009954int
9955main ()
9956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009958test_array [0] = 0
9959
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965if { (ac_try="$ac_compile"
9966case "(($ac_try" in
9967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9968 *) ac_try_echo=$ac_try;;
9969esac
9970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009972 ac_status=$?
9973 grep -v '^ *+' conftest.er1 >conftest.err
9974 rm -f conftest.er1
9975 cat conftest.err >&5
9976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977 (exit $ac_status); } && {
9978 test -z "$ac_c_werror_flag" ||
9979 test ! -s conftest.err
9980 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009981 ac_lo=0 ac_mid=0
9982 while :; do
9983 cat >conftest.$ac_ext <<_ACEOF
9984/* confdefs.h. */
9985_ACEOF
9986cat confdefs.h >>conftest.$ac_ext
9987cat >>conftest.$ac_ext <<_ACEOF
9988/* end confdefs.h. */
9989$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009990 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009991int
9992main ()
9993{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009995test_array [0] = 0
9996
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002if { (ac_try="$ac_compile"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
10007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009 ac_status=$?
10010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
10013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010014 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err
10017 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010018 ac_hi=$ac_mid; break
10019else
10020 echo "$as_me: failed program was:" >&5
10021sed 's/^/| /' conftest.$ac_ext >&5
10022
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023 ac_lo=`expr $ac_mid + 1`
10024 if test $ac_lo -le $ac_mid; then
10025 ac_lo= ac_hi=
10026 break
10027 fi
10028 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030
10031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010032 done
10033else
10034 echo "$as_me: failed program was:" >&5
10035sed 's/^/| /' conftest.$ac_ext >&5
10036
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010038/* confdefs.h. */
10039_ACEOF
10040cat confdefs.h >>conftest.$ac_ext
10041cat >>conftest.$ac_ext <<_ACEOF
10042/* end confdefs.h. */
10043$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010044 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010045int
10046main ()
10047{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010049test_array [0] = 0
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056if { (ac_try="$ac_compile"
10057case "(($ac_try" in
10058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10059 *) ac_try_echo=$ac_try;;
10060esac
10061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063 ac_status=$?
10064 grep -v '^ *+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010068 (exit $ac_status); } && {
10069 test -z "$ac_c_werror_flag" ||
10070 test ! -s conftest.err
10071 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010072 ac_hi=-1 ac_mid=-1
10073 while :; do
10074 cat >conftest.$ac_ext <<_ACEOF
10075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
10080$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010081 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010082int
10083main ()
10084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086test_array [0] = 0
10087
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093if { (ac_try="$ac_compile"
10094case "(($ac_try" in
10095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10096 *) ac_try_echo=$ac_try;;
10097esac
10098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010100 ac_status=$?
10101 grep -v '^ *+' conftest.er1 >conftest.err
10102 rm -f conftest.er1
10103 cat conftest.err >&5
10104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105 (exit $ac_status); } && {
10106 test -z "$ac_c_werror_flag" ||
10107 test ! -s conftest.err
10108 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010109 ac_lo=$ac_mid; break
10110else
10111 echo "$as_me: failed program was:" >&5
10112sed 's/^/| /' conftest.$ac_ext >&5
10113
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 ac_hi=`expr '(' $ac_mid ')' - 1`
10115 if test $ac_mid -le $ac_hi; then
10116 ac_lo= ac_hi=
10117 break
10118 fi
10119 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121
10122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010123 done
10124else
10125 echo "$as_me: failed program was:" >&5
10126sed 's/^/| /' conftest.$ac_ext >&5
10127
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130
10131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133
10134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010135# Binary search between lo and hi bounds.
10136while test "x$ac_lo" != "x$ac_hi"; do
10137 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10138 cat >conftest.$ac_ext <<_ACEOF
10139/* confdefs.h. */
10140_ACEOF
10141cat confdefs.h >>conftest.$ac_ext
10142cat >>conftest.$ac_ext <<_ACEOF
10143/* end confdefs.h. */
10144$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010146int
10147main ()
10148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010150test_array [0] = 0
10151
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157if { (ac_try="$ac_compile"
10158case "(($ac_try" in
10159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10160 *) ac_try_echo=$ac_try;;
10161esac
10162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010164 ac_status=$?
10165 grep -v '^ *+' conftest.er1 >conftest.err
10166 rm -f conftest.er1
10167 cat conftest.err >&5
10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169 (exit $ac_status); } && {
10170 test -z "$ac_c_werror_flag" ||
10171 test ! -s conftest.err
10172 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010173 ac_hi=$ac_mid
10174else
10175 echo "$as_me: failed program was:" >&5
10176sed 's/^/| /' conftest.$ac_ext >&5
10177
Martin v. Löwiseba40652007-08-30 20:10:57 +000010178 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180
10181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010182done
10183case $ac_lo in
10184?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185'') if test "$ac_cv_type_size_t" = yes; then
10186 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010187See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010188echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010189See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 { (exit 77); exit 77; }; }
10191 else
10192 ac_cv_sizeof_size_t=0
10193 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010194esac
10195else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010196 cat >conftest.$ac_ext <<_ACEOF
10197/* confdefs.h. */
10198_ACEOF
10199cat confdefs.h >>conftest.$ac_ext
10200cat >>conftest.$ac_ext <<_ACEOF
10201/* end confdefs.h. */
10202$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203 typedef size_t ac__type_sizeof_;
10204static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10205static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010206#include <stdio.h>
10207#include <stdlib.h>
10208int
10209main ()
10210{
10211
10212 FILE *f = fopen ("conftest.val", "w");
10213 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010214 return 1;
10215 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010216 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217 long int i = longval ();
10218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10219 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010220 fprintf (f, "%ld\n", i);
10221 }
10222 else
10223 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010224 unsigned long int i = ulongval ();
10225 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10226 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010227 fprintf (f, "%lu\n", i);
10228 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010229 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010230
10231 ;
10232 return 0;
10233}
10234_ACEOF
10235rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236if { (ac_try="$ac_link"
10237case "(($ac_try" in
10238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239 *) ac_try_echo=$ac_try;;
10240esac
10241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10242 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010243 ac_status=$?
10244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246 { (case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
10250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10251 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010252 ac_status=$?
10253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10254 (exit $ac_status); }; }; then
10255 ac_cv_sizeof_size_t=`cat conftest.val`
10256else
10257 echo "$as_me: program exited with status $ac_status" >&5
10258echo "$as_me: failed program was:" >&5
10259sed 's/^/| /' conftest.$ac_ext >&5
10260
10261( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262if test "$ac_cv_type_size_t" = yes; then
10263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010264See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010265echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010266See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 { (exit 77); exit 77; }; }
10268 else
10269 ac_cv_sizeof_size_t=0
10270 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010272rm -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 +000010273fi
10274rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10277echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10278
10279
10280
Martin v. Löwis18e16552006-02-15 17:27:45 +000010281cat >>confdefs.h <<_ACEOF
10282#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10283_ACEOF
10284
10285
Christian Heimes951cc0f2008-01-31 23:08:23 +000010286{ echo "$as_me:$LINENO: checking for pid_t" >&5
10287echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10288if test "${ac_cv_type_pid_t+set}" = set; then
10289 echo $ECHO_N "(cached) $ECHO_C" >&6
10290else
10291 cat >conftest.$ac_ext <<_ACEOF
10292/* confdefs.h. */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h. */
10297$ac_includes_default
10298typedef pid_t ac__type_new_;
10299int
10300main ()
10301{
10302if ((ac__type_new_ *) 0)
10303 return 0;
10304if (sizeof (ac__type_new_))
10305 return 0;
10306 ;
10307 return 0;
10308}
10309_ACEOF
10310rm -f conftest.$ac_objext
10311if { (ac_try="$ac_compile"
10312case "(($ac_try" in
10313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10314 *) ac_try_echo=$ac_try;;
10315esac
10316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10317 (eval "$ac_compile") 2>conftest.er1
10318 ac_status=$?
10319 grep -v '^ *+' conftest.er1 >conftest.err
10320 rm -f conftest.er1
10321 cat conftest.err >&5
10322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323 (exit $ac_status); } && {
10324 test -z "$ac_c_werror_flag" ||
10325 test ! -s conftest.err
10326 } && test -s conftest.$ac_objext; then
10327 ac_cv_type_pid_t=yes
10328else
10329 echo "$as_me: failed program was:" >&5
10330sed 's/^/| /' conftest.$ac_ext >&5
10331
10332 ac_cv_type_pid_t=no
10333fi
10334
10335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10336fi
10337{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10338echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10339
10340# The cast to long int works around a bug in the HP C Compiler
10341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10343# This bug is HP SR number 8606223364.
10344{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10345echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10346if test "${ac_cv_sizeof_pid_t+set}" = set; then
10347 echo $ECHO_N "(cached) $ECHO_C" >&6
10348else
10349 if test "$cross_compiling" = yes; then
10350 # Depending upon the size, compute the lo and hi bounds.
10351cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
10357$ac_includes_default
10358 typedef pid_t ac__type_sizeof_;
10359int
10360main ()
10361{
10362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10363test_array [0] = 0
10364
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext
10370if { (ac_try="$ac_compile"
10371case "(($ac_try" in
10372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10373 *) ac_try_echo=$ac_try;;
10374esac
10375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10376 (eval "$ac_compile") 2>conftest.er1
10377 ac_status=$?
10378 grep -v '^ *+' conftest.er1 >conftest.err
10379 rm -f conftest.er1
10380 cat conftest.err >&5
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); } && {
10383 test -z "$ac_c_werror_flag" ||
10384 test ! -s conftest.err
10385 } && test -s conftest.$ac_objext; then
10386 ac_lo=0 ac_mid=0
10387 while :; do
10388 cat >conftest.$ac_ext <<_ACEOF
10389/* confdefs.h. */
10390_ACEOF
10391cat confdefs.h >>conftest.$ac_ext
10392cat >>conftest.$ac_ext <<_ACEOF
10393/* end confdefs.h. */
10394$ac_includes_default
10395 typedef pid_t ac__type_sizeof_;
10396int
10397main ()
10398{
10399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10400test_array [0] = 0
10401
10402 ;
10403 return 0;
10404}
10405_ACEOF
10406rm -f conftest.$ac_objext
10407if { (ac_try="$ac_compile"
10408case "(($ac_try" in
10409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10410 *) ac_try_echo=$ac_try;;
10411esac
10412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10413 (eval "$ac_compile") 2>conftest.er1
10414 ac_status=$?
10415 grep -v '^ *+' conftest.er1 >conftest.err
10416 rm -f conftest.er1
10417 cat conftest.err >&5
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); } && {
10420 test -z "$ac_c_werror_flag" ||
10421 test ! -s conftest.err
10422 } && test -s conftest.$ac_objext; then
10423 ac_hi=$ac_mid; break
10424else
10425 echo "$as_me: failed program was:" >&5
10426sed 's/^/| /' conftest.$ac_ext >&5
10427
10428 ac_lo=`expr $ac_mid + 1`
10429 if test $ac_lo -le $ac_mid; then
10430 ac_lo= ac_hi=
10431 break
10432 fi
10433 ac_mid=`expr 2 '*' $ac_mid + 1`
10434fi
10435
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10437 done
10438else
10439 echo "$as_me: failed program was:" >&5
10440sed 's/^/| /' conftest.$ac_ext >&5
10441
10442 cat >conftest.$ac_ext <<_ACEOF
10443/* confdefs.h. */
10444_ACEOF
10445cat confdefs.h >>conftest.$ac_ext
10446cat >>conftest.$ac_ext <<_ACEOF
10447/* end confdefs.h. */
10448$ac_includes_default
10449 typedef pid_t ac__type_sizeof_;
10450int
10451main ()
10452{
10453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10454test_array [0] = 0
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
10460rm -f conftest.$ac_objext
10461if { (ac_try="$ac_compile"
10462case "(($ac_try" in
10463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10464 *) ac_try_echo=$ac_try;;
10465esac
10466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10467 (eval "$ac_compile") 2>conftest.er1
10468 ac_status=$?
10469 grep -v '^ *+' conftest.er1 >conftest.err
10470 rm -f conftest.er1
10471 cat conftest.err >&5
10472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10473 (exit $ac_status); } && {
10474 test -z "$ac_c_werror_flag" ||
10475 test ! -s conftest.err
10476 } && test -s conftest.$ac_objext; then
10477 ac_hi=-1 ac_mid=-1
10478 while :; do
10479 cat >conftest.$ac_ext <<_ACEOF
10480/* confdefs.h. */
10481_ACEOF
10482cat confdefs.h >>conftest.$ac_ext
10483cat >>conftest.$ac_ext <<_ACEOF
10484/* end confdefs.h. */
10485$ac_includes_default
10486 typedef pid_t ac__type_sizeof_;
10487int
10488main ()
10489{
10490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10491test_array [0] = 0
10492
10493 ;
10494 return 0;
10495}
10496_ACEOF
10497rm -f conftest.$ac_objext
10498if { (ac_try="$ac_compile"
10499case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
10503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10504 (eval "$ac_compile") 2>conftest.er1
10505 ac_status=$?
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510 (exit $ac_status); } && {
10511 test -z "$ac_c_werror_flag" ||
10512 test ! -s conftest.err
10513 } && test -s conftest.$ac_objext; then
10514 ac_lo=$ac_mid; break
10515else
10516 echo "$as_me: failed program was:" >&5
10517sed 's/^/| /' conftest.$ac_ext >&5
10518
10519 ac_hi=`expr '(' $ac_mid ')' - 1`
10520 if test $ac_mid -le $ac_hi; then
10521 ac_lo= ac_hi=
10522 break
10523 fi
10524 ac_mid=`expr 2 '*' $ac_mid`
10525fi
10526
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10528 done
10529else
10530 echo "$as_me: failed program was:" >&5
10531sed 's/^/| /' conftest.$ac_ext >&5
10532
10533 ac_lo= ac_hi=
10534fi
10535
10536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10537fi
10538
10539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10540# Binary search between lo and hi bounds.
10541while test "x$ac_lo" != "x$ac_hi"; do
10542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10543 cat >conftest.$ac_ext <<_ACEOF
10544/* confdefs.h. */
10545_ACEOF
10546cat confdefs.h >>conftest.$ac_ext
10547cat >>conftest.$ac_ext <<_ACEOF
10548/* end confdefs.h. */
10549$ac_includes_default
10550 typedef pid_t ac__type_sizeof_;
10551int
10552main ()
10553{
10554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10555test_array [0] = 0
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561rm -f conftest.$ac_objext
10562if { (ac_try="$ac_compile"
10563case "(($ac_try" in
10564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10565 *) ac_try_echo=$ac_try;;
10566esac
10567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10568 (eval "$ac_compile") 2>conftest.er1
10569 ac_status=$?
10570 grep -v '^ *+' conftest.er1 >conftest.err
10571 rm -f conftest.er1
10572 cat conftest.err >&5
10573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10574 (exit $ac_status); } && {
10575 test -z "$ac_c_werror_flag" ||
10576 test ! -s conftest.err
10577 } && test -s conftest.$ac_objext; then
10578 ac_hi=$ac_mid
10579else
10580 echo "$as_me: failed program was:" >&5
10581sed 's/^/| /' conftest.$ac_ext >&5
10582
10583 ac_lo=`expr '(' $ac_mid ')' + 1`
10584fi
10585
10586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10587done
10588case $ac_lo in
10589?*) ac_cv_sizeof_pid_t=$ac_lo;;
10590'') if test "$ac_cv_type_pid_t" = yes; then
10591 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10592See \`config.log' for more details." >&5
10593echo "$as_me: error: cannot compute sizeof (pid_t)
10594See \`config.log' for more details." >&2;}
10595 { (exit 77); exit 77; }; }
10596 else
10597 ac_cv_sizeof_pid_t=0
10598 fi ;;
10599esac
10600else
10601 cat >conftest.$ac_ext <<_ACEOF
10602/* confdefs.h. */
10603_ACEOF
10604cat confdefs.h >>conftest.$ac_ext
10605cat >>conftest.$ac_ext <<_ACEOF
10606/* end confdefs.h. */
10607$ac_includes_default
10608 typedef pid_t ac__type_sizeof_;
10609static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10610static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10611#include <stdio.h>
10612#include <stdlib.h>
10613int
10614main ()
10615{
10616
10617 FILE *f = fopen ("conftest.val", "w");
10618 if (! f)
10619 return 1;
10620 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10621 {
10622 long int i = longval ();
10623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10624 return 1;
10625 fprintf (f, "%ld\n", i);
10626 }
10627 else
10628 {
10629 unsigned long int i = ulongval ();
10630 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10631 return 1;
10632 fprintf (f, "%lu\n", i);
10633 }
10634 return ferror (f) || fclose (f) != 0;
10635
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest$ac_exeext
10641if { (ac_try="$ac_link"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
10646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10647 (eval "$ac_link") 2>&5
10648 ac_status=$?
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10651 { (case "(($ac_try" in
10652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10653 *) ac_try_echo=$ac_try;;
10654esac
10655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10656 (eval "$ac_try") 2>&5
10657 ac_status=$?
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659 (exit $ac_status); }; }; then
10660 ac_cv_sizeof_pid_t=`cat conftest.val`
10661else
10662 echo "$as_me: program exited with status $ac_status" >&5
10663echo "$as_me: failed program was:" >&5
10664sed 's/^/| /' conftest.$ac_ext >&5
10665
10666( exit $ac_status )
10667if test "$ac_cv_type_pid_t" = yes; then
10668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10669See \`config.log' for more details." >&5
10670echo "$as_me: error: cannot compute sizeof (pid_t)
10671See \`config.log' for more details." >&2;}
10672 { (exit 77); exit 77; }; }
10673 else
10674 ac_cv_sizeof_pid_t=0
10675 fi
10676fi
10677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10678fi
10679rm -f conftest.val
10680fi
10681{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10682echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10683
10684
10685
10686cat >>confdefs.h <<_ACEOF
10687#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10688_ACEOF
10689
10690
Michael W. Hudson54241132001-12-07 15:38:26 +000010691
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692{ echo "$as_me:$LINENO: checking for long long support" >&5
10693echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010694have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010696/* confdefs.h. */
10697_ACEOF
10698cat confdefs.h >>conftest.$ac_ext
10699cat >>conftest.$ac_ext <<_ACEOF
10700/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010701
Martin v. Löwis11437992002-04-12 09:54:03 +000010702int
10703main ()
10704{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010705long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 ;
10707 return 0;
10708}
10709_ACEOF
10710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711if { (ac_try="$ac_compile"
10712case "(($ac_try" in
10713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10714 *) ac_try_echo=$ac_try;;
10715esac
10716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010719 grep -v '^ *+' conftest.er1 >conftest.err
10720 rm -f conftest.er1
10721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 (exit $ac_status); } && {
10724 test -z "$ac_c_werror_flag" ||
10725 test ! -s conftest.err
10726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
10728
10729cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010730#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010731_ACEOF
10732
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010733 have_long_long=yes
10734
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010737sed 's/^/| /' conftest.$ac_ext >&5
10738
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010741
10742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10743{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10744echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010745if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010746{ echo "$as_me:$LINENO: checking for long long" >&5
10747echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010748if test "${ac_cv_type_long_long+set}" = set; then
10749 echo $ECHO_N "(cached) $ECHO_C" >&6
10750else
10751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010752/* confdefs.h. */
10753_ACEOF
10754cat confdefs.h >>conftest.$ac_ext
10755cat >>conftest.$ac_ext <<_ACEOF
10756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 return 0;
10766 ;
10767 return 0;
10768}
10769_ACEOF
10770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010771if { (ac_try="$ac_compile"
10772case "(($ac_try" in
10773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10774 *) ac_try_echo=$ac_try;;
10775esac
10776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010779 grep -v '^ *+' conftest.er1 >conftest.err
10780 rm -f conftest.er1
10781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010783 (exit $ac_status); } && {
10784 test -z "$ac_c_werror_flag" ||
10785 test ! -s conftest.err
10786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 ac_cv_type_long_long=yes
10788else
10789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010790sed 's/^/| /' conftest.$ac_ext >&5
10791
Martin v. Löwiseba40652007-08-30 20:10:57 +000010792 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010793fi
Brett Cannon19fab762007-06-02 03:02:29 +000010794
Martin v. Löwiseba40652007-08-30 20:10:57 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796fi
10797{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10798echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10799
10800# The cast to long int works around a bug in the HP C Compiler
10801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10803# This bug is HP SR number 8606223364.
10804{ echo "$as_me:$LINENO: checking size of long long" >&5
10805echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010806if test "${ac_cv_sizeof_long_long+set}" = set; then
10807 echo $ECHO_N "(cached) $ECHO_C" >&6
10808else
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 if test "$cross_compiling" = yes; then
10810 # Depending upon the size, compute the lo and hi bounds.
10811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* confdefs.h. */
10813_ACEOF
10814cat confdefs.h >>conftest.$ac_ext
10815cat >>conftest.$ac_ext <<_ACEOF
10816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010817$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010819int
10820main ()
10821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010823test_array [0] = 0
10824
10825 ;
10826 return 0;
10827}
10828_ACEOF
10829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830if { (ac_try="$ac_compile"
10831case "(($ac_try" in
10832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10833 *) ac_try_echo=$ac_try;;
10834esac
10835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010838 grep -v '^ *+' conftest.er1 >conftest.err
10839 rm -f conftest.er1
10840 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010842 (exit $ac_status); } && {
10843 test -z "$ac_c_werror_flag" ||
10844 test ! -s conftest.err
10845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ac_lo=0 ac_mid=0
10847 while :; do
10848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* confdefs.h. */
10850_ACEOF
10851cat confdefs.h >>conftest.$ac_ext
10852cat >>conftest.$ac_ext <<_ACEOF
10853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010854$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010855 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010856int
10857main ()
10858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010860test_array [0] = 0
10861
10862 ;
10863 return 0;
10864}
10865_ACEOF
10866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010867if { (ac_try="$ac_compile"
10868case "(($ac_try" in
10869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10870 *) ac_try_echo=$ac_try;;
10871esac
10872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010875 grep -v '^ *+' conftest.er1 >conftest.err
10876 rm -f conftest.er1
10877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010879 (exit $ac_status); } && {
10880 test -z "$ac_c_werror_flag" ||
10881 test ! -s conftest.err
10882 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 ac_hi=$ac_mid; break
10884else
10885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010886sed 's/^/| /' conftest.$ac_ext >&5
10887
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888 ac_lo=`expr $ac_mid + 1`
10889 if test $ac_lo -le $ac_mid; then
10890 ac_lo= ac_hi=
10891 break
10892 fi
10893 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010895
10896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 done
10898else
10899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010900sed 's/^/| /' conftest.$ac_ext >&5
10901
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* confdefs.h. */
10904_ACEOF
10905cat confdefs.h >>conftest.$ac_ext
10906cat >>conftest.$ac_ext <<_ACEOF
10907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010908$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010909 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010910int
10911main ()
10912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010913static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010914test_array [0] = 0
10915
10916 ;
10917 return 0;
10918}
10919_ACEOF
10920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010921if { (ac_try="$ac_compile"
10922case "(($ac_try" in
10923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10924 *) ac_try_echo=$ac_try;;
10925esac
10926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010929 grep -v '^ *+' conftest.er1 >conftest.err
10930 rm -f conftest.er1
10931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010933 (exit $ac_status); } && {
10934 test -z "$ac_c_werror_flag" ||
10935 test ! -s conftest.err
10936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 ac_hi=-1 ac_mid=-1
10938 while :; do
10939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* confdefs.h. */
10941_ACEOF
10942cat confdefs.h >>conftest.$ac_ext
10943cat >>conftest.$ac_ext <<_ACEOF
10944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010945$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010947int
10948main ()
10949{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010950static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010951test_array [0] = 0
10952
10953 ;
10954 return 0;
10955}
10956_ACEOF
10957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010958if { (ac_try="$ac_compile"
10959case "(($ac_try" in
10960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10961 *) ac_try_echo=$ac_try;;
10962esac
10963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010966 grep -v '^ *+' conftest.er1 >conftest.err
10967 rm -f conftest.er1
10968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970 (exit $ac_status); } && {
10971 test -z "$ac_c_werror_flag" ||
10972 test ! -s conftest.err
10973 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 ac_lo=$ac_mid; break
10975else
10976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010977sed 's/^/| /' conftest.$ac_ext >&5
10978
Martin v. Löwiseba40652007-08-30 20:10:57 +000010979 ac_hi=`expr '(' $ac_mid ')' - 1`
10980 if test $ac_mid -le $ac_hi; then
10981 ac_lo= ac_hi=
10982 break
10983 fi
10984 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010986
10987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 done
10989else
10990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010991sed 's/^/| /' conftest.$ac_ext >&5
10992
Martin v. Löwiseba40652007-08-30 20:10:57 +000010993 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010995
10996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010998
10999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011000# Binary search between lo and hi bounds.
11001while test "x$ac_lo" != "x$ac_hi"; do
11002 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* confdefs.h. */
11005_ACEOF
11006cat confdefs.h >>conftest.$ac_ext
11007cat >>conftest.$ac_ext <<_ACEOF
11008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011009$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011011int
11012main ()
11013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011015test_array [0] = 0
11016
11017 ;
11018 return 0;
11019}
11020_ACEOF
11021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022if { (ac_try="$ac_compile"
11023case "(($ac_try" in
11024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11025 *) ac_try_echo=$ac_try;;
11026esac
11027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011030 grep -v '^ *+' conftest.er1 >conftest.err
11031 rm -f conftest.er1
11032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034 (exit $ac_status); } && {
11035 test -z "$ac_c_werror_flag" ||
11036 test ! -s conftest.err
11037 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ac_hi=$ac_mid
11039else
11040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011041sed 's/^/| /' conftest.$ac_ext >&5
11042
Martin v. Löwiseba40652007-08-30 20:10:57 +000011043 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011045
11046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011047done
11048case $ac_lo in
11049?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050'') if test "$ac_cv_type_long_long" = yes; then
11051 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011052See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011053echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011054See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011055 { (exit 77); exit 77; }; }
11056 else
11057 ac_cv_sizeof_long_long=0
11058 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011059esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011060else
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* confdefs.h. */
11063_ACEOF
11064cat confdefs.h >>conftest.$ac_ext
11065cat >>conftest.$ac_ext <<_ACEOF
11066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011067$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068 typedef long long ac__type_sizeof_;
11069static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11070static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011071#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011072#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011075{
Martin v. Löwis11437992002-04-12 09:54:03 +000011076
11077 FILE *f = fopen ("conftest.val", "w");
11078 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011079 return 1;
11080 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082 long int i = longval ();
11083 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11084 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 fprintf (f, "%ld\n", i);
11086 }
11087 else
11088 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011089 unsigned long int i = ulongval ();
11090 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11091 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 fprintf (f, "%lu\n", i);
11093 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
11096 ;
11097 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011098}
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
11100rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101if { (ac_try="$ac_link"
11102case "(($ac_try" in
11103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11104 *) ac_try_echo=$ac_try;;
11105esac
11106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ac_status=$?
11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011111 { (case "(($ac_try" in
11112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11113 *) ac_try_echo=$ac_try;;
11114esac
11115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11116 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ac_status=$?
11118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11119 (exit $ac_status); }; }; then
11120 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011121else
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 echo "$as_me: program exited with status $ac_status" >&5
11123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011124sed 's/^/| /' conftest.$ac_ext >&5
11125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127if test "$ac_cv_type_long_long" = yes; then
11128 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011129See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011130echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011131See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132 { (exit 77); exit 77; }; }
11133 else
11134 ac_cv_sizeof_long_long=0
11135 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137rm -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 +000011138fi
11139rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11142echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11143
11144
11145
Martin v. Löwis11437992002-04-12 09:54:03 +000011146cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011149
Michael W. Hudson54241132001-12-07 15:38:26 +000011150
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011151fi
11152
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011153{ echo "$as_me:$LINENO: checking for long double support" >&5
11154echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11155have_long_double=no
11156cat >conftest.$ac_ext <<_ACEOF
11157/* confdefs.h. */
11158_ACEOF
11159cat confdefs.h >>conftest.$ac_ext
11160cat >>conftest.$ac_ext <<_ACEOF
11161/* end confdefs.h. */
11162
11163int
11164main ()
11165{
11166long double x; x = (long double)0.;
11167 ;
11168 return 0;
11169}
11170_ACEOF
11171rm -f conftest.$ac_objext
11172if { (ac_try="$ac_compile"
11173case "(($ac_try" in
11174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11175 *) ac_try_echo=$ac_try;;
11176esac
11177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11178 (eval "$ac_compile") 2>conftest.er1
11179 ac_status=$?
11180 grep -v '^ *+' conftest.er1 >conftest.err
11181 rm -f conftest.er1
11182 cat conftest.err >&5
11183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11184 (exit $ac_status); } && {
11185 test -z "$ac_c_werror_flag" ||
11186 test ! -s conftest.err
11187 } && test -s conftest.$ac_objext; then
11188
11189
11190cat >>confdefs.h <<\_ACEOF
11191#define HAVE_LONG_DOUBLE 1
11192_ACEOF
11193
11194 have_long_double=yes
11195
11196else
11197 echo "$as_me: failed program was:" >&5
11198sed 's/^/| /' conftest.$ac_ext >&5
11199
11200
11201fi
11202
11203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11204{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11205echo "${ECHO_T}$have_long_double" >&6; }
11206if test "$have_long_double" = yes ; then
11207{ echo "$as_me:$LINENO: checking for long double" >&5
11208echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11209if test "${ac_cv_type_long_double+set}" = set; then
11210 echo $ECHO_N "(cached) $ECHO_C" >&6
11211else
11212 cat >conftest.$ac_ext <<_ACEOF
11213/* confdefs.h. */
11214_ACEOF
11215cat confdefs.h >>conftest.$ac_ext
11216cat >>conftest.$ac_ext <<_ACEOF
11217/* end confdefs.h. */
11218$ac_includes_default
11219typedef long double ac__type_new_;
11220int
11221main ()
11222{
11223if ((ac__type_new_ *) 0)
11224 return 0;
11225if (sizeof (ac__type_new_))
11226 return 0;
11227 ;
11228 return 0;
11229}
11230_ACEOF
11231rm -f conftest.$ac_objext
11232if { (ac_try="$ac_compile"
11233case "(($ac_try" in
11234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11235 *) ac_try_echo=$ac_try;;
11236esac
11237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11238 (eval "$ac_compile") 2>conftest.er1
11239 ac_status=$?
11240 grep -v '^ *+' conftest.er1 >conftest.err
11241 rm -f conftest.er1
11242 cat conftest.err >&5
11243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11244 (exit $ac_status); } && {
11245 test -z "$ac_c_werror_flag" ||
11246 test ! -s conftest.err
11247 } && test -s conftest.$ac_objext; then
11248 ac_cv_type_long_double=yes
11249else
11250 echo "$as_me: failed program was:" >&5
11251sed 's/^/| /' conftest.$ac_ext >&5
11252
11253 ac_cv_type_long_double=no
11254fi
11255
11256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11257fi
11258{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11259echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11260
11261# The cast to long int works around a bug in the HP C Compiler
11262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11264# This bug is HP SR number 8606223364.
11265{ echo "$as_me:$LINENO: checking size of long double" >&5
11266echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11267if test "${ac_cv_sizeof_long_double+set}" = set; then
11268 echo $ECHO_N "(cached) $ECHO_C" >&6
11269else
11270 if test "$cross_compiling" = yes; then
11271 # Depending upon the size, compute the lo and hi bounds.
11272cat >conftest.$ac_ext <<_ACEOF
11273/* confdefs.h. */
11274_ACEOF
11275cat confdefs.h >>conftest.$ac_ext
11276cat >>conftest.$ac_ext <<_ACEOF
11277/* end confdefs.h. */
11278$ac_includes_default
11279 typedef long double ac__type_sizeof_;
11280int
11281main ()
11282{
11283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11284test_array [0] = 0
11285
11286 ;
11287 return 0;
11288}
11289_ACEOF
11290rm -f conftest.$ac_objext
11291if { (ac_try="$ac_compile"
11292case "(($ac_try" in
11293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11294 *) ac_try_echo=$ac_try;;
11295esac
11296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11297 (eval "$ac_compile") 2>conftest.er1
11298 ac_status=$?
11299 grep -v '^ *+' conftest.er1 >conftest.err
11300 rm -f conftest.er1
11301 cat conftest.err >&5
11302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11303 (exit $ac_status); } && {
11304 test -z "$ac_c_werror_flag" ||
11305 test ! -s conftest.err
11306 } && test -s conftest.$ac_objext; then
11307 ac_lo=0 ac_mid=0
11308 while :; do
11309 cat >conftest.$ac_ext <<_ACEOF
11310/* confdefs.h. */
11311_ACEOF
11312cat confdefs.h >>conftest.$ac_ext
11313cat >>conftest.$ac_ext <<_ACEOF
11314/* end confdefs.h. */
11315$ac_includes_default
11316 typedef long double ac__type_sizeof_;
11317int
11318main ()
11319{
11320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11321test_array [0] = 0
11322
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext
11328if { (ac_try="$ac_compile"
11329case "(($ac_try" in
11330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11331 *) ac_try_echo=$ac_try;;
11332esac
11333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11334 (eval "$ac_compile") 2>conftest.er1
11335 ac_status=$?
11336 grep -v '^ *+' conftest.er1 >conftest.err
11337 rm -f conftest.er1
11338 cat conftest.err >&5
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340 (exit $ac_status); } && {
11341 test -z "$ac_c_werror_flag" ||
11342 test ! -s conftest.err
11343 } && test -s conftest.$ac_objext; then
11344 ac_hi=$ac_mid; break
11345else
11346 echo "$as_me: failed program was:" >&5
11347sed 's/^/| /' conftest.$ac_ext >&5
11348
11349 ac_lo=`expr $ac_mid + 1`
11350 if test $ac_lo -le $ac_mid; then
11351 ac_lo= ac_hi=
11352 break
11353 fi
11354 ac_mid=`expr 2 '*' $ac_mid + 1`
11355fi
11356
11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11358 done
11359else
11360 echo "$as_me: failed program was:" >&5
11361sed 's/^/| /' conftest.$ac_ext >&5
11362
11363 cat >conftest.$ac_ext <<_ACEOF
11364/* confdefs.h. */
11365_ACEOF
11366cat confdefs.h >>conftest.$ac_ext
11367cat >>conftest.$ac_ext <<_ACEOF
11368/* end confdefs.h. */
11369$ac_includes_default
11370 typedef long double ac__type_sizeof_;
11371int
11372main ()
11373{
11374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11375test_array [0] = 0
11376
11377 ;
11378 return 0;
11379}
11380_ACEOF
11381rm -f conftest.$ac_objext
11382if { (ac_try="$ac_compile"
11383case "(($ac_try" in
11384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11385 *) ac_try_echo=$ac_try;;
11386esac
11387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11388 (eval "$ac_compile") 2>conftest.er1
11389 ac_status=$?
11390 grep -v '^ *+' conftest.er1 >conftest.err
11391 rm -f conftest.er1
11392 cat conftest.err >&5
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394 (exit $ac_status); } && {
11395 test -z "$ac_c_werror_flag" ||
11396 test ! -s conftest.err
11397 } && test -s conftest.$ac_objext; then
11398 ac_hi=-1 ac_mid=-1
11399 while :; do
11400 cat >conftest.$ac_ext <<_ACEOF
11401/* confdefs.h. */
11402_ACEOF
11403cat confdefs.h >>conftest.$ac_ext
11404cat >>conftest.$ac_ext <<_ACEOF
11405/* end confdefs.h. */
11406$ac_includes_default
11407 typedef long double ac__type_sizeof_;
11408int
11409main ()
11410{
11411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11412test_array [0] = 0
11413
11414 ;
11415 return 0;
11416}
11417_ACEOF
11418rm -f conftest.$ac_objext
11419if { (ac_try="$ac_compile"
11420case "(($ac_try" in
11421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11422 *) ac_try_echo=$ac_try;;
11423esac
11424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11425 (eval "$ac_compile") 2>conftest.er1
11426 ac_status=$?
11427 grep -v '^ *+' conftest.er1 >conftest.err
11428 rm -f conftest.er1
11429 cat conftest.err >&5
11430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431 (exit $ac_status); } && {
11432 test -z "$ac_c_werror_flag" ||
11433 test ! -s conftest.err
11434 } && test -s conftest.$ac_objext; then
11435 ac_lo=$ac_mid; break
11436else
11437 echo "$as_me: failed program was:" >&5
11438sed 's/^/| /' conftest.$ac_ext >&5
11439
11440 ac_hi=`expr '(' $ac_mid ')' - 1`
11441 if test $ac_mid -le $ac_hi; then
11442 ac_lo= ac_hi=
11443 break
11444 fi
11445 ac_mid=`expr 2 '*' $ac_mid`
11446fi
11447
11448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11449 done
11450else
11451 echo "$as_me: failed program was:" >&5
11452sed 's/^/| /' conftest.$ac_ext >&5
11453
11454 ac_lo= ac_hi=
11455fi
11456
11457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11458fi
11459
11460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11461# Binary search between lo and hi bounds.
11462while test "x$ac_lo" != "x$ac_hi"; do
11463 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11464 cat >conftest.$ac_ext <<_ACEOF
11465/* confdefs.h. */
11466_ACEOF
11467cat confdefs.h >>conftest.$ac_ext
11468cat >>conftest.$ac_ext <<_ACEOF
11469/* end confdefs.h. */
11470$ac_includes_default
11471 typedef long double ac__type_sizeof_;
11472int
11473main ()
11474{
11475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11476test_array [0] = 0
11477
11478 ;
11479 return 0;
11480}
11481_ACEOF
11482rm -f conftest.$ac_objext
11483if { (ac_try="$ac_compile"
11484case "(($ac_try" in
11485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11486 *) ac_try_echo=$ac_try;;
11487esac
11488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11489 (eval "$ac_compile") 2>conftest.er1
11490 ac_status=$?
11491 grep -v '^ *+' conftest.er1 >conftest.err
11492 rm -f conftest.er1
11493 cat conftest.err >&5
11494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11495 (exit $ac_status); } && {
11496 test -z "$ac_c_werror_flag" ||
11497 test ! -s conftest.err
11498 } && test -s conftest.$ac_objext; then
11499 ac_hi=$ac_mid
11500else
11501 echo "$as_me: failed program was:" >&5
11502sed 's/^/| /' conftest.$ac_ext >&5
11503
11504 ac_lo=`expr '(' $ac_mid ')' + 1`
11505fi
11506
11507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11508done
11509case $ac_lo in
11510?*) ac_cv_sizeof_long_double=$ac_lo;;
11511'') if test "$ac_cv_type_long_double" = yes; then
11512 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11513See \`config.log' for more details." >&5
11514echo "$as_me: error: cannot compute sizeof (long double)
11515See \`config.log' for more details." >&2;}
11516 { (exit 77); exit 77; }; }
11517 else
11518 ac_cv_sizeof_long_double=0
11519 fi ;;
11520esac
11521else
11522 cat >conftest.$ac_ext <<_ACEOF
11523/* confdefs.h. */
11524_ACEOF
11525cat confdefs.h >>conftest.$ac_ext
11526cat >>conftest.$ac_ext <<_ACEOF
11527/* end confdefs.h. */
11528$ac_includes_default
11529 typedef long double ac__type_sizeof_;
11530static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11531static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11532#include <stdio.h>
11533#include <stdlib.h>
11534int
11535main ()
11536{
11537
11538 FILE *f = fopen ("conftest.val", "w");
11539 if (! f)
11540 return 1;
11541 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11542 {
11543 long int i = longval ();
11544 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11545 return 1;
11546 fprintf (f, "%ld\n", i);
11547 }
11548 else
11549 {
11550 unsigned long int i = ulongval ();
11551 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11552 return 1;
11553 fprintf (f, "%lu\n", i);
11554 }
11555 return ferror (f) || fclose (f) != 0;
11556
11557 ;
11558 return 0;
11559}
11560_ACEOF
11561rm -f conftest$ac_exeext
11562if { (ac_try="$ac_link"
11563case "(($ac_try" in
11564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11565 *) ac_try_echo=$ac_try;;
11566esac
11567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11568 (eval "$ac_link") 2>&5
11569 ac_status=$?
11570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11572 { (case "(($ac_try" in
11573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11574 *) ac_try_echo=$ac_try;;
11575esac
11576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11577 (eval "$ac_try") 2>&5
11578 ac_status=$?
11579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11580 (exit $ac_status); }; }; then
11581 ac_cv_sizeof_long_double=`cat conftest.val`
11582else
11583 echo "$as_me: program exited with status $ac_status" >&5
11584echo "$as_me: failed program was:" >&5
11585sed 's/^/| /' conftest.$ac_ext >&5
11586
11587( exit $ac_status )
11588if test "$ac_cv_type_long_double" = yes; then
11589 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11590See \`config.log' for more details." >&5
11591echo "$as_me: error: cannot compute sizeof (long double)
11592See \`config.log' for more details." >&2;}
11593 { (exit 77); exit 77; }; }
11594 else
11595 ac_cv_sizeof_long_double=0
11596 fi
11597fi
11598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11599fi
11600rm -f conftest.val
11601fi
11602{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11603echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11604
11605
11606
11607cat >>confdefs.h <<_ACEOF
11608#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11609_ACEOF
11610
11611
11612fi
11613
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11615echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011616have_c99_bool=no
11617cat >conftest.$ac_ext <<_ACEOF
11618/* confdefs.h. */
11619_ACEOF
11620cat confdefs.h >>conftest.$ac_ext
11621cat >>conftest.$ac_ext <<_ACEOF
11622/* end confdefs.h. */
11623
11624int
11625main ()
11626{
11627_Bool x; x = (_Bool)0;
11628 ;
11629 return 0;
11630}
11631_ACEOF
11632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633if { (ac_try="$ac_compile"
11634case "(($ac_try" in
11635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11636 *) ac_try_echo=$ac_try;;
11637esac
11638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011640 ac_status=$?
11641 grep -v '^ *+' conftest.er1 >conftest.err
11642 rm -f conftest.er1
11643 cat conftest.err >&5
11644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011645 (exit $ac_status); } && {
11646 test -z "$ac_c_werror_flag" ||
11647 test ! -s conftest.err
11648 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011649
11650
11651cat >>confdefs.h <<\_ACEOF
11652#define HAVE_C99_BOOL 1
11653_ACEOF
11654
11655 have_c99_bool=yes
11656
11657else
11658 echo "$as_me: failed program was:" >&5
11659sed 's/^/| /' conftest.$ac_ext >&5
11660
Martin v. Löwiseba40652007-08-30 20:10:57 +000011661
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011663
11664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11665{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11666echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011667if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668{ echo "$as_me:$LINENO: checking for _Bool" >&5
11669echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011670if test "${ac_cv_type__Bool+set}" = set; then
11671 echo $ECHO_N "(cached) $ECHO_C" >&6
11672else
11673 cat >conftest.$ac_ext <<_ACEOF
11674/* confdefs.h. */
11675_ACEOF
11676cat confdefs.h >>conftest.$ac_ext
11677cat >>conftest.$ac_ext <<_ACEOF
11678/* end confdefs.h. */
11679$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011680typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011681int
11682main ()
11683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011685 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011687 return 0;
11688 ;
11689 return 0;
11690}
11691_ACEOF
11692rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011693if { (ac_try="$ac_compile"
11694case "(($ac_try" in
11695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11696 *) ac_try_echo=$ac_try;;
11697esac
11698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011700 ac_status=$?
11701 grep -v '^ *+' conftest.er1 >conftest.err
11702 rm -f conftest.er1
11703 cat conftest.err >&5
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705 (exit $ac_status); } && {
11706 test -z "$ac_c_werror_flag" ||
11707 test ! -s conftest.err
11708 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011709 ac_cv_type__Bool=yes
11710else
11711 echo "$as_me: failed program was:" >&5
11712sed 's/^/| /' conftest.$ac_ext >&5
11713
Martin v. Löwiseba40652007-08-30 20:10:57 +000011714 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011715fi
Brett Cannon19fab762007-06-02 03:02:29 +000011716
Martin v. Löwiseba40652007-08-30 20:10:57 +000011717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11718fi
11719{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11720echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11721
11722# The cast to long int works around a bug in the HP C Compiler
11723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11725# This bug is HP SR number 8606223364.
11726{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11727echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011728if test "${ac_cv_sizeof__Bool+set}" = set; then
11729 echo $ECHO_N "(cached) $ECHO_C" >&6
11730else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011731 if test "$cross_compiling" = yes; then
11732 # Depending upon the size, compute the lo and hi bounds.
11733cat >conftest.$ac_ext <<_ACEOF
11734/* confdefs.h. */
11735_ACEOF
11736cat confdefs.h >>conftest.$ac_ext
11737cat >>conftest.$ac_ext <<_ACEOF
11738/* end confdefs.h. */
11739$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011741int
11742main ()
11743{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011745test_array [0] = 0
11746
11747 ;
11748 return 0;
11749}
11750_ACEOF
11751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752if { (ac_try="$ac_compile"
11753case "(($ac_try" in
11754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11755 *) ac_try_echo=$ac_try;;
11756esac
11757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011759 ac_status=$?
11760 grep -v '^ *+' conftest.er1 >conftest.err
11761 rm -f conftest.er1
11762 cat conftest.err >&5
11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011764 (exit $ac_status); } && {
11765 test -z "$ac_c_werror_flag" ||
11766 test ! -s conftest.err
11767 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011768 ac_lo=0 ac_mid=0
11769 while :; do
11770 cat >conftest.$ac_ext <<_ACEOF
11771/* confdefs.h. */
11772_ACEOF
11773cat confdefs.h >>conftest.$ac_ext
11774cat >>conftest.$ac_ext <<_ACEOF
11775/* end confdefs.h. */
11776$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011777 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011778int
11779main ()
11780{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011782test_array [0] = 0
11783
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789if { (ac_try="$ac_compile"
11790case "(($ac_try" in
11791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792 *) ac_try_echo=$ac_try;;
11793esac
11794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011796 ac_status=$?
11797 grep -v '^ *+' conftest.er1 >conftest.err
11798 rm -f conftest.er1
11799 cat conftest.err >&5
11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011801 (exit $ac_status); } && {
11802 test -z "$ac_c_werror_flag" ||
11803 test ! -s conftest.err
11804 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011805 ac_hi=$ac_mid; break
11806else
11807 echo "$as_me: failed program was:" >&5
11808sed 's/^/| /' conftest.$ac_ext >&5
11809
Martin v. Löwiseba40652007-08-30 20:10:57 +000011810 ac_lo=`expr $ac_mid + 1`
11811 if test $ac_lo -le $ac_mid; then
11812 ac_lo= ac_hi=
11813 break
11814 fi
11815 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011817
11818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011819 done
11820else
11821 echo "$as_me: failed program was:" >&5
11822sed 's/^/| /' conftest.$ac_ext >&5
11823
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011825/* confdefs.h. */
11826_ACEOF
11827cat confdefs.h >>conftest.$ac_ext
11828cat >>conftest.$ac_ext <<_ACEOF
11829/* end confdefs.h. */
11830$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011831 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011832int
11833main ()
11834{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011835static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011836test_array [0] = 0
11837
11838 ;
11839 return 0;
11840}
11841_ACEOF
11842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843if { (ac_try="$ac_compile"
11844case "(($ac_try" in
11845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11846 *) ac_try_echo=$ac_try;;
11847esac
11848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011850 ac_status=$?
11851 grep -v '^ *+' conftest.er1 >conftest.err
11852 rm -f conftest.er1
11853 cat conftest.err >&5
11854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011855 (exit $ac_status); } && {
11856 test -z "$ac_c_werror_flag" ||
11857 test ! -s conftest.err
11858 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011859 ac_hi=-1 ac_mid=-1
11860 while :; do
11861 cat >conftest.$ac_ext <<_ACEOF
11862/* confdefs.h. */
11863_ACEOF
11864cat confdefs.h >>conftest.$ac_ext
11865cat >>conftest.$ac_ext <<_ACEOF
11866/* end confdefs.h. */
11867$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011868 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011869int
11870main ()
11871{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011873test_array [0] = 0
11874
11875 ;
11876 return 0;
11877}
11878_ACEOF
11879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011880if { (ac_try="$ac_compile"
11881case "(($ac_try" in
11882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11883 *) ac_try_echo=$ac_try;;
11884esac
11885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011887 ac_status=$?
11888 grep -v '^ *+' conftest.er1 >conftest.err
11889 rm -f conftest.er1
11890 cat conftest.err >&5
11891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011892 (exit $ac_status); } && {
11893 test -z "$ac_c_werror_flag" ||
11894 test ! -s conftest.err
11895 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011896 ac_lo=$ac_mid; break
11897else
11898 echo "$as_me: failed program was:" >&5
11899sed 's/^/| /' conftest.$ac_ext >&5
11900
Martin v. Löwiseba40652007-08-30 20:10:57 +000011901 ac_hi=`expr '(' $ac_mid ')' - 1`
11902 if test $ac_mid -le $ac_hi; then
11903 ac_lo= ac_hi=
11904 break
11905 fi
11906 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011908
11909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011910 done
11911else
11912 echo "$as_me: failed program was:" >&5
11913sed 's/^/| /' conftest.$ac_ext >&5
11914
Martin v. Löwiseba40652007-08-30 20:10:57 +000011915 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011917
11918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011920
11921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011922# Binary search between lo and hi bounds.
11923while test "x$ac_lo" != "x$ac_hi"; do
11924 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11925 cat >conftest.$ac_ext <<_ACEOF
11926/* confdefs.h. */
11927_ACEOF
11928cat confdefs.h >>conftest.$ac_ext
11929cat >>conftest.$ac_ext <<_ACEOF
11930/* end confdefs.h. */
11931$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011932 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011933int
11934main ()
11935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011937test_array [0] = 0
11938
11939 ;
11940 return 0;
11941}
11942_ACEOF
11943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944if { (ac_try="$ac_compile"
11945case "(($ac_try" in
11946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11947 *) ac_try_echo=$ac_try;;
11948esac
11949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011951 ac_status=$?
11952 grep -v '^ *+' conftest.er1 >conftest.err
11953 rm -f conftest.er1
11954 cat conftest.err >&5
11955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011956 (exit $ac_status); } && {
11957 test -z "$ac_c_werror_flag" ||
11958 test ! -s conftest.err
11959 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011960 ac_hi=$ac_mid
11961else
11962 echo "$as_me: failed program was:" >&5
11963sed 's/^/| /' conftest.$ac_ext >&5
11964
Martin v. Löwiseba40652007-08-30 20:10:57 +000011965 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011967
11968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011969done
11970case $ac_lo in
11971?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011972'') if test "$ac_cv_type__Bool" = yes; then
11973 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011974See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011975echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011976See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011977 { (exit 77); exit 77; }; }
11978 else
11979 ac_cv_sizeof__Bool=0
11980 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011981esac
11982else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011983 cat >conftest.$ac_ext <<_ACEOF
11984/* confdefs.h. */
11985_ACEOF
11986cat confdefs.h >>conftest.$ac_ext
11987cat >>conftest.$ac_ext <<_ACEOF
11988/* end confdefs.h. */
11989$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011990 typedef _Bool ac__type_sizeof_;
11991static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11992static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011993#include <stdio.h>
11994#include <stdlib.h>
11995int
11996main ()
11997{
11998
11999 FILE *f = fopen ("conftest.val", "w");
12000 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012001 return 1;
12002 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012003 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012004 long int i = longval ();
12005 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12006 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012007 fprintf (f, "%ld\n", i);
12008 }
12009 else
12010 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012011 unsigned long int i = ulongval ();
12012 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12013 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012014 fprintf (f, "%lu\n", i);
12015 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012017
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023if { (ac_try="$ac_link"
12024case "(($ac_try" in
12025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12026 *) ac_try_echo=$ac_try;;
12027esac
12028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12029 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012030 ac_status=$?
12031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012033 { (case "(($ac_try" in
12034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12035 *) ac_try_echo=$ac_try;;
12036esac
12037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12038 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012039 ac_status=$?
12040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12041 (exit $ac_status); }; }; then
12042 ac_cv_sizeof__Bool=`cat conftest.val`
12043else
12044 echo "$as_me: program exited with status $ac_status" >&5
12045echo "$as_me: failed program was:" >&5
12046sed 's/^/| /' conftest.$ac_ext >&5
12047
12048( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012049if test "$ac_cv_type__Bool" = yes; then
12050 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012051See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012053See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054 { (exit 77); exit 77; }; }
12055 else
12056 ac_cv_sizeof__Bool=0
12057 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012059rm -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 +000012060fi
12061rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012063{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12064echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12065
12066
12067
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012068cat >>confdefs.h <<_ACEOF
12069#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12070_ACEOF
12071
12072
12073fi
12074
Martin v. Löwiseba40652007-08-30 20:10:57 +000012075{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12076echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012077if test "${ac_cv_type_uintptr_t+set}" = set; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
12079else
12080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012081/* confdefs.h. */
12082_ACEOF
12083cat confdefs.h >>conftest.$ac_ext
12084cat >>conftest.$ac_ext <<_ACEOF
12085/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012086#ifdef HAVE_STDINT_H
12087 #include <stdint.h>
12088 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012089
Martin v. Löwiseba40652007-08-30 20:10:57 +000012090typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012091int
12092main ()
12093{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012095 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012096if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012097 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 ;
12099 return 0;
12100}
12101_ACEOF
12102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012103if { (ac_try="$ac_compile"
12104case "(($ac_try" in
12105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12106 *) ac_try_echo=$ac_try;;
12107esac
12108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012111 grep -v '^ *+' conftest.er1 >conftest.err
12112 rm -f conftest.er1
12113 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012115 (exit $ac_status); } && {
12116 test -z "$ac_c_werror_flag" ||
12117 test ! -s conftest.err
12118 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012119 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012120else
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012122sed 's/^/| /' conftest.$ac_ext >&5
12123
Martin v. Löwiseba40652007-08-30 20:10:57 +000012124 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126
12127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012129{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12130echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012131if test $ac_cv_type_uintptr_t = yes; then
12132
12133cat >>confdefs.h <<_ACEOF
12134#define HAVE_UINTPTR_T 1
12135_ACEOF
12136
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12138echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012139if test "${ac_cv_type_uintptr_t+set}" = set; then
12140 echo $ECHO_N "(cached) $ECHO_C" >&6
12141else
12142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012143/* confdefs.h. */
12144_ACEOF
12145cat confdefs.h >>conftest.$ac_ext
12146cat >>conftest.$ac_ext <<_ACEOF
12147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012148$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012149typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012150int
12151main ()
12152{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012153if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012155if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012156 return 0;
12157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012162if { (ac_try="$ac_compile"
12163case "(($ac_try" in
12164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12165 *) ac_try_echo=$ac_try;;
12166esac
12167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012170 grep -v '^ *+' conftest.er1 >conftest.err
12171 rm -f conftest.er1
12172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012174 (exit $ac_status); } && {
12175 test -z "$ac_c_werror_flag" ||
12176 test ! -s conftest.err
12177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 ac_cv_type_uintptr_t=yes
12179else
12180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012181sed 's/^/| /' conftest.$ac_ext >&5
12182
Martin v. Löwiseba40652007-08-30 20:10:57 +000012183 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012184fi
Brett Cannon19fab762007-06-02 03:02:29 +000012185
Martin v. Löwiseba40652007-08-30 20:10:57 +000012186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12187fi
12188{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12189echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12190
12191# The cast to long int works around a bug in the HP C Compiler
12192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12194# This bug is HP SR number 8606223364.
12195{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12196echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012197if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12198 echo $ECHO_N "(cached) $ECHO_C" >&6
12199else
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 if test "$cross_compiling" = yes; then
12201 # Depending upon the size, compute the lo and hi bounds.
12202cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* confdefs.h. */
12204_ACEOF
12205cat confdefs.h >>conftest.$ac_ext
12206cat >>conftest.$ac_ext <<_ACEOF
12207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012210int
12211main ()
12212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012214test_array [0] = 0
12215
12216 ;
12217 return 0;
12218}
12219_ACEOF
12220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221if { (ac_try="$ac_compile"
12222case "(($ac_try" in
12223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12224 *) ac_try_echo=$ac_try;;
12225esac
12226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012229 grep -v '^ *+' conftest.er1 >conftest.err
12230 rm -f conftest.er1
12231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233 (exit $ac_status); } && {
12234 test -z "$ac_c_werror_flag" ||
12235 test ! -s conftest.err
12236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 ac_lo=0 ac_mid=0
12238 while :; do
12239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012240/* confdefs.h. */
12241_ACEOF
12242cat confdefs.h >>conftest.$ac_ext
12243cat >>conftest.$ac_ext <<_ACEOF
12244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012246 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012247int
12248main ()
12249{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012251test_array [0] = 0
12252
12253 ;
12254 return 0;
12255}
12256_ACEOF
12257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012258if { (ac_try="$ac_compile"
12259case "(($ac_try" in
12260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12261 *) ac_try_echo=$ac_try;;
12262esac
12263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012266 grep -v '^ *+' conftest.er1 >conftest.err
12267 rm -f conftest.er1
12268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012270 (exit $ac_status); } && {
12271 test -z "$ac_c_werror_flag" ||
12272 test ! -s conftest.err
12273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ac_hi=$ac_mid; break
12275else
12276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012277sed 's/^/| /' conftest.$ac_ext >&5
12278
Martin v. Löwiseba40652007-08-30 20:10:57 +000012279 ac_lo=`expr $ac_mid + 1`
12280 if test $ac_lo -le $ac_mid; then
12281 ac_lo= ac_hi=
12282 break
12283 fi
12284 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012286
12287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012288 done
12289else
12290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012291sed 's/^/| /' conftest.$ac_ext >&5
12292
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012294/* confdefs.h. */
12295_ACEOF
12296cat confdefs.h >>conftest.$ac_ext
12297cat >>conftest.$ac_ext <<_ACEOF
12298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012299$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012301int
12302main ()
12303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012305test_array [0] = 0
12306
12307 ;
12308 return 0;
12309}
12310_ACEOF
12311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312if { (ac_try="$ac_compile"
12313case "(($ac_try" in
12314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12315 *) ac_try_echo=$ac_try;;
12316esac
12317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012320 grep -v '^ *+' conftest.er1 >conftest.err
12321 rm -f conftest.er1
12322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324 (exit $ac_status); } && {
12325 test -z "$ac_c_werror_flag" ||
12326 test ! -s conftest.err
12327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 ac_hi=-1 ac_mid=-1
12329 while :; do
12330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* confdefs.h. */
12332_ACEOF
12333cat confdefs.h >>conftest.$ac_ext
12334cat >>conftest.$ac_ext <<_ACEOF
12335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012336$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338int
12339main ()
12340{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012342test_array [0] = 0
12343
12344 ;
12345 return 0;
12346}
12347_ACEOF
12348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349if { (ac_try="$ac_compile"
12350case "(($ac_try" in
12351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12352 *) ac_try_echo=$ac_try;;
12353esac
12354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012357 grep -v '^ *+' conftest.er1 >conftest.err
12358 rm -f conftest.er1
12359 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361 (exit $ac_status); } && {
12362 test -z "$ac_c_werror_flag" ||
12363 test ! -s conftest.err
12364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 ac_lo=$ac_mid; break
12366else
12367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012368sed 's/^/| /' conftest.$ac_ext >&5
12369
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370 ac_hi=`expr '(' $ac_mid ')' - 1`
12371 if test $ac_mid -le $ac_hi; then
12372 ac_lo= ac_hi=
12373 break
12374 fi
12375 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012377
12378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012379 done
12380else
12381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012382sed 's/^/| /' conftest.$ac_ext >&5
12383
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389
12390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012391# Binary search between lo and hi bounds.
12392while test "x$ac_lo" != "x$ac_hi"; do
12393 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* confdefs.h. */
12396_ACEOF
12397cat confdefs.h >>conftest.$ac_ext
12398cat >>conftest.$ac_ext <<_ACEOF
12399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012400$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012402int
12403main ()
12404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012406test_array [0] = 0
12407
12408 ;
12409 return 0;
12410}
12411_ACEOF
12412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413if { (ac_try="$ac_compile"
12414case "(($ac_try" in
12415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12416 *) ac_try_echo=$ac_try;;
12417esac
12418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012421 grep -v '^ *+' conftest.er1 >conftest.err
12422 rm -f conftest.er1
12423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425 (exit $ac_status); } && {
12426 test -z "$ac_c_werror_flag" ||
12427 test ! -s conftest.err
12428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 ac_hi=$ac_mid
12430else
12431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012432sed 's/^/| /' conftest.$ac_ext >&5
12433
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436
12437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012438done
12439case $ac_lo in
12440?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012441'') if test "$ac_cv_type_uintptr_t" = yes; then
12442 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012443See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012444echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012445See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446 { (exit 77); exit 77; }; }
12447 else
12448 ac_cv_sizeof_uintptr_t=0
12449 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012450esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012451else
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* confdefs.h. */
12454_ACEOF
12455cat confdefs.h >>conftest.$ac_ext
12456cat >>conftest.$ac_ext <<_ACEOF
12457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012458$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459 typedef uintptr_t ac__type_sizeof_;
12460static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12461static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012462#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012463#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012466{
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
12468 FILE *f = fopen ("conftest.val", "w");
12469 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012470 return 1;
12471 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473 long int i = longval ();
12474 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12475 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 fprintf (f, "%ld\n", i);
12477 }
12478 else
12479 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480 unsigned long int i = ulongval ();
12481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12482 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 fprintf (f, "%lu\n", i);
12484 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
12487 ;
12488 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012489}
Martin v. Löwis11437992002-04-12 09:54:03 +000012490_ACEOF
12491rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492if { (ac_try="$ac_link"
12493case "(($ac_try" in
12494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12495 *) ac_try_echo=$ac_try;;
12496esac
12497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12498 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012502 { (case "(($ac_try" in
12503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12504 *) ac_try_echo=$ac_try;;
12505esac
12506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12507 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 ac_status=$?
12509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510 (exit $ac_status); }; }; then
12511 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012512else
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 echo "$as_me: program exited with status $ac_status" >&5
12514echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012515sed 's/^/| /' conftest.$ac_ext >&5
12516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518if test "$ac_cv_type_uintptr_t" = yes; then
12519 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012520See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012521echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012522See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012523 { (exit 77); exit 77; }; }
12524 else
12525 ac_cv_sizeof_uintptr_t=0
12526 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012528rm -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 +000012529fi
12530rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012532{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12533echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12534
12535
12536
Martin v. Löwis11437992002-04-12 09:54:03 +000012537cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012538#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012539_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012540
Michael W. Hudson54241132001-12-07 15:38:26 +000012541
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012542fi
12543
Martin v. Löwisebe26702006-10-02 14:55:51 +000012544
12545
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012546# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547{ echo "$as_me:$LINENO: checking size of off_t" >&5
12548echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012549if test "${ac_cv_sizeof_off_t+set}" = set; then
12550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012551else
12552 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012553 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012554else
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012556/* confdefs.h. */
12557_ACEOF
12558cat confdefs.h >>conftest.$ac_ext
12559cat >>conftest.$ac_ext <<_ACEOF
12560/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012561#include <stdio.h>
12562#include <sys/types.h>
12563main()
12564{
12565 FILE *f=fopen("conftestval", "w");
12566 if (!f) exit(1);
12567 fprintf(f, "%d\n", sizeof(off_t));
12568 exit(0);
12569}
Martin v. Löwis11437992002-04-12 09:54:03 +000012570_ACEOF
12571rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012572if { (ac_try="$ac_link"
12573case "(($ac_try" in
12574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12575 *) ac_try_echo=$ac_try;;
12576esac
12577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12578 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012582 { (case "(($ac_try" in
12583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12584 *) ac_try_echo=$ac_try;;
12585esac
12586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12587 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ac_status=$?
12589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12590 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012591 ac_cv_sizeof_off_t=`cat conftestval`
12592else
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 echo "$as_me: program exited with status $ac_status" >&5
12594echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012595sed 's/^/| /' conftest.$ac_ext >&5
12596
Martin v. Löwis11437992002-04-12 09:54:03 +000012597( exit $ac_status )
12598ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600rm -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 +000012601fi
12602
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603
12604
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012605fi
12606
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12608echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
12610cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012611#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012612_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012613
Michael W. Hudson54241132001-12-07 15:38:26 +000012614
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12616echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012617if test "$have_long_long" = yes -a \
12618 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12619 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012620
Martin v. Löwis11437992002-04-12 09:54:03 +000012621cat >>confdefs.h <<\_ACEOF
12622#define HAVE_LARGEFILE_SUPPORT 1
12623_ACEOF
12624
Martin v. Löwiseba40652007-08-30 20:10:57 +000012625 { echo "$as_me:$LINENO: result: yes" >&5
12626echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012627else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012628 { echo "$as_me:$LINENO: result: no" >&5
12629echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012630fi
12631
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012632# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012633{ echo "$as_me:$LINENO: checking size of time_t" >&5
12634echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012635if test "${ac_cv_sizeof_time_t+set}" = set; then
12636 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012637else
12638 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012639 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012640else
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012642/* confdefs.h. */
12643_ACEOF
12644cat confdefs.h >>conftest.$ac_ext
12645cat >>conftest.$ac_ext <<_ACEOF
12646/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012647#include <stdio.h>
12648#include <time.h>
12649main()
12650{
12651 FILE *f=fopen("conftestval", "w");
12652 if (!f) exit(1);
12653 fprintf(f, "%d\n", sizeof(time_t));
12654 exit(0);
12655}
Martin v. Löwis11437992002-04-12 09:54:03 +000012656_ACEOF
12657rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012658if { (ac_try="$ac_link"
12659case "(($ac_try" in
12660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12661 *) ac_try_echo=$ac_try;;
12662esac
12663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12664 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ac_status=$?
12666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668 { (case "(($ac_try" in
12669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12670 *) ac_try_echo=$ac_try;;
12671esac
12672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12673 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ac_status=$?
12675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012677 ac_cv_sizeof_time_t=`cat conftestval`
12678else
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 echo "$as_me: program exited with status $ac_status" >&5
12680echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012681sed 's/^/| /' conftest.$ac_ext >&5
12682
Martin v. Löwis11437992002-04-12 09:54:03 +000012683( exit $ac_status )
12684ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686rm -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 +000012687fi
12688
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689
12690
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012691fi
12692
Martin v. Löwiseba40652007-08-30 20:10:57 +000012693{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12694echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012695
12696cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012697#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012698_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012699
Michael W. Hudson54241132001-12-07 15:38:26 +000012700
12701
Trent Mick635f6fb2000-08-23 21:33:05 +000012702# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012703ac_save_cc="$CC"
12704if test "$ac_cv_kpthread" = "yes"
12705then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012706elif test "$ac_cv_kthread" = "yes"
12707then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012708elif test "$ac_cv_pthread" = "yes"
12709then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12712echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012713have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* confdefs.h. */
12716_ACEOF
12717cat confdefs.h >>conftest.$ac_ext
12718cat >>conftest.$ac_ext <<_ACEOF
12719/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012720#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012721int
12722main ()
12723{
Guido van Rossum12580492000-09-24 16:47:19 +000012724pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ;
12726 return 0;
12727}
12728_ACEOF
12729rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730if { (ac_try="$ac_compile"
12731case "(($ac_try" in
12732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12733 *) ac_try_echo=$ac_try;;
12734esac
12735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012738 grep -v '^ *+' conftest.er1 >conftest.err
12739 rm -f conftest.er1
12740 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742 (exit $ac_status); } && {
12743 test -z "$ac_c_werror_flag" ||
12744 test ! -s conftest.err
12745 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012746 have_pthread_t=yes
12747else
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012749sed 's/^/| /' conftest.$ac_ext >&5
12750
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751
Trent Mick635f6fb2000-08-23 21:33:05 +000012752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012753
12754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12755{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12756echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012757if test "$have_pthread_t" = yes ; then
12758 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12760echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12762 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012763else
12764 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012765 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012766else
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012768/* confdefs.h. */
12769_ACEOF
12770cat confdefs.h >>conftest.$ac_ext
12771cat >>conftest.$ac_ext <<_ACEOF
12772/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012773#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012774#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012775 main()
12776 {
12777 FILE *f=fopen("conftestval", "w");
12778 if (!f) exit(1);
12779 fprintf(f, "%d\n", sizeof(pthread_t));
12780 exit(0);
12781 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012782_ACEOF
12783rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784if { (ac_try="$ac_link"
12785case "(($ac_try" in
12786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12787 *) ac_try_echo=$ac_try;;
12788esac
12789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12790 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_status=$?
12792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 { (case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
12798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12799 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_status=$?
12801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12802 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012803 ac_cv_sizeof_pthread_t=`cat conftestval`
12804else
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 echo "$as_me: program exited with status $ac_status" >&5
12806echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012807sed 's/^/| /' conftest.$ac_ext >&5
12808
Martin v. Löwis11437992002-04-12 09:54:03 +000012809( exit $ac_status )
12810ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812rm -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 +000012813fi
12814
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815
12816
Trent Mick635f6fb2000-08-23 21:33:05 +000012817fi
12818
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12820echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
12822cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012823#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012824_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012825
12826fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012827CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012828
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12830echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12831# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012832if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 enableval=$enable_toolbox_glue;
12834fi
Jack Jansene578a632001-08-15 01:27:14 +000012835
12836
12837if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012838then
Jack Jansene578a632001-08-15 01:27:14 +000012839 case $ac_sys_system/$ac_sys_release in
12840 Darwin/*)
12841 enable_toolbox_glue="yes";;
12842 *)
12843 enable_toolbox_glue="no";;
12844 esac
12845fi
12846case "$enable_toolbox_glue" in
12847yes)
Jack Jansene578a632001-08-15 01:27:14 +000012848 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012849 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
12851cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012852#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012853_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012854
12855 ;;
12856*)
Jack Jansene578a632001-08-15 01:27:14 +000012857 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012858 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012859 ;;
12860esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012861{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12862echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012864
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012865
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012866case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012867 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012868 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12869 ;;
12870 Darwin/*)
12871 OTHER_LIBTOOL_OPT=""
12872 ;;
12873esac
12874
12875
12876case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012877 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012878 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12879 if test "${enable_universalsdk}"; then
12880 :
12881 else
12882 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12883 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012884 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012885 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012886 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012887 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12888 if test ${gcc_version} '<' 4.0
12889 then
12890 LIBTOOL_CRUFT="-lcc_dynamic"
12891 else
12892 LIBTOOL_CRUFT=""
12893 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012894 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012895 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012896 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012897esac
12898
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12900echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012901if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012902then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012903 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012905 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012906
Martin v. Löwis11437992002-04-12 09:54:03 +000012907cat >>confdefs.h <<\_ACEOF
12908#define WITH_NEXT_FRAMEWORK 1
12909_ACEOF
12910
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911 { echo "$as_me:$LINENO: result: yes" >&5
12912echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012913else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914 { echo "$as_me:$LINENO: result: no" >&5
12915echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012916fi
12917
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918{ echo "$as_me:$LINENO: checking for dyld" >&5
12919echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012920case $ac_sys_system/$ac_sys_release in
12921 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012922
Martin v. Löwis11437992002-04-12 09:54:03 +000012923cat >>confdefs.h <<\_ACEOF
12924#define WITH_DYLD 1
12925_ACEOF
12926
Martin v. Löwiseba40652007-08-30 20:10:57 +000012927 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12928echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012929 ;;
12930 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012931 { echo "$as_me:$LINENO: result: no" >&5
12932echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012933 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012934esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012935
Guido van Rossum0a516c91994-09-12 10:58:40 +000012936# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012937
Michael W. Hudson54241132001-12-07 15:38:26 +000012938
12939
12940
12941
Guido van Rossum0a516c91994-09-12 10:58:40 +000012942# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012943# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944{ echo "$as_me:$LINENO: checking SO" >&5
12945echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012946if test -z "$SO"
12947then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012949 hp*|HP*)
12950 case `uname -m` in
12951 ia64) SO=.so;;
12952 *) SO=.sl;;
12953 esac
12954 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012955 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012956 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012957 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012958else
12959 # this might also be a termcap variable, see #610332
12960 echo
12961 echo '====================================================================='
12962 echo '+ +'
12963 echo '+ WARNING: You have set SO in your environment. +'
12964 echo '+ Do you really mean to change the extension for shared libraries? +'
12965 echo '+ Continuing in 10 seconds to let you to ponder. +'
12966 echo '+ +'
12967 echo '====================================================================='
12968 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012970{ echo "$as_me:$LINENO: result: $SO" >&5
12971echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012972
12973cat >>confdefs.h <<_ACEOF
12974#define SHLIB_EXT "$SO"
12975_ACEOF
12976
Guido van Rossum0a516c91994-09-12 10:58:40 +000012977# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012978# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012979# (Shared libraries in this instance are shared modules to be loaded into
12980# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12982echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012983if test -z "$LDSHARED"
12984then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012985 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012986 AIX*)
12987 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012988 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012989 ;;
12990 BeOS*)
12991 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012992 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012993 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012994 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012995 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012997 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012998 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012999 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013000 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013001 hp*|HP*)
13002 if test "$GCC" = "yes"
13003 then LDSHARED='$(CC) -shared'
13004 else LDSHARED='ld -b';
13005 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013006 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013007 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013008 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13009 if test "$enable_framework" ; then
13010 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013011 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13012 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013013 else
13014 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013015 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013016 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013017 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013018 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13019 if test "$enable_framework" ; then
13020 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013021 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13022 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013023 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013024 # No framework, use the Python app as bundle-loader
13025 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013026 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013027 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013028 Darwin/*)
13029 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13030 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000013031 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000013032 if test ${cur_target} '>' 10.2; then
13033 cur_target=10.3
13034 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013035 if test "${UNIVERSAL_ARCHS}" = "all"; then
13036 # Ensure that the default platform for a 4-way
13037 # universal build is OSX 10.5, that's the first
13038 # OS release where 4-way builds make sense.
13039 cur_target='10.5'
13040 fi
Jack Jansenc110f862005-01-07 10:49:32 +000013041 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013042
13043 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
13044 # environment with a value that is the same as what we'll use
13045 # in the Makefile to ensure that we'll get the same compiler
13046 # environment during configure and build time.
13047 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
13048 export MACOSX_DEPLOYMENT_TARGET
13049
Ronald Oussoren988117f2006-04-29 11:31:35 +000013050 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013051 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013052 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013053 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013054 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013055 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013056 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13057 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013058 else
13059 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13060 if test "$enable_framework" ; then
13061 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013062 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13063 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013064 else
13065 # No framework, use the Python app as bundle-loader
13066 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13067 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13068 fi
13069 fi
13070 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013071 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013072 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013073 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013074 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013075 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013076 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013077 else
13078 LDSHARED="ld -Bshareable ${LDFLAGS}"
13079 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013080 OpenBSD*)
13081 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13082 then
13083 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13084 else
13085 case `uname -r` in
13086 [01].* | 2.[0-7] | 2.[0-7].*)
13087 LDSHARED="ld -Bshareable ${LDFLAGS}"
13088 ;;
13089 *)
13090 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13091 ;;
13092 esac
13093 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013094 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013095 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013096 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013097 then LDSHARED='$(CC) -shared'
13098 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013099 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013100 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013101 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013102 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013103 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013104 *) LDSHARED="ld";;
13105 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13108echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013109BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013110# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013111# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013112{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13113echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013114if test -z "$CCSHARED"
13115then
Guido van Rossum07397971997-04-29 21:49:50 +000013116 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013117 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013118 then CCSHARED="-fPIC";
13119 elif test `uname -p` = sparc;
13120 then CCSHARED="-xcode=pic32";
13121 else CCSHARED="-Kpic";
13122 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013123 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013124 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013125 else CCSHARED="+z";
13126 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013127 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013128 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013129 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013130 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013131 if test "$GCC" = "yes"
13132 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013133 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013134 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013135 SCO_SV*)
13136 if test "$GCC" = "yes"
13137 then CCSHARED="-fPIC"
13138 else CCSHARED="-Kpic -belf"
13139 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013140 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013141 IRIX*/6*) case $CC in
13142 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013143 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013144 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013145 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013146 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013148{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13149echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013150# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013151# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013152{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13153echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013154if test -z "$LINKFORSHARED"
13155then
Guido van Rossum07397971997-04-29 21:49:50 +000013156 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013157 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013158 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013159 LINKFORSHARED="-Wl,-E -Wl,+s";;
13160# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013161 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013162 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013163 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013165 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13166 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013167 # not used by the core itself but which needs to be in the core so
13168 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013169 # -prebind is no longer used, because it actually seems to give a
13170 # slowdown in stead of a speedup, maybe due to the large number of
13171 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013172
13173 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013174 if test "$enable_framework"
13175 then
Jack Jansenda49e192005-01-07 13:08:22 +000013176 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013177 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013178 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013179 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013180 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013181 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013182 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013183 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13184 then
13185 LINKFORSHARED="-Wl,--export-dynamic"
13186 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013187 SunOS/5*) case $CC in
13188 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013189 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013190 then
13191 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013192 fi;;
13193 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013194 CYGWIN*)
13195 if test $enable_shared = "no"
13196 then
13197 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13198 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013199 QNX*)
13200 # -Wl,-E causes the symbols to be added to the dynamic
13201 # symbol table so that they can be found when a module
13202 # is loaded. -N 2048K causes the stack size to be set
13203 # to 2048 kilobytes so that the stack doesn't overflow
13204 # when running test_compile.py.
13205 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013206 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013208{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13209echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013210
Michael W. Hudson54241132001-12-07 15:38:26 +000013211
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013212
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13214echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013215if test ! "$LIBRARY" = "$LDLIBRARY"
13216then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013217 case $ac_sys_system in
13218 CYGWIN*)
13219 # Cygwin needs CCSHARED when building extension DLLs
13220 # but not when building the interpreter DLL.
13221 CFLAGSFORSHARED='';;
13222 *)
13223 CFLAGSFORSHARED='$(CCSHARED)'
13224 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013226{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13227echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013228
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013229# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13230# library (with --enable-shared).
13231# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013232# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13233# if it is not required, since it creates a dependency of the shared library
13234# to LIBS. This, in turn, means that applications linking the shared libpython
13235# don't need to link LIBS explicitly. The default should be only changed
13236# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013237
Martin v. Löwiseba40652007-08-30 20:10:57 +000013238{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13239echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013240case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013241 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013242 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013243esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013244{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13245echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013246
13247
Guido van Rossum627b2d71993-12-24 10:39:16 +000013248# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Martin v. Löwiseba40652007-08-30 20:10:57 +000013250{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13251echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013252if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013254else
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013256LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013258/* confdefs.h. */
13259_ACEOF
13260cat confdefs.h >>conftest.$ac_ext
13261cat >>conftest.$ac_ext <<_ACEOF
13262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Martin v. Löwiseba40652007-08-30 20:10:57 +000013264/* Override any GCC internal prototype to avoid an error.
13265 Use char because int might match the return type of a GCC
13266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013267#ifdef __cplusplus
13268extern "C"
13269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013270char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013271int
13272main ()
13273{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013274return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 ;
13276 return 0;
13277}
13278_ACEOF
13279rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013280if { (ac_try="$ac_link"
13281case "(($ac_try" in
13282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13283 *) ac_try_echo=$ac_try;;
13284esac
13285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013288 grep -v '^ *+' conftest.er1 >conftest.err
13289 rm -f conftest.er1
13290 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013292 (exit $ac_status); } && {
13293 test -z "$ac_c_werror_flag" ||
13294 test ! -s conftest.err
13295 } && test -s conftest$ac_exeext &&
13296 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298else
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013300sed 's/^/| /' conftest.$ac_ext >&5
13301
Martin v. Löwiseba40652007-08-30 20:10:57 +000013302 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304
13305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013307LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013309{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13310echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013311if test $ac_cv_lib_dl_dlopen = yes; then
13312 cat >>confdefs.h <<_ACEOF
13313#define HAVE_LIBDL 1
13314_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013315
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013316 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013317
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318fi
13319 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Martin v. Löwiseba40652007-08-30 20:10:57 +000013321{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13322echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013323if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325else
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013327LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* confdefs.h. */
13330_ACEOF
13331cat confdefs.h >>conftest.$ac_ext
13332cat >>conftest.$ac_ext <<_ACEOF
13333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Martin v. Löwiseba40652007-08-30 20:10:57 +000013335/* Override any GCC internal prototype to avoid an error.
13336 Use char because int might match the return type of a GCC
13337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013338#ifdef __cplusplus
13339extern "C"
13340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013341char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013342int
13343main ()
13344{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013345return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ;
13347 return 0;
13348}
13349_ACEOF
13350rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351if { (ac_try="$ac_link"
13352case "(($ac_try" in
13353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13354 *) ac_try_echo=$ac_try;;
13355esac
13356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13357 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013359 grep -v '^ *+' conftest.er1 >conftest.err
13360 rm -f conftest.er1
13361 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363 (exit $ac_status); } && {
13364 test -z "$ac_c_werror_flag" ||
13365 test ! -s conftest.err
13366 } && test -s conftest$ac_exeext &&
13367 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369else
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013371sed 's/^/| /' conftest.$ac_ext >&5
13372
Martin v. Löwiseba40652007-08-30 20:10:57 +000013373 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013375
13376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013378LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013380{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13381echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013382if test $ac_cv_lib_dld_shl_load = yes; then
13383 cat >>confdefs.h <<_ACEOF
13384#define HAVE_LIBDLD 1
13385_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013386
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013387 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389fi
13390 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013391
13392# only check for sem_ini if thread support is requested
13393if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13395echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013396if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013398else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013399 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013400cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* confdefs.h. */
13402_ACEOF
13403cat confdefs.h >>conftest.$ac_ext
13404cat >>conftest.$ac_ext <<_ACEOF
13405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Martin v. Löwiseba40652007-08-30 20:10:57 +000013407/* Override any GCC internal prototype to avoid an error.
13408 Use char because int might match the return type of a GCC
13409 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013410#ifdef __cplusplus
13411extern "C"
13412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013413char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013414int
13415main ()
13416{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ;
13419 return 0;
13420}
13421_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422for ac_lib in '' pthread rt posix4; do
13423 if test -z "$ac_lib"; then
13424 ac_res="none required"
13425 else
13426 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013427 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013428 fi
13429 rm -f conftest.$ac_objext conftest$ac_exeext
13430if { (ac_try="$ac_link"
13431case "(($ac_try" in
13432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13433 *) ac_try_echo=$ac_try;;
13434esac
13435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13436 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013437 ac_status=$?
13438 grep -v '^ *+' conftest.er1 >conftest.err
13439 rm -f conftest.er1
13440 cat conftest.err >&5
13441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013442 (exit $ac_status); } && {
13443 test -z "$ac_c_werror_flag" ||
13444 test ! -s conftest.err
13445 } && test -s conftest$ac_exeext &&
13446 $as_test_x conftest$ac_exeext; then
13447 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013448else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013449 echo "$as_me: failed program was:" >&5
13450sed 's/^/| /' conftest.$ac_ext >&5
13451
Martin v. Löwiseba40652007-08-30 20:10:57 +000013452
Brett Cannon19fab762007-06-02 03:02:29 +000013453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013454
13455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13456 conftest$ac_exeext
13457 if test "${ac_cv_search_sem_init+set}" = set; then
13458 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013460done
13461if test "${ac_cv_search_sem_init+set}" = set; then
13462 :
13463else
13464 ac_cv_search_sem_init=no
13465fi
13466rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013467LIBS=$ac_func_search_save_LIBS
13468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013469{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13470echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13471ac_res=$ac_cv_search_sem_init
13472if test "$ac_res" != no; then
13473 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013474
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013475fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013476 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013477 # posix4 on Solaris 2.6
13478 # pthread (first!) on Linux
13479fi
13480
Martin v. Löwis19d17342003-06-14 21:03:05 +000013481# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13483echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013484if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13485 echo $ECHO_N "(cached) $ECHO_C" >&6
13486else
13487 ac_check_lib_save_LIBS=$LIBS
13488LIBS="-lintl $LIBS"
13489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013495
Martin v. Löwiseba40652007-08-30 20:10:57 +000013496/* Override any GCC internal prototype to avoid an error.
13497 Use char because int might match the return type of a GCC
13498 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013499#ifdef __cplusplus
13500extern "C"
13501#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013502char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013503int
13504main ()
13505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013506return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
13511rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013512if { (ac_try="$ac_link"
13513case "(($ac_try" in
13514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13515 *) ac_try_echo=$ac_try;;
13516esac
13517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013520 grep -v '^ *+' conftest.er1 >conftest.err
13521 rm -f conftest.er1
13522 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013524 (exit $ac_status); } && {
13525 test -z "$ac_c_werror_flag" ||
13526 test ! -s conftest.err
13527 } && test -s conftest$ac_exeext &&
13528 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013529 ac_cv_lib_intl_textdomain=yes
13530else
13531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013532sed 's/^/| /' conftest.$ac_ext >&5
13533
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013536
13537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013539LIBS=$ac_check_lib_save_LIBS
13540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013541{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13542echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013543if test $ac_cv_lib_intl_textdomain = yes; then
13544
13545cat >>confdefs.h <<\_ACEOF
13546#define WITH_LIBINTL 1
13547_ACEOF
13548
13549fi
13550
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013551
13552# checks for system dependent C++ extensions support
13553case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013554 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13555echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013557/* confdefs.h. */
13558_ACEOF
13559cat confdefs.h >>conftest.$ac_ext
13560cat >>conftest.$ac_ext <<_ACEOF
13561/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013562#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013563int
13564main ()
13565{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013566loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 ;
13568 return 0;
13569}
13570_ACEOF
13571rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013572if { (ac_try="$ac_link"
13573case "(($ac_try" in
13574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13575 *) ac_try_echo=$ac_try;;
13576esac
13577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13578 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013580 grep -v '^ *+' conftest.er1 >conftest.err
13581 rm -f conftest.er1
13582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013584 (exit $ac_status); } && {
13585 test -z "$ac_c_werror_flag" ||
13586 test ! -s conftest.err
13587 } && test -s conftest$ac_exeext &&
13588 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013589
Martin v. Löwis11437992002-04-12 09:54:03 +000013590cat >>confdefs.h <<\_ACEOF
13591#define AIX_GENUINE_CPLUSPLUS 1
13592_ACEOF
13593
Martin v. Löwiseba40652007-08-30 20:10:57 +000013594 { echo "$as_me:$LINENO: result: yes" >&5
13595echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013596else
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013598sed 's/^/| /' conftest.$ac_ext >&5
13599
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600 { echo "$as_me:$LINENO: result: no" >&5
13601echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013603
13604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013605 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013606 *) ;;
13607esac
13608
Guido van Rossum70c7f481998-03-26 18:44:10 +000013609# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013610# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013611{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13612echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013613if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013615else
Martin v. Löwis11437992002-04-12 09:54:03 +000013616 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013617LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013619/* confdefs.h. */
13620_ACEOF
13621cat confdefs.h >>conftest.$ac_ext
13622cat >>conftest.$ac_ext <<_ACEOF
13623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625/* Override any GCC internal prototype to avoid an error.
13626 Use char because int might match the return type of a GCC
13627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013628#ifdef __cplusplus
13629extern "C"
13630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013631char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013632int
13633main ()
13634{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013635return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ;
13637 return 0;
13638}
13639_ACEOF
13640rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641if { (ac_try="$ac_link"
13642case "(($ac_try" in
13643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13644 *) ac_try_echo=$ac_try;;
13645esac
13646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13647 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013649 grep -v '^ *+' conftest.er1 >conftest.err
13650 rm -f conftest.er1
13651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653 (exit $ac_status); } && {
13654 test -z "$ac_c_werror_flag" ||
13655 test ! -s conftest.err
13656 } && test -s conftest$ac_exeext &&
13657 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013659else
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013661sed 's/^/| /' conftest.$ac_ext >&5
13662
Martin v. Löwiseba40652007-08-30 20:10:57 +000013663 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013665
13666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013668LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13671echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013672if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013673 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013674fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013675 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013676{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13677echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013678if test "${ac_cv_lib_socket_socket+set}" = set; then
13679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013680else
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013682LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013684/* confdefs.h. */
13685_ACEOF
13686cat confdefs.h >>conftest.$ac_ext
13687cat >>conftest.$ac_ext <<_ACEOF
13688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013689
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690/* Override any GCC internal prototype to avoid an error.
13691 Use char because int might match the return type of a GCC
13692 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013693#ifdef __cplusplus
13694extern "C"
13695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013696char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013697int
13698main ()
13699{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013700return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 ;
13702 return 0;
13703}
13704_ACEOF
13705rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013706if { (ac_try="$ac_link"
13707case "(($ac_try" in
13708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13709 *) ac_try_echo=$ac_try;;
13710esac
13711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13712 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013714 grep -v '^ *+' conftest.er1 >conftest.err
13715 rm -f conftest.er1
13716 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013718 (exit $ac_status); } && {
13719 test -z "$ac_c_werror_flag" ||
13720 test ! -s conftest.err
13721 } && test -s conftest$ac_exeext &&
13722 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013724else
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013726sed 's/^/| /' conftest.$ac_ext >&5
13727
Martin v. Löwiseba40652007-08-30 20:10:57 +000013728 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730
13731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013733LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13736echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013737if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013738 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013739fi
13740 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013741
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013742case "$ac_sys_system" in
13743BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013744{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13745echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013746if test "${ac_cv_lib_net_socket+set}" = set; then
13747 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013748else
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013750LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013752/* confdefs.h. */
13753_ACEOF
13754cat confdefs.h >>conftest.$ac_ext
13755cat >>conftest.$ac_ext <<_ACEOF
13756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758/* Override any GCC internal prototype to avoid an error.
13759 Use char because int might match the return type of a GCC
13760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013761#ifdef __cplusplus
13762extern "C"
13763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013764char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013765int
13766main ()
13767{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013768return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 ;
13770 return 0;
13771}
13772_ACEOF
13773rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013774if { (ac_try="$ac_link"
13775case "(($ac_try" in
13776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13777 *) ac_try_echo=$ac_try;;
13778esac
13779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13780 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013782 grep -v '^ *+' conftest.er1 >conftest.err
13783 rm -f conftest.er1
13784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786 (exit $ac_status); } && {
13787 test -z "$ac_c_werror_flag" ||
13788 test ! -s conftest.err
13789 } && test -s conftest$ac_exeext &&
13790 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013792else
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013794sed 's/^/| /' conftest.$ac_ext >&5
13795
Martin v. Löwiseba40652007-08-30 20:10:57 +000013796 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013798
13799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013801LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013803{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13804echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013805if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013806 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013807fi
13808 # BeOS
13809;;
13810esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013811
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13813echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013816if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013817 withval=$with_libs;
13818{ echo "$as_me:$LINENO: result: $withval" >&5
13819echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013820LIBS="$withval $LIBS"
13821
13822else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823 { echo "$as_me:$LINENO: result: no" >&5
13824echo "${ECHO_T}no" >&6; }
13825fi
13826
Guido van Rossum7f43da71994-08-01 12:15:30 +000013827
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013828# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13830echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013831
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013833if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013834 withval=$with_system_ffi;
13835fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013836
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013837
Martin v. Löwiseba40652007-08-30 20:10:57 +000013838{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13839echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013840
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013841# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013842
13843
Martin v. Löwiseba40652007-08-30 20:10:57 +000013844{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13845echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013846
Martin v. Löwiseba40652007-08-30 20:10:57 +000013847# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013848if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013849 withval=$with_signal_module;
13850fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013851
13852
13853if test -z "$with_signal_module"
13854then with_signal_module="yes"
13855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013856{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13857echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013858
13859if test "${with_signal_module}" = "yes"; then
13860 USE_SIGNAL_MODULE=""
13861 SIGNAL_OBJS=""
13862else
13863 USE_SIGNAL_MODULE="#"
13864 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13865fi
13866
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013867# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013868
Barry Warsawc0d24d82000-06-29 16:12:00 +000013869USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013870
Martin v. Löwiseba40652007-08-30 20:10:57 +000013871{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13872echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Guido van Rossumec2f0731997-01-22 20:54:01 +000013874
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013876if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013877 withval=$with_dec_threads;
13878{ echo "$as_me:$LINENO: result: $withval" >&5
13879echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013880LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013881if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013882 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013883fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013884else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885 { echo "$as_me:$LINENO: result: no" >&5
13886echo "${ECHO_T}no" >&6; }
13887fi
13888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
13890# Templates for things AC_DEFINEd more than once.
13891# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013892
13893
Martin v. Löwis11437992002-04-12 09:54:03 +000013894
13895
13896
13897
13898
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13900echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013901
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013903if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904 withval=$with_threads;
13905fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013906
13907
Barry Warsawc0d24d82000-06-29 16:12:00 +000013908# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013909
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013911if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013912 withval=$with_thread; with_threads=$with_thread
13913fi
13914
Barry Warsawc0d24d82000-06-29 16:12:00 +000013915
13916if test -z "$with_threads"
13917then with_threads="yes"
13918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013919{ echo "$as_me:$LINENO: result: $with_threads" >&5
13920echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013921
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013922
Barry Warsawc0d24d82000-06-29 16:12:00 +000013923if test "$with_threads" = "no"
13924then
13925 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013926elif test "$ac_cv_pthread_is_default" = yes
13927then
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013929#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013930_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013931
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013932 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013934#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013935_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013936
13937 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013939elif test "$ac_cv_kpthread" = "yes"
13940then
13941 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013942 if test "$ac_cv_cxx_thread" = "yes"; then
13943 CXX="$CXX -Kpthread"
13944 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013946#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013947_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013948
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013949 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013950 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013951elif test "$ac_cv_kthread" = "yes"
13952then
13953 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013954 if test "$ac_cv_cxx_thread" = "yes"; then
13955 CXX="$CXX -Kthread"
13956 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013957 cat >>confdefs.h <<\_ACEOF
13958#define WITH_THREAD 1
13959_ACEOF
13960
13961 posix_threads=yes
13962 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013963elif test "$ac_cv_pthread" = "yes"
13964then
13965 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013966 if test "$ac_cv_cxx_thread" = "yes"; then
13967 CXX="$CXX -pthread"
13968 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013969 cat >>confdefs.h <<\_ACEOF
13970#define WITH_THREAD 1
13971_ACEOF
13972
13973 posix_threads=yes
13974 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013975else
13976 if test ! -z "$with_threads" -a -d "$with_threads"
13977 then LDFLAGS="$LDFLAGS -L$with_threads"
13978 fi
13979 if test ! -z "$withval" -a -d "$withval"
13980 then LDFLAGS="$LDFLAGS -L$withval"
13981 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013982
13983 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013984 # define _POSIX_THREADS in unistd.h. Some apparently don't
13985 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13987echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013989/* confdefs.h. */
13990_ACEOF
13991cat confdefs.h >>conftest.$ac_ext
13992cat >>conftest.$ac_ext <<_ACEOF
13993/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013994
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013995#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013996#ifdef _POSIX_THREADS
13997yes
13998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013999
14000_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014002 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014003 unistd_defines_pthreads=yes
14004else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014005 unistd_defines_pthreads=no
14006fi
14007rm -f conftest*
14008
Martin v. Löwiseba40652007-08-30 20:10:57 +000014009 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14010echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014013#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014014_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014015
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014017 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14018echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014019if test "${ac_cv_header_cthreads_h+set}" = set; then
14020 echo $ECHO_N "(cached) $ECHO_C" >&6
14021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14023echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014024else
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14027echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014029/* confdefs.h. */
14030_ACEOF
14031cat confdefs.h >>conftest.$ac_ext
14032cat >>conftest.$ac_ext <<_ACEOF
14033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014034$ac_includes_default
14035#include <cthreads.h>
14036_ACEOF
14037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038if { (ac_try="$ac_compile"
14039case "(($ac_try" in
14040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14041 *) ac_try_echo=$ac_try;;
14042esac
14043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014046 grep -v '^ *+' conftest.er1 >conftest.err
14047 rm -f conftest.er1
14048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050 (exit $ac_status); } && {
14051 test -z "$ac_c_werror_flag" ||
14052 test ! -s conftest.err
14053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 ac_header_compiler=yes
14055else
14056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014057sed 's/^/| /' conftest.$ac_ext >&5
14058
Martin v. Löwiseba40652007-08-30 20:10:57 +000014059 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014061
14062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14063{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14064echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014065
14066# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14068echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014070/* confdefs.h. */
14071_ACEOF
14072cat confdefs.h >>conftest.$ac_ext
14073cat >>conftest.$ac_ext <<_ACEOF
14074/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014075#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014076_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077if { (ac_try="$ac_cpp conftest.$ac_ext"
14078case "(($ac_try" in
14079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14080 *) ac_try_echo=$ac_try;;
14081esac
14082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14083 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014085 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 rm -f conftest.er1
14087 cat conftest.err >&5
14088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014089 (exit $ac_status); } >/dev/null && {
14090 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14091 test ! -s conftest.err
14092 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 ac_header_preproc=yes
14094else
14095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014096sed 's/^/| /' conftest.$ac_ext >&5
14097
Martin v. Löwis11437992002-04-12 09:54:03 +000014098 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014100
Martin v. Löwis11437992002-04-12 09:54:03 +000014101rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14103echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
14105# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014106case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14107 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14109echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014110 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14111echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14112 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014113 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014114 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014115 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14116echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014117 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14118echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14119 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14120echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14121 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14122echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014123 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14124echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014125 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14126echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014127 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014128## ------------------------------------------------ ##
14129## Report this to http://www.python.org/python-bugs ##
14130## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014131_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014132 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014133 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014134esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014135{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14136echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014137if test "${ac_cv_header_cthreads_h+set}" = set; then
14138 echo $ECHO_N "(cached) $ECHO_C" >&6
14139else
14140 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014142{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14143echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014144
14145fi
14146if test $ac_cv_header_cthreads_h = yes; then
14147 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014148#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014149_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014150
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014152#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014153_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014154
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
14156cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014157#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014158_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014159
14160 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014161 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014162else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14166echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014167if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14168 echo $ECHO_N "(cached) $ECHO_C" >&6
14169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014170{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14171echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014172else
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014174{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14175echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014177/* confdefs.h. */
14178_ACEOF
14179cat confdefs.h >>conftest.$ac_ext
14180cat >>conftest.$ac_ext <<_ACEOF
14181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014182$ac_includes_default
14183#include <mach/cthreads.h>
14184_ACEOF
14185rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014186if { (ac_try="$ac_compile"
14187case "(($ac_try" in
14188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14189 *) ac_try_echo=$ac_try;;
14190esac
14191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014194 grep -v '^ *+' conftest.er1 >conftest.err
14195 rm -f conftest.er1
14196 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014198 (exit $ac_status); } && {
14199 test -z "$ac_c_werror_flag" ||
14200 test ! -s conftest.err
14201 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 ac_header_compiler=yes
14203else
14204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014205sed 's/^/| /' conftest.$ac_ext >&5
14206
Martin v. Löwiseba40652007-08-30 20:10:57 +000014207 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209
14210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14211{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14212echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014213
14214# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14216echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014218/* confdefs.h. */
14219_ACEOF
14220cat confdefs.h >>conftest.$ac_ext
14221cat >>conftest.$ac_ext <<_ACEOF
14222/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014223#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014224_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225if { (ac_try="$ac_cpp conftest.$ac_ext"
14226case "(($ac_try" in
14227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14228 *) ac_try_echo=$ac_try;;
14229esac
14230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14231 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014233 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 rm -f conftest.er1
14235 cat conftest.err >&5
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014237 (exit $ac_status); } >/dev/null && {
14238 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14239 test ! -s conftest.err
14240 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 ac_header_preproc=yes
14242else
14243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014244sed 's/^/| /' conftest.$ac_ext >&5
14245
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248
Martin v. Löwis11437992002-04-12 09:54:03 +000014249rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014250{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14251echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014252
14253# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014254case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14255 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014256 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14257echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014258 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14259echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14260 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014261 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014262 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014263 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14264echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14266echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14267 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14268echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14269 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14270echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014271 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14272echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014273 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14274echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014275 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014276## ------------------------------------------------ ##
14277## Report this to http://www.python.org/python-bugs ##
14278## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014279_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014281 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014282esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014283{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14284echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014285if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14286 echo $ECHO_N "(cached) $ECHO_C" >&6
14287else
14288 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14291echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014292
14293fi
14294if test $ac_cv_header_mach_cthreads_h = yes; then
14295 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014296#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014297_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014300#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014301_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014302
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
14304cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014305#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014306_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014307
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014308 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014309else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014310
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14312echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014313
Martin v. Löwiseba40652007-08-30 20:10:57 +000014314# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014315if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014316 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14317echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014318 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014319#define WITH_THREAD 1
14320_ACEOF
14321
14322
14323cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014324#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014325_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014326
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014327 LIBS="-lpth $LIBS"
14328 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014329else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330 { echo "$as_me:$LINENO: result: no" >&5
14331echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014332
14333 # Just looking for pthread_create in libpthread is not enough:
14334 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14335 # So we really have to include pthread.h, and then link.
14336 _libs=$LIBS
14337 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014338 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14339echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014341/* confdefs.h. */
14342_ACEOF
14343cat confdefs.h >>conftest.$ac_ext
14344cat >>conftest.$ac_ext <<_ACEOF
14345/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014346#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014347
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014348void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014349int
14350main ()
14351{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014352
14353pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ;
14355 return 0;
14356}
14357_ACEOF
14358rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359if { (ac_try="$ac_link"
14360case "(($ac_try" in
14361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14362 *) ac_try_echo=$ac_try;;
14363esac
14364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14365 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014367 grep -v '^ *+' conftest.er1 >conftest.err
14368 rm -f conftest.er1
14369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014371 (exit $ac_status); } && {
14372 test -z "$ac_c_werror_flag" ||
14373 test ! -s conftest.err
14374 } && test -s conftest$ac_exeext &&
14375 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
Martin v. Löwiseba40652007-08-30 20:10:57 +000014377 { echo "$as_me:$LINENO: result: yes" >&5
14378echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014380#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014381_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014382
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014383 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014384 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014385else
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014387sed 's/^/| /' conftest.$ac_ext >&5
14388
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014390 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14392echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014393if test "${ac_cv_func_pthread_detach+set}" = set; then
14394 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014395else
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014397/* confdefs.h. */
14398_ACEOF
14399cat confdefs.h >>conftest.$ac_ext
14400cat >>conftest.$ac_ext <<_ACEOF
14401/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014402/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14403 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14404#define pthread_detach innocuous_pthread_detach
14405
Guido van Rossumad678af1998-10-02 14:42:15 +000014406/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 which can conflict with char pthread_detach (); below.
14408 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014409 <limits.h> exists even on freestanding compilers. */
14410
14411#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014412# include <limits.h>
14413#else
14414# include <assert.h>
14415#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014416
14417#undef pthread_detach
14418
Martin v. Löwiseba40652007-08-30 20:10:57 +000014419/* Override any GCC internal prototype to avoid an error.
14420 Use char because int might match the return type of a GCC
14421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014422#ifdef __cplusplus
14423extern "C"
14424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014425char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014426/* The GNU C library defines this for functions which it implements
14427 to always fail with ENOSYS. Some functions are actually named
14428 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014429#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014430choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014431#endif
14432
Skip Montanaro6dead952003-09-25 14:50:04 +000014433int
14434main ()
14435{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014436return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ;
14438 return 0;
14439}
14440_ACEOF
14441rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442if { (ac_try="$ac_link"
14443case "(($ac_try" in
14444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14445 *) ac_try_echo=$ac_try;;
14446esac
14447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14448 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014450 grep -v '^ *+' conftest.er1 >conftest.err
14451 rm -f conftest.er1
14452 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014454 (exit $ac_status); } && {
14455 test -z "$ac_c_werror_flag" ||
14456 test ! -s conftest.err
14457 } && test -s conftest$ac_exeext &&
14458 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014460else
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014462sed 's/^/| /' conftest.$ac_ext >&5
14463
Martin v. Löwiseba40652007-08-30 20:10:57 +000014464 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466
14467rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014468 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14471echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014472if test $ac_cv_func_pthread_detach = yes; then
14473 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014474#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014475_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014476
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014477 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014478 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014479else
Guido van Rossumad678af1998-10-02 14:42:15 +000014480
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014481 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14483echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014484if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14485 echo $ECHO_N "(cached) $ECHO_C" >&6
14486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14488echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014489else
14490 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14492echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014494/* confdefs.h. */
14495_ACEOF
14496cat confdefs.h >>conftest.$ac_ext
14497cat >>conftest.$ac_ext <<_ACEOF
14498/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014499$ac_includes_default
14500#include <atheos/threads.h>
14501_ACEOF
14502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503if { (ac_try="$ac_compile"
14504case "(($ac_try" in
14505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14506 *) ac_try_echo=$ac_try;;
14507esac
14508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014511 grep -v '^ *+' conftest.er1 >conftest.err
14512 rm -f conftest.er1
14513 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014515 (exit $ac_status); } && {
14516 test -z "$ac_c_werror_flag" ||
14517 test ! -s conftest.err
14518 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014519 ac_header_compiler=yes
14520else
14521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014522sed 's/^/| /' conftest.$ac_ext >&5
14523
Martin v. Löwiseba40652007-08-30 20:10:57 +000014524 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526
14527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14528{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14529echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014530
14531# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14533echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014535/* confdefs.h. */
14536_ACEOF
14537cat confdefs.h >>conftest.$ac_ext
14538cat >>conftest.$ac_ext <<_ACEOF
14539/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014540#include <atheos/threads.h>
14541_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542if { (ac_try="$ac_cpp conftest.$ac_ext"
14543case "(($ac_try" in
14544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14545 *) ac_try_echo=$ac_try;;
14546esac
14547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14548 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014549 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014550 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014551 rm -f conftest.er1
14552 cat conftest.err >&5
14553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014554 (exit $ac_status); } >/dev/null && {
14555 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14556 test ! -s conftest.err
14557 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014558 ac_header_preproc=yes
14559else
14560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014561sed 's/^/| /' conftest.$ac_ext >&5
14562
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014563 ac_header_preproc=no
14564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014565
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014566rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14568echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014569
14570# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014571case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14572 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014573 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14574echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014575 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14576echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14577 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014578 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014579 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014580 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14581echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014582 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14583echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14584 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14585echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14586 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14587echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014588 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14589echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014590 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14591echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014592 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014593## ------------------------------------------------ ##
14594## Report this to http://www.python.org/python-bugs ##
14595## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014596_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014598 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014599esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014600{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14601echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014602if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14603 echo $ECHO_N "(cached) $ECHO_C" >&6
14604else
14605 ac_cv_header_atheos_threads_h=$ac_header_preproc
14606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14608echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014609
14610fi
14611if test $ac_cv_header_atheos_threads_h = yes; then
14612 cat >>confdefs.h <<\_ACEOF
14613#define WITH_THREAD 1
14614_ACEOF
14615
14616
14617cat >>confdefs.h <<\_ACEOF
14618#define ATHEOS_THREADS 1
14619_ACEOF
14620
14621 THREADOBJ="Python/thread.o"
14622else
14623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14626echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014627if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14628 echo $ECHO_N "(cached) $ECHO_C" >&6
14629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14631echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014632else
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014634{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14635echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014637/* confdefs.h. */
14638_ACEOF
14639cat confdefs.h >>conftest.$ac_ext
14640cat >>conftest.$ac_ext <<_ACEOF
14641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014642$ac_includes_default
14643#include <kernel/OS.h>
14644_ACEOF
14645rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646if { (ac_try="$ac_compile"
14647case "(($ac_try" in
14648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14649 *) ac_try_echo=$ac_try;;
14650esac
14651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014654 grep -v '^ *+' conftest.er1 >conftest.err
14655 rm -f conftest.er1
14656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658 (exit $ac_status); } && {
14659 test -z "$ac_c_werror_flag" ||
14660 test ! -s conftest.err
14661 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 ac_header_compiler=yes
14663else
14664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014665sed 's/^/| /' conftest.$ac_ext >&5
14666
Martin v. Löwiseba40652007-08-30 20:10:57 +000014667 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669
14670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14671{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14672echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
14674# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14676echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014678/* confdefs.h. */
14679_ACEOF
14680cat confdefs.h >>conftest.$ac_ext
14681cat >>conftest.$ac_ext <<_ACEOF
14682/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014683#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014684_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685if { (ac_try="$ac_cpp conftest.$ac_ext"
14686case "(($ac_try" in
14687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14688 *) ac_try_echo=$ac_try;;
14689esac
14690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14691 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014692 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014693 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 rm -f conftest.er1
14695 cat conftest.err >&5
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014697 (exit $ac_status); } >/dev/null && {
14698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14699 test ! -s conftest.err
14700 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014701 ac_header_preproc=yes
14702else
14703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014704sed 's/^/| /' conftest.$ac_ext >&5
14705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014710{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14711echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014712
Martin v. Löwis11437992002-04-12 09:54:03 +000014713# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014714case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14715 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14717echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014718 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14719echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14720 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014721 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014722 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014723 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14724echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014725 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14726echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14727 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14728echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14729 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14730echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014731 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14732echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014733 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14734echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014736## ------------------------------------------------ ##
14737## Report this to http://www.python.org/python-bugs ##
14738## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014739_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014740 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014741 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014742esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014743{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14744echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014745if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14746 echo $ECHO_N "(cached) $ECHO_C" >&6
14747else
14748 ac_cv_header_kernel_OS_h=$ac_header_preproc
14749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014750{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14751echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014752
14753fi
14754if test $ac_cv_header_kernel_OS_h = yes; then
14755 cat >>confdefs.h <<\_ACEOF
14756#define WITH_THREAD 1
14757_ACEOF
14758
14759
14760cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014761#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014762_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014763
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014764 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014765else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014766
Martin v. Löwiseba40652007-08-30 20:10:57 +000014767 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14768echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014769if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014771else
Martin v. Löwis11437992002-04-12 09:54:03 +000014772 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014773LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014775/* confdefs.h. */
14776_ACEOF
14777cat confdefs.h >>conftest.$ac_ext
14778cat >>conftest.$ac_ext <<_ACEOF
14779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014780
Martin v. Löwiseba40652007-08-30 20:10:57 +000014781/* Override any GCC internal prototype to avoid an error.
14782 Use char because int might match the return type of a GCC
14783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014784#ifdef __cplusplus
14785extern "C"
14786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014787char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014788int
14789main ()
14790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014791return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 ;
14793 return 0;
14794}
14795_ACEOF
14796rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797if { (ac_try="$ac_link"
14798case "(($ac_try" in
14799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14800 *) ac_try_echo=$ac_try;;
14801esac
14802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014805 grep -v '^ *+' conftest.er1 >conftest.err
14806 rm -f conftest.er1
14807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014809 (exit $ac_status); } && {
14810 test -z "$ac_c_werror_flag" ||
14811 test ! -s conftest.err
14812 } && test -s conftest$ac_exeext &&
14813 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014815else
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014817sed 's/^/| /' conftest.$ac_ext >&5
14818
Martin v. Löwiseba40652007-08-30 20:10:57 +000014819 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014821
14822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014824LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14827echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014828if test $ac_cv_lib_pthreads_pthread_create = yes; then
14829 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014830#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014831_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014832
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014833 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014834 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014835 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014836else
Greg Steinadf63d62000-07-05 10:38:09 +000014837
Martin v. Löwiseba40652007-08-30 20:10:57 +000014838 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14839echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014840if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14841 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014842else
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014844LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014846/* confdefs.h. */
14847_ACEOF
14848cat confdefs.h >>conftest.$ac_ext
14849cat >>conftest.$ac_ext <<_ACEOF
14850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014851
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852/* Override any GCC internal prototype to avoid an error.
14853 Use char because int might match the return type of a GCC
14854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014855#ifdef __cplusplus
14856extern "C"
14857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014858char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014859int
14860main ()
14861{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 ;
14864 return 0;
14865}
14866_ACEOF
14867rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868if { (ac_try="$ac_link"
14869case "(($ac_try" in
14870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14871 *) ac_try_echo=$ac_try;;
14872esac
14873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14874 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014876 grep -v '^ *+' conftest.er1 >conftest.err
14877 rm -f conftest.er1
14878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014880 (exit $ac_status); } && {
14881 test -z "$ac_c_werror_flag" ||
14882 test ! -s conftest.err
14883 } && test -s conftest$ac_exeext &&
14884 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014885 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014886else
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014888sed 's/^/| /' conftest.$ac_ext >&5
14889
Martin v. Löwiseba40652007-08-30 20:10:57 +000014890 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892
14893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014895LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014897{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14898echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014899if test $ac_cv_lib_c_r_pthread_create = yes; then
14900 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014901#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014902_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014903
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014904 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014905 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014906 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014907else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014908
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14910echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014911if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014913else
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014915LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014916cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014917/* confdefs.h. */
14918_ACEOF
14919cat confdefs.h >>conftest.$ac_ext
14920cat >>conftest.$ac_ext <<_ACEOF
14921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014922
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923/* Override any GCC internal prototype to avoid an error.
14924 Use char because int might match the return type of a GCC
14925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014926#ifdef __cplusplus
14927extern "C"
14928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014929char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014930int
14931main ()
14932{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 ;
14935 return 0;
14936}
14937_ACEOF
14938rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014939if { (ac_try="$ac_link"
14940case "(($ac_try" in
14941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14942 *) ac_try_echo=$ac_try;;
14943esac
14944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14945 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014947 grep -v '^ *+' conftest.er1 >conftest.err
14948 rm -f conftest.er1
14949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014951 (exit $ac_status); } && {
14952 test -z "$ac_c_werror_flag" ||
14953 test ! -s conftest.err
14954 } && test -s conftest$ac_exeext &&
14955 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014957else
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014959sed 's/^/| /' conftest.$ac_ext >&5
14960
Martin v. Löwiseba40652007-08-30 20:10:57 +000014961 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014963
14964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014966LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14969echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014970if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14971 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014972#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014973_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014974
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014975 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014976 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014977 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014978else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014979
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14981echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014982if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014984else
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014986LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* confdefs.h. */
14989_ACEOF
14990cat confdefs.h >>conftest.$ac_ext
14991cat >>conftest.$ac_ext <<_ACEOF
14992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994/* Override any GCC internal prototype to avoid an error.
14995 Use char because int might match the return type of a GCC
14996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014997#ifdef __cplusplus
14998extern "C"
14999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015000char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015001int
15002main ()
15003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015004return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ;
15006 return 0;
15007}
15008_ACEOF
15009rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010if { (ac_try="$ac_link"
15011case "(($ac_try" in
15012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15013 *) ac_try_echo=$ac_try;;
15014esac
15015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15016 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015018 grep -v '^ *+' conftest.er1 >conftest.err
15019 rm -f conftest.er1
15020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015022 (exit $ac_status); } && {
15023 test -z "$ac_c_werror_flag" ||
15024 test ! -s conftest.err
15025 } && test -s conftest$ac_exeext &&
15026 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015028else
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015030sed 's/^/| /' conftest.$ac_ext >&5
15031
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034
15035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015037LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15040echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015041if test $ac_cv_lib_cma_pthread_create = yes; then
15042 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015043#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015044_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015046 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015047 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015048 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015049else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015050
Martin v. Löwis130fb172001-07-19 11:00:41 +000015051 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015052fi
15053
Guido van Rossum627b2d71993-12-24 10:39:16 +000015054
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015055fi
15056
Guido van Rossum0be3e491997-05-22 20:33:33 +000015057fi
15058
Guido van Rossum49545951997-12-02 19:28:29 +000015059fi
15060
Guido van Rossumb93a8621998-05-07 13:27:32 +000015061fi
15062
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015063
Michael W. Hudson54241132001-12-07 15:38:26 +000015064fi
15065
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015066
15067fi
15068
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070
15071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073fi
15074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075fi
15076
15077
15078fi
15079
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015080
Michael W. Hudson54241132001-12-07 15:38:26 +000015081
Martin v. Löwiseba40652007-08-30 20:10:57 +000015082 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15083echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015084if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015086else
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015088LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015090/* confdefs.h. */
15091_ACEOF
15092cat confdefs.h >>conftest.$ac_ext
15093cat >>conftest.$ac_ext <<_ACEOF
15094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015095
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096/* Override any GCC internal prototype to avoid an error.
15097 Use char because int might match the return type of a GCC
15098 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015099#ifdef __cplusplus
15100extern "C"
15101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015102char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015103int
15104main ()
15105{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015106return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 ;
15108 return 0;
15109}
15110_ACEOF
15111rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112if { (ac_try="$ac_link"
15113case "(($ac_try" in
15114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15115 *) ac_try_echo=$ac_try;;
15116esac
15117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15118 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015120 grep -v '^ *+' conftest.er1 >conftest.err
15121 rm -f conftest.er1
15122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015124 (exit $ac_status); } && {
15125 test -z "$ac_c_werror_flag" ||
15126 test ! -s conftest.err
15127 } && test -s conftest$ac_exeext &&
15128 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015130else
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015132sed 's/^/| /' conftest.$ac_ext >&5
15133
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136
15137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015139LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015141{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15142echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015143if test $ac_cv_lib_mpc_usconfig = yes; then
15144 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015145#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015146_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015147
Martin v. Löwis130fb172001-07-19 11:00:41 +000015148 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015149 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015150 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015151fi
15152
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015153
Neal Norwitza978ab02002-11-02 16:58:05 +000015154 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15156echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015157if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15158 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159else
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015161LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015162cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015163/* confdefs.h. */
15164_ACEOF
15165cat confdefs.h >>conftest.$ac_ext
15166cat >>conftest.$ac_ext <<_ACEOF
15167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169/* Override any GCC internal prototype to avoid an error.
15170 Use char because int might match the return type of a GCC
15171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015172#ifdef __cplusplus
15173extern "C"
15174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015175char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015176int
15177main ()
15178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015179return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 ;
15181 return 0;
15182}
15183_ACEOF
15184rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185if { (ac_try="$ac_link"
15186case "(($ac_try" in
15187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15188 *) ac_try_echo=$ac_try;;
15189esac
15190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15191 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015193 grep -v '^ *+' conftest.er1 >conftest.err
15194 rm -f conftest.er1
15195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197 (exit $ac_status); } && {
15198 test -z "$ac_c_werror_flag" ||
15199 test ! -s conftest.err
15200 } && test -s conftest$ac_exeext &&
15201 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015203else
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015205sed 's/^/| /' conftest.$ac_ext >&5
15206
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209
15210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015212LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15215echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015216if test $ac_cv_lib_thread_thr_create = yes; then
15217 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015218#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015219_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015220
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015221 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015222 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015223 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015224fi
15225
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015226 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015227
Martin v. Löwis130fb172001-07-19 11:00:41 +000015228 if test "$USE_THREAD_MODULE" != "#"
15229 then
15230 # If the above checks didn't disable threads, (at least) OSF1
15231 # needs this '-threads' argument during linking.
15232 case $ac_sys_system in
15233 OSF1) LDLAST=-threads;;
15234 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015235 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015236fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015237
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015238if test "$posix_threads" = "yes"; then
15239 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015240
15241cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015242#define _POSIX_THREADS 1
15243_ACEOF
15244
15245 fi
15246
15247 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15248 case $ac_sys_system/$ac_sys_release in
15249 SunOS/5.6)
15250cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015251#define HAVE_PTHREAD_DESTRUCTOR 1
15252_ACEOF
15253
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015254 ;;
15255 SunOS/5.8)
15256cat >>confdefs.h <<\_ACEOF
15257#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15258_ACEOF
15259
15260 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015261 AIX/5)
15262cat >>confdefs.h <<\_ACEOF
15263#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15264_ACEOF
15265
15266 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015267 esac
15268
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15270echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015271 if test "${ac_cv_pthread_system_supported+set}" = set; then
15272 echo $ECHO_N "(cached) $ECHO_C" >&6
15273else
15274 if test "$cross_compiling" = yes; then
15275 ac_cv_pthread_system_supported=no
15276else
15277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015278/* confdefs.h. */
15279_ACEOF
15280cat confdefs.h >>conftest.$ac_ext
15281cat >>conftest.$ac_ext <<_ACEOF
15282/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015283#include <pthread.h>
15284 void *foo(void *parm) {
15285 return NULL;
15286 }
15287 main() {
15288 pthread_attr_t attr;
15289 pthread_t id;
15290 if (pthread_attr_init(&attr)) exit(-1);
15291 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15292 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15293 exit(0);
15294 }
15295_ACEOF
15296rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297if { (ac_try="$ac_link"
15298case "(($ac_try" in
15299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15300 *) ac_try_echo=$ac_try;;
15301esac
15302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15303 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015304 ac_status=$?
15305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307 { (case "(($ac_try" in
15308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15309 *) ac_try_echo=$ac_try;;
15310esac
15311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15312 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015313 ac_status=$?
15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15315 (exit $ac_status); }; }; then
15316 ac_cv_pthread_system_supported=yes
15317else
15318 echo "$as_me: program exited with status $ac_status" >&5
15319echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015320sed 's/^/| /' conftest.$ac_ext >&5
15321
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015322( exit $ac_status )
15323ac_cv_pthread_system_supported=no
15324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325rm -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 +000015326fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015327
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328
15329
Guido van Rossum627b2d71993-12-24 10:39:16 +000015330fi
15331
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15333echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015334 if test "$ac_cv_pthread_system_supported" = "yes"; then
15335
15336cat >>confdefs.h <<\_ACEOF
15337#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15338_ACEOF
15339
15340 fi
15341
15342for ac_func in pthread_sigmask
15343do
15344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15347if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015348 echo $ECHO_N "(cached) $ECHO_C" >&6
15349else
15350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015351/* confdefs.h. */
15352_ACEOF
15353cat confdefs.h >>conftest.$ac_ext
15354cat >>conftest.$ac_ext <<_ACEOF
15355/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015356/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15357 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15358#define $ac_func innocuous_$ac_func
15359
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015360/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015361 which can conflict with char $ac_func (); below.
15362 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015363 <limits.h> exists even on freestanding compilers. */
15364
15365#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015366# include <limits.h>
15367#else
15368# include <assert.h>
15369#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015370
15371#undef $ac_func
15372
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373/* Override any GCC internal prototype to avoid an error.
15374 Use char because int might match the return type of a GCC
15375 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015376#ifdef __cplusplus
15377extern "C"
15378#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015379char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015380/* The GNU C library defines this for functions which it implements
15381 to always fail with ENOSYS. Some functions are actually named
15382 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015383#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015384choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015385#endif
15386
Skip Montanaro6dead952003-09-25 14:50:04 +000015387int
15388main ()
15389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396if { (ac_try="$ac_link"
15397case "(($ac_try" in
15398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15399 *) ac_try_echo=$ac_try;;
15400esac
15401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015404 grep -v '^ *+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408 (exit $ac_status); } && {
15409 test -z "$ac_c_werror_flag" ||
15410 test ! -s conftest.err
15411 } && test -s conftest$ac_exeext &&
15412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015413 eval "$as_ac_var=yes"
15414else
15415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015416sed 's/^/| /' conftest.$ac_ext >&5
15417
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420
15421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424ac_res=`eval echo '${'$as_ac_var'}'`
15425 { echo "$as_me:$LINENO: result: $ac_res" >&5
15426echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015427if test `eval echo '${'$as_ac_var'}'` = yes; then
15428 cat >>confdefs.h <<_ACEOF
15429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15430_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015431 case $ac_sys_system in
15432 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015433
Jason Tishlerfac083d2003-07-22 15:20:49 +000015434cat >>confdefs.h <<\_ACEOF
15435#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15436_ACEOF
15437
15438 ;;
15439 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015440fi
15441done
15442
15443fi
15444
15445
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015446# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
15448
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15450echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15451# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015452if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015454 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015455 { echo "$as_me:$LINENO: result: no" >&5
15456echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015457 ipv6=no
15458 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459 *) { echo "$as_me:$LINENO: result: yes" >&5
15460echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015462#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015463_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015464
15465 ipv6=yes
15466 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015468else
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015470 if test "$cross_compiling" = yes; then
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
15475else
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015477/* confdefs.h. */
15478_ACEOF
15479cat confdefs.h >>conftest.$ac_ext
15480cat >>conftest.$ac_ext <<_ACEOF
15481/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015482 /* AF_INET6 available check */
15483#include <sys/types.h>
15484#include <sys/socket.h>
15485main()
15486{
15487 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15488 exit(1);
15489 else
15490 exit(0);
15491}
15492
Martin v. Löwis11437992002-04-12 09:54:03 +000015493_ACEOF
15494rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015495if { (ac_try="$ac_link"
15496case "(($ac_try" in
15497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15498 *) ac_try_echo=$ac_try;;
15499esac
15500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15501 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505 { (case "(($ac_try" in
15506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15507 *) ac_try_echo=$ac_try;;
15508esac
15509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15510 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015514 { echo "$as_me:$LINENO: result: yes" >&5
15515echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015516 ipv6=yes
15517else
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 echo "$as_me: program exited with status $ac_status" >&5
15519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015520sed 's/^/| /' conftest.$ac_ext >&5
15521
Martin v. Löwis11437992002-04-12 09:54:03 +000015522( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523{ echo "$as_me:$LINENO: result: no" >&5
15524echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015525 ipv6=no
15526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015527rm -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 +000015528fi
15529
Martin v. Löwiseba40652007-08-30 20:10:57 +000015530
15531
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015532if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015533 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15534echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015536/* confdefs.h. */
15537_ACEOF
15538cat confdefs.h >>conftest.$ac_ext
15539cat >>conftest.$ac_ext <<_ACEOF
15540/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015541#include <sys/types.h>
15542#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015543int
15544main ()
15545{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015546struct sockaddr_in6 x;
15547x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 ;
15549 return 0;
15550}
15551_ACEOF
15552rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553if { (ac_try="$ac_compile"
15554case "(($ac_try" in
15555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15556 *) ac_try_echo=$ac_try;;
15557esac
15558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015561 grep -v '^ *+' conftest.er1 >conftest.err
15562 rm -f conftest.er1
15563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 (exit $ac_status); } && {
15566 test -z "$ac_c_werror_flag" ||
15567 test ! -s conftest.err
15568 } && test -s conftest.$ac_objext; then
15569 { echo "$as_me:$LINENO: result: yes" >&5
15570echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015571 ipv6=yes
15572else
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015574sed 's/^/| /' conftest.$ac_ext >&5
15575
Martin v. Löwiseba40652007-08-30 20:10:57 +000015576 { echo "$as_me:$LINENO: result: no" >&5
15577echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015578 ipv6=no
15579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580
15581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015582fi
15583
15584if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015586#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015587_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015588
15589fi
15590
Martin v. Löwiseba40652007-08-30 20:10:57 +000015591fi
15592
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015593
15594ipv6type=unknown
15595ipv6lib=none
15596ipv6trylibc=no
15597
15598if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15600echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015601 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15602 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015603 case $i in
15604 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015606/* confdefs.h. */
15607_ACEOF
15608cat confdefs.h >>conftest.$ac_ext
15609cat >>conftest.$ac_ext <<_ACEOF
15610/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015611
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015612#include <netinet/in.h>
15613#ifdef IPV6_INRIA_VERSION
15614yes
15615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015616_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015617if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015618 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015619 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015620fi
15621rm -f conftest*
15622
15623 ;;
15624 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015626/* confdefs.h. */
15627_ACEOF
15628cat confdefs.h >>conftest.$ac_ext
15629cat >>conftest.$ac_ext <<_ACEOF
15630/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015631
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015632#include <netinet/in.h>
15633#ifdef __KAME__
15634yes
15635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015636_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015638 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015639 ipv6type=$i;
15640 ipv6lib=inet6
15641 ipv6libdir=/usr/local/v6/lib
15642 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015643fi
15644rm -f conftest*
15645
15646 ;;
15647 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015649/* confdefs.h. */
15650_ACEOF
15651cat confdefs.h >>conftest.$ac_ext
15652cat >>conftest.$ac_ext <<_ACEOF
15653/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015655#include <features.h>
15656#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15657yes
15658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015659_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015661 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015662 ipv6type=$i;
15663 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015664fi
15665rm -f conftest*
15666
15667 ;;
15668 linux-inet6)
15669 if test -d /usr/inet6; then
15670 ipv6type=$i
15671 ipv6lib=inet6
15672 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015673 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015674 fi
15675 ;;
15676 solaris)
15677 if test -f /etc/netconfig; then
15678 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15679 ipv6type=$i
15680 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015681 fi
15682 fi
15683 ;;
15684 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015686/* confdefs.h. */
15687_ACEOF
15688cat confdefs.h >>conftest.$ac_ext
15689cat >>conftest.$ac_ext <<_ACEOF
15690/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015691
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015692#include <sys/param.h>
15693#ifdef _TOSHIBA_INET6
15694yes
15695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015696_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015698 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015699 ipv6type=$i;
15700 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015701 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015702fi
15703rm -f conftest*
15704
15705 ;;
15706 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015708/* confdefs.h. */
15709_ACEOF
15710cat confdefs.h >>conftest.$ac_ext
15711cat >>conftest.$ac_ext <<_ACEOF
15712/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015714#include </usr/local/v6/include/sys/v6config.h>
15715#ifdef __V6D__
15716yes
15717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015718_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015720 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015721 ipv6type=$i;
15722 ipv6lib=v6;
15723 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015724 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015725fi
15726rm -f conftest*
15727
15728 ;;
15729 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015731/* confdefs.h. */
15732_ACEOF
15733cat confdefs.h >>conftest.$ac_ext
15734cat >>conftest.$ac_ext <<_ACEOF
15735/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015737#include <sys/param.h>
15738#ifdef _ZETA_MINAMI_INET6
15739yes
15740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015741_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015744 ipv6type=$i;
15745 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015746 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015747fi
15748rm -f conftest*
15749
15750 ;;
15751 esac
15752 if test "$ipv6type" != "unknown"; then
15753 break
15754 fi
15755 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15757echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015758fi
15759
15760if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15761 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15762 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15763 echo "using lib$ipv6lib"
15764 else
15765 if test $ipv6trylibc = "yes"; then
15766 echo "using libc"
15767 else
15768 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15769 echo "You need to fetch lib$ipv6lib.a from appropriate"
15770 echo 'ipv6 kit and compile beforehand.'
15771 exit 1
15772 fi
15773 fi
15774fi
15775
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015776{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15777echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15778cat >conftest.$ac_ext <<_ACEOF
15779/* confdefs.h. */
15780_ACEOF
15781cat confdefs.h >>conftest.$ac_ext
15782cat >>conftest.$ac_ext <<_ACEOF
15783/* end confdefs.h. */
15784#include <Carbon/Carbon.h>
15785int
15786main ()
15787{
15788FSIORefNum fRef = 0
15789 ;
15790 return 0;
15791}
15792_ACEOF
15793rm -f conftest.$ac_objext
15794if { (ac_try="$ac_compile"
15795case "(($ac_try" in
15796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15797 *) ac_try_echo=$ac_try;;
15798esac
15799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15800 (eval "$ac_compile") 2>conftest.er1
15801 ac_status=$?
15802 grep -v '^ *+' conftest.er1 >conftest.err
15803 rm -f conftest.er1
15804 cat conftest.err >&5
15805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15806 (exit $ac_status); } && {
15807 test -z "$ac_c_werror_flag" ||
15808 test ! -s conftest.err
15809 } && test -s conftest.$ac_objext; then
15810
15811cat >>confdefs.h <<\_ACEOF
15812#define HAVE_OSX105_SDK 1
15813_ACEOF
15814
15815 { echo "$as_me:$LINENO: result: yes" >&5
15816echo "${ECHO_T}yes" >&6; }
15817else
15818 echo "$as_me: failed program was:" >&5
15819sed 's/^/| /' conftest.$ac_ext >&5
15820
15821 { echo "$as_me:$LINENO: result: no" >&5
15822echo "${ECHO_T}no" >&6; }
15823
15824fi
15825
15826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15827
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015828# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015829{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15830echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015831
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015833if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834 withval=$with_doc_strings;
15835fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015836
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015837
15838if test -z "$with_doc_strings"
15839then with_doc_strings="yes"
15840fi
15841if test "$with_doc_strings" != "no"
15842then
15843
15844cat >>confdefs.h <<\_ACEOF
15845#define WITH_DOC_STRINGS 1
15846_ACEOF
15847
15848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15850echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015851
Neil Schemenauera35c6882001-02-27 04:45:05 +000015852# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15854echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015855
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015857if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015859if test "$withval" != no
15860then
15861
15862cat >>confdefs.h <<\_ACEOF
15863#define WITH_TSC 1
15864_ACEOF
15865
Martin v. Löwiseba40652007-08-30 20:10:57 +000015866 { echo "$as_me:$LINENO: result: yes" >&5
15867echo "${ECHO_T}yes" >&6; }
15868else { echo "$as_me:$LINENO: result: no" >&5
15869echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015870fi
15871else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872 { echo "$as_me:$LINENO: result: no" >&5
15873echo "${ECHO_T}no" >&6; }
15874fi
15875
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015876
15877# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15879echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015882if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015883 withval=$with_pymalloc;
15884fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015885
Neil Schemenauera35c6882001-02-27 04:45:05 +000015886
Neil Schemenauer16c22972002-03-22 15:34:49 +000015887if test -z "$with_pymalloc"
15888then with_pymalloc="yes"
15889fi
15890if test "$with_pymalloc" != "no"
15891then
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
15893cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015894#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015895_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015896
15897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15899echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015900
Barry Warsawef82cd72000-06-30 16:21:01 +000015901# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015902{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15903echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015904
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015906if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015908if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015909then
15910
15911cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015912#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015913_ACEOF
15914
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915 { echo "$as_me:$LINENO: result: yes" >&5
15916echo "${ECHO_T}yes" >&6; }
15917else { echo "$as_me:$LINENO: result: no" >&5
15918echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015919fi
15920else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921 { echo "$as_me:$LINENO: result: no" >&5
15922echo "${ECHO_T}no" >&6; }
15923fi
15924
Barry Warsawef82cd72000-06-30 16:21:01 +000015925
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015926# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015927
Guido van Rossum98935bf2001-09-05 19:13:16 +000015928DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015929
Guido van Rossume97ee181999-12-20 21:27:22 +000015930# the dlopen() function means we might want to use dynload_shlib.o. some
15931# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
Thomas Wouters3a584202000-08-05 23:28:51 +000015933for ac_func in dlopen
15934do
Martin v. Löwis11437992002-04-12 09:54:03 +000015935as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15937echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15938if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015940else
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015942/* confdefs.h. */
15943_ACEOF
15944cat confdefs.h >>conftest.$ac_ext
15945cat >>conftest.$ac_ext <<_ACEOF
15946/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015947/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15948 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15949#define $ac_func innocuous_$ac_func
15950
Guido van Rossume97ee181999-12-20 21:27:22 +000015951/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015952 which can conflict with char $ac_func (); below.
15953 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015954 <limits.h> exists even on freestanding compilers. */
15955
15956#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015957# include <limits.h>
15958#else
15959# include <assert.h>
15960#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015961
15962#undef $ac_func
15963
Martin v. Löwiseba40652007-08-30 20:10:57 +000015964/* Override any GCC internal prototype to avoid an error.
15965 Use char because int might match the return type of a GCC
15966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015967#ifdef __cplusplus
15968extern "C"
15969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015970char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015971/* The GNU C library defines this for functions which it implements
15972 to always fail with ENOSYS. Some functions are actually named
15973 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015974#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015975choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015976#endif
15977
Skip Montanaro6dead952003-09-25 14:50:04 +000015978int
15979main ()
15980{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015981return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 ;
15983 return 0;
15984}
15985_ACEOF
15986rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015987if { (ac_try="$ac_link"
15988case "(($ac_try" in
15989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15990 *) ac_try_echo=$ac_try;;
15991esac
15992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015995 grep -v '^ *+' conftest.er1 >conftest.err
15996 rm -f conftest.er1
15997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015999 (exit $ac_status); } && {
16000 test -z "$ac_c_werror_flag" ||
16001 test ! -s conftest.err
16002 } && test -s conftest$ac_exeext &&
16003 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016005else
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016007sed 's/^/| /' conftest.$ac_ext >&5
16008
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016011
16012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016013 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015ac_res=`eval echo '${'$as_ac_var'}'`
16016 { echo "$as_me:$LINENO: result: $ac_res" >&5
16017echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016018if test `eval echo '${'$as_ac_var'}'` = yes; then
16019 cat >>confdefs.h <<_ACEOF
16020#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16021_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016022
Guido van Rossume97ee181999-12-20 21:27:22 +000016023fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016024done
Guido van Rossume97ee181999-12-20 21:27:22 +000016025
Michael W. Hudson54241132001-12-07 15:38:26 +000016026
Guido van Rossume97ee181999-12-20 21:27:22 +000016027# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16028# loading of modules.
16029
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16031echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016032if test -z "$DYNLOADFILE"
16033then
16034 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016035 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16036 if test "$ac_cv_func_dlopen" = yes
16037 then DYNLOADFILE="dynload_shlib.o"
16038 else DYNLOADFILE="dynload_aix.o"
16039 fi
16040 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016041 BeOS*) DYNLOADFILE="dynload_beos.o";;
16042 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016043 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16044 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016045 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016046 *)
16047 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16048 # out any dynamic loading
16049 if test "$ac_cv_func_dlopen" = yes
16050 then DYNLOADFILE="dynload_shlib.o"
16051 else DYNLOADFILE="dynload_stub.o"
16052 fi
16053 ;;
16054 esac
16055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016056{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16057echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016058if test "$DYNLOADFILE" != "dynload_stub.o"
16059then
Martin v. Löwis11437992002-04-12 09:54:03 +000016060
16061cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016062#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016063_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016064
16065fi
16066
Neil Schemenauer4e425612001-06-19 15:44:15 +000016067# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16068
Michael W. Hudson54241132001-12-07 15:38:26 +000016069
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16071echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016072if test -z "$MACHDEP_OBJS"
16073then
Jack Jansene578a632001-08-15 01:27:14 +000016074 MACHDEP_OBJS=$extra_machdep_objs
16075else
16076 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16079echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016080
Guido van Rossum627b2d71993-12-24 10:39:16 +000016081# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
Martin v. Löwisd6320502004-08-12 13:45:08 +000016153
Martin v. Löwisc3001752005-01-23 09:27:24 +000016154
16155
Neal Norwitz05a45592006-03-20 06:30:08 +000016156
16157
Martin v. Löwis382abef2007-02-19 10:55:19 +000016158
16159
Christian Heimes36281872007-11-30 21:11:28 +000016160
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016161
16162
16163for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16164 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016165 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016166 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016167 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016168 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016169 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016170 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016171 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016172 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016173 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016174 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016175do
Martin v. Löwis11437992002-04-12 09:54:03 +000016176as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016177{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16178echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16179if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016181else
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016183/* confdefs.h. */
16184_ACEOF
16185cat confdefs.h >>conftest.$ac_ext
16186cat >>conftest.$ac_ext <<_ACEOF
16187/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016188/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16190#define $ac_func innocuous_$ac_func
16191
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016192/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016193 which can conflict with char $ac_func (); below.
16194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016195 <limits.h> exists even on freestanding compilers. */
16196
16197#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016198# include <limits.h>
16199#else
16200# include <assert.h>
16201#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016202
16203#undef $ac_func
16204
Martin v. Löwiseba40652007-08-30 20:10:57 +000016205/* Override any GCC internal prototype to avoid an error.
16206 Use char because int might match the return type of a GCC
16207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016208#ifdef __cplusplus
16209extern "C"
16210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016211char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016212/* The GNU C library defines this for functions which it implements
16213 to always fail with ENOSYS. Some functions are actually named
16214 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016216choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016217#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016218
Skip Montanaro6dead952003-09-25 14:50:04 +000016219int
16220main ()
16221{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016223 ;
16224 return 0;
16225}
16226_ACEOF
16227rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228if { (ac_try="$ac_link"
16229case "(($ac_try" in
16230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16231 *) ac_try_echo=$ac_try;;
16232esac
16233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16234 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016236 grep -v '^ *+' conftest.er1 >conftest.err
16237 rm -f conftest.er1
16238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016240 (exit $ac_status); } && {
16241 test -z "$ac_c_werror_flag" ||
16242 test ! -s conftest.err
16243 } && test -s conftest$ac_exeext &&
16244 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016246else
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016248sed 's/^/| /' conftest.$ac_ext >&5
16249
Martin v. Löwiseba40652007-08-30 20:10:57 +000016250 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016252
16253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016254 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256ac_res=`eval echo '${'$as_ac_var'}'`
16257 { echo "$as_me:$LINENO: result: $ac_res" >&5
16258echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016259if test `eval echo '${'$as_ac_var'}'` = yes; then
16260 cat >>confdefs.h <<_ACEOF
16261#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16262_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016263
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016264fi
16265done
16266
Michael W. Hudson54241132001-12-07 15:38:26 +000016267
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016268# For some functions, having a definition is not sufficient, since
16269# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016270{ echo "$as_me:$LINENO: checking for chroot" >&5
16271echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016273/* confdefs.h. */
16274_ACEOF
16275cat confdefs.h >>conftest.$ac_ext
16276cat >>conftest.$ac_ext <<_ACEOF
16277/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016278#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016279int
16280main ()
16281{
16282void *x=chroot
16283 ;
16284 return 0;
16285}
16286_ACEOF
16287rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288if { (ac_try="$ac_compile"
16289case "(($ac_try" in
16290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16291 *) ac_try_echo=$ac_try;;
16292esac
16293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16294 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016296 grep -v '^ *+' conftest.er1 >conftest.err
16297 rm -f conftest.er1
16298 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300 (exit $ac_status); } && {
16301 test -z "$ac_c_werror_flag" ||
16302 test ! -s conftest.err
16303 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016304
16305cat >>confdefs.h <<\_ACEOF
16306#define HAVE_CHROOT 1
16307_ACEOF
16308
Martin v. Löwiseba40652007-08-30 20:10:57 +000016309 { echo "$as_me:$LINENO: result: yes" >&5
16310echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016311else
16312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016313sed 's/^/| /' conftest.$ac_ext >&5
16314
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315 { echo "$as_me:$LINENO: result: no" >&5
16316echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016317
16318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319
16320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16321{ echo "$as_me:$LINENO: checking for link" >&5
16322echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016323cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016324/* confdefs.h. */
16325_ACEOF
16326cat confdefs.h >>conftest.$ac_ext
16327cat >>conftest.$ac_ext <<_ACEOF
16328/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016329#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016330int
16331main ()
16332{
16333void *x=link
16334 ;
16335 return 0;
16336}
16337_ACEOF
16338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016339if { (ac_try="$ac_compile"
16340case "(($ac_try" in
16341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16342 *) ac_try_echo=$ac_try;;
16343esac
16344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 grep -v '^ *+' conftest.er1 >conftest.err
16348 rm -f conftest.er1
16349 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351 (exit $ac_status); } && {
16352 test -z "$ac_c_werror_flag" ||
16353 test ! -s conftest.err
16354 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016355
16356cat >>confdefs.h <<\_ACEOF
16357#define HAVE_LINK 1
16358_ACEOF
16359
Martin v. Löwiseba40652007-08-30 20:10:57 +000016360 { echo "$as_me:$LINENO: result: yes" >&5
16361echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016362else
16363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016364sed 's/^/| /' conftest.$ac_ext >&5
16365
Martin v. Löwiseba40652007-08-30 20:10:57 +000016366 { echo "$as_me:$LINENO: result: no" >&5
16367echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016368
16369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370
16371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16372{ echo "$as_me:$LINENO: checking for symlink" >&5
16373echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016375/* confdefs.h. */
16376_ACEOF
16377cat confdefs.h >>conftest.$ac_ext
16378cat >>conftest.$ac_ext <<_ACEOF
16379/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016380#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016381int
16382main ()
16383{
16384void *x=symlink
16385 ;
16386 return 0;
16387}
16388_ACEOF
16389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016390if { (ac_try="$ac_compile"
16391case "(($ac_try" in
16392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16393 *) ac_try_echo=$ac_try;;
16394esac
16395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016398 grep -v '^ *+' conftest.er1 >conftest.err
16399 rm -f conftest.er1
16400 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016402 (exit $ac_status); } && {
16403 test -z "$ac_c_werror_flag" ||
16404 test ! -s conftest.err
16405 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016406
16407cat >>confdefs.h <<\_ACEOF
16408#define HAVE_SYMLINK 1
16409_ACEOF
16410
Martin v. Löwiseba40652007-08-30 20:10:57 +000016411 { echo "$as_me:$LINENO: result: yes" >&5
16412echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016413else
16414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016415sed 's/^/| /' conftest.$ac_ext >&5
16416
Martin v. Löwiseba40652007-08-30 20:10:57 +000016417 { echo "$as_me:$LINENO: result: no" >&5
16418echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016419
16420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016421
16422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16423{ echo "$as_me:$LINENO: checking for fchdir" >&5
16424echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016426/* confdefs.h. */
16427_ACEOF
16428cat confdefs.h >>conftest.$ac_ext
16429cat >>conftest.$ac_ext <<_ACEOF
16430/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016431#include <unistd.h>
16432int
16433main ()
16434{
16435void *x=fchdir
16436 ;
16437 return 0;
16438}
16439_ACEOF
16440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016441if { (ac_try="$ac_compile"
16442case "(($ac_try" in
16443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16444 *) ac_try_echo=$ac_try;;
16445esac
16446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016449 grep -v '^ *+' conftest.er1 >conftest.err
16450 rm -f conftest.er1
16451 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 (exit $ac_status); } && {
16454 test -z "$ac_c_werror_flag" ||
16455 test ! -s conftest.err
16456 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016457
16458cat >>confdefs.h <<\_ACEOF
16459#define HAVE_FCHDIR 1
16460_ACEOF
16461
Martin v. Löwiseba40652007-08-30 20:10:57 +000016462 { echo "$as_me:$LINENO: result: yes" >&5
16463echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016464else
16465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016466sed 's/^/| /' conftest.$ac_ext >&5
16467
Martin v. Löwiseba40652007-08-30 20:10:57 +000016468 { echo "$as_me:$LINENO: result: no" >&5
16469echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016470
16471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016472
16473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16474{ echo "$as_me:$LINENO: checking for fsync" >&5
16475echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016477/* confdefs.h. */
16478_ACEOF
16479cat confdefs.h >>conftest.$ac_ext
16480cat >>conftest.$ac_ext <<_ACEOF
16481/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016482#include <unistd.h>
16483int
16484main ()
16485{
16486void *x=fsync
16487 ;
16488 return 0;
16489}
16490_ACEOF
16491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016492if { (ac_try="$ac_compile"
16493case "(($ac_try" in
16494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16495 *) ac_try_echo=$ac_try;;
16496esac
16497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016500 grep -v '^ *+' conftest.er1 >conftest.err
16501 rm -f conftest.er1
16502 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016504 (exit $ac_status); } && {
16505 test -z "$ac_c_werror_flag" ||
16506 test ! -s conftest.err
16507 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016508
16509cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016510#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016511_ACEOF
16512
Martin v. Löwiseba40652007-08-30 20:10:57 +000016513 { echo "$as_me:$LINENO: result: yes" >&5
16514echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016515else
16516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016517sed 's/^/| /' conftest.$ac_ext >&5
16518
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519 { echo "$as_me:$LINENO: result: no" >&5
16520echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016521
16522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016523
16524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16525{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16526echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016527cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016528/* confdefs.h. */
16529_ACEOF
16530cat confdefs.h >>conftest.$ac_ext
16531cat >>conftest.$ac_ext <<_ACEOF
16532/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016533#include <unistd.h>
16534int
16535main ()
16536{
16537void *x=fdatasync
16538 ;
16539 return 0;
16540}
16541_ACEOF
16542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016543if { (ac_try="$ac_compile"
16544case "(($ac_try" in
16545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16546 *) ac_try_echo=$ac_try;;
16547esac
16548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016551 grep -v '^ *+' conftest.er1 >conftest.err
16552 rm -f conftest.er1
16553 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016555 (exit $ac_status); } && {
16556 test -z "$ac_c_werror_flag" ||
16557 test ! -s conftest.err
16558 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016559
16560cat >>confdefs.h <<\_ACEOF
16561#define HAVE_FDATASYNC 1
16562_ACEOF
16563
Martin v. Löwiseba40652007-08-30 20:10:57 +000016564 { echo "$as_me:$LINENO: result: yes" >&5
16565echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016566else
16567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016568sed 's/^/| /' conftest.$ac_ext >&5
16569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570 { echo "$as_me:$LINENO: result: no" >&5
16571echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016572
16573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016574
16575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016576{ echo "$as_me:$LINENO: checking for epoll" >&5
16577echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16578cat >conftest.$ac_ext <<_ACEOF
16579/* confdefs.h. */
16580_ACEOF
16581cat confdefs.h >>conftest.$ac_ext
16582cat >>conftest.$ac_ext <<_ACEOF
16583/* end confdefs.h. */
16584#include <sys/epoll.h>
16585int
16586main ()
16587{
16588void *x=epoll_create
16589 ;
16590 return 0;
16591}
16592_ACEOF
16593rm -f conftest.$ac_objext
16594if { (ac_try="$ac_compile"
16595case "(($ac_try" in
16596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16597 *) ac_try_echo=$ac_try;;
16598esac
16599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16600 (eval "$ac_compile") 2>conftest.er1
16601 ac_status=$?
16602 grep -v '^ *+' conftest.er1 >conftest.err
16603 rm -f conftest.er1
16604 cat conftest.err >&5
16605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16606 (exit $ac_status); } && {
16607 test -z "$ac_c_werror_flag" ||
16608 test ! -s conftest.err
16609 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016610
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016611cat >>confdefs.h <<\_ACEOF
16612#define HAVE_EPOLL 1
16613_ACEOF
16614
16615 { echo "$as_me:$LINENO: result: yes" >&5
16616echo "${ECHO_T}yes" >&6; }
16617else
16618 echo "$as_me: failed program was:" >&5
16619sed 's/^/| /' conftest.$ac_ext >&5
16620
16621 { echo "$as_me:$LINENO: result: no" >&5
16622echo "${ECHO_T}no" >&6; }
16623
16624fi
16625
16626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16627{ echo "$as_me:$LINENO: checking for kqueue" >&5
16628echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16629cat >conftest.$ac_ext <<_ACEOF
16630/* confdefs.h. */
16631_ACEOF
16632cat confdefs.h >>conftest.$ac_ext
16633cat >>conftest.$ac_ext <<_ACEOF
16634/* end confdefs.h. */
16635
16636#include <sys/types.h>
16637#include <sys/event.h>
16638
16639int
16640main ()
16641{
16642int x=kqueue()
16643 ;
16644 return 0;
16645}
16646_ACEOF
16647rm -f conftest.$ac_objext
16648if { (ac_try="$ac_compile"
16649case "(($ac_try" in
16650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16651 *) ac_try_echo=$ac_try;;
16652esac
16653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16654 (eval "$ac_compile") 2>conftest.er1
16655 ac_status=$?
16656 grep -v '^ *+' conftest.er1 >conftest.err
16657 rm -f conftest.er1
16658 cat conftest.err >&5
16659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16660 (exit $ac_status); } && {
16661 test -z "$ac_c_werror_flag" ||
16662 test ! -s conftest.err
16663 } && test -s conftest.$ac_objext; then
16664
16665cat >>confdefs.h <<\_ACEOF
16666#define HAVE_KQUEUE 1
16667_ACEOF
16668
16669 { echo "$as_me:$LINENO: result: yes" >&5
16670echo "${ECHO_T}yes" >&6; }
16671else
16672 echo "$as_me: failed program was:" >&5
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
16675 { echo "$as_me:$LINENO: result: no" >&5
16676echo "${ECHO_T}no" >&6; }
16677
16678fi
16679
16680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016681# On some systems (eg. FreeBSD 5), we would find a definition of the
16682# functions ctermid_r, setgroups in the library, but no prototype
16683# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16684# address to avoid compiler warnings and potential miscompilations
16685# because of the missing prototypes.
16686
Martin v. Löwiseba40652007-08-30 20:10:57 +000016687{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16688echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016690/* confdefs.h. */
16691_ACEOF
16692cat confdefs.h >>conftest.$ac_ext
16693cat >>conftest.$ac_ext <<_ACEOF
16694/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016695
16696#include "confdefs.h"
16697#include <stdio.h>
16698
Martin v. Löwisd5843682002-11-21 20:41:28 +000016699int
16700main ()
16701{
16702void* p = ctermid_r
16703 ;
16704 return 0;
16705}
16706_ACEOF
16707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708if { (ac_try="$ac_compile"
16709case "(($ac_try" in
16710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16711 *) ac_try_echo=$ac_try;;
16712esac
16713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016716 grep -v '^ *+' conftest.er1 >conftest.err
16717 rm -f conftest.er1
16718 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720 (exit $ac_status); } && {
16721 test -z "$ac_c_werror_flag" ||
16722 test ! -s conftest.err
16723 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016724
16725cat >>confdefs.h <<\_ACEOF
16726#define HAVE_CTERMID_R 1
16727_ACEOF
16728
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729 { echo "$as_me:$LINENO: result: yes" >&5
16730echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016731else
16732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016733sed 's/^/| /' conftest.$ac_ext >&5
16734
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735 { echo "$as_me:$LINENO: result: no" >&5
16736echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016737
16738fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016739
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16741
16742{ echo "$as_me:$LINENO: checking for flock" >&5
16743echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016750
16751#include "confdefs.h"
16752#include <sys/file.h>
16753
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016754int
16755main ()
16756{
16757void* p = flock
16758 ;
16759 return 0;
16760}
16761_ACEOF
16762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016763if { (ac_try="$ac_compile"
16764case "(($ac_try" in
16765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16766 *) ac_try_echo=$ac_try;;
16767esac
16768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771 grep -v '^ *+' conftest.er1 >conftest.err
16772 rm -f conftest.er1
16773 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775 (exit $ac_status); } && {
16776 test -z "$ac_c_werror_flag" ||
16777 test ! -s conftest.err
16778 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016779
16780cat >>confdefs.h <<\_ACEOF
16781#define HAVE_FLOCK 1
16782_ACEOF
16783
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784 { echo "$as_me:$LINENO: result: yes" >&5
16785echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016786else
16787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016788sed 's/^/| /' conftest.$ac_ext >&5
16789
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790 { echo "$as_me:$LINENO: result: no" >&5
16791echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016792
16793fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016794
Martin v. Löwiseba40652007-08-30 20:10:57 +000016795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16796
16797{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16798echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016800/* confdefs.h. */
16801_ACEOF
16802cat confdefs.h >>conftest.$ac_ext
16803cat >>conftest.$ac_ext <<_ACEOF
16804/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016805
16806#include "confdefs.h"
16807#include <unistd.h>
16808
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016809int
16810main ()
16811{
16812void* p = getpagesize
16813 ;
16814 return 0;
16815}
16816_ACEOF
16817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016818if { (ac_try="$ac_compile"
16819case "(($ac_try" in
16820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16821 *) ac_try_echo=$ac_try;;
16822esac
16823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016826 grep -v '^ *+' conftest.er1 >conftest.err
16827 rm -f conftest.er1
16828 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830 (exit $ac_status); } && {
16831 test -z "$ac_c_werror_flag" ||
16832 test ! -s conftest.err
16833 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016834
16835cat >>confdefs.h <<\_ACEOF
16836#define HAVE_GETPAGESIZE 1
16837_ACEOF
16838
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839 { echo "$as_me:$LINENO: result: yes" >&5
16840echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016841else
16842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016843sed 's/^/| /' conftest.$ac_ext >&5
16844
Martin v. Löwiseba40652007-08-30 20:10:57 +000016845 { echo "$as_me:$LINENO: result: no" >&5
16846echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016847
16848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849
16850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016851
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016852for ac_prog in true
16853do
16854 # Extract the first word of "$ac_prog", so it can be a program name with args.
16855set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16857echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016858if test "${ac_cv_prog_TRUE+set}" = set; then
16859 echo $ECHO_N "(cached) $ECHO_C" >&6
16860else
16861 if test -n "$TRUE"; then
16862 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16863else
16864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16865for as_dir in $PATH
16866do
16867 IFS=$as_save_IFS
16868 test -z "$as_dir" && as_dir=.
16869 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016870 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 +000016871 ac_cv_prog_TRUE="$ac_prog"
16872 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16873 break 2
16874 fi
16875done
16876done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016878
16879fi
16880fi
16881TRUE=$ac_cv_prog_TRUE
16882if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883 { echo "$as_me:$LINENO: result: $TRUE" >&5
16884echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016885else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886 { echo "$as_me:$LINENO: result: no" >&5
16887echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016888fi
16889
Martin v. Löwiseba40652007-08-30 20:10:57 +000016890
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016891 test -n "$TRUE" && break
16892done
16893test -n "$TRUE" || TRUE="/bin/true"
16894
16895
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16897echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016898if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16899 echo $ECHO_N "(cached) $ECHO_C" >&6
16900else
16901 ac_check_lib_save_LIBS=$LIBS
16902LIBS="-lc $LIBS"
16903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016904/* confdefs.h. */
16905_ACEOF
16906cat confdefs.h >>conftest.$ac_ext
16907cat >>conftest.$ac_ext <<_ACEOF
16908/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016909
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910/* Override any GCC internal prototype to avoid an error.
16911 Use char because int might match the return type of a GCC
16912 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016913#ifdef __cplusplus
16914extern "C"
16915#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016916char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016917int
16918main ()
16919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016921 ;
16922 return 0;
16923}
16924_ACEOF
16925rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926if { (ac_try="$ac_link"
16927case "(($ac_try" in
16928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16929 *) ac_try_echo=$ac_try;;
16930esac
16931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16932 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016934 grep -v '^ *+' conftest.er1 >conftest.err
16935 rm -f conftest.er1
16936 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938 (exit $ac_status); } && {
16939 test -z "$ac_c_werror_flag" ||
16940 test ! -s conftest.err
16941 } && test -s conftest$ac_exeext &&
16942 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016943 ac_cv_lib_c_inet_aton=yes
16944else
16945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016946sed 's/^/| /' conftest.$ac_ext >&5
16947
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016950
16951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016953LIBS=$ac_check_lib_save_LIBS
16954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016955{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16956echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016957if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016958 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016959else
16960
Martin v. Löwiseba40652007-08-30 20:10:57 +000016961{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16962echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016963if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16964 echo $ECHO_N "(cached) $ECHO_C" >&6
16965else
16966 ac_check_lib_save_LIBS=$LIBS
16967LIBS="-lresolv $LIBS"
16968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016969/* confdefs.h. */
16970_ACEOF
16971cat confdefs.h >>conftest.$ac_ext
16972cat >>conftest.$ac_ext <<_ACEOF
16973/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016974
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975/* Override any GCC internal prototype to avoid an error.
16976 Use char because int might match the return type of a GCC
16977 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016978#ifdef __cplusplus
16979extern "C"
16980#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016981char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016982int
16983main ()
16984{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016985return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016986 ;
16987 return 0;
16988}
16989_ACEOF
16990rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016991if { (ac_try="$ac_link"
16992case "(($ac_try" in
16993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16994 *) ac_try_echo=$ac_try;;
16995esac
16996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16997 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016999 grep -v '^ *+' conftest.er1 >conftest.err
17000 rm -f conftest.er1
17001 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017003 (exit $ac_status); } && {
17004 test -z "$ac_c_werror_flag" ||
17005 test ! -s conftest.err
17006 } && test -s conftest$ac_exeext &&
17007 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017008 ac_cv_lib_resolv_inet_aton=yes
17009else
17010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017011sed 's/^/| /' conftest.$ac_ext >&5
17012
Martin v. Löwiseba40652007-08-30 20:10:57 +000017013 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015
17016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017018LIBS=$ac_check_lib_save_LIBS
17019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17021echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017022if test $ac_cv_lib_resolv_inet_aton = yes; then
17023 cat >>confdefs.h <<_ACEOF
17024#define HAVE_LIBRESOLV 1
17025_ACEOF
17026
17027 LIBS="-lresolv $LIBS"
17028
17029fi
17030
17031
17032fi
17033
17034
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017035# On Tru64, chflags seems to be present, but calling it will
17036# exit Python
17037{ echo "$as_me:$LINENO: checking for chflags" >&5
17038echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17039if test "$cross_compiling" = yes; then
17040 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17041See \`config.log' for more details." >&5
17042echo "$as_me: error: cannot run test program while cross compiling
17043See \`config.log' for more details." >&2;}
17044 { (exit 1); exit 1; }; }
17045else
17046 cat >conftest.$ac_ext <<_ACEOF
17047/* confdefs.h. */
17048_ACEOF
17049cat confdefs.h >>conftest.$ac_ext
17050cat >>conftest.$ac_ext <<_ACEOF
17051/* end confdefs.h. */
17052
17053#include <sys/stat.h>
17054#include <unistd.h>
17055int main(int argc, char*argv[])
17056{
17057 if(chflags(argv[0], 0) != 0)
17058 return 1;
17059 return 0;
17060}
17061
17062_ACEOF
17063rm -f conftest$ac_exeext
17064if { (ac_try="$ac_link"
17065case "(($ac_try" in
17066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17067 *) ac_try_echo=$ac_try;;
17068esac
17069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17070 (eval "$ac_link") 2>&5
17071 ac_status=$?
17072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17074 { (case "(($ac_try" in
17075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17076 *) ac_try_echo=$ac_try;;
17077esac
17078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17079 (eval "$ac_try") 2>&5
17080 ac_status=$?
17081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17082 (exit $ac_status); }; }; then
17083
17084cat >>confdefs.h <<\_ACEOF
17085#define HAVE_CHFLAGS 1
17086_ACEOF
17087
17088 { echo "$as_me:$LINENO: result: yes" >&5
17089echo "${ECHO_T}yes" >&6; }
17090else
17091 echo "$as_me: program exited with status $ac_status" >&5
17092echo "$as_me: failed program was:" >&5
17093sed 's/^/| /' conftest.$ac_ext >&5
17094
17095( exit $ac_status )
17096{ echo "$as_me:$LINENO: result: no" >&5
17097echo "${ECHO_T}no" >&6; }
17098
17099fi
17100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17101fi
17102
17103
17104
17105{ echo "$as_me:$LINENO: checking for lchflags" >&5
17106echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17107if test "$cross_compiling" = yes; then
17108 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17109See \`config.log' for more details." >&5
17110echo "$as_me: error: cannot run test program while cross compiling
17111See \`config.log' for more details." >&2;}
17112 { (exit 1); exit 1; }; }
17113else
17114 cat >conftest.$ac_ext <<_ACEOF
17115/* confdefs.h. */
17116_ACEOF
17117cat confdefs.h >>conftest.$ac_ext
17118cat >>conftest.$ac_ext <<_ACEOF
17119/* end confdefs.h. */
17120
17121#include <sys/stat.h>
17122#include <unistd.h>
17123int main(int argc, char*argv[])
17124{
17125 if(lchflags(argv[0], 0) != 0)
17126 return 1;
17127 return 0;
17128}
17129
17130_ACEOF
17131rm -f conftest$ac_exeext
17132if { (ac_try="$ac_link"
17133case "(($ac_try" in
17134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17135 *) ac_try_echo=$ac_try;;
17136esac
17137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17138 (eval "$ac_link") 2>&5
17139 ac_status=$?
17140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17142 { (case "(($ac_try" in
17143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17144 *) ac_try_echo=$ac_try;;
17145esac
17146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17147 (eval "$ac_try") 2>&5
17148 ac_status=$?
17149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); }; }; then
17151
17152cat >>confdefs.h <<\_ACEOF
17153#define HAVE_LCHFLAGS 1
17154_ACEOF
17155
17156 { echo "$as_me:$LINENO: result: yes" >&5
17157echo "${ECHO_T}yes" >&6; }
17158else
17159 echo "$as_me: program exited with status $ac_status" >&5
17160echo "$as_me: failed program was:" >&5
17161sed 's/^/| /' conftest.$ac_ext >&5
17162
17163( exit $ac_status )
17164{ echo "$as_me:$LINENO: result: no" >&5
17165echo "${ECHO_T}no" >&6; }
17166
17167fi
17168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17169fi
17170
17171
17172
Ronald Oussorenf8752642006-07-06 10:13:35 +000017173case $ac_sys_system/$ac_sys_release in
17174Darwin/*)
17175 _CUR_CFLAGS="${CFLAGS}"
17176 _CUR_LDFLAGS="${LDFLAGS}"
17177 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17178 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17179 ;;
17180esac
17181
Martin v. Löwiseba40652007-08-30 20:10:57 +000017182{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17183echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017184if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17185 echo $ECHO_N "(cached) $ECHO_C" >&6
17186else
17187 ac_check_lib_save_LIBS=$LIBS
17188LIBS="-lz $LIBS"
17189cat >conftest.$ac_ext <<_ACEOF
17190/* confdefs.h. */
17191_ACEOF
17192cat confdefs.h >>conftest.$ac_ext
17193cat >>conftest.$ac_ext <<_ACEOF
17194/* end confdefs.h. */
17195
Martin v. Löwiseba40652007-08-30 20:10:57 +000017196/* Override any GCC internal prototype to avoid an error.
17197 Use char because int might match the return type of a GCC
17198 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017199#ifdef __cplusplus
17200extern "C"
17201#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017202char inflateCopy ();
17203int
17204main ()
17205{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017206return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017207 ;
17208 return 0;
17209}
17210_ACEOF
17211rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017212if { (ac_try="$ac_link"
17213case "(($ac_try" in
17214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17215 *) ac_try_echo=$ac_try;;
17216esac
17217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17218 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017219 ac_status=$?
17220 grep -v '^ *+' conftest.er1 >conftest.err
17221 rm -f conftest.er1
17222 cat conftest.err >&5
17223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017224 (exit $ac_status); } && {
17225 test -z "$ac_c_werror_flag" ||
17226 test ! -s conftest.err
17227 } && test -s conftest$ac_exeext &&
17228 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017229 ac_cv_lib_z_inflateCopy=yes
17230else
17231 echo "$as_me: failed program was:" >&5
17232sed 's/^/| /' conftest.$ac_ext >&5
17233
Martin v. Löwiseba40652007-08-30 20:10:57 +000017234 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017236
17237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017238 conftest$ac_exeext conftest.$ac_ext
17239LIBS=$ac_check_lib_save_LIBS
17240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17242echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017243if test $ac_cv_lib_z_inflateCopy = yes; then
17244
17245cat >>confdefs.h <<\_ACEOF
17246#define HAVE_ZLIB_COPY 1
17247_ACEOF
17248
17249fi
17250
17251
Ronald Oussorenf8752642006-07-06 10:13:35 +000017252case $ac_sys_system/$ac_sys_release in
17253Darwin/*)
17254 CFLAGS="${_CUR_CFLAGS}"
17255 LDFLAGS="${_CUR_LDFLAGS}"
17256 ;;
17257esac
17258
Martin v. Löwiseba40652007-08-30 20:10:57 +000017259{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17260echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017262/* confdefs.h. */
17263_ACEOF
17264cat confdefs.h >>conftest.$ac_ext
17265cat >>conftest.$ac_ext <<_ACEOF
17266/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017267
17268#include "confdefs.h"
17269#include <netdb.h>
17270
Martin v. Löwise9416172003-05-03 10:12:45 +000017271int
17272main ()
17273{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017274void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017275 ;
17276 return 0;
17277}
17278_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017279rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280if { (ac_try="$ac_link"
17281case "(($ac_try" in
17282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17283 *) ac_try_echo=$ac_try;;
17284esac
17285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017288 grep -v '^ *+' conftest.er1 >conftest.err
17289 rm -f conftest.er1
17290 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017292 (exit $ac_status); } && {
17293 test -z "$ac_c_werror_flag" ||
17294 test ! -s conftest.err
17295 } && test -s conftest$ac_exeext &&
17296 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017297
17298cat >>confdefs.h <<\_ACEOF
17299#define HAVE_HSTRERROR 1
17300_ACEOF
17301
Martin v. Löwiseba40652007-08-30 20:10:57 +000017302 { echo "$as_me:$LINENO: result: yes" >&5
17303echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017304else
17305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017306sed 's/^/| /' conftest.$ac_ext >&5
17307
Martin v. Löwiseba40652007-08-30 20:10:57 +000017308 { echo "$as_me:$LINENO: result: no" >&5
17309echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017310
17311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017312
17313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017315
Martin v. Löwiseba40652007-08-30 20:10:57 +000017316{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17317echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017319/* confdefs.h. */
17320_ACEOF
17321cat confdefs.h >>conftest.$ac_ext
17322cat >>conftest.$ac_ext <<_ACEOF
17323/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017324
17325#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017326#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017327#include <sys/socket.h>
17328#include <netinet/in.h>
17329#include <arpa/inet.h>
17330
Martin v. Löwise9416172003-05-03 10:12:45 +000017331int
17332main ()
17333{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017334void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017335 ;
17336 return 0;
17337}
17338_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017340if { (ac_try="$ac_link"
17341case "(($ac_try" in
17342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17343 *) ac_try_echo=$ac_try;;
17344esac
17345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017348 grep -v '^ *+' conftest.er1 >conftest.err
17349 rm -f conftest.er1
17350 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017352 (exit $ac_status); } && {
17353 test -z "$ac_c_werror_flag" ||
17354 test ! -s conftest.err
17355 } && test -s conftest$ac_exeext &&
17356 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017357
17358cat >>confdefs.h <<\_ACEOF
17359#define HAVE_INET_ATON 1
17360_ACEOF
17361
Martin v. Löwiseba40652007-08-30 20:10:57 +000017362 { echo "$as_me:$LINENO: result: yes" >&5
17363echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017364else
17365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017366sed 's/^/| /' conftest.$ac_ext >&5
17367
Martin v. Löwiseba40652007-08-30 20:10:57 +000017368 { echo "$as_me:$LINENO: result: no" >&5
17369echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017370
17371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017372
17373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017375
Martin v. Löwiseba40652007-08-30 20:10:57 +000017376{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17377echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017379/* confdefs.h. */
17380_ACEOF
17381cat confdefs.h >>conftest.$ac_ext
17382cat >>conftest.$ac_ext <<_ACEOF
17383/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017384
17385#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017386#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017387#include <sys/socket.h>
17388#include <netinet/in.h>
17389#include <arpa/inet.h>
17390
Martin v. Löwise9416172003-05-03 10:12:45 +000017391int
17392main ()
17393{
17394void* p = inet_pton
17395 ;
17396 return 0;
17397}
17398_ACEOF
17399rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017400if { (ac_try="$ac_compile"
17401case "(($ac_try" in
17402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17403 *) ac_try_echo=$ac_try;;
17404esac
17405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017408 grep -v '^ *+' conftest.er1 >conftest.err
17409 rm -f conftest.er1
17410 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017412 (exit $ac_status); } && {
17413 test -z "$ac_c_werror_flag" ||
17414 test ! -s conftest.err
17415 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017416
17417cat >>confdefs.h <<\_ACEOF
17418#define HAVE_INET_PTON 1
17419_ACEOF
17420
Martin v. Löwiseba40652007-08-30 20:10:57 +000017421 { echo "$as_me:$LINENO: result: yes" >&5
17422echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017423else
17424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017425sed 's/^/| /' conftest.$ac_ext >&5
17426
Martin v. Löwiseba40652007-08-30 20:10:57 +000017427 { echo "$as_me:$LINENO: result: no" >&5
17428echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017429
17430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017431
17432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017433
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017434# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435{ echo "$as_me:$LINENO: checking for setgroups" >&5
17436echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017438/* confdefs.h. */
17439_ACEOF
17440cat confdefs.h >>conftest.$ac_ext
17441cat >>conftest.$ac_ext <<_ACEOF
17442/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017443
17444#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017445#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017446#ifdef HAVE_GRP_H
17447#include <grp.h>
17448#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017449
Martin v. Löwisd5843682002-11-21 20:41:28 +000017450int
17451main ()
17452{
17453void* p = setgroups
17454 ;
17455 return 0;
17456}
17457_ACEOF
17458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017459if { (ac_try="$ac_compile"
17460case "(($ac_try" in
17461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17462 *) ac_try_echo=$ac_try;;
17463esac
17464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017467 grep -v '^ *+' conftest.er1 >conftest.err
17468 rm -f conftest.er1
17469 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017471 (exit $ac_status); } && {
17472 test -z "$ac_c_werror_flag" ||
17473 test ! -s conftest.err
17474 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017475
17476cat >>confdefs.h <<\_ACEOF
17477#define HAVE_SETGROUPS 1
17478_ACEOF
17479
Martin v. Löwiseba40652007-08-30 20:10:57 +000017480 { echo "$as_me:$LINENO: result: yes" >&5
17481echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017482else
17483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017484sed 's/^/| /' conftest.$ac_ext >&5
17485
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486 { echo "$as_me:$LINENO: result: no" >&5
17487echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017488
17489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017490
17491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017492
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017493# check for openpty and forkpty
17494
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017496for ac_func in openpty
17497do
Martin v. Löwis11437992002-04-12 09:54:03 +000017498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017499{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17501if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017503else
Martin v. Löwis11437992002-04-12 09:54:03 +000017504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017505/* confdefs.h. */
17506_ACEOF
17507cat confdefs.h >>conftest.$ac_ext
17508cat >>conftest.$ac_ext <<_ACEOF
17509/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017510/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17511 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17512#define $ac_func innocuous_$ac_func
17513
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017514/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017515 which can conflict with char $ac_func (); below.
17516 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017517 <limits.h> exists even on freestanding compilers. */
17518
17519#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017520# include <limits.h>
17521#else
17522# include <assert.h>
17523#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017524
17525#undef $ac_func
17526
Martin v. Löwiseba40652007-08-30 20:10:57 +000017527/* Override any GCC internal prototype to avoid an error.
17528 Use char because int might match the return type of a GCC
17529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017530#ifdef __cplusplus
17531extern "C"
17532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017533char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017534/* The GNU C library defines this for functions which it implements
17535 to always fail with ENOSYS. Some functions are actually named
17536 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017537#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017538choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017539#endif
17540
Skip Montanaro6dead952003-09-25 14:50:04 +000017541int
17542main ()
17543{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017544return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 ;
17546 return 0;
17547}
17548_ACEOF
17549rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017550if { (ac_try="$ac_link"
17551case "(($ac_try" in
17552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17553 *) ac_try_echo=$ac_try;;
17554esac
17555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17556 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017558 grep -v '^ *+' conftest.er1 >conftest.err
17559 rm -f conftest.er1
17560 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017562 (exit $ac_status); } && {
17563 test -z "$ac_c_werror_flag" ||
17564 test ! -s conftest.err
17565 } && test -s conftest$ac_exeext &&
17566 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017567 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017568else
Martin v. Löwis11437992002-04-12 09:54:03 +000017569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017570sed 's/^/| /' conftest.$ac_ext >&5
17571
Martin v. Löwiseba40652007-08-30 20:10:57 +000017572 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017574
17575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017576 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578ac_res=`eval echo '${'$as_ac_var'}'`
17579 { echo "$as_me:$LINENO: result: $ac_res" >&5
17580echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017581if test `eval echo '${'$as_ac_var'}'` = yes; then
17582 cat >>confdefs.h <<_ACEOF
17583#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17584_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017585
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017586else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017587 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17588echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017589if test "${ac_cv_lib_util_openpty+set}" = set; then
17590 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017591else
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017593LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017594cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017595/* confdefs.h. */
17596_ACEOF
17597cat confdefs.h >>conftest.$ac_ext
17598cat >>conftest.$ac_ext <<_ACEOF
17599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017600
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601/* Override any GCC internal prototype to avoid an error.
17602 Use char because int might match the return type of a GCC
17603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017604#ifdef __cplusplus
17605extern "C"
17606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017607char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017608int
17609main ()
17610{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 ;
17613 return 0;
17614}
17615_ACEOF
17616rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617if { (ac_try="$ac_link"
17618case "(($ac_try" in
17619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17620 *) ac_try_echo=$ac_try;;
17621esac
17622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17623 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017625 grep -v '^ *+' conftest.er1 >conftest.err
17626 rm -f conftest.er1
17627 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017629 (exit $ac_status); } && {
17630 test -z "$ac_c_werror_flag" ||
17631 test ! -s conftest.err
17632 } && test -s conftest$ac_exeext &&
17633 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017635else
Martin v. Löwis11437992002-04-12 09:54:03 +000017636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017637sed 's/^/| /' conftest.$ac_ext >&5
17638
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017641
17642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017644LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017646{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17647echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017648if test $ac_cv_lib_util_openpty = yes; then
17649 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017650#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017651_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017652 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017653else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017654 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17655echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017656if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17657 echo $ECHO_N "(cached) $ECHO_C" >&6
17658else
17659 ac_check_lib_save_LIBS=$LIBS
17660LIBS="-lbsd $LIBS"
17661cat >conftest.$ac_ext <<_ACEOF
17662/* confdefs.h. */
17663_ACEOF
17664cat confdefs.h >>conftest.$ac_ext
17665cat >>conftest.$ac_ext <<_ACEOF
17666/* end confdefs.h. */
17667
Martin v. Löwiseba40652007-08-30 20:10:57 +000017668/* Override any GCC internal prototype to avoid an error.
17669 Use char because int might match the return type of a GCC
17670 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017671#ifdef __cplusplus
17672extern "C"
17673#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017674char openpty ();
17675int
17676main ()
17677{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017679 ;
17680 return 0;
17681}
17682_ACEOF
17683rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017684if { (ac_try="$ac_link"
17685case "(($ac_try" in
17686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17687 *) ac_try_echo=$ac_try;;
17688esac
17689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17690 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017691 ac_status=$?
17692 grep -v '^ *+' conftest.er1 >conftest.err
17693 rm -f conftest.er1
17694 cat conftest.err >&5
17695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017696 (exit $ac_status); } && {
17697 test -z "$ac_c_werror_flag" ||
17698 test ! -s conftest.err
17699 } && test -s conftest$ac_exeext &&
17700 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017701 ac_cv_lib_bsd_openpty=yes
17702else
17703 echo "$as_me: failed program was:" >&5
17704sed 's/^/| /' conftest.$ac_ext >&5
17705
Martin v. Löwiseba40652007-08-30 20:10:57 +000017706 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017708
17709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017710 conftest$ac_exeext conftest.$ac_ext
17711LIBS=$ac_check_lib_save_LIBS
17712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017713{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17714echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017715if test $ac_cv_lib_bsd_openpty = yes; then
17716 cat >>confdefs.h <<\_ACEOF
17717#define HAVE_OPENPTY 1
17718_ACEOF
17719 LIBS="$LIBS -lbsd"
17720fi
17721
17722
17723fi
17724
Fred Drake8cef4cf2000-06-28 16:40:38 +000017725
17726fi
17727done
17728
Martin v. Löwis11437992002-04-12 09:54:03 +000017729
Fred Drake8cef4cf2000-06-28 16:40:38 +000017730for ac_func in forkpty
17731do
Martin v. Löwis11437992002-04-12 09:54:03 +000017732as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017733{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17734echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17735if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017737else
Martin v. Löwis11437992002-04-12 09:54:03 +000017738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017739/* confdefs.h. */
17740_ACEOF
17741cat confdefs.h >>conftest.$ac_ext
17742cat >>conftest.$ac_ext <<_ACEOF
17743/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017744/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17745 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17746#define $ac_func innocuous_$ac_func
17747
Fred Drake8cef4cf2000-06-28 16:40:38 +000017748/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017749 which can conflict with char $ac_func (); below.
17750 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017751 <limits.h> exists even on freestanding compilers. */
17752
17753#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017754# include <limits.h>
17755#else
17756# include <assert.h>
17757#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017758
17759#undef $ac_func
17760
Martin v. Löwiseba40652007-08-30 20:10:57 +000017761/* Override any GCC internal prototype to avoid an error.
17762 Use char because int might match the return type of a GCC
17763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017764#ifdef __cplusplus
17765extern "C"
17766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017767char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017768/* The GNU C library defines this for functions which it implements
17769 to always fail with ENOSYS. Some functions are actually named
17770 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017771#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017772choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017773#endif
17774
Skip Montanaro6dead952003-09-25 14:50:04 +000017775int
17776main ()
17777{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017778return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017779 ;
17780 return 0;
17781}
17782_ACEOF
17783rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017784if { (ac_try="$ac_link"
17785case "(($ac_try" in
17786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17787 *) ac_try_echo=$ac_try;;
17788esac
17789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17790 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017792 grep -v '^ *+' conftest.er1 >conftest.err
17793 rm -f conftest.er1
17794 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017796 (exit $ac_status); } && {
17797 test -z "$ac_c_werror_flag" ||
17798 test ! -s conftest.err
17799 } && test -s conftest$ac_exeext &&
17800 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017801 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017802else
Martin v. Löwis11437992002-04-12 09:54:03 +000017803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017804sed 's/^/| /' conftest.$ac_ext >&5
17805
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808
17809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017810 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017812ac_res=`eval echo '${'$as_ac_var'}'`
17813 { echo "$as_me:$LINENO: result: $ac_res" >&5
17814echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017815if test `eval echo '${'$as_ac_var'}'` = yes; then
17816 cat >>confdefs.h <<_ACEOF
17817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17818_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017819
Fred Drake8cef4cf2000-06-28 16:40:38 +000017820else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017821 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17822echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017823if test "${ac_cv_lib_util_forkpty+set}" = set; then
17824 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017825else
Martin v. Löwis11437992002-04-12 09:54:03 +000017826 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017827LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017829/* confdefs.h. */
17830_ACEOF
17831cat confdefs.h >>conftest.$ac_ext
17832cat >>conftest.$ac_ext <<_ACEOF
17833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017834
Martin v. Löwiseba40652007-08-30 20:10:57 +000017835/* Override any GCC internal prototype to avoid an error.
17836 Use char because int might match the return type of a GCC
17837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017838#ifdef __cplusplus
17839extern "C"
17840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017841char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017842int
17843main ()
17844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017845return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017846 ;
17847 return 0;
17848}
17849_ACEOF
17850rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017851if { (ac_try="$ac_link"
17852case "(($ac_try" in
17853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17854 *) ac_try_echo=$ac_try;;
17855esac
17856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017859 grep -v '^ *+' conftest.er1 >conftest.err
17860 rm -f conftest.er1
17861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017863 (exit $ac_status); } && {
17864 test -z "$ac_c_werror_flag" ||
17865 test ! -s conftest.err
17866 } && test -s conftest$ac_exeext &&
17867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017868 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017869else
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017871sed 's/^/| /' conftest.$ac_ext >&5
17872
Martin v. Löwiseba40652007-08-30 20:10:57 +000017873 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017875
17876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017878LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017880{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17881echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017882if test $ac_cv_lib_util_forkpty = yes; then
17883 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017884#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017885_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017886 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017887else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017888 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17889echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017890if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17891 echo $ECHO_N "(cached) $ECHO_C" >&6
17892else
17893 ac_check_lib_save_LIBS=$LIBS
17894LIBS="-lbsd $LIBS"
17895cat >conftest.$ac_ext <<_ACEOF
17896/* confdefs.h. */
17897_ACEOF
17898cat confdefs.h >>conftest.$ac_ext
17899cat >>conftest.$ac_ext <<_ACEOF
17900/* end confdefs.h. */
17901
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902/* Override any GCC internal prototype to avoid an error.
17903 Use char because int might match the return type of a GCC
17904 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017905#ifdef __cplusplus
17906extern "C"
17907#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017908char forkpty ();
17909int
17910main ()
17911{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017912return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017913 ;
17914 return 0;
17915}
17916_ACEOF
17917rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017918if { (ac_try="$ac_link"
17919case "(($ac_try" in
17920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17921 *) ac_try_echo=$ac_try;;
17922esac
17923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17924 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017925 ac_status=$?
17926 grep -v '^ *+' conftest.er1 >conftest.err
17927 rm -f conftest.er1
17928 cat conftest.err >&5
17929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017930 (exit $ac_status); } && {
17931 test -z "$ac_c_werror_flag" ||
17932 test ! -s conftest.err
17933 } && test -s conftest$ac_exeext &&
17934 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017935 ac_cv_lib_bsd_forkpty=yes
17936else
17937 echo "$as_me: failed program was:" >&5
17938sed 's/^/| /' conftest.$ac_ext >&5
17939
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942
17943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017944 conftest$ac_exeext conftest.$ac_ext
17945LIBS=$ac_check_lib_save_LIBS
17946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17948echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017949if test $ac_cv_lib_bsd_forkpty = yes; then
17950 cat >>confdefs.h <<\_ACEOF
17951#define HAVE_FORKPTY 1
17952_ACEOF
17953 LIBS="$LIBS -lbsd"
17954fi
17955
17956
17957fi
17958
Fred Drake8cef4cf2000-06-28 16:40:38 +000017959
17960fi
17961done
17962
Jack Jansendd19cf82001-12-06 22:36:17 +000017963
Brett Cannonaa5778d2008-03-18 04:09:00 +000017964# Stuff for expat.
17965
17966for ac_func in memmove
17967do
17968as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17969{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17970echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17971if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17972 echo $ECHO_N "(cached) $ECHO_C" >&6
17973else
17974 cat >conftest.$ac_ext <<_ACEOF
17975/* confdefs.h. */
17976_ACEOF
17977cat confdefs.h >>conftest.$ac_ext
17978cat >>conftest.$ac_ext <<_ACEOF
17979/* end confdefs.h. */
17980/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17981 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17982#define $ac_func innocuous_$ac_func
17983
17984/* System header to define __stub macros and hopefully few prototypes,
17985 which can conflict with char $ac_func (); below.
17986 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17987 <limits.h> exists even on freestanding compilers. */
17988
17989#ifdef __STDC__
17990# include <limits.h>
17991#else
17992# include <assert.h>
17993#endif
17994
17995#undef $ac_func
17996
17997/* Override any GCC internal prototype to avoid an error.
17998 Use char because int might match the return type of a GCC
17999 builtin and then its argument prototype would still apply. */
18000#ifdef __cplusplus
18001extern "C"
18002#endif
18003char $ac_func ();
18004/* The GNU C library defines this for functions which it implements
18005 to always fail with ENOSYS. Some functions are actually named
18006 something starting with __ and the normal name is an alias. */
18007#if defined __stub_$ac_func || defined __stub___$ac_func
18008choke me
18009#endif
18010
18011int
18012main ()
18013{
18014return $ac_func ();
18015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext conftest$ac_exeext
18020if { (ac_try="$ac_link"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
18025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18026 (eval "$ac_link") 2>conftest.er1
18027 ac_status=$?
18028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
18031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18032 (exit $ac_status); } && {
18033 test -z "$ac_c_werror_flag" ||
18034 test ! -s conftest.err
18035 } && test -s conftest$ac_exeext &&
18036 $as_test_x conftest$ac_exeext; then
18037 eval "$as_ac_var=yes"
18038else
18039 echo "$as_me: failed program was:" >&5
18040sed 's/^/| /' conftest.$ac_ext >&5
18041
18042 eval "$as_ac_var=no"
18043fi
18044
18045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18046 conftest$ac_exeext conftest.$ac_ext
18047fi
18048ac_res=`eval echo '${'$as_ac_var'}'`
18049 { echo "$as_me:$LINENO: result: $ac_res" >&5
18050echo "${ECHO_T}$ac_res" >&6; }
18051if test `eval echo '${'$as_ac_var'}'` = yes; then
18052 cat >>confdefs.h <<_ACEOF
18053#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18054_ACEOF
18055
18056fi
18057done
18058
18059
Michael W. Hudson54241132001-12-07 15:38:26 +000018060# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018061
18062
18063
18064
18065
18066
Fred Drake8cef4cf2000-06-28 16:40:38 +000018067for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18068do
Martin v. Löwis11437992002-04-12 09:54:03 +000018069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018070{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18072if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018074else
Martin v. Löwis11437992002-04-12 09:54:03 +000018075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018076/* confdefs.h. */
18077_ACEOF
18078cat confdefs.h >>conftest.$ac_ext
18079cat >>conftest.$ac_ext <<_ACEOF
18080/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018081/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18082 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18083#define $ac_func innocuous_$ac_func
18084
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018085/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018086 which can conflict with char $ac_func (); below.
18087 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018088 <limits.h> exists even on freestanding compilers. */
18089
18090#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018091# include <limits.h>
18092#else
18093# include <assert.h>
18094#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018095
18096#undef $ac_func
18097
Martin v. Löwiseba40652007-08-30 20:10:57 +000018098/* Override any GCC internal prototype to avoid an error.
18099 Use char because int might match the return type of a GCC
18100 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018101#ifdef __cplusplus
18102extern "C"
18103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018104char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018105/* The GNU C library defines this for functions which it implements
18106 to always fail with ENOSYS. Some functions are actually named
18107 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018109choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018110#endif
18111
Skip Montanaro6dead952003-09-25 14:50:04 +000018112int
18113main ()
18114{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018115return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018116 ;
18117 return 0;
18118}
18119_ACEOF
18120rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121if { (ac_try="$ac_link"
18122case "(($ac_try" in
18123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18124 *) ac_try_echo=$ac_try;;
18125esac
18126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18127 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018129 grep -v '^ *+' conftest.er1 >conftest.err
18130 rm -f conftest.er1
18131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018133 (exit $ac_status); } && {
18134 test -z "$ac_c_werror_flag" ||
18135 test ! -s conftest.err
18136 } && test -s conftest$ac_exeext &&
18137 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018138 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018139else
Martin v. Löwis11437992002-04-12 09:54:03 +000018140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018141sed 's/^/| /' conftest.$ac_ext >&5
18142
Martin v. Löwiseba40652007-08-30 20:10:57 +000018143 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018145
18146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018147 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018149ac_res=`eval echo '${'$as_ac_var'}'`
18150 { echo "$as_me:$LINENO: result: $ac_res" >&5
18151echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018152if test `eval echo '${'$as_ac_var'}'` = yes; then
18153 cat >>confdefs.h <<_ACEOF
18154#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18155_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018156
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018157fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018158done
18159
Michael W. Hudson54241132001-12-07 15:38:26 +000018160
Martin v. Löwis11437992002-04-12 09:54:03 +000018161
18162
18163
Brett Cannonaa5778d2008-03-18 04:09:00 +000018164for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018165do
Martin v. Löwis11437992002-04-12 09:54:03 +000018166as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018167{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18168echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18169if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018171else
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018173/* confdefs.h. */
18174_ACEOF
18175cat confdefs.h >>conftest.$ac_ext
18176cat >>conftest.$ac_ext <<_ACEOF
18177/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018178/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18180#define $ac_func innocuous_$ac_func
18181
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018182/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018183 which can conflict with char $ac_func (); below.
18184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018185 <limits.h> exists even on freestanding compilers. */
18186
18187#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018188# include <limits.h>
18189#else
18190# include <assert.h>
18191#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018192
18193#undef $ac_func
18194
Martin v. Löwiseba40652007-08-30 20:10:57 +000018195/* Override any GCC internal prototype to avoid an error.
18196 Use char because int might match the return type of a GCC
18197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018198#ifdef __cplusplus
18199extern "C"
18200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018201char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018202/* The GNU C library defines this for functions which it implements
18203 to always fail with ENOSYS. Some functions are actually named
18204 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018205#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018206choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018207#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018208
Skip Montanaro6dead952003-09-25 14:50:04 +000018209int
18210main ()
18211{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018212return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018213 ;
18214 return 0;
18215}
18216_ACEOF
18217rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018218if { (ac_try="$ac_link"
18219case "(($ac_try" in
18220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18221 *) ac_try_echo=$ac_try;;
18222esac
18223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018226 grep -v '^ *+' conftest.er1 >conftest.err
18227 rm -f conftest.er1
18228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018230 (exit $ac_status); } && {
18231 test -z "$ac_c_werror_flag" ||
18232 test ! -s conftest.err
18233 } && test -s conftest$ac_exeext &&
18234 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018235 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018236else
Martin v. Löwis11437992002-04-12 09:54:03 +000018237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018238sed 's/^/| /' conftest.$ac_ext >&5
18239
Martin v. Löwiseba40652007-08-30 20:10:57 +000018240 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018242
18243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018246ac_res=`eval echo '${'$as_ac_var'}'`
18247 { echo "$as_me:$LINENO: result: $ac_res" >&5
18248echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018249if test `eval echo '${'$as_ac_var'}'` = yes; then
18250 cat >>confdefs.h <<_ACEOF
18251#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18252_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018253
Martin v. Löwis1142de32002-03-29 16:28:31 +000018254else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018256 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018257 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18258 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018259esac
18260
Martin v. Löwis1142de32002-03-29 16:28:31 +000018261fi
18262done
18263
18264
Martin v. Löwis11437992002-04-12 09:54:03 +000018265
Martin v. Löwis1142de32002-03-29 16:28:31 +000018266for ac_func in getpgrp
18267do
Martin v. Löwis11437992002-04-12 09:54:03 +000018268as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018269{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18270echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18271if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018273else
Martin v. Löwis11437992002-04-12 09:54:03 +000018274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018275/* confdefs.h. */
18276_ACEOF
18277cat confdefs.h >>conftest.$ac_ext
18278cat >>conftest.$ac_ext <<_ACEOF
18279/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018280/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18281 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18282#define $ac_func innocuous_$ac_func
18283
Martin v. Löwis1142de32002-03-29 16:28:31 +000018284/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018285 which can conflict with char $ac_func (); below.
18286 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018287 <limits.h> exists even on freestanding compilers. */
18288
18289#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018290# include <limits.h>
18291#else
18292# include <assert.h>
18293#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018294
18295#undef $ac_func
18296
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297/* Override any GCC internal prototype to avoid an error.
18298 Use char because int might match the return type of a GCC
18299 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018300#ifdef __cplusplus
18301extern "C"
18302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018303char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018304/* The GNU C library defines this for functions which it implements
18305 to always fail with ENOSYS. Some functions are actually named
18306 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018307#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018308choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018309#endif
18310
Skip Montanaro6dead952003-09-25 14:50:04 +000018311int
18312main ()
18313{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018314return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018315 ;
18316 return 0;
18317}
18318_ACEOF
18319rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018320if { (ac_try="$ac_link"
18321case "(($ac_try" in
18322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18323 *) ac_try_echo=$ac_try;;
18324esac
18325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18326 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018328 grep -v '^ *+' conftest.er1 >conftest.err
18329 rm -f conftest.er1
18330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018332 (exit $ac_status); } && {
18333 test -z "$ac_c_werror_flag" ||
18334 test ! -s conftest.err
18335 } && test -s conftest$ac_exeext &&
18336 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018337 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018338else
Martin v. Löwis11437992002-04-12 09:54:03 +000018339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018340sed 's/^/| /' conftest.$ac_ext >&5
18341
Martin v. Löwiseba40652007-08-30 20:10:57 +000018342 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018344
18345rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018346 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018348ac_res=`eval echo '${'$as_ac_var'}'`
18349 { echo "$as_me:$LINENO: result: $ac_res" >&5
18350echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018351if test `eval echo '${'$as_ac_var'}'` = yes; then
18352 cat >>confdefs.h <<_ACEOF
18353#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18354_ACEOF
18355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018356/* confdefs.h. */
18357_ACEOF
18358cat confdefs.h >>conftest.$ac_ext
18359cat >>conftest.$ac_ext <<_ACEOF
18360/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018361#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018362int
18363main ()
18364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018365getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018366 ;
18367 return 0;
18368}
18369_ACEOF
18370rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371if { (ac_try="$ac_compile"
18372case "(($ac_try" in
18373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18374 *) ac_try_echo=$ac_try;;
18375esac
18376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018379 grep -v '^ *+' conftest.er1 >conftest.err
18380 rm -f conftest.er1
18381 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018383 (exit $ac_status); } && {
18384 test -z "$ac_c_werror_flag" ||
18385 test ! -s conftest.err
18386 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018387
18388cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018389#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018390_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018391
Martin v. Löwis11437992002-04-12 09:54:03 +000018392
Guido van Rossumf78abae1997-01-21 22:02:36 +000018393else
Martin v. Löwis11437992002-04-12 09:54:03 +000018394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018395sed 's/^/| /' conftest.$ac_ext >&5
18396
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397
Guido van Rossum627b2d71993-12-24 10:39:16 +000018398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018399
18400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018401
Guido van Rossum627b2d71993-12-24 10:39:16 +000018402fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018403done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018404
Jack Jansen150753c2003-03-29 22:07:47 +000018405
18406for ac_func in setpgrp
18407do
18408as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018409{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18410echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18411if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018413else
Martin v. Löwis11437992002-04-12 09:54:03 +000018414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018415/* confdefs.h. */
18416_ACEOF
18417cat confdefs.h >>conftest.$ac_ext
18418cat >>conftest.$ac_ext <<_ACEOF
18419/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018420/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18421 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18422#define $ac_func innocuous_$ac_func
18423
Jack Jansen150753c2003-03-29 22:07:47 +000018424/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018425 which can conflict with char $ac_func (); below.
18426 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018427 <limits.h> exists even on freestanding compilers. */
18428
18429#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018430# include <limits.h>
18431#else
18432# include <assert.h>
18433#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018434
18435#undef $ac_func
18436
Martin v. Löwiseba40652007-08-30 20:10:57 +000018437/* Override any GCC internal prototype to avoid an error.
18438 Use char because int might match the return type of a GCC
18439 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018440#ifdef __cplusplus
18441extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018442#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018443char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018444/* The GNU C library defines this for functions which it implements
18445 to always fail with ENOSYS. Some functions are actually named
18446 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018447#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018448choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018449#endif
18450
Skip Montanaro6dead952003-09-25 14:50:04 +000018451int
18452main ()
18453{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018454return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 ;
18456 return 0;
18457}
18458_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018459rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460if { (ac_try="$ac_link"
18461case "(($ac_try" in
18462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18463 *) ac_try_echo=$ac_try;;
18464esac
18465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18466 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018468 grep -v '^ *+' conftest.er1 >conftest.err
18469 rm -f conftest.er1
18470 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018472 (exit $ac_status); } && {
18473 test -z "$ac_c_werror_flag" ||
18474 test ! -s conftest.err
18475 } && test -s conftest$ac_exeext &&
18476 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018477 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018478else
Jack Jansen150753c2003-03-29 22:07:47 +000018479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018480sed 's/^/| /' conftest.$ac_ext >&5
18481
Martin v. Löwiseba40652007-08-30 20:10:57 +000018482 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018484
18485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018486 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018488ac_res=`eval echo '${'$as_ac_var'}'`
18489 { echo "$as_me:$LINENO: result: $ac_res" >&5
18490echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018491if test `eval echo '${'$as_ac_var'}'` = yes; then
18492 cat >>confdefs.h <<_ACEOF
18493#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18494_ACEOF
18495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018496/* confdefs.h. */
18497_ACEOF
18498cat confdefs.h >>conftest.$ac_ext
18499cat >>conftest.$ac_ext <<_ACEOF
18500/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018501#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018502int
18503main ()
18504{
18505setpgrp(0,0);
18506 ;
18507 return 0;
18508}
18509_ACEOF
18510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511if { (ac_try="$ac_compile"
18512case "(($ac_try" in
18513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18514 *) ac_try_echo=$ac_try;;
18515esac
18516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18517 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018519 grep -v '^ *+' conftest.er1 >conftest.err
18520 rm -f conftest.er1
18521 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018523 (exit $ac_status); } && {
18524 test -z "$ac_c_werror_flag" ||
18525 test ! -s conftest.err
18526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018527
18528cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018529#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018530_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018531
Jack Jansen150753c2003-03-29 22:07:47 +000018532
18533else
18534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018535sed 's/^/| /' conftest.$ac_ext >&5
18536
Martin v. Löwiseba40652007-08-30 20:10:57 +000018537
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018539
18540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018541
18542fi
18543done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018544
Martin v. Löwis11437992002-04-12 09:54:03 +000018545
Thomas Wouters3a584202000-08-05 23:28:51 +000018546for ac_func in gettimeofday
18547do
Martin v. Löwis11437992002-04-12 09:54:03 +000018548as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018549{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18550echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18551if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018553else
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018555/* confdefs.h. */
18556_ACEOF
18557cat confdefs.h >>conftest.$ac_ext
18558cat >>conftest.$ac_ext <<_ACEOF
18559/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018560/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18561 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18562#define $ac_func innocuous_$ac_func
18563
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018564/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018565 which can conflict with char $ac_func (); below.
18566 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018567 <limits.h> exists even on freestanding compilers. */
18568
18569#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018570# include <limits.h>
18571#else
18572# include <assert.h>
18573#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018574
18575#undef $ac_func
18576
Martin v. Löwiseba40652007-08-30 20:10:57 +000018577/* Override any GCC internal prototype to avoid an error.
18578 Use char because int might match the return type of a GCC
18579 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018580#ifdef __cplusplus
18581extern "C"
18582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018583char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018584/* The GNU C library defines this for functions which it implements
18585 to always fail with ENOSYS. Some functions are actually named
18586 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018588choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018589#endif
18590
Skip Montanaro6dead952003-09-25 14:50:04 +000018591int
18592main ()
18593{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018594return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018595 ;
18596 return 0;
18597}
18598_ACEOF
18599rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600if { (ac_try="$ac_link"
18601case "(($ac_try" in
18602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18603 *) ac_try_echo=$ac_try;;
18604esac
18605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18606 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018608 grep -v '^ *+' conftest.er1 >conftest.err
18609 rm -f conftest.er1
18610 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018612 (exit $ac_status); } && {
18613 test -z "$ac_c_werror_flag" ||
18614 test ! -s conftest.err
18615 } && test -s conftest$ac_exeext &&
18616 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018617 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018618else
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018620sed 's/^/| /' conftest.$ac_ext >&5
18621
Martin v. Löwiseba40652007-08-30 20:10:57 +000018622 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018624
18625rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018626 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628ac_res=`eval echo '${'$as_ac_var'}'`
18629 { echo "$as_me:$LINENO: result: $ac_res" >&5
18630echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018631if test `eval echo '${'$as_ac_var'}'` = yes; then
18632 cat >>confdefs.h <<_ACEOF
18633#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18634_ACEOF
18635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018636/* confdefs.h. */
18637_ACEOF
18638cat confdefs.h >>conftest.$ac_ext
18639cat >>conftest.$ac_ext <<_ACEOF
18640/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018641#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018642int
18643main ()
18644{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018645gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 ;
18647 return 0;
18648}
18649_ACEOF
18650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651if { (ac_try="$ac_compile"
18652case "(($ac_try" in
18653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18654 *) ac_try_echo=$ac_try;;
18655esac
18656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018659 grep -v '^ *+' conftest.er1 >conftest.err
18660 rm -f conftest.er1
18661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018663 (exit $ac_status); } && {
18664 test -z "$ac_c_werror_flag" ||
18665 test ! -s conftest.err
18666 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018667 :
18668else
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018670sed 's/^/| /' conftest.$ac_ext >&5
18671
Martin v. Löwis11437992002-04-12 09:54:03 +000018672
18673cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018674#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018675_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018676
Martin v. Löwis11437992002-04-12 09:54:03 +000018677
Guido van Rossum627b2d71993-12-24 10:39:16 +000018678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018679
18680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018682fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018683done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018684
Michael W. Hudson54241132001-12-07 15:38:26 +000018685
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686{ echo "$as_me:$LINENO: checking for major" >&5
18687echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018689/* confdefs.h. */
18690_ACEOF
18691cat confdefs.h >>conftest.$ac_ext
18692cat >>conftest.$ac_ext <<_ACEOF
18693/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018694
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018695#if defined(MAJOR_IN_MKDEV)
18696#include <sys/mkdev.h>
18697#elif defined(MAJOR_IN_SYSMACROS)
18698#include <sys/sysmacros.h>
18699#else
18700#include <sys/types.h>
18701#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018702
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018703int
18704main ()
18705{
18706
18707 makedev(major(0),minor(0));
18708
18709 ;
18710 return 0;
18711}
18712_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018713rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714if { (ac_try="$ac_link"
18715case "(($ac_try" in
18716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18717 *) ac_try_echo=$ac_try;;
18718esac
18719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018722 grep -v '^ *+' conftest.er1 >conftest.err
18723 rm -f conftest.er1
18724 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018726 (exit $ac_status); } && {
18727 test -z "$ac_c_werror_flag" ||
18728 test ! -s conftest.err
18729 } && test -s conftest$ac_exeext &&
18730 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018731
18732
18733cat >>confdefs.h <<\_ACEOF
18734#define HAVE_DEVICE_MACROS 1
18735_ACEOF
18736
Martin v. Löwiseba40652007-08-30 20:10:57 +000018737 { echo "$as_me:$LINENO: result: yes" >&5
18738echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018739
18740else
18741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018742sed 's/^/| /' conftest.$ac_ext >&5
18743
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018744
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745 { echo "$as_me:$LINENO: result: no" >&5
18746echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018747
18748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018749
18750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018751 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018752
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018753# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018754# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018755{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18756echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018758/* confdefs.h. */
18759_ACEOF
18760cat confdefs.h >>conftest.$ac_ext
18761cat >>conftest.$ac_ext <<_ACEOF
18762/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018763
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018764#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018765#include <sys/socket.h>
18766#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018767#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018768
Martin v. Löwis11437992002-04-12 09:54:03 +000018769int
18770main ()
18771{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018772
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018773getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018774
Martin v. Löwis11437992002-04-12 09:54:03 +000018775 ;
18776 return 0;
18777}
18778_ACEOF
18779rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018780if { (ac_try="$ac_link"
18781case "(($ac_try" in
18782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18783 *) ac_try_echo=$ac_try;;
18784esac
18785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018788 grep -v '^ *+' conftest.er1 >conftest.err
18789 rm -f conftest.er1
18790 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018792 (exit $ac_status); } && {
18793 test -z "$ac_c_werror_flag" ||
18794 test ! -s conftest.err
18795 } && test -s conftest$ac_exeext &&
18796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018797
Martin v. Löwiseba40652007-08-30 20:10:57 +000018798{ echo "$as_me:$LINENO: result: yes" >&5
18799echo "${ECHO_T}yes" >&6; }
18800{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18801echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018802if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018803 { echo "$as_me:$LINENO: result: buggy" >&5
18804echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018805buggygetaddrinfo=yes
18806else
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018808/* confdefs.h. */
18809_ACEOF
18810cat confdefs.h >>conftest.$ac_ext
18811cat >>conftest.$ac_ext <<_ACEOF
18812/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018813
18814#include <sys/types.h>
18815#include <netdb.h>
18816#include <string.h>
18817#include <sys/socket.h>
18818#include <netinet/in.h>
18819
18820main()
18821{
18822 int passive, gaierr, inet4 = 0, inet6 = 0;
18823 struct addrinfo hints, *ai, *aitop;
18824 char straddr[INET6_ADDRSTRLEN], strport[16];
18825
18826 for (passive = 0; passive <= 1; passive++) {
18827 memset(&hints, 0, sizeof(hints));
18828 hints.ai_family = AF_UNSPEC;
18829 hints.ai_flags = passive ? AI_PASSIVE : 0;
18830 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018831 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018832 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18833 (void)gai_strerror(gaierr);
18834 goto bad;
18835 }
18836 for (ai = aitop; ai; ai = ai->ai_next) {
18837 if (ai->ai_addr == NULL ||
18838 ai->ai_addrlen == 0 ||
18839 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18840 straddr, sizeof(straddr), strport, sizeof(strport),
18841 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18842 goto bad;
18843 }
18844 switch (ai->ai_family) {
18845 case AF_INET:
18846 if (strcmp(strport, "54321") != 0) {
18847 goto bad;
18848 }
18849 if (passive) {
18850 if (strcmp(straddr, "0.0.0.0") != 0) {
18851 goto bad;
18852 }
18853 } else {
18854 if (strcmp(straddr, "127.0.0.1") != 0) {
18855 goto bad;
18856 }
18857 }
18858 inet4++;
18859 break;
18860 case AF_INET6:
18861 if (strcmp(strport, "54321") != 0) {
18862 goto bad;
18863 }
18864 if (passive) {
18865 if (strcmp(straddr, "::") != 0) {
18866 goto bad;
18867 }
18868 } else {
18869 if (strcmp(straddr, "::1") != 0) {
18870 goto bad;
18871 }
18872 }
18873 inet6++;
18874 break;
18875 case AF_UNSPEC:
18876 goto bad;
18877 break;
18878 default:
18879 /* another family support? */
18880 break;
18881 }
18882 }
18883 }
18884
18885 if (!(inet4 == 0 || inet4 == 2))
18886 goto bad;
18887 if (!(inet6 == 0 || inet6 == 2))
18888 goto bad;
18889
18890 if (aitop)
18891 freeaddrinfo(aitop);
18892 exit(0);
18893
18894 bad:
18895 if (aitop)
18896 freeaddrinfo(aitop);
18897 exit(1);
18898}
18899
Martin v. Löwis11437992002-04-12 09:54:03 +000018900_ACEOF
18901rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902if { (ac_try="$ac_link"
18903case "(($ac_try" in
18904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18905 *) ac_try_echo=$ac_try;;
18906esac
18907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018909 ac_status=$?
18910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018912 { (case "(($ac_try" in
18913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18914 *) ac_try_echo=$ac_try;;
18915esac
18916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018918 ac_status=$?
18919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18920 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921 { echo "$as_me:$LINENO: result: good" >&5
18922echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018923buggygetaddrinfo=no
18924else
Martin v. Löwis11437992002-04-12 09:54:03 +000018925 echo "$as_me: program exited with status $ac_status" >&5
18926echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018927sed 's/^/| /' conftest.$ac_ext >&5
18928
Martin v. Löwis11437992002-04-12 09:54:03 +000018929( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018930{ echo "$as_me:$LINENO: result: buggy" >&5
18931echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018932buggygetaddrinfo=yes
18933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018934rm -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 +000018935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936
18937
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018938else
Martin v. Löwis11437992002-04-12 09:54:03 +000018939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018940sed 's/^/| /' conftest.$ac_ext >&5
18941
Martin v. Löwis11437992002-04-12 09:54:03 +000018942
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943{ echo "$as_me:$LINENO: result: no" >&5
18944echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018945buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018946
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948
18949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018951
18952if test "$buggygetaddrinfo" = "yes"; then
18953 if test "$ipv6" = "yes"; then
18954 echo 'Fatal: You must get working getaddrinfo() function.'
18955 echo ' or you can specify "--disable-ipv6"'.
18956 exit 1
18957 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018958else
Martin v. Löwis11437992002-04-12 09:54:03 +000018959
18960cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018961#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018962_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018963
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018965
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018966for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018967do
Martin v. Löwis11437992002-04-12 09:54:03 +000018968as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018969{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18970echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18971if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018973else
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018975/* confdefs.h. */
18976_ACEOF
18977cat confdefs.h >>conftest.$ac_ext
18978cat >>conftest.$ac_ext <<_ACEOF
18979/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018980/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18981 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18982#define $ac_func innocuous_$ac_func
18983
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018984/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018985 which can conflict with char $ac_func (); below.
18986 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018987 <limits.h> exists even on freestanding compilers. */
18988
18989#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018990# include <limits.h>
18991#else
18992# include <assert.h>
18993#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018994
18995#undef $ac_func
18996
Martin v. Löwiseba40652007-08-30 20:10:57 +000018997/* Override any GCC internal prototype to avoid an error.
18998 Use char because int might match the return type of a GCC
18999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019000#ifdef __cplusplus
19001extern "C"
19002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019003char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019004/* The GNU C library defines this for functions which it implements
19005 to always fail with ENOSYS. Some functions are actually named
19006 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019007#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019008choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019009#endif
19010
Skip Montanaro6dead952003-09-25 14:50:04 +000019011int
19012main ()
19013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019014return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019015 ;
19016 return 0;
19017}
19018_ACEOF
19019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019020if { (ac_try="$ac_link"
19021case "(($ac_try" in
19022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19023 *) ac_try_echo=$ac_try;;
19024esac
19025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019028 grep -v '^ *+' conftest.er1 >conftest.err
19029 rm -f conftest.er1
19030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032 (exit $ac_status); } && {
19033 test -z "$ac_c_werror_flag" ||
19034 test ! -s conftest.err
19035 } && test -s conftest$ac_exeext &&
19036 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019037 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019038else
Martin v. Löwis11437992002-04-12 09:54:03 +000019039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019040sed 's/^/| /' conftest.$ac_ext >&5
19041
Martin v. Löwiseba40652007-08-30 20:10:57 +000019042 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019044
19045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019046 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048ac_res=`eval echo '${'$as_ac_var'}'`
19049 { echo "$as_me:$LINENO: result: $ac_res" >&5
19050echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019051if test `eval echo '${'$as_ac_var'}'` = yes; then
19052 cat >>confdefs.h <<_ACEOF
19053#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19054_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019055
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019056fi
19057done
19058
Michael W. Hudson54241132001-12-07 15:38:26 +000019059
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019060# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19062echo $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 +000019063if test "${ac_cv_header_time+set}" = set; then
19064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019065else
Martin v. Löwis11437992002-04-12 09:54:03 +000019066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019067/* confdefs.h. */
19068_ACEOF
19069cat confdefs.h >>conftest.$ac_ext
19070cat >>conftest.$ac_ext <<_ACEOF
19071/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019072#include <sys/types.h>
19073#include <sys/time.h>
19074#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019075
Martin v. Löwis11437992002-04-12 09:54:03 +000019076int
19077main ()
19078{
19079if ((struct tm *) 0)
19080return 0;
19081 ;
19082 return 0;
19083}
19084_ACEOF
19085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019086if { (ac_try="$ac_compile"
19087case "(($ac_try" in
19088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19089 *) ac_try_echo=$ac_try;;
19090esac
19091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019094 grep -v '^ *+' conftest.er1 >conftest.err
19095 rm -f conftest.er1
19096 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019098 (exit $ac_status); } && {
19099 test -z "$ac_c_werror_flag" ||
19100 test ! -s conftest.err
19101 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019102 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019103else
Martin v. Löwis11437992002-04-12 09:54:03 +000019104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019105sed 's/^/| /' conftest.$ac_ext >&5
19106
Martin v. Löwiseba40652007-08-30 20:10:57 +000019107 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019109
19110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19113echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019114if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019115
19116cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019117#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019118_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019119
19120fi
19121
Martin v. Löwiseba40652007-08-30 20:10:57 +000019122{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19123echo $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 +000019124if test "${ac_cv_struct_tm+set}" = set; then
19125 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019126else
Martin v. Löwis11437992002-04-12 09:54:03 +000019127 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019128/* confdefs.h. */
19129_ACEOF
19130cat confdefs.h >>conftest.$ac_ext
19131cat >>conftest.$ac_ext <<_ACEOF
19132/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019133#include <sys/types.h>
19134#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019135
Martin v. Löwis11437992002-04-12 09:54:03 +000019136int
19137main ()
19138{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019139struct tm tm;
19140 int *p = &tm.tm_sec;
19141 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019142 ;
19143 return 0;
19144}
19145_ACEOF
19146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019147if { (ac_try="$ac_compile"
19148case "(($ac_try" in
19149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19150 *) ac_try_echo=$ac_try;;
19151esac
19152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019155 grep -v '^ *+' conftest.er1 >conftest.err
19156 rm -f conftest.er1
19157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019159 (exit $ac_status); } && {
19160 test -z "$ac_c_werror_flag" ||
19161 test ! -s conftest.err
19162 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019163 ac_cv_struct_tm=time.h
19164else
Martin v. Löwis11437992002-04-12 09:54:03 +000019165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019166sed 's/^/| /' conftest.$ac_ext >&5
19167
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019170
19171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19174echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019175if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019176
19177cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019178#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019179_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019180
19181fi
19182
Martin v. Löwiseba40652007-08-30 20:10:57 +000019183{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19184echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019185if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19186 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019187else
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019189/* confdefs.h. */
19190_ACEOF
19191cat confdefs.h >>conftest.$ac_ext
19192cat >>conftest.$ac_ext <<_ACEOF
19193/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019194#include <sys/types.h>
19195#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019196
19197
Martin v. Löwis11437992002-04-12 09:54:03 +000019198int
19199main ()
19200{
19201static struct tm ac_aggr;
19202if (ac_aggr.tm_zone)
19203return 0;
19204 ;
19205 return 0;
19206}
19207_ACEOF
19208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019209if { (ac_try="$ac_compile"
19210case "(($ac_try" in
19211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19212 *) ac_try_echo=$ac_try;;
19213esac
19214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019217 grep -v '^ *+' conftest.er1 >conftest.err
19218 rm -f conftest.er1
19219 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019221 (exit $ac_status); } && {
19222 test -z "$ac_c_werror_flag" ||
19223 test ! -s conftest.err
19224 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019225 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019226else
Martin v. Löwis11437992002-04-12 09:54:03 +000019227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019228sed 's/^/| /' conftest.$ac_ext >&5
19229
Martin v. Löwiseba40652007-08-30 20:10:57 +000019230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019231/* confdefs.h. */
19232_ACEOF
19233cat confdefs.h >>conftest.$ac_ext
19234cat >>conftest.$ac_ext <<_ACEOF
19235/* end confdefs.h. */
19236#include <sys/types.h>
19237#include <$ac_cv_struct_tm>
19238
19239
19240int
19241main ()
19242{
19243static struct tm ac_aggr;
19244if (sizeof ac_aggr.tm_zone)
19245return 0;
19246 ;
19247 return 0;
19248}
19249_ACEOF
19250rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019251if { (ac_try="$ac_compile"
19252case "(($ac_try" in
19253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19254 *) ac_try_echo=$ac_try;;
19255esac
19256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19257 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019259 grep -v '^ *+' conftest.er1 >conftest.err
19260 rm -f conftest.er1
19261 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019263 (exit $ac_status); } && {
19264 test -z "$ac_c_werror_flag" ||
19265 test ! -s conftest.err
19266 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019267 ac_cv_member_struct_tm_tm_zone=yes
19268else
19269 echo "$as_me: failed program was:" >&5
19270sed 's/^/| /' conftest.$ac_ext >&5
19271
Martin v. Löwiseba40652007-08-30 20:10:57 +000019272 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019274
19275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019277
19278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019280{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19281echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019282if test $ac_cv_member_struct_tm_tm_zone = yes; then
19283
19284cat >>confdefs.h <<_ACEOF
19285#define HAVE_STRUCT_TM_TM_ZONE 1
19286_ACEOF
19287
19288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019289fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019290
Martin v. Löwis11437992002-04-12 09:54:03 +000019291if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19292
19293cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019294#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019295_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019296
19297else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019298 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19299echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19300if test "${ac_cv_have_decl_tzname+set}" = set; then
19301 echo $ECHO_N "(cached) $ECHO_C" >&6
19302else
19303 cat >conftest.$ac_ext <<_ACEOF
19304/* confdefs.h. */
19305_ACEOF
19306cat confdefs.h >>conftest.$ac_ext
19307cat >>conftest.$ac_ext <<_ACEOF
19308/* end confdefs.h. */
19309#include <time.h>
19310
19311int
19312main ()
19313{
19314#ifndef tzname
19315 (void) tzname;
19316#endif
19317
19318 ;
19319 return 0;
19320}
19321_ACEOF
19322rm -f conftest.$ac_objext
19323if { (ac_try="$ac_compile"
19324case "(($ac_try" in
19325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19326 *) ac_try_echo=$ac_try;;
19327esac
19328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19329 (eval "$ac_compile") 2>conftest.er1
19330 ac_status=$?
19331 grep -v '^ *+' conftest.er1 >conftest.err
19332 rm -f conftest.er1
19333 cat conftest.err >&5
19334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19335 (exit $ac_status); } && {
19336 test -z "$ac_c_werror_flag" ||
19337 test ! -s conftest.err
19338 } && test -s conftest.$ac_objext; then
19339 ac_cv_have_decl_tzname=yes
19340else
19341 echo "$as_me: failed program was:" >&5
19342sed 's/^/| /' conftest.$ac_ext >&5
19343
19344 ac_cv_have_decl_tzname=no
19345fi
19346
19347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19348fi
19349{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19350echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19351if test $ac_cv_have_decl_tzname = yes; then
19352
19353cat >>confdefs.h <<_ACEOF
19354#define HAVE_DECL_TZNAME 1
19355_ACEOF
19356
19357
19358else
19359 cat >>confdefs.h <<_ACEOF
19360#define HAVE_DECL_TZNAME 0
19361_ACEOF
19362
19363
19364fi
19365
19366
19367 { echo "$as_me:$LINENO: checking for tzname" >&5
19368echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019369if test "${ac_cv_var_tzname+set}" = set; then
19370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019371else
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019373/* confdefs.h. */
19374_ACEOF
19375cat confdefs.h >>conftest.$ac_ext
19376cat >>conftest.$ac_ext <<_ACEOF
19377/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019378#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379#if !HAVE_DECL_TZNAME
19380extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019382
Martin v. Löwis11437992002-04-12 09:54:03 +000019383int
19384main ()
19385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019386return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 ;
19388 return 0;
19389}
19390_ACEOF
19391rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019392if { (ac_try="$ac_link"
19393case "(($ac_try" in
19394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19395 *) ac_try_echo=$ac_try;;
19396esac
19397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19398 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019400 grep -v '^ *+' conftest.er1 >conftest.err
19401 rm -f conftest.er1
19402 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404 (exit $ac_status); } && {
19405 test -z "$ac_c_werror_flag" ||
19406 test ! -s conftest.err
19407 } && test -s conftest$ac_exeext &&
19408 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019409 ac_cv_var_tzname=yes
19410else
Martin v. Löwis11437992002-04-12 09:54:03 +000019411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019412sed 's/^/| /' conftest.$ac_ext >&5
19413
Martin v. Löwiseba40652007-08-30 20:10:57 +000019414 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019416
19417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019418 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019420{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19421echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019422 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019423
19424cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019425#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019426_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019428 fi
19429fi
19430
Martin v. Löwiseba40652007-08-30 20:10:57 +000019431{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19432echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019433if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19434 echo $ECHO_N "(cached) $ECHO_C" >&6
19435else
19436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019437/* confdefs.h. */
19438_ACEOF
19439cat confdefs.h >>conftest.$ac_ext
19440cat >>conftest.$ac_ext <<_ACEOF
19441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019442$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019443int
19444main ()
19445{
19446static struct stat ac_aggr;
19447if (ac_aggr.st_rdev)
19448return 0;
19449 ;
19450 return 0;
19451}
19452_ACEOF
19453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019454if { (ac_try="$ac_compile"
19455case "(($ac_try" in
19456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19457 *) ac_try_echo=$ac_try;;
19458esac
19459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019462 grep -v '^ *+' conftest.er1 >conftest.err
19463 rm -f conftest.er1
19464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019466 (exit $ac_status); } && {
19467 test -z "$ac_c_werror_flag" ||
19468 test ! -s conftest.err
19469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019470 ac_cv_member_struct_stat_st_rdev=yes
19471else
19472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019473sed 's/^/| /' conftest.$ac_ext >&5
19474
Martin v. Löwiseba40652007-08-30 20:10:57 +000019475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019476/* confdefs.h. */
19477_ACEOF
19478cat confdefs.h >>conftest.$ac_ext
19479cat >>conftest.$ac_ext <<_ACEOF
19480/* end confdefs.h. */
19481$ac_includes_default
19482int
19483main ()
19484{
19485static struct stat ac_aggr;
19486if (sizeof ac_aggr.st_rdev)
19487return 0;
19488 ;
19489 return 0;
19490}
19491_ACEOF
19492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493if { (ac_try="$ac_compile"
19494case "(($ac_try" in
19495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19496 *) ac_try_echo=$ac_try;;
19497esac
19498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19499 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019500 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019501 grep -v '^ *+' conftest.er1 >conftest.err
19502 rm -f conftest.er1
19503 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019505 (exit $ac_status); } && {
19506 test -z "$ac_c_werror_flag" ||
19507 test ! -s conftest.err
19508 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019509 ac_cv_member_struct_stat_st_rdev=yes
19510else
19511 echo "$as_me: failed program was:" >&5
19512sed 's/^/| /' conftest.$ac_ext >&5
19513
Martin v. Löwiseba40652007-08-30 20:10:57 +000019514 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516
19517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019519
19520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19523echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019524if test $ac_cv_member_struct_stat_st_rdev = yes; then
19525
19526cat >>confdefs.h <<_ACEOF
19527#define HAVE_STRUCT_STAT_ST_RDEV 1
19528_ACEOF
19529
19530
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019531fi
19532
Martin v. Löwiseba40652007-08-30 20:10:57 +000019533{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19534echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019535if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19536 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019537else
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019539/* confdefs.h. */
19540_ACEOF
19541cat confdefs.h >>conftest.$ac_ext
19542cat >>conftest.$ac_ext <<_ACEOF
19543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019544$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019545int
19546main ()
19547{
19548static struct stat ac_aggr;
19549if (ac_aggr.st_blksize)
19550return 0;
19551 ;
19552 return 0;
19553}
19554_ACEOF
19555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019556if { (ac_try="$ac_compile"
19557case "(($ac_try" in
19558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19559 *) ac_try_echo=$ac_try;;
19560esac
19561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019564 grep -v '^ *+' conftest.er1 >conftest.err
19565 rm -f conftest.er1
19566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568 (exit $ac_status); } && {
19569 test -z "$ac_c_werror_flag" ||
19570 test ! -s conftest.err
19571 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019572 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019573else
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019575sed 's/^/| /' conftest.$ac_ext >&5
19576
Martin v. Löwiseba40652007-08-30 20:10:57 +000019577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019578/* confdefs.h. */
19579_ACEOF
19580cat confdefs.h >>conftest.$ac_ext
19581cat >>conftest.$ac_ext <<_ACEOF
19582/* end confdefs.h. */
19583$ac_includes_default
19584int
19585main ()
19586{
19587static struct stat ac_aggr;
19588if (sizeof ac_aggr.st_blksize)
19589return 0;
19590 ;
19591 return 0;
19592}
19593_ACEOF
19594rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019595if { (ac_try="$ac_compile"
19596case "(($ac_try" in
19597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19598 *) ac_try_echo=$ac_try;;
19599esac
19600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19601 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019603 grep -v '^ *+' conftest.er1 >conftest.err
19604 rm -f conftest.er1
19605 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019607 (exit $ac_status); } && {
19608 test -z "$ac_c_werror_flag" ||
19609 test ! -s conftest.err
19610 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019611 ac_cv_member_struct_stat_st_blksize=yes
19612else
19613 echo "$as_me: failed program was:" >&5
19614sed 's/^/| /' conftest.$ac_ext >&5
19615
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019618
19619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019621
19622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19625echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019626if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019627
Martin v. Löwis11437992002-04-12 09:54:03 +000019628cat >>confdefs.h <<_ACEOF
19629#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19630_ACEOF
19631
19632
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019633fi
19634
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19636echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019637if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19638 echo $ECHO_N "(cached) $ECHO_C" >&6
19639else
19640 cat >conftest.$ac_ext <<_ACEOF
19641/* confdefs.h. */
19642_ACEOF
19643cat confdefs.h >>conftest.$ac_ext
19644cat >>conftest.$ac_ext <<_ACEOF
19645/* end confdefs.h. */
19646$ac_includes_default
19647int
19648main ()
19649{
19650static struct stat ac_aggr;
19651if (ac_aggr.st_flags)
19652return 0;
19653 ;
19654 return 0;
19655}
19656_ACEOF
19657rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019658if { (ac_try="$ac_compile"
19659case "(($ac_try" in
19660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19661 *) ac_try_echo=$ac_try;;
19662esac
19663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19664 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019665 ac_status=$?
19666 grep -v '^ *+' conftest.er1 >conftest.err
19667 rm -f conftest.er1
19668 cat conftest.err >&5
19669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670 (exit $ac_status); } && {
19671 test -z "$ac_c_werror_flag" ||
19672 test ! -s conftest.err
19673 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019674 ac_cv_member_struct_stat_st_flags=yes
19675else
19676 echo "$as_me: failed program was:" >&5
19677sed 's/^/| /' conftest.$ac_ext >&5
19678
Martin v. Löwiseba40652007-08-30 20:10:57 +000019679 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019680/* confdefs.h. */
19681_ACEOF
19682cat confdefs.h >>conftest.$ac_ext
19683cat >>conftest.$ac_ext <<_ACEOF
19684/* end confdefs.h. */
19685$ac_includes_default
19686int
19687main ()
19688{
19689static struct stat ac_aggr;
19690if (sizeof ac_aggr.st_flags)
19691return 0;
19692 ;
19693 return 0;
19694}
19695_ACEOF
19696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697if { (ac_try="$ac_compile"
19698case "(($ac_try" in
19699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19700 *) ac_try_echo=$ac_try;;
19701esac
19702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19703 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019704 ac_status=$?
19705 grep -v '^ *+' conftest.er1 >conftest.err
19706 rm -f conftest.er1
19707 cat conftest.err >&5
19708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709 (exit $ac_status); } && {
19710 test -z "$ac_c_werror_flag" ||
19711 test ! -s conftest.err
19712 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019713 ac_cv_member_struct_stat_st_flags=yes
19714else
19715 echo "$as_me: failed program was:" >&5
19716sed 's/^/| /' conftest.$ac_ext >&5
19717
Martin v. Löwiseba40652007-08-30 20:10:57 +000019718 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720
19721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019723
19724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19727echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019728if test $ac_cv_member_struct_stat_st_flags = yes; then
19729
19730cat >>confdefs.h <<_ACEOF
19731#define HAVE_STRUCT_STAT_ST_FLAGS 1
19732_ACEOF
19733
19734
19735fi
19736
Martin v. Löwiseba40652007-08-30 20:10:57 +000019737{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19738echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019739if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19740 echo $ECHO_N "(cached) $ECHO_C" >&6
19741else
19742 cat >conftest.$ac_ext <<_ACEOF
19743/* confdefs.h. */
19744_ACEOF
19745cat confdefs.h >>conftest.$ac_ext
19746cat >>conftest.$ac_ext <<_ACEOF
19747/* end confdefs.h. */
19748$ac_includes_default
19749int
19750main ()
19751{
19752static struct stat ac_aggr;
19753if (ac_aggr.st_gen)
19754return 0;
19755 ;
19756 return 0;
19757}
19758_ACEOF
19759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760if { (ac_try="$ac_compile"
19761case "(($ac_try" in
19762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19763 *) ac_try_echo=$ac_try;;
19764esac
19765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019767 ac_status=$?
19768 grep -v '^ *+' conftest.er1 >conftest.err
19769 rm -f conftest.er1
19770 cat conftest.err >&5
19771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019772 (exit $ac_status); } && {
19773 test -z "$ac_c_werror_flag" ||
19774 test ! -s conftest.err
19775 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019776 ac_cv_member_struct_stat_st_gen=yes
19777else
19778 echo "$as_me: failed program was:" >&5
19779sed 's/^/| /' conftest.$ac_ext >&5
19780
Martin v. Löwiseba40652007-08-30 20:10:57 +000019781 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019782/* confdefs.h. */
19783_ACEOF
19784cat confdefs.h >>conftest.$ac_ext
19785cat >>conftest.$ac_ext <<_ACEOF
19786/* end confdefs.h. */
19787$ac_includes_default
19788int
19789main ()
19790{
19791static struct stat ac_aggr;
19792if (sizeof ac_aggr.st_gen)
19793return 0;
19794 ;
19795 return 0;
19796}
19797_ACEOF
19798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019799if { (ac_try="$ac_compile"
19800case "(($ac_try" in
19801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19802 *) ac_try_echo=$ac_try;;
19803esac
19804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019806 ac_status=$?
19807 grep -v '^ *+' conftest.er1 >conftest.err
19808 rm -f conftest.er1
19809 cat conftest.err >&5
19810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019811 (exit $ac_status); } && {
19812 test -z "$ac_c_werror_flag" ||
19813 test ! -s conftest.err
19814 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019815 ac_cv_member_struct_stat_st_gen=yes
19816else
19817 echo "$as_me: failed program was:" >&5
19818sed 's/^/| /' conftest.$ac_ext >&5
19819
Martin v. Löwiseba40652007-08-30 20:10:57 +000019820 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822
19823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825
19826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19829echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019830if test $ac_cv_member_struct_stat_st_gen = yes; then
19831
19832cat >>confdefs.h <<_ACEOF
19833#define HAVE_STRUCT_STAT_ST_GEN 1
19834_ACEOF
19835
19836
19837fi
19838
Martin v. Löwiseba40652007-08-30 20:10:57 +000019839{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19840echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019841if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19842 echo $ECHO_N "(cached) $ECHO_C" >&6
19843else
19844 cat >conftest.$ac_ext <<_ACEOF
19845/* confdefs.h. */
19846_ACEOF
19847cat confdefs.h >>conftest.$ac_ext
19848cat >>conftest.$ac_ext <<_ACEOF
19849/* end confdefs.h. */
19850$ac_includes_default
19851int
19852main ()
19853{
19854static struct stat ac_aggr;
19855if (ac_aggr.st_birthtime)
19856return 0;
19857 ;
19858 return 0;
19859}
19860_ACEOF
19861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862if { (ac_try="$ac_compile"
19863case "(($ac_try" in
19864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19865 *) ac_try_echo=$ac_try;;
19866esac
19867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019869 ac_status=$?
19870 grep -v '^ *+' conftest.er1 >conftest.err
19871 rm -f conftest.er1
19872 cat conftest.err >&5
19873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019874 (exit $ac_status); } && {
19875 test -z "$ac_c_werror_flag" ||
19876 test ! -s conftest.err
19877 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019878 ac_cv_member_struct_stat_st_birthtime=yes
19879else
19880 echo "$as_me: failed program was:" >&5
19881sed 's/^/| /' conftest.$ac_ext >&5
19882
Martin v. Löwiseba40652007-08-30 20:10:57 +000019883 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019884/* confdefs.h. */
19885_ACEOF
19886cat confdefs.h >>conftest.$ac_ext
19887cat >>conftest.$ac_ext <<_ACEOF
19888/* end confdefs.h. */
19889$ac_includes_default
19890int
19891main ()
19892{
19893static struct stat ac_aggr;
19894if (sizeof ac_aggr.st_birthtime)
19895return 0;
19896 ;
19897 return 0;
19898}
19899_ACEOF
19900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019901if { (ac_try="$ac_compile"
19902case "(($ac_try" in
19903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19904 *) ac_try_echo=$ac_try;;
19905esac
19906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019908 ac_status=$?
19909 grep -v '^ *+' conftest.er1 >conftest.err
19910 rm -f conftest.er1
19911 cat conftest.err >&5
19912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019913 (exit $ac_status); } && {
19914 test -z "$ac_c_werror_flag" ||
19915 test ! -s conftest.err
19916 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019917 ac_cv_member_struct_stat_st_birthtime=yes
19918else
19919 echo "$as_me: failed program was:" >&5
19920sed 's/^/| /' conftest.$ac_ext >&5
19921
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019924
19925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927
19928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019930{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19931echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019932if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19933
19934cat >>confdefs.h <<_ACEOF
19935#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19936_ACEOF
19937
19938
19939fi
19940
Martin v. Löwiseba40652007-08-30 20:10:57 +000019941{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19942echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019943if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019945else
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019947/* confdefs.h. */
19948_ACEOF
19949cat confdefs.h >>conftest.$ac_ext
19950cat >>conftest.$ac_ext <<_ACEOF
19951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019952$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019953int
19954main ()
19955{
19956static struct stat ac_aggr;
19957if (ac_aggr.st_blocks)
19958return 0;
19959 ;
19960 return 0;
19961}
19962_ACEOF
19963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019964if { (ac_try="$ac_compile"
19965case "(($ac_try" in
19966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19967 *) ac_try_echo=$ac_try;;
19968esac
19969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019972 grep -v '^ *+' conftest.er1 >conftest.err
19973 rm -f conftest.er1
19974 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019976 (exit $ac_status); } && {
19977 test -z "$ac_c_werror_flag" ||
19978 test ! -s conftest.err
19979 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019980 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019981else
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019983sed 's/^/| /' conftest.$ac_ext >&5
19984
Martin v. Löwiseba40652007-08-30 20:10:57 +000019985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019986/* confdefs.h. */
19987_ACEOF
19988cat confdefs.h >>conftest.$ac_ext
19989cat >>conftest.$ac_ext <<_ACEOF
19990/* end confdefs.h. */
19991$ac_includes_default
19992int
19993main ()
19994{
19995static struct stat ac_aggr;
19996if (sizeof ac_aggr.st_blocks)
19997return 0;
19998 ;
19999 return 0;
20000}
20001_ACEOF
20002rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020003if { (ac_try="$ac_compile"
20004case "(($ac_try" in
20005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20006 *) ac_try_echo=$ac_try;;
20007esac
20008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20009 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020011 grep -v '^ *+' conftest.er1 >conftest.err
20012 rm -f conftest.er1
20013 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015 (exit $ac_status); } && {
20016 test -z "$ac_c_werror_flag" ||
20017 test ! -s conftest.err
20018 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020019 ac_cv_member_struct_stat_st_blocks=yes
20020else
20021 echo "$as_me: failed program was:" >&5
20022sed 's/^/| /' conftest.$ac_ext >&5
20023
Martin v. Löwiseba40652007-08-30 20:10:57 +000020024 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026
20027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029
20030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20033echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020034if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020035
Martin v. Löwis11437992002-04-12 09:54:03 +000020036cat >>confdefs.h <<_ACEOF
20037#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20038_ACEOF
20039
20040
20041cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020042#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020043_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020044
20045else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020047 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020048 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20049 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020050esac
20051
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020052fi
20053
Michael W. Hudson54241132001-12-07 15:38:26 +000020054
Martin v. Löwis11437992002-04-12 09:54:03 +000020055
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20057echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020058if test "${ac_cv_header_time_altzone+set}" = set; then
20059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020060else
Martin v. Löwis11437992002-04-12 09:54:03 +000020061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020062/* confdefs.h. */
20063_ACEOF
20064cat confdefs.h >>conftest.$ac_ext
20065cat >>conftest.$ac_ext <<_ACEOF
20066/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020067#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020068int
20069main ()
20070{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020071return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020072 ;
20073 return 0;
20074}
20075_ACEOF
20076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077if { (ac_try="$ac_compile"
20078case "(($ac_try" in
20079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20080 *) ac_try_echo=$ac_try;;
20081esac
20082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020085 grep -v '^ *+' conftest.er1 >conftest.err
20086 rm -f conftest.er1
20087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020089 (exit $ac_status); } && {
20090 test -z "$ac_c_werror_flag" ||
20091 test ! -s conftest.err
20092 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020093 ac_cv_header_time_altzone=yes
20094else
Martin v. Löwis11437992002-04-12 09:54:03 +000020095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020096sed 's/^/| /' conftest.$ac_ext >&5
20097
Martin v. Löwiseba40652007-08-30 20:10:57 +000020098 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020099fi
20100
Martin v. Löwiseba40652007-08-30 20:10:57 +000020101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20102fi
20103
20104{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20105echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020106if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020107
20108cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020109#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020110_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020111
20112fi
20113
Guido van Rossumda88dad1995-01-26 00:46:29 +000020114was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020115{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20116echo $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 +000020117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020118/* confdefs.h. */
20119_ACEOF
20120cat confdefs.h >>conftest.$ac_ext
20121cat >>conftest.$ac_ext <<_ACEOF
20122/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020123
20124#include <sys/types.h>
20125#include <sys/select.h>
20126#include <sys/time.h>
20127
Martin v. Löwis11437992002-04-12 09:54:03 +000020128int
20129main ()
20130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020131;
Martin v. Löwis11437992002-04-12 09:54:03 +000020132 ;
20133 return 0;
20134}
20135_ACEOF
20136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020137if { (ac_try="$ac_compile"
20138case "(($ac_try" in
20139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20140 *) ac_try_echo=$ac_try;;
20141esac
20142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020145 grep -v '^ *+' conftest.er1 >conftest.err
20146 rm -f conftest.er1
20147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149 (exit $ac_status); } && {
20150 test -z "$ac_c_werror_flag" ||
20151 test ! -s conftest.err
20152 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020153
20154
20155cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020156#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020157_ACEOF
20158
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020159 was_it_defined=yes
20160
Guido van Rossumf78abae1997-01-21 22:02:36 +000020161else
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020163sed 's/^/| /' conftest.$ac_ext >&5
20164
Brett Cannon19fab762007-06-02 03:02:29 +000020165
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166fi
20167
20168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20169{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20170echo "${ECHO_T}$was_it_defined" >&6; }
20171
20172{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20173echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020174if test "${ac_cv_struct_addrinfo+set}" = set; then
20175 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020176else
Martin v. Löwis11437992002-04-12 09:54:03 +000020177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020178/* confdefs.h. */
20179_ACEOF
20180cat confdefs.h >>conftest.$ac_ext
20181cat >>conftest.$ac_ext <<_ACEOF
20182/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020183
20184# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020185int
20186main ()
20187{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020188struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020189 ;
20190 return 0;
20191}
20192_ACEOF
20193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020194if { (ac_try="$ac_compile"
20195case "(($ac_try" in
20196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20197 *) ac_try_echo=$ac_try;;
20198esac
20199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020202 grep -v '^ *+' conftest.er1 >conftest.err
20203 rm -f conftest.er1
20204 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206 (exit $ac_status); } && {
20207 test -z "$ac_c_werror_flag" ||
20208 test ! -s conftest.err
20209 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020210 ac_cv_struct_addrinfo=yes
20211else
Martin v. Löwis11437992002-04-12 09:54:03 +000020212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020213sed 's/^/| /' conftest.$ac_ext >&5
20214
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020216fi
20217
Martin v. Löwiseba40652007-08-30 20:10:57 +000020218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20219fi
20220
20221{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20222echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020223if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020224
20225cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020226#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020227_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020228
20229fi
20230
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20232echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020233if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020235else
Martin v. Löwis11437992002-04-12 09:54:03 +000020236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020237/* confdefs.h. */
20238_ACEOF
20239cat confdefs.h >>conftest.$ac_ext
20240cat >>conftest.$ac_ext <<_ACEOF
20241/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020242
20243# include <sys/types.h>
20244# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020245int
20246main ()
20247{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020248struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020249 ;
20250 return 0;
20251}
20252_ACEOF
20253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254if { (ac_try="$ac_compile"
20255case "(($ac_try" in
20256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20257 *) ac_try_echo=$ac_try;;
20258esac
20259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020262 grep -v '^ *+' conftest.er1 >conftest.err
20263 rm -f conftest.er1
20264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020266 (exit $ac_status); } && {
20267 test -z "$ac_c_werror_flag" ||
20268 test ! -s conftest.err
20269 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020270 ac_cv_struct_sockaddr_storage=yes
20271else
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020273sed 's/^/| /' conftest.$ac_ext >&5
20274
Martin v. Löwiseba40652007-08-30 20:10:57 +000020275 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020276fi
20277
Martin v. Löwiseba40652007-08-30 20:10:57 +000020278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20279fi
20280
20281{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20282echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020283if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020284
20285cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020286#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020287_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020288
20289fi
20290
Guido van Rossum627b2d71993-12-24 10:39:16 +000020291# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020292
Michael W. Hudson54241132001-12-07 15:38:26 +000020293
Martin v. Löwiseba40652007-08-30 20:10:57 +000020294{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20295echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020296if test "${ac_cv_c_char_unsigned+set}" = set; then
20297 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020298else
Martin v. Löwis11437992002-04-12 09:54:03 +000020299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020300/* confdefs.h. */
20301_ACEOF
20302cat confdefs.h >>conftest.$ac_ext
20303cat >>conftest.$ac_ext <<_ACEOF
20304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020306int
20307main ()
20308{
20309static int test_array [1 - 2 * !(((char) -1) < 0)];
20310test_array [0] = 0
20311
20312 ;
20313 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020314}
Martin v. Löwis11437992002-04-12 09:54:03 +000020315_ACEOF
20316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317if { (ac_try="$ac_compile"
20318case "(($ac_try" in
20319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20320 *) ac_try_echo=$ac_try;;
20321esac
20322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020325 grep -v '^ *+' conftest.er1 >conftest.err
20326 rm -f conftest.er1
20327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020329 (exit $ac_status); } && {
20330 test -z "$ac_c_werror_flag" ||
20331 test ! -s conftest.err
20332 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020333 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020334else
20335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020336sed 's/^/| /' conftest.$ac_ext >&5
20337
Martin v. Löwiseba40652007-08-30 20:10:57 +000020338 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020340
20341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020343{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20344echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020345if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020346 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020347#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020348_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020349
20350fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020351
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20353echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020354if test "${ac_cv_c_const+set}" = set; then
20355 echo $ECHO_N "(cached) $ECHO_C" >&6
20356else
20357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020358/* confdefs.h. */
20359_ACEOF
20360cat confdefs.h >>conftest.$ac_ext
20361cat >>conftest.$ac_ext <<_ACEOF
20362/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020363
Martin v. Löwis11437992002-04-12 09:54:03 +000020364int
20365main ()
20366{
20367/* FIXME: Include the comments suggested by Paul. */
20368#ifndef __cplusplus
20369 /* Ultrix mips cc rejects this. */
20370 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020371 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020373 char const *const *pcpcc;
20374 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020375 /* NEC SVR4.0.2 mips cc rejects this. */
20376 struct point {int x, y;};
20377 static struct point const zero = {0,0};
20378 /* AIX XL C 1.02.0.0 rejects this.
20379 It does not let you subtract one const X* pointer from another in
20380 an arm of an if-expression whose if-part is not a constant
20381 expression */
20382 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020383 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020384 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020385 ++pcpcc;
20386 ppc = (char**) pcpcc;
20387 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020388 { /* SCO 3.2v4 cc rejects this. */
20389 char *t;
20390 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020391
Martin v. Löwis11437992002-04-12 09:54:03 +000020392 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020393 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020394 }
20395 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20396 int x[] = {25, 17};
20397 const int *foo = &x[0];
20398 ++foo;
20399 }
20400 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20401 typedef const int *iptr;
20402 iptr p = 0;
20403 ++p;
20404 }
20405 { /* AIX XL C 1.02.0.0 rejects this saying
20406 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20407 struct s { int j; const int *ap[3]; };
20408 struct s *b; b->j = 5;
20409 }
20410 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20411 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020414 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020415#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020416
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 ;
20418 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020419}
Martin v. Löwis11437992002-04-12 09:54:03 +000020420_ACEOF
20421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422if { (ac_try="$ac_compile"
20423case "(($ac_try" in
20424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20425 *) ac_try_echo=$ac_try;;
20426esac
20427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020430 grep -v '^ *+' conftest.er1 >conftest.err
20431 rm -f conftest.er1
20432 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434 (exit $ac_status); } && {
20435 test -z "$ac_c_werror_flag" ||
20436 test ! -s conftest.err
20437 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020438 ac_cv_c_const=yes
20439else
Martin v. Löwis11437992002-04-12 09:54:03 +000020440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020441sed 's/^/| /' conftest.$ac_ext >&5
20442
Martin v. Löwiseba40652007-08-30 20:10:57 +000020443 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445
20446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020448{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20449echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020450if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020451
20452cat >>confdefs.h <<\_ACEOF
20453#define const
20454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020455
20456fi
20457
Michael W. Hudson54241132001-12-07 15:38:26 +000020458
Guido van Rossumda88dad1995-01-26 00:46:29 +000020459works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020460{ echo "$as_me:$LINENO: checking for working volatile" >&5
20461echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020462cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020463/* confdefs.h. */
20464_ACEOF
20465cat confdefs.h >>conftest.$ac_ext
20466cat >>conftest.$ac_ext <<_ACEOF
20467/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020468
Martin v. Löwis11437992002-04-12 09:54:03 +000020469int
20470main ()
20471{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020472volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020473 ;
20474 return 0;
20475}
20476_ACEOF
20477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020478if { (ac_try="$ac_compile"
20479case "(($ac_try" in
20480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20481 *) ac_try_echo=$ac_try;;
20482esac
20483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020486 grep -v '^ *+' conftest.er1 >conftest.err
20487 rm -f conftest.er1
20488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490 (exit $ac_status); } && {
20491 test -z "$ac_c_werror_flag" ||
20492 test ! -s conftest.err
20493 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020494 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020495else
Martin v. Löwis11437992002-04-12 09:54:03 +000020496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020497sed 's/^/| /' conftest.$ac_ext >&5
20498
Martin v. Löwis11437992002-04-12 09:54:03 +000020499
20500cat >>confdefs.h <<\_ACEOF
20501#define volatile
20502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020503
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020504
Guido van Rossum627b2d71993-12-24 10:39:16 +000020505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020506
20507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20508{ echo "$as_me:$LINENO: result: $works" >&5
20509echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020510
Guido van Rossumda88dad1995-01-26 00:46:29 +000020511works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020512{ echo "$as_me:$LINENO: checking for working signed char" >&5
20513echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020515/* confdefs.h. */
20516_ACEOF
20517cat confdefs.h >>conftest.$ac_ext
20518cat >>conftest.$ac_ext <<_ACEOF
20519/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020520
Martin v. Löwis11437992002-04-12 09:54:03 +000020521int
20522main ()
20523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020524signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020525 ;
20526 return 0;
20527}
20528_ACEOF
20529rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530if { (ac_try="$ac_compile"
20531case "(($ac_try" in
20532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20533 *) ac_try_echo=$ac_try;;
20534esac
20535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020538 grep -v '^ *+' conftest.er1 >conftest.err
20539 rm -f conftest.er1
20540 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542 (exit $ac_status); } && {
20543 test -z "$ac_c_werror_flag" ||
20544 test ! -s conftest.err
20545 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020546 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020547else
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020549sed 's/^/| /' conftest.$ac_ext >&5
20550
Martin v. Löwis11437992002-04-12 09:54:03 +000020551
20552cat >>confdefs.h <<\_ACEOF
20553#define signed
20554_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020555
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020556
Guido van Rossum7f43da71994-08-01 12:15:30 +000020557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020558
20559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20560{ echo "$as_me:$LINENO: result: $works" >&5
20561echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020562
Guido van Rossumda88dad1995-01-26 00:46:29 +000020563have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020564{ echo "$as_me:$LINENO: checking for prototypes" >&5
20565echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020567/* confdefs.h. */
20568_ACEOF
20569cat confdefs.h >>conftest.$ac_ext
20570cat >>conftest.$ac_ext <<_ACEOF
20571/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020572int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020573int
20574main ()
20575{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020576return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 ;
20578 return 0;
20579}
20580_ACEOF
20581rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582if { (ac_try="$ac_compile"
20583case "(($ac_try" in
20584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20585 *) ac_try_echo=$ac_try;;
20586esac
20587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020590 grep -v '^ *+' conftest.er1 >conftest.err
20591 rm -f conftest.er1
20592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020594 (exit $ac_status); } && {
20595 test -z "$ac_c_werror_flag" ||
20596 test ! -s conftest.err
20597 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020598
20599
20600cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020601#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020602_ACEOF
20603
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020604 have_prototypes=yes
20605
Guido van Rossumf78abae1997-01-21 22:02:36 +000020606else
Martin v. Löwis11437992002-04-12 09:54:03 +000020607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020608sed 's/^/| /' conftest.$ac_ext >&5
20609
Martin v. Löwiseba40652007-08-30 20:10:57 +000020610
Guido van Rossum7f43da71994-08-01 12:15:30 +000020611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612
20613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20614{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20615echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020616
Guido van Rossumda88dad1995-01-26 00:46:29 +000020617works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20619echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020621/* confdefs.h. */
20622_ACEOF
20623cat confdefs.h >>conftest.$ac_ext
20624cat >>conftest.$ac_ext <<_ACEOF
20625/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020626
20627#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020628int foo(int x, ...) {
20629 va_list va;
20630 va_start(va, x);
20631 va_arg(va, int);
20632 va_arg(va, char *);
20633 va_arg(va, double);
20634 return 0;
20635}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020636
Martin v. Löwis11437992002-04-12 09:54:03 +000020637int
20638main ()
20639{
Guido van Rossum90eea071996-08-30 20:58:57 +000020640return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020641 ;
20642 return 0;
20643}
20644_ACEOF
20645rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020646if { (ac_try="$ac_compile"
20647case "(($ac_try" in
20648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20649 *) ac_try_echo=$ac_try;;
20650esac
20651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020654 grep -v '^ *+' conftest.er1 >conftest.err
20655 rm -f conftest.er1
20656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020658 (exit $ac_status); } && {
20659 test -z "$ac_c_werror_flag" ||
20660 test ! -s conftest.err
20661 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020662
20663
20664cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020665#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020666_ACEOF
20667
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020668 works=yes
20669
Guido van Rossumf78abae1997-01-21 22:02:36 +000020670else
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020672sed 's/^/| /' conftest.$ac_ext >&5
20673
Martin v. Löwiseba40652007-08-30 20:10:57 +000020674
Guido van Rossum627b2d71993-12-24 10:39:16 +000020675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676
20677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20678{ echo "$as_me:$LINENO: result: $works" >&5
20679echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020680
Martin v. Löwisd6320502004-08-12 13:45:08 +000020681# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682{ echo "$as_me:$LINENO: checking for socketpair" >&5
20683echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020684cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020685/* confdefs.h. */
20686_ACEOF
20687cat confdefs.h >>conftest.$ac_ext
20688cat >>conftest.$ac_ext <<_ACEOF
20689/* end confdefs.h. */
20690
20691#include <sys/types.h>
20692#include <sys/socket.h>
20693
20694int
20695main ()
20696{
20697void *x=socketpair
20698 ;
20699 return 0;
20700}
20701_ACEOF
20702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020703if { (ac_try="$ac_compile"
20704case "(($ac_try" in
20705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20706 *) ac_try_echo=$ac_try;;
20707esac
20708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020711 grep -v '^ *+' conftest.er1 >conftest.err
20712 rm -f conftest.er1
20713 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020715 (exit $ac_status); } && {
20716 test -z "$ac_c_werror_flag" ||
20717 test ! -s conftest.err
20718 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020719
20720cat >>confdefs.h <<\_ACEOF
20721#define HAVE_SOCKETPAIR 1
20722_ACEOF
20723
Martin v. Löwiseba40652007-08-30 20:10:57 +000020724 { echo "$as_me:$LINENO: result: yes" >&5
20725echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020726else
20727 echo "$as_me: failed program was:" >&5
20728sed 's/^/| /' conftest.$ac_ext >&5
20729
Martin v. Löwiseba40652007-08-30 20:10:57 +000020730 { echo "$as_me:$LINENO: result: no" >&5
20731echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020732
20733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020734
20735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020737# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20739echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020741/* confdefs.h. */
20742_ACEOF
20743cat confdefs.h >>conftest.$ac_ext
20744cat >>conftest.$ac_ext <<_ACEOF
20745/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020746#include <sys/types.h>
20747#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020748int
20749main ()
20750{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020751struct sockaddr x;
20752x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 ;
20754 return 0;
20755}
20756_ACEOF
20757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758if { (ac_try="$ac_compile"
20759case "(($ac_try" in
20760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20761 *) ac_try_echo=$ac_try;;
20762esac
20763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020766 grep -v '^ *+' conftest.er1 >conftest.err
20767 rm -f conftest.er1
20768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770 (exit $ac_status); } && {
20771 test -z "$ac_c_werror_flag" ||
20772 test ! -s conftest.err
20773 } && test -s conftest.$ac_objext; then
20774 { echo "$as_me:$LINENO: result: yes" >&5
20775echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020776
20777cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020778#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020779_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020780
20781else
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020783sed 's/^/| /' conftest.$ac_ext >&5
20784
Martin v. Löwiseba40652007-08-30 20:10:57 +000020785 { echo "$as_me:$LINENO: result: no" >&5
20786echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788
20789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020790
Guido van Rossumda88dad1995-01-26 00:46:29 +000020791va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20793echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020795/* confdefs.h. */
20796_ACEOF
20797cat confdefs.h >>conftest.$ac_ext
20798cat >>conftest.$ac_ext <<_ACEOF
20799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020800
20801#ifdef HAVE_STDARG_PROTOTYPES
20802#include <stdarg.h>
20803#else
20804#include <varargs.h>
20805#endif
20806
Martin v. Löwis11437992002-04-12 09:54:03 +000020807int
20808main ()
20809{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020811 ;
20812 return 0;
20813}
20814_ACEOF
20815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816if { (ac_try="$ac_compile"
20817case "(($ac_try" in
20818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20819 *) ac_try_echo=$ac_try;;
20820esac
20821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020824 grep -v '^ *+' conftest.er1 >conftest.err
20825 rm -f conftest.er1
20826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828 (exit $ac_status); } && {
20829 test -z "$ac_c_werror_flag" ||
20830 test ! -s conftest.err
20831 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020832 :
20833else
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020835sed 's/^/| /' conftest.$ac_ext >&5
20836
Martin v. Löwis11437992002-04-12 09:54:03 +000020837
20838
20839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020840#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020841_ACEOF
20842
Guido van Rossumda88dad1995-01-26 00:46:29 +000020843 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020846
20847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20848{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20849echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020850
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020851# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020852
20853
20854
Martin v. Löwiseba40652007-08-30 20:10:57 +000020855{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20856echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020857if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020859else
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020861/* confdefs.h. */
20862_ACEOF
20863cat confdefs.h >>conftest.$ac_ext
20864cat >>conftest.$ac_ext <<_ACEOF
20865/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020866/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20867 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20868#define gethostbyname_r innocuous_gethostbyname_r
20869
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020870/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020871 which can conflict with char gethostbyname_r (); below.
20872 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020873 <limits.h> exists even on freestanding compilers. */
20874
20875#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020876# include <limits.h>
20877#else
20878# include <assert.h>
20879#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020880
20881#undef gethostbyname_r
20882
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883/* Override any GCC internal prototype to avoid an error.
20884 Use char because int might match the return type of a GCC
20885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020886#ifdef __cplusplus
20887extern "C"
20888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020889char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020890/* The GNU C library defines this for functions which it implements
20891 to always fail with ENOSYS. Some functions are actually named
20892 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020893#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020894choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020895#endif
20896
Skip Montanaro6dead952003-09-25 14:50:04 +000020897int
20898main ()
20899{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020900return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020901 ;
20902 return 0;
20903}
20904_ACEOF
20905rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906if { (ac_try="$ac_link"
20907case "(($ac_try" in
20908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20909 *) ac_try_echo=$ac_try;;
20910esac
20911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20912 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020914 grep -v '^ *+' conftest.er1 >conftest.err
20915 rm -f conftest.er1
20916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020918 (exit $ac_status); } && {
20919 test -z "$ac_c_werror_flag" ||
20920 test ! -s conftest.err
20921 } && test -s conftest$ac_exeext &&
20922 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020923 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020924else
Martin v. Löwis11437992002-04-12 09:54:03 +000020925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020926sed 's/^/| /' conftest.$ac_ext >&5
20927
Martin v. Löwiseba40652007-08-30 20:10:57 +000020928 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020930
20931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020932 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020934{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20935echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020936if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020937
Martin v. Löwis11437992002-04-12 09:54:03 +000020938 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020939#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020940_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020941
Martin v. Löwiseba40652007-08-30 20:10:57 +000020942 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20943echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020944 OLD_CFLAGS=$CFLAGS
20945 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020947/* confdefs.h. */
20948_ACEOF
20949cat confdefs.h >>conftest.$ac_ext
20950cat >>conftest.$ac_ext <<_ACEOF
20951/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020952
20953# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020954
Martin v. Löwis11437992002-04-12 09:54:03 +000020955int
20956main ()
20957{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020958
20959 char *name;
20960 struct hostent *he, *res;
20961 char buffer[2048];
20962 int buflen = 2048;
20963 int h_errnop;
20964
20965 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020966
20967 ;
20968 return 0;
20969}
20970_ACEOF
20971rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020972if { (ac_try="$ac_compile"
20973case "(($ac_try" in
20974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20975 *) ac_try_echo=$ac_try;;
20976esac
20977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020980 grep -v '^ *+' conftest.er1 >conftest.err
20981 rm -f conftest.er1
20982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020984 (exit $ac_status); } && {
20985 test -z "$ac_c_werror_flag" ||
20986 test ! -s conftest.err
20987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020988
20989 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020990#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020991_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020992
Martin v. Löwis11437992002-04-12 09:54:03 +000020993
20994cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020995#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020996_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020997
Martin v. Löwiseba40652007-08-30 20:10:57 +000020998 { echo "$as_me:$LINENO: result: yes" >&5
20999echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021001else
Martin v. Löwis11437992002-04-12 09:54:03 +000021002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021003sed 's/^/| /' conftest.$ac_ext >&5
21004
Martin v. Löwis11437992002-04-12 09:54:03 +000021005
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006 { echo "$as_me:$LINENO: result: no" >&5
21007echo "${ECHO_T}no" >&6; }
21008 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21009echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021011/* confdefs.h. */
21012_ACEOF
21013cat confdefs.h >>conftest.$ac_ext
21014cat >>conftest.$ac_ext <<_ACEOF
21015/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021016
21017# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021018
Martin v. Löwis11437992002-04-12 09:54:03 +000021019int
21020main ()
21021{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021022
21023 char *name;
21024 struct hostent *he;
21025 char buffer[2048];
21026 int buflen = 2048;
21027 int h_errnop;
21028
21029 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021030
21031 ;
21032 return 0;
21033}
21034_ACEOF
21035rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021036if { (ac_try="$ac_compile"
21037case "(($ac_try" in
21038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21039 *) ac_try_echo=$ac_try;;
21040esac
21041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021044 grep -v '^ *+' conftest.er1 >conftest.err
21045 rm -f conftest.er1
21046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021048 (exit $ac_status); } && {
21049 test -z "$ac_c_werror_flag" ||
21050 test ! -s conftest.err
21051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021052
21053 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021054#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021055_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021056
Martin v. Löwis11437992002-04-12 09:54:03 +000021057
21058cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021059#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021060_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021061
Martin v. Löwiseba40652007-08-30 20:10:57 +000021062 { echo "$as_me:$LINENO: result: yes" >&5
21063echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021064
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021065else
Martin v. Löwis11437992002-04-12 09:54:03 +000021066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021067sed 's/^/| /' conftest.$ac_ext >&5
21068
Martin v. Löwis11437992002-04-12 09:54:03 +000021069
Martin v. Löwiseba40652007-08-30 20:10:57 +000021070 { echo "$as_me:$LINENO: result: no" >&5
21071echo "${ECHO_T}no" >&6; }
21072 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21073echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021075/* confdefs.h. */
21076_ACEOF
21077cat confdefs.h >>conftest.$ac_ext
21078cat >>conftest.$ac_ext <<_ACEOF
21079/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021080
21081# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021082
Martin v. Löwis11437992002-04-12 09:54:03 +000021083int
21084main ()
21085{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021086
21087 char *name;
21088 struct hostent *he;
21089 struct hostent_data data;
21090
21091 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021092
21093 ;
21094 return 0;
21095}
21096_ACEOF
21097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021098if { (ac_try="$ac_compile"
21099case "(($ac_try" in
21100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21101 *) ac_try_echo=$ac_try;;
21102esac
21103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021106 grep -v '^ *+' conftest.er1 >conftest.err
21107 rm -f conftest.er1
21108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021110 (exit $ac_status); } && {
21111 test -z "$ac_c_werror_flag" ||
21112 test ! -s conftest.err
21113 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021114
21115 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021116#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021117_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021118
Martin v. Löwis11437992002-04-12 09:54:03 +000021119
21120cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021121#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021122_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021123
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124 { echo "$as_me:$LINENO: result: yes" >&5
21125echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021126
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021127else
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021129sed 's/^/| /' conftest.$ac_ext >&5
21130
Martin v. Löwis11437992002-04-12 09:54:03 +000021131
Martin v. Löwiseba40652007-08-30 20:10:57 +000021132 { echo "$as_me:$LINENO: result: no" >&5
21133echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021134
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021136
21137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021138
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021140
21141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021142
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144
21145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021146 CFLAGS=$OLD_CFLAGS
21147
21148else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021149
Martin v. Löwis11437992002-04-12 09:54:03 +000021150
21151for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021152do
Martin v. Löwis11437992002-04-12 09:54:03 +000021153as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021154{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21155echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21156if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021158else
Martin v. Löwis11437992002-04-12 09:54:03 +000021159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021160/* confdefs.h. */
21161_ACEOF
21162cat confdefs.h >>conftest.$ac_ext
21163cat >>conftest.$ac_ext <<_ACEOF
21164/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021165/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21166 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21167#define $ac_func innocuous_$ac_func
21168
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021169/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021170 which can conflict with char $ac_func (); below.
21171 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021172 <limits.h> exists even on freestanding compilers. */
21173
21174#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021175# include <limits.h>
21176#else
21177# include <assert.h>
21178#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021179
21180#undef $ac_func
21181
Martin v. Löwiseba40652007-08-30 20:10:57 +000021182/* Override any GCC internal prototype to avoid an error.
21183 Use char because int might match the return type of a GCC
21184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021185#ifdef __cplusplus
21186extern "C"
21187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021188char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021189/* The GNU C library defines this for functions which it implements
21190 to always fail with ENOSYS. Some functions are actually named
21191 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021193choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021194#endif
21195
Skip Montanaro6dead952003-09-25 14:50:04 +000021196int
21197main ()
21198{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021200 ;
21201 return 0;
21202}
21203_ACEOF
21204rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205if { (ac_try="$ac_link"
21206case "(($ac_try" in
21207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21208 *) ac_try_echo=$ac_try;;
21209esac
21210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21211 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021213 grep -v '^ *+' conftest.er1 >conftest.err
21214 rm -f conftest.er1
21215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021217 (exit $ac_status); } && {
21218 test -z "$ac_c_werror_flag" ||
21219 test ! -s conftest.err
21220 } && test -s conftest$ac_exeext &&
21221 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021223else
Martin v. Löwis11437992002-04-12 09:54:03 +000021224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021225sed 's/^/| /' conftest.$ac_ext >&5
21226
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229
21230rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021231 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233ac_res=`eval echo '${'$as_ac_var'}'`
21234 { echo "$as_me:$LINENO: result: $ac_res" >&5
21235echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021236if test `eval echo '${'$as_ac_var'}'` = yes; then
21237 cat >>confdefs.h <<_ACEOF
21238#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21239_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021240
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021241fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021242done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021243
Michael W. Hudson54241132001-12-07 15:38:26 +000021244
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021245fi
21246
Michael W. Hudson54241132001-12-07 15:38:26 +000021247
21248
21249
21250
21251
21252
Guido van Rossum627b2d71993-12-24 10:39:16 +000021253# checks for system services
21254# (none yet)
21255
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021256# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021257{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21258echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021259if test "${ac_cv_func___fpu_control+set}" = set; then
21260 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021261else
Martin v. Löwis11437992002-04-12 09:54:03 +000021262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021263/* confdefs.h. */
21264_ACEOF
21265cat confdefs.h >>conftest.$ac_ext
21266cat >>conftest.$ac_ext <<_ACEOF
21267/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021268/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21269 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21270#define __fpu_control innocuous___fpu_control
21271
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021272/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021273 which can conflict with char __fpu_control (); below.
21274 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021275 <limits.h> exists even on freestanding compilers. */
21276
21277#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021278# include <limits.h>
21279#else
21280# include <assert.h>
21281#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021282
21283#undef __fpu_control
21284
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285/* Override any GCC internal prototype to avoid an error.
21286 Use char because int might match the return type of a GCC
21287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021288#ifdef __cplusplus
21289extern "C"
21290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021291char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021292/* The GNU C library defines this for functions which it implements
21293 to always fail with ENOSYS. Some functions are actually named
21294 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021296choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021297#endif
21298
Skip Montanaro6dead952003-09-25 14:50:04 +000021299int
21300main ()
21301{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021302return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021303 ;
21304 return 0;
21305}
21306_ACEOF
21307rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308if { (ac_try="$ac_link"
21309case "(($ac_try" in
21310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21311 *) ac_try_echo=$ac_try;;
21312esac
21313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21314 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021316 grep -v '^ *+' conftest.er1 >conftest.err
21317 rm -f conftest.er1
21318 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021320 (exit $ac_status); } && {
21321 test -z "$ac_c_werror_flag" ||
21322 test ! -s conftest.err
21323 } && test -s conftest$ac_exeext &&
21324 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021326else
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021328sed 's/^/| /' conftest.$ac_ext >&5
21329
Martin v. Löwiseba40652007-08-30 20:10:57 +000021330 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021332
21333rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021334 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021336{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21337echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021338if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021339 :
21340else
Martin v. Löwis11437992002-04-12 09:54:03 +000021341
Martin v. Löwiseba40652007-08-30 20:10:57 +000021342{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21343echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021344if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021346else
Martin v. Löwis11437992002-04-12 09:54:03 +000021347 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021348LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021350/* confdefs.h. */
21351_ACEOF
21352cat confdefs.h >>conftest.$ac_ext
21353cat >>conftest.$ac_ext <<_ACEOF
21354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021355
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356/* Override any GCC internal prototype to avoid an error.
21357 Use char because int might match the return type of a GCC
21358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021359#ifdef __cplusplus
21360extern "C"
21361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021362char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021363int
21364main ()
21365{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021366return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 ;
21368 return 0;
21369}
21370_ACEOF
21371rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372if { (ac_try="$ac_link"
21373case "(($ac_try" in
21374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21375 *) ac_try_echo=$ac_try;;
21376esac
21377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21378 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021380 grep -v '^ *+' conftest.er1 >conftest.err
21381 rm -f conftest.er1
21382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021384 (exit $ac_status); } && {
21385 test -z "$ac_c_werror_flag" ||
21386 test ! -s conftest.err
21387 } && test -s conftest$ac_exeext &&
21388 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021390else
Martin v. Löwis11437992002-04-12 09:54:03 +000021391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021392sed 's/^/| /' conftest.$ac_ext >&5
21393
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021396
21397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021399LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21402echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021403if test $ac_cv_lib_ieee___fpu_control = yes; then
21404 cat >>confdefs.h <<_ACEOF
21405#define HAVE_LIBIEEE 1
21406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021407
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021408 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021409
Guido van Rossum627b2d71993-12-24 10:39:16 +000021410fi
21411
Michael W. Hudson54241132001-12-07 15:38:26 +000021412
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021413fi
21414
Michael W. Hudson54241132001-12-07 15:38:26 +000021415
Guido van Rossum7f253911997-05-09 02:42:48 +000021416# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21418echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021419
Martin v. Löwiseba40652007-08-30 20:10:57 +000021420# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021421if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021422 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021423if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021424then
21425
21426cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021427#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021428_ACEOF
21429
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430 { echo "$as_me:$LINENO: result: yes" >&5
21431echo "${ECHO_T}yes" >&6; }
21432else { echo "$as_me:$LINENO: result: no" >&5
21433echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021434fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021435else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436 { echo "$as_me:$LINENO: result: no" >&5
21437echo "${ECHO_T}no" >&6; }
21438fi
21439
Guido van Rossum7f253911997-05-09 02:42:48 +000021440
Guido van Rossum7f43da71994-08-01 12:15:30 +000021441# check for --with-libm=...
21442
Guido van Rossum563e7081996-09-10 18:20:48 +000021443case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021444Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021445BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021446*) LIBM=-lm
21447esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21449echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021450
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021452if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021454if test "$withval" = no
21455then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021456 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21457echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021458elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021459then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21461echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021462else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21463echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21464 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021465fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021466else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21468echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21469fi
21470
Guido van Rossum7f43da71994-08-01 12:15:30 +000021471
21472# check for --with-libc=...
21473
Martin v. Löwiseba40652007-08-30 20:10:57 +000021474{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21475echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021476
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021478if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021480if test "$withval" = no
21481then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021482 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21483echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021484elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021485then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021486 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21487echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021488else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21489echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21490 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021491fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021492else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021493 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21494echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21495fi
21496
Guido van Rossum7f43da71994-08-01 12:15:30 +000021497
Christian Heimes0a8143f2007-12-18 23:22:54 +000021498# ************************************
21499# * Check for mathematical functions *
21500# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021501
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021502LIBS_SAVE=$LIBS
21503LIBS="$LIBS $LIBM"
21504
Mark Dickinson265d7382008-04-21 22:32:24 +000021505# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21506# -0. on some architectures.
21507{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21508echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21509if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21510 echo $ECHO_N "(cached) $ECHO_C" >&6
21511else
21512
21513if test "$cross_compiling" = yes; then
21514 ac_cv_tanh_preserves_zero_sign=no
21515else
21516 cat >conftest.$ac_ext <<_ACEOF
21517/* confdefs.h. */
21518_ACEOF
21519cat confdefs.h >>conftest.$ac_ext
21520cat >>conftest.$ac_ext <<_ACEOF
21521/* end confdefs.h. */
21522
21523#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021524#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021525int main() {
21526 /* return 0 if either negative zeros don't exist
21527 on this platform or if negative zeros exist
21528 and tanh(-0.) == -0. */
21529 if (atan2(0., -1.) == atan2(-0., -1.) ||
21530 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21531 else exit(1);
21532}
21533
21534_ACEOF
21535rm -f conftest$ac_exeext
21536if { (ac_try="$ac_link"
21537case "(($ac_try" in
21538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21539 *) ac_try_echo=$ac_try;;
21540esac
21541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21542 (eval "$ac_link") 2>&5
21543 ac_status=$?
21544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21546 { (case "(($ac_try" in
21547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21548 *) ac_try_echo=$ac_try;;
21549esac
21550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21551 (eval "$ac_try") 2>&5
21552 ac_status=$?
21553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21554 (exit $ac_status); }; }; then
21555 ac_cv_tanh_preserves_zero_sign=yes
21556else
21557 echo "$as_me: program exited with status $ac_status" >&5
21558echo "$as_me: failed program was:" >&5
21559sed 's/^/| /' conftest.$ac_ext >&5
21560
21561( exit $ac_status )
21562ac_cv_tanh_preserves_zero_sign=no
21563fi
21564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21565fi
21566
21567
21568fi
21569
21570{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21571echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21572if test "$ac_cv_tanh_preserves_zero_sign" = yes
21573then
21574
21575cat >>confdefs.h <<\_ACEOF
21576#define TANH_PRESERVES_ZERO_SIGN 1
21577_ACEOF
21578
21579fi
21580
Martin v. Löwis11437992002-04-12 09:54:03 +000021581
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021582for ac_func in hypot
21583do
Martin v. Löwis11437992002-04-12 09:54:03 +000021584as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021585{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21586echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21587if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021589else
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021591/* confdefs.h. */
21592_ACEOF
21593cat confdefs.h >>conftest.$ac_ext
21594cat >>conftest.$ac_ext <<_ACEOF
21595/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021596/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21597 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21598#define $ac_func innocuous_$ac_func
21599
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021600/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021601 which can conflict with char $ac_func (); below.
21602 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021603 <limits.h> exists even on freestanding compilers. */
21604
21605#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021606# include <limits.h>
21607#else
21608# include <assert.h>
21609#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021610
21611#undef $ac_func
21612
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613/* Override any GCC internal prototype to avoid an error.
21614 Use char because int might match the return type of a GCC
21615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021616#ifdef __cplusplus
21617extern "C"
21618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021619char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021620/* The GNU C library defines this for functions which it implements
21621 to always fail with ENOSYS. Some functions are actually named
21622 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021624choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021625#endif
21626
Skip Montanaro6dead952003-09-25 14:50:04 +000021627int
21628main ()
21629{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021631 ;
21632 return 0;
21633}
21634_ACEOF
21635rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636if { (ac_try="$ac_link"
21637case "(($ac_try" in
21638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21639 *) ac_try_echo=$ac_try;;
21640esac
21641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21642 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021644 grep -v '^ *+' conftest.er1 >conftest.err
21645 rm -f conftest.er1
21646 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648 (exit $ac_status); } && {
21649 test -z "$ac_c_werror_flag" ||
21650 test ! -s conftest.err
21651 } && test -s conftest$ac_exeext &&
21652 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021653 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021654else
Martin v. Löwis11437992002-04-12 09:54:03 +000021655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021656sed 's/^/| /' conftest.$ac_ext >&5
21657
Martin v. Löwiseba40652007-08-30 20:10:57 +000021658 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021660
21661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021662 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021664ac_res=`eval echo '${'$as_ac_var'}'`
21665 { echo "$as_me:$LINENO: result: $ac_res" >&5
21666echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021667if test `eval echo '${'$as_ac_var'}'` = yes; then
21668 cat >>confdefs.h <<_ACEOF
21669#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21670_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021671
Michael W. Hudson54241132001-12-07 15:38:26 +000021672else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021673 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021674 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21676 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021677esac
21678
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021679fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021680done
21681
Michael W. Hudson54241132001-12-07 15:38:26 +000021682
Christian Heimes0a8143f2007-12-18 23:22:54 +000021683
21684
21685
21686
21687
Christian Heimes48723512008-01-20 14:28:28 +000021688
21689
21690
21691
21692
21693for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021694do
21695as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21696{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21697echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21698if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21699 echo $ECHO_N "(cached) $ECHO_C" >&6
21700else
21701 cat >conftest.$ac_ext <<_ACEOF
21702/* confdefs.h. */
21703_ACEOF
21704cat confdefs.h >>conftest.$ac_ext
21705cat >>conftest.$ac_ext <<_ACEOF
21706/* end confdefs.h. */
21707/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21708 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21709#define $ac_func innocuous_$ac_func
21710
21711/* System header to define __stub macros and hopefully few prototypes,
21712 which can conflict with char $ac_func (); below.
21713 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21714 <limits.h> exists even on freestanding compilers. */
21715
21716#ifdef __STDC__
21717# include <limits.h>
21718#else
21719# include <assert.h>
21720#endif
21721
21722#undef $ac_func
21723
21724/* Override any GCC internal prototype to avoid an error.
21725 Use char because int might match the return type of a GCC
21726 builtin and then its argument prototype would still apply. */
21727#ifdef __cplusplus
21728extern "C"
21729#endif
21730char $ac_func ();
21731/* The GNU C library defines this for functions which it implements
21732 to always fail with ENOSYS. Some functions are actually named
21733 something starting with __ and the normal name is an alias. */
21734#if defined __stub_$ac_func || defined __stub___$ac_func
21735choke me
21736#endif
21737
21738int
21739main ()
21740{
21741return $ac_func ();
21742 ;
21743 return 0;
21744}
21745_ACEOF
21746rm -f conftest.$ac_objext conftest$ac_exeext
21747if { (ac_try="$ac_link"
21748case "(($ac_try" in
21749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21750 *) ac_try_echo=$ac_try;;
21751esac
21752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21753 (eval "$ac_link") 2>conftest.er1
21754 ac_status=$?
21755 grep -v '^ *+' conftest.er1 >conftest.err
21756 rm -f conftest.er1
21757 cat conftest.err >&5
21758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21759 (exit $ac_status); } && {
21760 test -z "$ac_c_werror_flag" ||
21761 test ! -s conftest.err
21762 } && test -s conftest$ac_exeext &&
21763 $as_test_x conftest$ac_exeext; then
21764 eval "$as_ac_var=yes"
21765else
21766 echo "$as_me: failed program was:" >&5
21767sed 's/^/| /' conftest.$ac_ext >&5
21768
21769 eval "$as_ac_var=no"
21770fi
21771
21772rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21773 conftest$ac_exeext conftest.$ac_ext
21774fi
21775ac_res=`eval echo '${'$as_ac_var'}'`
21776 { echo "$as_me:$LINENO: result: $ac_res" >&5
21777echo "${ECHO_T}$ac_res" >&6; }
21778if test `eval echo '${'$as_ac_var'}'` = yes; then
21779 cat >>confdefs.h <<_ACEOF
21780#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21781_ACEOF
21782
21783fi
21784done
21785
21786
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021787LIBS=$LIBS_SAVE
21788
Guido van Rossumef2255b2000-03-10 22:30:29 +000021789# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021790if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021791 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21792echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021793if test "${ac_cv_header_wchar_h+set}" = set; then
21794 echo $ECHO_N "(cached) $ECHO_C" >&6
21795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021796{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21797echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021798else
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21801echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021803/* confdefs.h. */
21804_ACEOF
21805cat confdefs.h >>conftest.$ac_ext
21806cat >>conftest.$ac_ext <<_ACEOF
21807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021808$ac_includes_default
21809#include <wchar.h>
21810_ACEOF
21811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812if { (ac_try="$ac_compile"
21813case "(($ac_try" in
21814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21815 *) ac_try_echo=$ac_try;;
21816esac
21817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021820 grep -v '^ *+' conftest.er1 >conftest.err
21821 rm -f conftest.er1
21822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824 (exit $ac_status); } && {
21825 test -z "$ac_c_werror_flag" ||
21826 test ! -s conftest.err
21827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021828 ac_header_compiler=yes
21829else
21830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021831sed 's/^/| /' conftest.$ac_ext >&5
21832
Martin v. Löwiseba40652007-08-30 20:10:57 +000021833 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021835
21836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21837{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21838echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021839
21840# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021841{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21842echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021844/* confdefs.h. */
21845_ACEOF
21846cat confdefs.h >>conftest.$ac_ext
21847cat >>conftest.$ac_ext <<_ACEOF
21848/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021849#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021850_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851if { (ac_try="$ac_cpp conftest.$ac_ext"
21852case "(($ac_try" in
21853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854 *) ac_try_echo=$ac_try;;
21855esac
21856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021858 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021859 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021860 rm -f conftest.er1
21861 cat conftest.err >&5
21862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 (exit $ac_status); } >/dev/null && {
21864 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21865 test ! -s conftest.err
21866 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 ac_header_preproc=yes
21868else
21869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021870sed 's/^/| /' conftest.$ac_ext >&5
21871
Martin v. Löwis11437992002-04-12 09:54:03 +000021872 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874
Martin v. Löwis11437992002-04-12 09:54:03 +000021875rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021876{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21877echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021878
21879# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21881 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021882 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21883echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021884 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21885echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21886 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021887 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021888 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021889 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21890echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021891 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21892echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21893 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21894echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21895 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21896echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021897 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21898echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021899 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21900echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021901 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021902## ------------------------------------------------ ##
21903## Report this to http://www.python.org/python-bugs ##
21904## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021905_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021906 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021907 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021908esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021909{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21910echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021911if test "${ac_cv_header_wchar_h+set}" = set; then
21912 echo $ECHO_N "(cached) $ECHO_C" >&6
21913else
21914 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21917echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021918
21919fi
21920if test $ac_cv_header_wchar_h = yes; then
21921
21922
21923cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021924#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021925_ACEOF
21926
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021927 wchar_h="yes"
21928
Guido van Rossumef2255b2000-03-10 22:30:29 +000021929else
Martin v. Löwis11437992002-04-12 09:54:03 +000021930 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021931
21932fi
21933
Michael W. Hudson54241132001-12-07 15:38:26 +000021934
Martin v. Löwis11437992002-04-12 09:54:03 +000021935
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021936# determine wchar_t size
21937if test "$wchar_h" = yes
21938then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021939 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21940echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021941if test "${ac_cv_type_wchar_t+set}" = set; then
21942 echo $ECHO_N "(cached) $ECHO_C" >&6
21943else
21944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021945/* confdefs.h. */
21946_ACEOF
21947cat confdefs.h >>conftest.$ac_ext
21948cat >>conftest.$ac_ext <<_ACEOF
21949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021950#include <wchar.h>
21951
Martin v. Löwiseba40652007-08-30 20:10:57 +000021952typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021953int
21954main ()
21955{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021956if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021957 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021958if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021959 return 0;
21960 ;
21961 return 0;
21962}
21963_ACEOF
21964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021965if { (ac_try="$ac_compile"
21966case "(($ac_try" in
21967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21968 *) ac_try_echo=$ac_try;;
21969esac
21970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021973 grep -v '^ *+' conftest.er1 >conftest.err
21974 rm -f conftest.er1
21975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021977 (exit $ac_status); } && {
21978 test -z "$ac_c_werror_flag" ||
21979 test ! -s conftest.err
21980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021981 ac_cv_type_wchar_t=yes
21982else
21983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021984sed 's/^/| /' conftest.$ac_ext >&5
21985
Martin v. Löwiseba40652007-08-30 20:10:57 +000021986 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021987fi
Brett Cannon19fab762007-06-02 03:02:29 +000021988
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21990fi
21991{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21992echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21993
21994# The cast to long int works around a bug in the HP C Compiler
21995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21997# This bug is HP SR number 8606223364.
21998{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21999echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022000if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22001 echo $ECHO_N "(cached) $ECHO_C" >&6
22002else
Martin v. Löwis11437992002-04-12 09:54:03 +000022003 if test "$cross_compiling" = yes; then
22004 # Depending upon the size, compute the lo and hi bounds.
22005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022006/* confdefs.h. */
22007_ACEOF
22008cat confdefs.h >>conftest.$ac_ext
22009cat >>conftest.$ac_ext <<_ACEOF
22010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022011#include <wchar.h>
22012
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022014int
22015main ()
22016{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022018test_array [0] = 0
22019
22020 ;
22021 return 0;
22022}
22023_ACEOF
22024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022025if { (ac_try="$ac_compile"
22026case "(($ac_try" in
22027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22028 *) ac_try_echo=$ac_try;;
22029esac
22030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022033 grep -v '^ *+' conftest.er1 >conftest.err
22034 rm -f conftest.er1
22035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022037 (exit $ac_status); } && {
22038 test -z "$ac_c_werror_flag" ||
22039 test ! -s conftest.err
22040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 ac_lo=0 ac_mid=0
22042 while :; do
22043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022044/* confdefs.h. */
22045_ACEOF
22046cat confdefs.h >>conftest.$ac_ext
22047cat >>conftest.$ac_ext <<_ACEOF
22048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022049#include <wchar.h>
22050
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022052int
22053main ()
22054{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022056test_array [0] = 0
22057
22058 ;
22059 return 0;
22060}
22061_ACEOF
22062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022063if { (ac_try="$ac_compile"
22064case "(($ac_try" in
22065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22066 *) ac_try_echo=$ac_try;;
22067esac
22068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022071 grep -v '^ *+' conftest.er1 >conftest.err
22072 rm -f conftest.er1
22073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022075 (exit $ac_status); } && {
22076 test -z "$ac_c_werror_flag" ||
22077 test ! -s conftest.err
22078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022079 ac_hi=$ac_mid; break
22080else
22081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022082sed 's/^/| /' conftest.$ac_ext >&5
22083
Martin v. Löwiseba40652007-08-30 20:10:57 +000022084 ac_lo=`expr $ac_mid + 1`
22085 if test $ac_lo -le $ac_mid; then
22086 ac_lo= ac_hi=
22087 break
22088 fi
22089 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022091
22092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022093 done
22094else
22095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022096sed 's/^/| /' conftest.$ac_ext >&5
22097
Martin v. Löwiseba40652007-08-30 20:10:57 +000022098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022099/* confdefs.h. */
22100_ACEOF
22101cat confdefs.h >>conftest.$ac_ext
22102cat >>conftest.$ac_ext <<_ACEOF
22103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022104#include <wchar.h>
22105
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022107int
22108main ()
22109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022110static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022111test_array [0] = 0
22112
22113 ;
22114 return 0;
22115}
22116_ACEOF
22117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118if { (ac_try="$ac_compile"
22119case "(($ac_try" in
22120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22121 *) ac_try_echo=$ac_try;;
22122esac
22123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022126 grep -v '^ *+' conftest.er1 >conftest.err
22127 rm -f conftest.er1
22128 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022130 (exit $ac_status); } && {
22131 test -z "$ac_c_werror_flag" ||
22132 test ! -s conftest.err
22133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022134 ac_hi=-1 ac_mid=-1
22135 while :; do
22136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022137/* confdefs.h. */
22138_ACEOF
22139cat confdefs.h >>conftest.$ac_ext
22140cat >>conftest.$ac_ext <<_ACEOF
22141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022142#include <wchar.h>
22143
Martin v. Löwiseba40652007-08-30 20:10:57 +000022144 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022145int
22146main ()
22147{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022149test_array [0] = 0
22150
22151 ;
22152 return 0;
22153}
22154_ACEOF
22155rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022156if { (ac_try="$ac_compile"
22157case "(($ac_try" in
22158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22159 *) ac_try_echo=$ac_try;;
22160esac
22161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022164 grep -v '^ *+' conftest.er1 >conftest.err
22165 rm -f conftest.er1
22166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022168 (exit $ac_status); } && {
22169 test -z "$ac_c_werror_flag" ||
22170 test ! -s conftest.err
22171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022172 ac_lo=$ac_mid; break
22173else
22174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022175sed 's/^/| /' conftest.$ac_ext >&5
22176
Martin v. Löwiseba40652007-08-30 20:10:57 +000022177 ac_hi=`expr '(' $ac_mid ')' - 1`
22178 if test $ac_mid -le $ac_hi; then
22179 ac_lo= ac_hi=
22180 break
22181 fi
22182 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184
22185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022186 done
22187else
22188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022189sed 's/^/| /' conftest.$ac_ext >&5
22190
Martin v. Löwiseba40652007-08-30 20:10:57 +000022191 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022193
22194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196
22197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022198# Binary search between lo and hi bounds.
22199while test "x$ac_lo" != "x$ac_hi"; do
22200 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022202/* confdefs.h. */
22203_ACEOF
22204cat confdefs.h >>conftest.$ac_ext
22205cat >>conftest.$ac_ext <<_ACEOF
22206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022207#include <wchar.h>
22208
Martin v. Löwiseba40652007-08-30 20:10:57 +000022209 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022210int
22211main ()
22212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022214test_array [0] = 0
22215
22216 ;
22217 return 0;
22218}
22219_ACEOF
22220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022221if { (ac_try="$ac_compile"
22222case "(($ac_try" in
22223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22224 *) ac_try_echo=$ac_try;;
22225esac
22226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022229 grep -v '^ *+' conftest.er1 >conftest.err
22230 rm -f conftest.er1
22231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233 (exit $ac_status); } && {
22234 test -z "$ac_c_werror_flag" ||
22235 test ! -s conftest.err
22236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022237 ac_hi=$ac_mid
22238else
22239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022240sed 's/^/| /' conftest.$ac_ext >&5
22241
Martin v. Löwiseba40652007-08-30 20:10:57 +000022242 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022244
22245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022246done
22247case $ac_lo in
22248?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022249'') if test "$ac_cv_type_wchar_t" = yes; then
22250 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022251See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022252echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022253See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022254 { (exit 77); exit 77; }; }
22255 else
22256 ac_cv_sizeof_wchar_t=0
22257 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022258esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022259else
Martin v. Löwis11437992002-04-12 09:54:03 +000022260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022261/* confdefs.h. */
22262_ACEOF
22263cat confdefs.h >>conftest.$ac_ext
22264cat >>conftest.$ac_ext <<_ACEOF
22265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022266#include <wchar.h>
22267
Martin v. Löwiseba40652007-08-30 20:10:57 +000022268 typedef wchar_t ac__type_sizeof_;
22269static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22270static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022271#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022272#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022273int
22274main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022275{
Martin v. Löwis11437992002-04-12 09:54:03 +000022276
22277 FILE *f = fopen ("conftest.val", "w");
22278 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022279 return 1;
22280 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022282 long int i = longval ();
22283 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22284 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022285 fprintf (f, "%ld\n", i);
22286 }
22287 else
22288 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022289 unsigned long int i = ulongval ();
22290 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22291 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022292 fprintf (f, "%lu\n", i);
22293 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022295
22296 ;
22297 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022298}
Martin v. Löwis11437992002-04-12 09:54:03 +000022299_ACEOF
22300rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022301if { (ac_try="$ac_link"
22302case "(($ac_try" in
22303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22304 *) ac_try_echo=$ac_try;;
22305esac
22306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22307 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 ac_status=$?
22309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311 { (case "(($ac_try" in
22312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22313 *) ac_try_echo=$ac_try;;
22314esac
22315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22316 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022317 ac_status=$?
22318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22319 (exit $ac_status); }; }; then
22320 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022321else
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 echo "$as_me: program exited with status $ac_status" >&5
22323echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022324sed 's/^/| /' conftest.$ac_ext >&5
22325
Martin v. Löwis11437992002-04-12 09:54:03 +000022326( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022327if test "$ac_cv_type_wchar_t" = yes; then
22328 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022329See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022330echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022331See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022332 { (exit 77); exit 77; }; }
22333 else
22334 ac_cv_sizeof_wchar_t=0
22335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022337rm -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 +000022338fi
22339rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022341{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22342echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22343
22344
22345
Martin v. Löwis11437992002-04-12 09:54:03 +000022346cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022347#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022348_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022349
Michael W. Hudson54241132001-12-07 15:38:26 +000022350
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022351fi
22352
Martin v. Löwiseba40652007-08-30 20:10:57 +000022353{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22354echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022355have_ucs4_tcl=no
22356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022357/* confdefs.h. */
22358_ACEOF
22359cat confdefs.h >>conftest.$ac_ext
22360cat >>conftest.$ac_ext <<_ACEOF
22361/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022362
22363#include <tcl.h>
22364#if TCL_UTF_MAX != 6
22365# error "NOT UCS4_TCL"
22366#endif
22367int
22368main ()
22369{
22370
22371 ;
22372 return 0;
22373}
22374_ACEOF
22375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022376if { (ac_try="$ac_compile"
22377case "(($ac_try" in
22378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22379 *) ac_try_echo=$ac_try;;
22380esac
22381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022384 grep -v '^ *+' conftest.er1 >conftest.err
22385 rm -f conftest.er1
22386 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022388 (exit $ac_status); } && {
22389 test -z "$ac_c_werror_flag" ||
22390 test ! -s conftest.err
22391 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022392
22393
22394cat >>confdefs.h <<\_ACEOF
22395#define HAVE_UCS4_TCL 1
22396_ACEOF
22397
22398 have_ucs4_tcl=yes
22399
22400else
22401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022402sed 's/^/| /' conftest.$ac_ext >&5
22403
Martin v. Löwiseba40652007-08-30 20:10:57 +000022404
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406
22407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22408{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22409echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022410
Skip Montanaro6dead952003-09-25 14:50:04 +000022411# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022412if test "$wchar_h" = yes
22413then
22414 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022415 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22416echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022417 if test "${ac_cv_wchar_t_signed+set}" = set; then
22418 echo $ECHO_N "(cached) $ECHO_C" >&6
22419else
22420
22421 if test "$cross_compiling" = yes; then
22422 ac_cv_wchar_t_signed=yes
22423else
22424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022425/* confdefs.h. */
22426_ACEOF
22427cat confdefs.h >>conftest.$ac_ext
22428cat >>conftest.$ac_ext <<_ACEOF
22429/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022430
22431 #include <wchar.h>
22432 int main()
22433 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022434 /* Success: exit code 0 */
22435 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022436 }
22437
22438_ACEOF
22439rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022440if { (ac_try="$ac_link"
22441case "(($ac_try" in
22442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22443 *) ac_try_echo=$ac_try;;
22444esac
22445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22446 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022447 ac_status=$?
22448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022450 { (case "(($ac_try" in
22451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22452 *) ac_try_echo=$ac_try;;
22453esac
22454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22455 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022456 ac_status=$?
22457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22458 (exit $ac_status); }; }; then
22459 ac_cv_wchar_t_signed=yes
22460else
22461 echo "$as_me: program exited with status $ac_status" >&5
22462echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022463sed 's/^/| /' conftest.$ac_ext >&5
22464
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022465( exit $ac_status )
22466ac_cv_wchar_t_signed=no
22467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022468rm -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 +000022469fi
22470
Martin v. Löwiseba40652007-08-30 20:10:57 +000022471
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022472fi
22473
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22475echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22476fi
22477
22478{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22479echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22480# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022481if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022482 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022483else
22484 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485fi
22486
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022487
22488if test $enable_unicode = yes
22489then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022490 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022491 case "$have_ucs4_tcl" in
22492 yes) enable_unicode="ucs4"
22493 ;;
22494 *) enable_unicode="ucs2"
22495 ;;
22496 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022497fi
22498
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022499
22500
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022501case "$enable_unicode" in
22502ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022503 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022504#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022505_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022506
22507 ;;
22508ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022509 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022510#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022511_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022512
22513 ;;
22514esac
22515
Michael W. Hudson54241132001-12-07 15:38:26 +000022516
Martin v. Löwis11437992002-04-12 09:54:03 +000022517
22518
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022519
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022520if test "$enable_unicode" = "no"
22521then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022522 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022523 { echo "$as_me:$LINENO: result: not used" >&5
22524echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022525else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022526 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022527
22528cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022529#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022530_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022531
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022532
22533 # wchar_t is only usable if it maps to an unsigned type
22534 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022535 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022536 then
22537 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022538
Martin v. Löwis11437992002-04-12 09:54:03 +000022539cat >>confdefs.h <<\_ACEOF
22540#define HAVE_USABLE_WCHAR_T 1
22541_ACEOF
22542
22543 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022544#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022545_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022546
22547 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22548 then
22549 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022550 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022551#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022552_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022553
22554 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22555 then
22556 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022557 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022558#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022559_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022560
22561 else
22562 PY_UNICODE_TYPE="no type found"
22563 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22565echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022566fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022567
22568# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22570echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022571if test "${ac_cv_c_bigendian+set}" = set; then
22572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022573else
Martin v. Löwis11437992002-04-12 09:54:03 +000022574 # See if sys/param.h defines the BYTE_ORDER macro.
22575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022576/* confdefs.h. */
22577_ACEOF
22578cat confdefs.h >>conftest.$ac_ext
22579cat >>conftest.$ac_ext <<_ACEOF
22580/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022581#include <sys/types.h>
22582#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022583
Martin v. Löwis11437992002-04-12 09:54:03 +000022584int
22585main ()
22586{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022587#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22588 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022589 bogus endian macros
22590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022591
22592 ;
22593 return 0;
22594}
22595_ACEOF
22596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022597if { (ac_try="$ac_compile"
22598case "(($ac_try" in
22599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22600 *) ac_try_echo=$ac_try;;
22601esac
22602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022605 grep -v '^ *+' conftest.er1 >conftest.err
22606 rm -f conftest.er1
22607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022609 (exit $ac_status); } && {
22610 test -z "$ac_c_werror_flag" ||
22611 test ! -s conftest.err
22612 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022613 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022615/* confdefs.h. */
22616_ACEOF
22617cat confdefs.h >>conftest.$ac_ext
22618cat >>conftest.$ac_ext <<_ACEOF
22619/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022620#include <sys/types.h>
22621#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022622
Martin v. Löwis11437992002-04-12 09:54:03 +000022623int
22624main ()
22625{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022626#if BYTE_ORDER != BIG_ENDIAN
22627 not big endian
22628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022629
22630 ;
22631 return 0;
22632}
22633_ACEOF
22634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635if { (ac_try="$ac_compile"
22636case "(($ac_try" in
22637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22638 *) ac_try_echo=$ac_try;;
22639esac
22640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022643 grep -v '^ *+' conftest.er1 >conftest.err
22644 rm -f conftest.er1
22645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647 (exit $ac_status); } && {
22648 test -z "$ac_c_werror_flag" ||
22649 test ! -s conftest.err
22650 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022651 ac_cv_c_bigendian=yes
22652else
Martin v. Löwis11437992002-04-12 09:54:03 +000022653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022654sed 's/^/| /' conftest.$ac_ext >&5
22655
Martin v. Löwiseba40652007-08-30 20:10:57 +000022656 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658
22659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022660else
Martin v. Löwis11437992002-04-12 09:54:03 +000022661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022662sed 's/^/| /' conftest.$ac_ext >&5
22663
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022665if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022666 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 ac_cv_c_bigendian=unknown
22668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022669/* confdefs.h. */
22670_ACEOF
22671cat confdefs.h >>conftest.$ac_ext
22672cat >>conftest.$ac_ext <<_ACEOF
22673/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022674short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22675short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022676void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022677short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22678short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022679void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022680int
22681main ()
22682{
22683 _ascii (); _ebcdic ();
22684 ;
22685 return 0;
22686}
22687_ACEOF
22688rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022689if { (ac_try="$ac_compile"
22690case "(($ac_try" in
22691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22692 *) ac_try_echo=$ac_try;;
22693esac
22694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022697 grep -v '^ *+' conftest.er1 >conftest.err
22698 rm -f conftest.er1
22699 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022701 (exit $ac_status); } && {
22702 test -z "$ac_c_werror_flag" ||
22703 test ! -s conftest.err
22704 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022705 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022706 ac_cv_c_bigendian=yes
22707fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022708if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022709 if test "$ac_cv_c_bigendian" = unknown; then
22710 ac_cv_c_bigendian=no
22711 else
22712 # finding both strings is unlikely to happen, but who knows?
22713 ac_cv_c_bigendian=unknown
22714 fi
22715fi
22716else
22717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022718sed 's/^/| /' conftest.$ac_ext >&5
22719
Martin v. Löwiseba40652007-08-30 20:10:57 +000022720
Martin v. Löwis11437992002-04-12 09:54:03 +000022721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022722
22723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022724else
22725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022726/* confdefs.h. */
22727_ACEOF
22728cat confdefs.h >>conftest.$ac_ext
22729cat >>conftest.$ac_ext <<_ACEOF
22730/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022732int
22733main ()
22734{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022735
Guido van Rossumef2255b2000-03-10 22:30:29 +000022736 /* Are we little or big endian? From Harbison&Steele. */
22737 union
22738 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739 long int l;
22740 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022741 } u;
22742 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022743 return u.c[sizeof (long int) - 1] == 1;
22744
22745 ;
22746 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022747}
Martin v. Löwis11437992002-04-12 09:54:03 +000022748_ACEOF
22749rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022750if { (ac_try="$ac_link"
22751case "(($ac_try" in
22752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22753 *) ac_try_echo=$ac_try;;
22754esac
22755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22756 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022757 ac_status=$?
22758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022760 { (case "(($ac_try" in
22761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22762 *) ac_try_echo=$ac_try;;
22763esac
22764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22765 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 ac_status=$?
22767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22768 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022769 ac_cv_c_bigendian=no
22770else
Martin v. Löwis11437992002-04-12 09:54:03 +000022771 echo "$as_me: program exited with status $ac_status" >&5
22772echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022773sed 's/^/| /' conftest.$ac_ext >&5
22774
Martin v. Löwis11437992002-04-12 09:54:03 +000022775( exit $ac_status )
22776ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022778rm -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 +000022779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022780
22781
Martin v. Löwis11437992002-04-12 09:54:03 +000022782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022783
22784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22787echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022788case $ac_cv_c_bigendian in
22789 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022790
Martin v. Löwis11437992002-04-12 09:54:03 +000022791cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022792#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022793_ACEOF
22794 ;;
22795 no)
22796 ;;
22797 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022798 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022799presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022800echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022801presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22802 { (exit 1); exit 1; }; } ;;
22803esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022804
Michael W. Hudson54241132001-12-07 15:38:26 +000022805
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022806# Check whether right shifting a negative integer extends the sign bit
22807# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022808{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22809echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022810if test "${ac_cv_rshift_extends_sign+set}" = set; then
22811 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022812else
Martin v. Löwis11437992002-04-12 09:54:03 +000022813
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022814if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022815 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022816else
Martin v. Löwis11437992002-04-12 09:54:03 +000022817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022818/* confdefs.h. */
22819_ACEOF
22820cat confdefs.h >>conftest.$ac_ext
22821cat >>conftest.$ac_ext <<_ACEOF
22822/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022823
22824int main()
22825{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022826 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022827}
22828
Martin v. Löwis11437992002-04-12 09:54:03 +000022829_ACEOF
22830rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831if { (ac_try="$ac_link"
22832case "(($ac_try" in
22833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22834 *) ac_try_echo=$ac_try;;
22835esac
22836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022838 ac_status=$?
22839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022841 { (case "(($ac_try" in
22842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22843 *) ac_try_echo=$ac_try;;
22844esac
22845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022847 ac_status=$?
22848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22849 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022850 ac_cv_rshift_extends_sign=yes
22851else
Martin v. Löwis11437992002-04-12 09:54:03 +000022852 echo "$as_me: program exited with status $ac_status" >&5
22853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022854sed 's/^/| /' conftest.$ac_ext >&5
22855
Martin v. Löwis11437992002-04-12 09:54:03 +000022856( exit $ac_status )
22857ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859rm -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 +000022860fi
22861
Martin v. Löwiseba40652007-08-30 20:10:57 +000022862
22863fi
22864
22865{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22866echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022867if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022868then
Martin v. Löwis11437992002-04-12 09:54:03 +000022869
22870cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022871#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022872_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022873
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022874fi
22875
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022876# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22878echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022879if test "${ac_cv_have_getc_unlocked+set}" = set; then
22880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022881else
Martin v. Löwis11437992002-04-12 09:54:03 +000022882
22883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022884/* confdefs.h. */
22885_ACEOF
22886cat confdefs.h >>conftest.$ac_ext
22887cat >>conftest.$ac_ext <<_ACEOF
22888/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022889#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022890int
22891main ()
22892{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022893
22894 FILE *f = fopen("/dev/null", "r");
22895 flockfile(f);
22896 getc_unlocked(f);
22897 funlockfile(f);
22898
Martin v. Löwis11437992002-04-12 09:54:03 +000022899 ;
22900 return 0;
22901}
22902_ACEOF
22903rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022904if { (ac_try="$ac_link"
22905case "(($ac_try" in
22906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22907 *) ac_try_echo=$ac_try;;
22908esac
22909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22910 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022912 grep -v '^ *+' conftest.er1 >conftest.err
22913 rm -f conftest.er1
22914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022916 (exit $ac_status); } && {
22917 test -z "$ac_c_werror_flag" ||
22918 test ! -s conftest.err
22919 } && test -s conftest$ac_exeext &&
22920 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022921 ac_cv_have_getc_unlocked=yes
22922else
Martin v. Löwis11437992002-04-12 09:54:03 +000022923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022924sed 's/^/| /' conftest.$ac_ext >&5
22925
Martin v. Löwiseba40652007-08-30 20:10:57 +000022926 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022928
22929rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022930 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022931fi
22932
Martin v. Löwiseba40652007-08-30 20:10:57 +000022933{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22934echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022935if test "$ac_cv_have_getc_unlocked" = yes
22936then
Martin v. Löwis11437992002-04-12 09:54:03 +000022937
22938cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022939#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022940_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022941
22942fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022943
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022944# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022945# save the value of LIBS so we don't actually link Python with readline
22946LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022947
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22949echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022950if test "${ac_cv_lib_readline_readline+set}" = set; then
22951 echo $ECHO_N "(cached) $ECHO_C" >&6
22952else
22953 ac_check_lib_save_LIBS=$LIBS
22954LIBS="-lreadline $LIBS"
22955cat >conftest.$ac_ext <<_ACEOF
22956/* confdefs.h. */
22957_ACEOF
22958cat confdefs.h >>conftest.$ac_ext
22959cat >>conftest.$ac_ext <<_ACEOF
22960/* end confdefs.h. */
22961
Martin v. Löwiseba40652007-08-30 20:10:57 +000022962/* Override any GCC internal prototype to avoid an error.
22963 Use char because int might match the return type of a GCC
22964 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022965#ifdef __cplusplus
22966extern "C"
22967#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022968char readline ();
22969int
22970main ()
22971{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022972return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022973 ;
22974 return 0;
22975}
22976_ACEOF
22977rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978if { (ac_try="$ac_link"
22979case "(($ac_try" in
22980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22981 *) ac_try_echo=$ac_try;;
22982esac
22983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22984 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022985 ac_status=$?
22986 grep -v '^ *+' conftest.er1 >conftest.err
22987 rm -f conftest.er1
22988 cat conftest.err >&5
22989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022990 (exit $ac_status); } && {
22991 test -z "$ac_c_werror_flag" ||
22992 test ! -s conftest.err
22993 } && test -s conftest$ac_exeext &&
22994 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022995 ac_cv_lib_readline_readline=yes
22996else
22997 echo "$as_me: failed program was:" >&5
22998sed 's/^/| /' conftest.$ac_ext >&5
22999
Martin v. Löwiseba40652007-08-30 20:10:57 +000023000 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002
23003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023004 conftest$ac_exeext conftest.$ac_ext
23005LIBS=$ac_check_lib_save_LIBS
23006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
23008echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023009if test $ac_cv_lib_readline_readline = yes; then
23010 cat >>confdefs.h <<_ACEOF
23011#define HAVE_LIBREADLINE 1
23012_ACEOF
23013
23014 LIBS="-lreadline $LIBS"
23015
23016fi
23017
23018if test "$ac_cv_have_readline_readline" = no
23019then
23020
Martin v. Löwiseba40652007-08-30 20:10:57 +000023021{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
23022echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023023if test "${ac_cv_lib_termcap_readline+set}" = set; then
23024 echo $ECHO_N "(cached) $ECHO_C" >&6
23025else
23026 ac_check_lib_save_LIBS=$LIBS
23027LIBS="-ltermcap $LIBS"
23028cat >conftest.$ac_ext <<_ACEOF
23029/* confdefs.h. */
23030_ACEOF
23031cat confdefs.h >>conftest.$ac_ext
23032cat >>conftest.$ac_ext <<_ACEOF
23033/* end confdefs.h. */
23034
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035/* Override any GCC internal prototype to avoid an error.
23036 Use char because int might match the return type of a GCC
23037 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023038#ifdef __cplusplus
23039extern "C"
23040#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023041char readline ();
23042int
23043main ()
23044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023045return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023046 ;
23047 return 0;
23048}
23049_ACEOF
23050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023051if { (ac_try="$ac_link"
23052case "(($ac_try" in
23053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23054 *) ac_try_echo=$ac_try;;
23055esac
23056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23057 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023058 ac_status=$?
23059 grep -v '^ *+' conftest.er1 >conftest.err
23060 rm -f conftest.er1
23061 cat conftest.err >&5
23062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063 (exit $ac_status); } && {
23064 test -z "$ac_c_werror_flag" ||
23065 test ! -s conftest.err
23066 } && test -s conftest$ac_exeext &&
23067 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023068 ac_cv_lib_termcap_readline=yes
23069else
23070 echo "$as_me: failed program was:" >&5
23071sed 's/^/| /' conftest.$ac_ext >&5
23072
Martin v. Löwiseba40652007-08-30 20:10:57 +000023073 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023075
23076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023077 conftest$ac_exeext conftest.$ac_ext
23078LIBS=$ac_check_lib_save_LIBS
23079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023080{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
23081echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023082if test $ac_cv_lib_termcap_readline = yes; then
23083 cat >>confdefs.h <<_ACEOF
23084#define HAVE_LIBTERMCAP 1
23085_ACEOF
23086
23087 LIBS="-ltermcap $LIBS"
23088
23089fi
23090
23091fi
23092
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023093# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023094{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23095echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023096if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23097 echo $ECHO_N "(cached) $ECHO_C" >&6
23098else
23099 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023100LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023101cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023102/* confdefs.h. */
23103_ACEOF
23104cat confdefs.h >>conftest.$ac_ext
23105cat >>conftest.$ac_ext <<_ACEOF
23106/* end confdefs.h. */
23107
Martin v. Löwiseba40652007-08-30 20:10:57 +000023108/* Override any GCC internal prototype to avoid an error.
23109 Use char because int might match the return type of a GCC
23110 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023111#ifdef __cplusplus
23112extern "C"
23113#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023114char rl_callback_handler_install ();
23115int
23116main ()
23117{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023119 ;
23120 return 0;
23121}
23122_ACEOF
23123rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124if { (ac_try="$ac_link"
23125case "(($ac_try" in
23126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23127 *) ac_try_echo=$ac_try;;
23128esac
23129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23130 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023132 grep -v '^ *+' conftest.er1 >conftest.err
23133 rm -f conftest.er1
23134 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023136 (exit $ac_status); } && {
23137 test -z "$ac_c_werror_flag" ||
23138 test ! -s conftest.err
23139 } && test -s conftest$ac_exeext &&
23140 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023141 ac_cv_lib_readline_rl_callback_handler_install=yes
23142else
23143 echo "$as_me: failed program was:" >&5
23144sed 's/^/| /' conftest.$ac_ext >&5
23145
Martin v. Löwiseba40652007-08-30 20:10:57 +000023146 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023148
23149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023150 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023151LIBS=$ac_check_lib_save_LIBS
23152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023153{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23154echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023155if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23156
23157cat >>confdefs.h <<\_ACEOF
23158#define HAVE_RL_CALLBACK 1
23159_ACEOF
23160
23161fi
23162
23163
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023164# check for readline 2.2
23165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023166/* confdefs.h. */
23167_ACEOF
23168cat confdefs.h >>conftest.$ac_ext
23169cat >>conftest.$ac_ext <<_ACEOF
23170/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023171#include <readline/readline.h>
23172_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023173if { (ac_try="$ac_cpp conftest.$ac_ext"
23174case "(($ac_try" in
23175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23176 *) ac_try_echo=$ac_try;;
23177esac
23178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23179 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023180 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023181 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023182 rm -f conftest.er1
23183 cat conftest.err >&5
23184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185 (exit $ac_status); } >/dev/null && {
23186 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23187 test ! -s conftest.err
23188 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023189 have_readline=yes
23190else
23191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023192sed 's/^/| /' conftest.$ac_ext >&5
23193
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023194 have_readline=no
23195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023196
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023197rm -f conftest.err conftest.$ac_ext
23198if test $have_readline = yes
23199then
23200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023201/* confdefs.h. */
23202_ACEOF
23203cat confdefs.h >>conftest.$ac_ext
23204cat >>conftest.$ac_ext <<_ACEOF
23205/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023206#include <readline/readline.h>
23207
23208_ACEOF
23209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023210 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023211
23212cat >>confdefs.h <<\_ACEOF
23213#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23214_ACEOF
23215
23216fi
23217rm -f conftest*
23218
23219fi
23220
Martin v. Löwis0daad592001-09-30 21:09:59 +000023221# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023222{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23223echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023224if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023226else
Martin v. Löwis11437992002-04-12 09:54:03 +000023227 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023228LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023230/* confdefs.h. */
23231_ACEOF
23232cat confdefs.h >>conftest.$ac_ext
23233cat >>conftest.$ac_ext <<_ACEOF
23234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023235
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236/* Override any GCC internal prototype to avoid an error.
23237 Use char because int might match the return type of a GCC
23238 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023239#ifdef __cplusplus
23240extern "C"
23241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023242char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023243int
23244main ()
23245{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023246return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 ;
23248 return 0;
23249}
23250_ACEOF
23251rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252if { (ac_try="$ac_link"
23253case "(($ac_try" in
23254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23255 *) ac_try_echo=$ac_try;;
23256esac
23257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23258 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023260 grep -v '^ *+' conftest.er1 >conftest.err
23261 rm -f conftest.er1
23262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023264 (exit $ac_status); } && {
23265 test -z "$ac_c_werror_flag" ||
23266 test ! -s conftest.err
23267 } && test -s conftest$ac_exeext &&
23268 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023269 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023270else
Martin v. Löwis11437992002-04-12 09:54:03 +000023271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023272sed 's/^/| /' conftest.$ac_ext >&5
23273
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023276
23277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023279LIBS=$ac_check_lib_save_LIBS
23280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23282echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023283if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023284
Martin v. Löwis11437992002-04-12 09:54:03 +000023285cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023286#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023287_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023288
Martin v. Löwis0daad592001-09-30 21:09:59 +000023289fi
23290
Michael W. Hudson54241132001-12-07 15:38:26 +000023291
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023292# also in 4.0
23293{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23294echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23295if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23296 echo $ECHO_N "(cached) $ECHO_C" >&6
23297else
23298 ac_check_lib_save_LIBS=$LIBS
23299LIBS="-lreadline $LIBS"
23300cat >conftest.$ac_ext <<_ACEOF
23301/* confdefs.h. */
23302_ACEOF
23303cat confdefs.h >>conftest.$ac_ext
23304cat >>conftest.$ac_ext <<_ACEOF
23305/* end confdefs.h. */
23306
23307/* Override any GCC internal prototype to avoid an error.
23308 Use char because int might match the return type of a GCC
23309 builtin and then its argument prototype would still apply. */
23310#ifdef __cplusplus
23311extern "C"
23312#endif
23313char rl_completion_display_matches_hook ();
23314int
23315main ()
23316{
23317return rl_completion_display_matches_hook ();
23318 ;
23319 return 0;
23320}
23321_ACEOF
23322rm -f conftest.$ac_objext conftest$ac_exeext
23323if { (ac_try="$ac_link"
23324case "(($ac_try" in
23325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23326 *) ac_try_echo=$ac_try;;
23327esac
23328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23329 (eval "$ac_link") 2>conftest.er1
23330 ac_status=$?
23331 grep -v '^ *+' conftest.er1 >conftest.err
23332 rm -f conftest.er1
23333 cat conftest.err >&5
23334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23335 (exit $ac_status); } && {
23336 test -z "$ac_c_werror_flag" ||
23337 test ! -s conftest.err
23338 } && test -s conftest$ac_exeext &&
23339 $as_test_x conftest$ac_exeext; then
23340 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23341else
23342 echo "$as_me: failed program was:" >&5
23343sed 's/^/| /' conftest.$ac_ext >&5
23344
23345 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23346fi
23347
23348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23349 conftest$ac_exeext conftest.$ac_ext
23350LIBS=$ac_check_lib_save_LIBS
23351fi
23352{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23353echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23354if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23355
23356cat >>confdefs.h <<\_ACEOF
23357#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23358_ACEOF
23359
23360fi
23361
23362
Martin v. Löwis0daad592001-09-30 21:09:59 +000023363# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023364{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23365echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023366if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23367 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023368else
Martin v. Löwis11437992002-04-12 09:54:03 +000023369 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023370LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023371cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023372/* confdefs.h. */
23373_ACEOF
23374cat confdefs.h >>conftest.$ac_ext
23375cat >>conftest.$ac_ext <<_ACEOF
23376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023377
Martin v. Löwiseba40652007-08-30 20:10:57 +000023378/* Override any GCC internal prototype to avoid an error.
23379 Use char because int might match the return type of a GCC
23380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023381#ifdef __cplusplus
23382extern "C"
23383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023384char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023385int
23386main ()
23387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023388return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023389 ;
23390 return 0;
23391}
23392_ACEOF
23393rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023394if { (ac_try="$ac_link"
23395case "(($ac_try" in
23396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23397 *) ac_try_echo=$ac_try;;
23398esac
23399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23400 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023402 grep -v '^ *+' conftest.er1 >conftest.err
23403 rm -f conftest.er1
23404 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406 (exit $ac_status); } && {
23407 test -z "$ac_c_werror_flag" ||
23408 test ! -s conftest.err
23409 } && test -s conftest$ac_exeext &&
23410 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023411 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023412else
Martin v. Löwis11437992002-04-12 09:54:03 +000023413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023414sed 's/^/| /' conftest.$ac_ext >&5
23415
Martin v. Löwiseba40652007-08-30 20:10:57 +000023416 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023418
23419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023421LIBS=$ac_check_lib_save_LIBS
23422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023423{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23424echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023425if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023426
Martin v. Löwis11437992002-04-12 09:54:03 +000023427cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023428#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023429_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023430
Guido van Rossum353ae582001-07-10 16:45:32 +000023431fi
23432
Jack Jansendd19cf82001-12-06 22:36:17 +000023433
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023434# also in readline 4.2
23435cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023436/* confdefs.h. */
23437_ACEOF
23438cat confdefs.h >>conftest.$ac_ext
23439cat >>conftest.$ac_ext <<_ACEOF
23440/* end confdefs.h. */
23441#include <readline/readline.h>
23442_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023443if { (ac_try="$ac_cpp conftest.$ac_ext"
23444case "(($ac_try" in
23445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23446 *) ac_try_echo=$ac_try;;
23447esac
23448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23449 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023450 ac_status=$?
23451 grep -v '^ *+' conftest.er1 >conftest.err
23452 rm -f conftest.er1
23453 cat conftest.err >&5
23454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023455 (exit $ac_status); } >/dev/null && {
23456 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23457 test ! -s conftest.err
23458 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023459 have_readline=yes
23460else
23461 echo "$as_me: failed program was:" >&5
23462sed 's/^/| /' conftest.$ac_ext >&5
23463
23464 have_readline=no
23465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023466
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023467rm -f conftest.err conftest.$ac_ext
23468if test $have_readline = yes
23469then
23470 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023471/* confdefs.h. */
23472_ACEOF
23473cat confdefs.h >>conftest.$ac_ext
23474cat >>conftest.$ac_ext <<_ACEOF
23475/* end confdefs.h. */
23476#include <readline/readline.h>
23477
23478_ACEOF
23479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23480 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23481
23482cat >>confdefs.h <<\_ACEOF
23483#define HAVE_RL_CATCH_SIGNAL 1
23484_ACEOF
23485
23486fi
23487rm -f conftest*
23488
23489fi
23490
Martin v. Löwis82bca632006-02-10 20:49:30 +000023491# End of readline checks: restore LIBS
23492LIBS=$LIBS_no_readline
23493
Martin v. Löwiseba40652007-08-30 20:10:57 +000023494{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23495echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023496if test "${ac_cv_broken_nice+set}" = set; then
23497 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023498else
Martin v. Löwis11437992002-04-12 09:54:03 +000023499
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023500if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023501 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023502else
Martin v. Löwis11437992002-04-12 09:54:03 +000023503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023504/* confdefs.h. */
23505_ACEOF
23506cat confdefs.h >>conftest.$ac_ext
23507cat >>conftest.$ac_ext <<_ACEOF
23508/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023509
23510int main()
23511{
23512 int val1 = nice(1);
23513 if (val1 != -1 && val1 == nice(2))
23514 exit(0);
23515 exit(1);
23516}
23517
Martin v. Löwis11437992002-04-12 09:54:03 +000023518_ACEOF
23519rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023520if { (ac_try="$ac_link"
23521case "(($ac_try" in
23522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23523 *) ac_try_echo=$ac_try;;
23524esac
23525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23526 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023527 ac_status=$?
23528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23529 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023530 { (case "(($ac_try" in
23531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23532 *) ac_try_echo=$ac_try;;
23533esac
23534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23535 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023536 ac_status=$?
23537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23538 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023539 ac_cv_broken_nice=yes
23540else
Martin v. Löwis11437992002-04-12 09:54:03 +000023541 echo "$as_me: program exited with status $ac_status" >&5
23542echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023543sed 's/^/| /' conftest.$ac_ext >&5
23544
Martin v. Löwis11437992002-04-12 09:54:03 +000023545( exit $ac_status )
23546ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023548rm -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 +000023549fi
23550
Martin v. Löwiseba40652007-08-30 20:10:57 +000023551
23552fi
23553
23554{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23555echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023556if test "$ac_cv_broken_nice" = yes
23557then
Martin v. Löwis11437992002-04-12 09:54:03 +000023558
23559cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023560#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023561_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023562
23563fi
23564
Martin v. Löwiseba40652007-08-30 20:10:57 +000023565{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23566echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023567if test "$cross_compiling" = yes; then
23568 ac_cv_broken_poll=no
23569else
23570 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023571/* confdefs.h. */
23572_ACEOF
23573cat confdefs.h >>conftest.$ac_ext
23574cat >>conftest.$ac_ext <<_ACEOF
23575/* end confdefs.h. */
23576
23577#include <poll.h>
23578
23579int main (void)
23580 {
23581 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23582
23583 close (42);
23584
23585 int poll_test = poll (&poll_struct, 1, 0);
23586
23587 if (poll_test < 0)
23588 {
23589 exit(0);
23590 }
23591 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23592 {
23593 exit(0);
23594 }
23595 else
23596 {
23597 exit(1);
23598 }
23599 }
23600
23601_ACEOF
23602rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023603if { (ac_try="$ac_link"
23604case "(($ac_try" in
23605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23606 *) ac_try_echo=$ac_try;;
23607esac
23608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23609 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023610 ac_status=$?
23611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613 { (case "(($ac_try" in
23614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23615 *) ac_try_echo=$ac_try;;
23616esac
23617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23618 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023619 ac_status=$?
23620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23621 (exit $ac_status); }; }; then
23622 ac_cv_broken_poll=yes
23623else
23624 echo "$as_me: program exited with status $ac_status" >&5
23625echo "$as_me: failed program was:" >&5
23626sed 's/^/| /' conftest.$ac_ext >&5
23627
23628( exit $ac_status )
23629ac_cv_broken_poll=no
23630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023631rm -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 +000023632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633
23634
23635{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23636echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023637if test "$ac_cv_broken_poll" = yes
23638then
23639
23640cat >>confdefs.h <<\_ACEOF
23641#define HAVE_BROKEN_POLL 1
23642_ACEOF
23643
23644fi
23645
Brett Cannon43802422005-02-10 20:48:03 +000023646# 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 +000023647# (which is not required by ISO C or UNIX spec) and/or if we support
23648# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023649{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23650echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023651if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23652 echo $ECHO_N "(cached) $ECHO_C" >&6
23653else
23654 cat >conftest.$ac_ext <<_ACEOF
23655/* confdefs.h. */
23656_ACEOF
23657cat confdefs.h >>conftest.$ac_ext
23658cat >>conftest.$ac_ext <<_ACEOF
23659/* end confdefs.h. */
23660#include <sys/types.h>
23661#include <$ac_cv_struct_tm>
23662
23663
23664int
23665main ()
23666{
23667static struct tm ac_aggr;
23668if (ac_aggr.tm_zone)
23669return 0;
23670 ;
23671 return 0;
23672}
23673_ACEOF
23674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023675if { (ac_try="$ac_compile"
23676case "(($ac_try" in
23677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23678 *) ac_try_echo=$ac_try;;
23679esac
23680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23681 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023682 ac_status=$?
23683 grep -v '^ *+' conftest.er1 >conftest.err
23684 rm -f conftest.er1
23685 cat conftest.err >&5
23686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023687 (exit $ac_status); } && {
23688 test -z "$ac_c_werror_flag" ||
23689 test ! -s conftest.err
23690 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023691 ac_cv_member_struct_tm_tm_zone=yes
23692else
23693 echo "$as_me: failed program was:" >&5
23694sed 's/^/| /' conftest.$ac_ext >&5
23695
Martin v. Löwiseba40652007-08-30 20:10:57 +000023696 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023697/* confdefs.h. */
23698_ACEOF
23699cat confdefs.h >>conftest.$ac_ext
23700cat >>conftest.$ac_ext <<_ACEOF
23701/* end confdefs.h. */
23702#include <sys/types.h>
23703#include <$ac_cv_struct_tm>
23704
23705
23706int
23707main ()
23708{
23709static struct tm ac_aggr;
23710if (sizeof ac_aggr.tm_zone)
23711return 0;
23712 ;
23713 return 0;
23714}
23715_ACEOF
23716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023717if { (ac_try="$ac_compile"
23718case "(($ac_try" in
23719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23720 *) ac_try_echo=$ac_try;;
23721esac
23722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23723 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023724 ac_status=$?
23725 grep -v '^ *+' conftest.er1 >conftest.err
23726 rm -f conftest.er1
23727 cat conftest.err >&5
23728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729 (exit $ac_status); } && {
23730 test -z "$ac_c_werror_flag" ||
23731 test ! -s conftest.err
23732 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023733 ac_cv_member_struct_tm_tm_zone=yes
23734else
23735 echo "$as_me: failed program was:" >&5
23736sed 's/^/| /' conftest.$ac_ext >&5
23737
Martin v. Löwiseba40652007-08-30 20:10:57 +000023738 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023740
23741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023743
23744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23747echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023748if test $ac_cv_member_struct_tm_tm_zone = yes; then
23749
23750cat >>confdefs.h <<_ACEOF
23751#define HAVE_STRUCT_TM_TM_ZONE 1
23752_ACEOF
23753
23754
23755fi
23756
23757if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23758
23759cat >>confdefs.h <<\_ACEOF
23760#define HAVE_TM_ZONE 1
23761_ACEOF
23762
23763else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023764 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23765echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23766if test "${ac_cv_have_decl_tzname+set}" = set; then
23767 echo $ECHO_N "(cached) $ECHO_C" >&6
23768else
23769 cat >conftest.$ac_ext <<_ACEOF
23770/* confdefs.h. */
23771_ACEOF
23772cat confdefs.h >>conftest.$ac_ext
23773cat >>conftest.$ac_ext <<_ACEOF
23774/* end confdefs.h. */
23775#include <time.h>
23776
23777int
23778main ()
23779{
23780#ifndef tzname
23781 (void) tzname;
23782#endif
23783
23784 ;
23785 return 0;
23786}
23787_ACEOF
23788rm -f conftest.$ac_objext
23789if { (ac_try="$ac_compile"
23790case "(($ac_try" in
23791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23792 *) ac_try_echo=$ac_try;;
23793esac
23794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23795 (eval "$ac_compile") 2>conftest.er1
23796 ac_status=$?
23797 grep -v '^ *+' conftest.er1 >conftest.err
23798 rm -f conftest.er1
23799 cat conftest.err >&5
23800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23801 (exit $ac_status); } && {
23802 test -z "$ac_c_werror_flag" ||
23803 test ! -s conftest.err
23804 } && test -s conftest.$ac_objext; then
23805 ac_cv_have_decl_tzname=yes
23806else
23807 echo "$as_me: failed program was:" >&5
23808sed 's/^/| /' conftest.$ac_ext >&5
23809
23810 ac_cv_have_decl_tzname=no
23811fi
23812
23813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23814fi
23815{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23816echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23817if test $ac_cv_have_decl_tzname = yes; then
23818
23819cat >>confdefs.h <<_ACEOF
23820#define HAVE_DECL_TZNAME 1
23821_ACEOF
23822
23823
23824else
23825 cat >>confdefs.h <<_ACEOF
23826#define HAVE_DECL_TZNAME 0
23827_ACEOF
23828
23829
23830fi
23831
23832
23833 { echo "$as_me:$LINENO: checking for tzname" >&5
23834echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023835if test "${ac_cv_var_tzname+set}" = set; then
23836 echo $ECHO_N "(cached) $ECHO_C" >&6
23837else
23838 cat >conftest.$ac_ext <<_ACEOF
23839/* confdefs.h. */
23840_ACEOF
23841cat confdefs.h >>conftest.$ac_ext
23842cat >>conftest.$ac_ext <<_ACEOF
23843/* end confdefs.h. */
23844#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023845#if !HAVE_DECL_TZNAME
23846extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023847#endif
23848
23849int
23850main ()
23851{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023852return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023853 ;
23854 return 0;
23855}
23856_ACEOF
23857rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023858if { (ac_try="$ac_link"
23859case "(($ac_try" in
23860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23861 *) ac_try_echo=$ac_try;;
23862esac
23863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23864 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023865 ac_status=$?
23866 grep -v '^ *+' conftest.er1 >conftest.err
23867 rm -f conftest.er1
23868 cat conftest.err >&5
23869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023870 (exit $ac_status); } && {
23871 test -z "$ac_c_werror_flag" ||
23872 test ! -s conftest.err
23873 } && test -s conftest$ac_exeext &&
23874 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023875 ac_cv_var_tzname=yes
23876else
23877 echo "$as_me: failed program was:" >&5
23878sed 's/^/| /' conftest.$ac_ext >&5
23879
Martin v. Löwiseba40652007-08-30 20:10:57 +000023880 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023882
23883rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023884 conftest$ac_exeext conftest.$ac_ext
23885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23887echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023888 if test $ac_cv_var_tzname = yes; then
23889
23890cat >>confdefs.h <<\_ACEOF
23891#define HAVE_TZNAME 1
23892_ACEOF
23893
23894 fi
23895fi
23896
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023897
Martin v. Löwis1d459062005-03-14 21:23:33 +000023898# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023899{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23900echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023901if test "${ac_cv_working_tzset+set}" = set; then
23902 echo $ECHO_N "(cached) $ECHO_C" >&6
23903else
23904
23905if test "$cross_compiling" = yes; then
23906 ac_cv_working_tzset=no
23907else
23908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023909/* confdefs.h. */
23910_ACEOF
23911cat confdefs.h >>conftest.$ac_ext
23912cat >>conftest.$ac_ext <<_ACEOF
23913/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023914
23915#include <stdlib.h>
23916#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023917#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023918
23919#if HAVE_TZNAME
23920extern char *tzname[];
23921#endif
23922
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023923int main()
23924{
Brett Cannon18367812003-09-19 00:59:16 +000023925 /* Note that we need to ensure that not only does tzset(3)
23926 do 'something' with localtime, but it works as documented
23927 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023928 This includes making sure that tzname is set properly if
23929 tm->tm_zone does not exist since it is the alternative way
23930 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023931
23932 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023933 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023934 */
23935
Martin v. Löwis1d459062005-03-14 21:23:33 +000023936 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023937 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23938
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023939 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023940 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023941 if (localtime(&groundhogday)->tm_hour != 0)
23942 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023943#if HAVE_TZNAME
23944 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23945 if (strcmp(tzname[0], "UTC") ||
23946 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23947 exit(1);
23948#endif
Brett Cannon18367812003-09-19 00:59:16 +000023949
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023950 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023951 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023952 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023953 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023954#if HAVE_TZNAME
23955 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23956 exit(1);
23957#endif
Brett Cannon18367812003-09-19 00:59:16 +000023958
23959 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23960 tzset();
23961 if (localtime(&groundhogday)->tm_hour != 11)
23962 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023963#if HAVE_TZNAME
23964 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23965 exit(1);
23966#endif
23967
23968#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023969 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23970 exit(1);
23971 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23972 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023973#endif
Brett Cannon18367812003-09-19 00:59:16 +000023974
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023975 exit(0);
23976}
23977
23978_ACEOF
23979rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980if { (ac_try="$ac_link"
23981case "(($ac_try" in
23982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23983 *) ac_try_echo=$ac_try;;
23984esac
23985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23986 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023987 ac_status=$?
23988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023990 { (case "(($ac_try" in
23991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23992 *) ac_try_echo=$ac_try;;
23993esac
23994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23995 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023996 ac_status=$?
23997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23998 (exit $ac_status); }; }; then
23999 ac_cv_working_tzset=yes
24000else
24001 echo "$as_me: program exited with status $ac_status" >&5
24002echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024003sed 's/^/| /' conftest.$ac_ext >&5
24004
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024005( exit $ac_status )
24006ac_cv_working_tzset=no
24007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008rm -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 +000024009fi
24010
Martin v. Löwiseba40652007-08-30 20:10:57 +000024011
24012fi
24013
24014{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24015echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024016if test "$ac_cv_working_tzset" = yes
24017then
24018
24019cat >>confdefs.h <<\_ACEOF
24020#define HAVE_WORKING_TZSET 1
24021_ACEOF
24022
24023fi
24024
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024025# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024026{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24027echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024028if test "${ac_cv_stat_tv_nsec+set}" = set; then
24029 echo $ECHO_N "(cached) $ECHO_C" >&6
24030else
24031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024032/* confdefs.h. */
24033_ACEOF
24034cat confdefs.h >>conftest.$ac_ext
24035cat >>conftest.$ac_ext <<_ACEOF
24036/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024037#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024038int
24039main ()
24040{
24041
24042struct stat st;
24043st.st_mtim.tv_nsec = 1;
24044
24045 ;
24046 return 0;
24047}
24048_ACEOF
24049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024050if { (ac_try="$ac_compile"
24051case "(($ac_try" in
24052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24053 *) ac_try_echo=$ac_try;;
24054esac
24055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024058 grep -v '^ *+' conftest.er1 >conftest.err
24059 rm -f conftest.er1
24060 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024062 (exit $ac_status); } && {
24063 test -z "$ac_c_werror_flag" ||
24064 test ! -s conftest.err
24065 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024066 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024067else
24068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024069sed 's/^/| /' conftest.$ac_ext >&5
24070
Martin v. Löwiseba40652007-08-30 20:10:57 +000024071 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024072fi
24073
Martin v. Löwiseba40652007-08-30 20:10:57 +000024074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24075fi
24076
24077{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24078echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024079if test "$ac_cv_stat_tv_nsec" = yes
24080then
24081
24082cat >>confdefs.h <<\_ACEOF
24083#define HAVE_STAT_TV_NSEC 1
24084_ACEOF
24085
24086fi
24087
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024088# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024089{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24090echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024091if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24092 echo $ECHO_N "(cached) $ECHO_C" >&6
24093else
24094 cat >conftest.$ac_ext <<_ACEOF
24095/* confdefs.h. */
24096_ACEOF
24097cat confdefs.h >>conftest.$ac_ext
24098cat >>conftest.$ac_ext <<_ACEOF
24099/* end confdefs.h. */
24100#include <sys/stat.h>
24101int
24102main ()
24103{
24104
24105struct stat st;
24106st.st_mtimespec.tv_nsec = 1;
24107
24108 ;
24109 return 0;
24110}
24111_ACEOF
24112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113if { (ac_try="$ac_compile"
24114case "(($ac_try" in
24115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24116 *) ac_try_echo=$ac_try;;
24117esac
24118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024120 ac_status=$?
24121 grep -v '^ *+' conftest.er1 >conftest.err
24122 rm -f conftest.er1
24123 cat conftest.err >&5
24124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024125 (exit $ac_status); } && {
24126 test -z "$ac_c_werror_flag" ||
24127 test ! -s conftest.err
24128 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024129 ac_cv_stat_tv_nsec2=yes
24130else
24131 echo "$as_me: failed program was:" >&5
24132sed 's/^/| /' conftest.$ac_ext >&5
24133
Martin v. Löwiseba40652007-08-30 20:10:57 +000024134 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024135fi
24136
Martin v. Löwiseba40652007-08-30 20:10:57 +000024137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24138fi
24139
24140{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24141echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024142if test "$ac_cv_stat_tv_nsec2" = yes
24143then
24144
24145cat >>confdefs.h <<\_ACEOF
24146#define HAVE_STAT_TV_NSEC2 1
24147_ACEOF
24148
24149fi
24150
Jack Jansen666b1e72001-10-31 12:11:48 +000024151# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024152{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24153echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024154if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24155 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024156else
Martin v. Löwis11437992002-04-12 09:54:03 +000024157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024158/* confdefs.h. */
24159_ACEOF
24160cat confdefs.h >>conftest.$ac_ext
24161cat >>conftest.$ac_ext <<_ACEOF
24162/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024163#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024164int
24165main ()
24166{
Jack Jansen666b1e72001-10-31 12:11:48 +000024167
24168 int rtn;
24169 rtn = mvwdelch(0,0,0);
24170
Martin v. Löwis11437992002-04-12 09:54:03 +000024171 ;
24172 return 0;
24173}
24174_ACEOF
24175rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024176if { (ac_try="$ac_compile"
24177case "(($ac_try" in
24178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24179 *) ac_try_echo=$ac_try;;
24180esac
24181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024184 grep -v '^ *+' conftest.er1 >conftest.err
24185 rm -f conftest.er1
24186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024188 (exit $ac_status); } && {
24189 test -z "$ac_c_werror_flag" ||
24190 test ! -s conftest.err
24191 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024192 ac_cv_mvwdelch_is_expression=yes
24193else
Martin v. Löwis11437992002-04-12 09:54:03 +000024194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024195sed 's/^/| /' conftest.$ac_ext >&5
24196
Martin v. Löwiseba40652007-08-30 20:10:57 +000024197 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024198fi
24199
Martin v. Löwiseba40652007-08-30 20:10:57 +000024200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24201fi
24202
24203{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24204echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024205
24206if test "$ac_cv_mvwdelch_is_expression" = yes
24207then
Martin v. Löwis11437992002-04-12 09:54:03 +000024208
24209cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024210#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024211_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024212
24213fi
24214
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24216echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024217if test "${ac_cv_window_has_flags+set}" = set; then
24218 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024219else
Martin v. Löwis11437992002-04-12 09:54:03 +000024220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024221/* confdefs.h. */
24222_ACEOF
24223cat confdefs.h >>conftest.$ac_ext
24224cat >>conftest.$ac_ext <<_ACEOF
24225/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024226#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024227int
24228main ()
24229{
Jack Jansen666b1e72001-10-31 12:11:48 +000024230
24231 WINDOW *w;
24232 w->_flags = 0;
24233
Martin v. Löwis11437992002-04-12 09:54:03 +000024234 ;
24235 return 0;
24236}
24237_ACEOF
24238rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024239if { (ac_try="$ac_compile"
24240case "(($ac_try" in
24241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24242 *) ac_try_echo=$ac_try;;
24243esac
24244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24245 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024247 grep -v '^ *+' conftest.er1 >conftest.err
24248 rm -f conftest.er1
24249 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024251 (exit $ac_status); } && {
24252 test -z "$ac_c_werror_flag" ||
24253 test ! -s conftest.err
24254 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024255 ac_cv_window_has_flags=yes
24256else
Martin v. Löwis11437992002-04-12 09:54:03 +000024257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024258sed 's/^/| /' conftest.$ac_ext >&5
24259
Martin v. Löwiseba40652007-08-30 20:10:57 +000024260 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024261fi
24262
Martin v. Löwiseba40652007-08-30 20:10:57 +000024263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24264fi
24265
24266{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24267echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024268
Jack Jansen666b1e72001-10-31 12:11:48 +000024269
24270if test "$ac_cv_window_has_flags" = yes
24271then
Martin v. Löwis11437992002-04-12 09:54:03 +000024272
24273cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024274#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024275_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024276
24277fi
24278
Martin v. Löwiseba40652007-08-30 20:10:57 +000024279{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24280echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024281cat >conftest.$ac_ext <<_ACEOF
24282/* confdefs.h. */
24283_ACEOF
24284cat confdefs.h >>conftest.$ac_ext
24285cat >>conftest.$ac_ext <<_ACEOF
24286/* end confdefs.h. */
24287#include <curses.h>
24288int
24289main ()
24290{
24291void *x=is_term_resized
24292 ;
24293 return 0;
24294}
24295_ACEOF
24296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024297if { (ac_try="$ac_compile"
24298case "(($ac_try" in
24299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24300 *) ac_try_echo=$ac_try;;
24301esac
24302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24303 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024304 ac_status=$?
24305 grep -v '^ *+' conftest.er1 >conftest.err
24306 rm -f conftest.er1
24307 cat conftest.err >&5
24308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024309 (exit $ac_status); } && {
24310 test -z "$ac_c_werror_flag" ||
24311 test ! -s conftest.err
24312 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024313
24314cat >>confdefs.h <<\_ACEOF
24315#define HAVE_CURSES_IS_TERM_RESIZED 1
24316_ACEOF
24317
Martin v. Löwiseba40652007-08-30 20:10:57 +000024318 { echo "$as_me:$LINENO: result: yes" >&5
24319echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024320else
24321 echo "$as_me: failed program was:" >&5
24322sed 's/^/| /' conftest.$ac_ext >&5
24323
Martin v. Löwiseba40652007-08-30 20:10:57 +000024324 { echo "$as_me:$LINENO: result: no" >&5
24325echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024326
24327fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024328
Martin v. Löwiseba40652007-08-30 20:10:57 +000024329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24330
24331{ echo "$as_me:$LINENO: checking for resize_term" >&5
24332echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024333cat >conftest.$ac_ext <<_ACEOF
24334/* confdefs.h. */
24335_ACEOF
24336cat confdefs.h >>conftest.$ac_ext
24337cat >>conftest.$ac_ext <<_ACEOF
24338/* end confdefs.h. */
24339#include <curses.h>
24340int
24341main ()
24342{
24343void *x=resize_term
24344 ;
24345 return 0;
24346}
24347_ACEOF
24348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024349if { (ac_try="$ac_compile"
24350case "(($ac_try" in
24351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24352 *) ac_try_echo=$ac_try;;
24353esac
24354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24355 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024356 ac_status=$?
24357 grep -v '^ *+' conftest.er1 >conftest.err
24358 rm -f conftest.er1
24359 cat conftest.err >&5
24360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024361 (exit $ac_status); } && {
24362 test -z "$ac_c_werror_flag" ||
24363 test ! -s conftest.err
24364 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024365
24366cat >>confdefs.h <<\_ACEOF
24367#define HAVE_CURSES_RESIZE_TERM 1
24368_ACEOF
24369
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370 { echo "$as_me:$LINENO: result: yes" >&5
24371echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024372else
24373 echo "$as_me: failed program was:" >&5
24374sed 's/^/| /' conftest.$ac_ext >&5
24375
Martin v. Löwiseba40652007-08-30 20:10:57 +000024376 { echo "$as_me:$LINENO: result: no" >&5
24377echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024378
24379fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024380
Martin v. Löwiseba40652007-08-30 20:10:57 +000024381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24382
24383{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24384echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024385cat >conftest.$ac_ext <<_ACEOF
24386/* confdefs.h. */
24387_ACEOF
24388cat confdefs.h >>conftest.$ac_ext
24389cat >>conftest.$ac_ext <<_ACEOF
24390/* end confdefs.h. */
24391#include <curses.h>
24392int
24393main ()
24394{
24395void *x=resizeterm
24396 ;
24397 return 0;
24398}
24399_ACEOF
24400rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024401if { (ac_try="$ac_compile"
24402case "(($ac_try" in
24403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24404 *) ac_try_echo=$ac_try;;
24405esac
24406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24407 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024408 ac_status=$?
24409 grep -v '^ *+' conftest.er1 >conftest.err
24410 rm -f conftest.er1
24411 cat conftest.err >&5
24412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024413 (exit $ac_status); } && {
24414 test -z "$ac_c_werror_flag" ||
24415 test ! -s conftest.err
24416 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024417
24418cat >>confdefs.h <<\_ACEOF
24419#define HAVE_CURSES_RESIZETERM 1
24420_ACEOF
24421
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422 { echo "$as_me:$LINENO: result: yes" >&5
24423echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024424else
24425 echo "$as_me: failed program was:" >&5
24426sed 's/^/| /' conftest.$ac_ext >&5
24427
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428 { echo "$as_me:$LINENO: result: no" >&5
24429echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024430
24431fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024432
Martin v. Löwiseba40652007-08-30 20:10:57 +000024433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24434
24435{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24436echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024437
24438if test -r /dev/ptmx
24439then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024440 { echo "$as_me:$LINENO: result: yes" >&5
24441echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024442
24443cat >>confdefs.h <<\_ACEOF
24444#define HAVE_DEV_PTMX 1
24445_ACEOF
24446
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024447else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024448 { echo "$as_me:$LINENO: result: no" >&5
24449echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024450fi
24451
Martin v. Löwiseba40652007-08-30 20:10:57 +000024452{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24453echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024454
24455if test -r /dev/ptc
24456then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457 { echo "$as_me:$LINENO: result: yes" >&5
24458echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024459
24460cat >>confdefs.h <<\_ACEOF
24461#define HAVE_DEV_PTC 1
24462_ACEOF
24463
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024464else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024465 { echo "$as_me:$LINENO: result: no" >&5
24466echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024467fi
24468
Martin v. Löwiseba40652007-08-30 20:10:57 +000024469{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24470echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024471if test "$cross_compiling" = yes; then
24472 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24473See \`config.log' for more details." >&5
24474echo "$as_me: error: cannot run test program while cross compiling
24475See \`config.log' for more details." >&2;}
24476 { (exit 1); exit 1; }; }
24477else
24478 cat >conftest.$ac_ext <<_ACEOF
24479/* confdefs.h. */
24480_ACEOF
24481cat confdefs.h >>conftest.$ac_ext
24482cat >>conftest.$ac_ext <<_ACEOF
24483/* end confdefs.h. */
24484#include <stdio.h>
24485#include <stddef.h>
24486#include <string.h>
24487
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024488#ifdef HAVE_SYS_TYPES_H
24489#include <sys/types.h>
24490#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024491
24492#ifdef HAVE_SSIZE_T
24493typedef ssize_t Py_ssize_t;
24494#elif SIZEOF_VOID_P == SIZEOF_LONG
24495typedef long Py_ssize_t;
24496#else
24497typedef int Py_ssize_t;
24498#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024499
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024500int main()
24501{
24502 char buffer[256];
24503
Brett Cannon09d12362006-05-11 05:11:33 +000024504 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24505 return 1;
24506
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024507 if (strcmp(buffer, "123"))
24508 return 1;
24509
24510 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24511 return 1;
24512
24513 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024514 return 1;
24515
24516 return 0;
24517}
24518_ACEOF
24519rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024520if { (ac_try="$ac_link"
24521case "(($ac_try" in
24522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24523 *) ac_try_echo=$ac_try;;
24524esac
24525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24526 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024527 ac_status=$?
24528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24529 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530 { (case "(($ac_try" in
24531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24532 *) ac_try_echo=$ac_try;;
24533esac
24534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24535 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024536 ac_status=$?
24537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24538 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024539 { echo "$as_me:$LINENO: result: yes" >&5
24540echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024541
24542cat >>confdefs.h <<\_ACEOF
24543#define PY_FORMAT_SIZE_T "z"
24544_ACEOF
24545
24546else
24547 echo "$as_me: program exited with status $ac_status" >&5
24548echo "$as_me: failed program was:" >&5
24549sed 's/^/| /' conftest.$ac_ext >&5
24550
24551( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024552{ echo "$as_me:$LINENO: result: no" >&5
24553echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024555rm -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 +000024556fi
24557
Martin v. Löwiseba40652007-08-30 20:10:57 +000024558
24559
24560{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24561echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024562if test "${ac_cv_type_socklen_t+set}" = set; then
24563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024564else
Martin v. Löwis11437992002-04-12 09:54:03 +000024565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024566/* confdefs.h. */
24567_ACEOF
24568cat confdefs.h >>conftest.$ac_ext
24569cat >>conftest.$ac_ext <<_ACEOF
24570/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024571
24572#ifdef HAVE_SYS_TYPES_H
24573#include <sys/types.h>
24574#endif
24575#ifdef HAVE_SYS_SOCKET_H
24576#include <sys/socket.h>
24577#endif
24578
24579
Martin v. Löwiseba40652007-08-30 20:10:57 +000024580typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024581int
24582main ()
24583{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024584if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024585 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024587 return 0;
24588 ;
24589 return 0;
24590}
24591_ACEOF
24592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024593if { (ac_try="$ac_compile"
24594case "(($ac_try" in
24595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24596 *) ac_try_echo=$ac_try;;
24597esac
24598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024601 grep -v '^ *+' conftest.er1 >conftest.err
24602 rm -f conftest.er1
24603 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024605 (exit $ac_status); } && {
24606 test -z "$ac_c_werror_flag" ||
24607 test ! -s conftest.err
24608 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024609 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024610else
Martin v. Löwis11437992002-04-12 09:54:03 +000024611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024612sed 's/^/| /' conftest.$ac_ext >&5
24613
Martin v. Löwiseba40652007-08-30 20:10:57 +000024614 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024616
24617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024619{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24620echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024621if test $ac_cv_type_socklen_t = yes; then
24622 :
24623else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024624
Martin v. Löwis01c04012002-11-11 14:58:44 +000024625cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024626#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024627_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024628
24629fi
24630
Michael W. Hudson54241132001-12-07 15:38:26 +000024631
Michael W. Hudson54241132001-12-07 15:38:26 +000024632
24633
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024634for h in `(cd $srcdir;echo Python/thread_*.h)`
24635do
24636 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24637done
24638
Michael W. Hudson54241132001-12-07 15:38:26 +000024639
Neal Norwitzd24499d2005-12-18 21:36:39 +000024640SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024641{ echo "$as_me:$LINENO: checking for build directories" >&5
24642echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024643for dir in $SRCDIRS; do
24644 if test ! -d $dir; then
24645 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024646 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024647done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024648{ echo "$as_me:$LINENO: result: done" >&5
24649echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024650
Guido van Rossum627b2d71993-12-24 10:39:16 +000024651# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024652ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024653
Martin v. Löwis11437992002-04-12 09:54:03 +000024654cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024655# This file is a shell script that caches the results of configure
24656# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024657# scripts and configure runs, see configure's option --config-cache.
24658# It is not useful on other systems. If it contains results you don't
24659# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024660#
Martin v. Löwis11437992002-04-12 09:54:03 +000024661# config.status only pays attention to the cache file if you give it
24662# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024663#
Skip Montanaro6dead952003-09-25 14:50:04 +000024664# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024665# loading this file, other *unset* `ac_cv_foo' will be assigned the
24666# following values.
24667
24668_ACEOF
24669
Guido van Rossumf78abae1997-01-21 22:02:36 +000024670# The following way of writing the cache mishandles newlines in values,
24671# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024672# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024673# Ultrix sh set writes to stderr and can't be redirected directly,
24674# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024675(
24676 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24677 eval ac_val=\$$ac_var
24678 case $ac_val in #(
24679 *${as_nl}*)
24680 case $ac_var in #(
24681 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24682echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24683 esac
24684 case $ac_var in #(
24685 _ | IFS | as_nl) ;; #(
24686 *) $as_unset $ac_var ;;
24687 esac ;;
24688 esac
24689 done
24690
Martin v. Löwis11437992002-04-12 09:54:03 +000024691 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024692 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24693 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024694 # `set' does not quote correctly, so add quotes (double-quote
24695 # substitution turns \\\\ into \\, and sed turns \\ into \).
24696 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024697 "s/'/'\\\\''/g;
24698 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024699 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 *)
24701 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024703 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024704 esac |
24705 sort
24706) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024707 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024709 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024710 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024711 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24712 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024713 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24714 :end' >>confcache
24715if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24716 if test -w "$cache_file"; then
24717 test "x$cache_file" != "x/dev/null" &&
24718 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24719echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024720 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024721 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024722 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24723echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024725fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024726rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024727
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024728test "x$prefix" = xNONE && prefix=$ac_default_prefix
24729# Let make expand exec_prefix.
24730test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024732DEFS=-DHAVE_CONFIG_H
24733
Skip Montanaro6dead952003-09-25 14:50:04 +000024734ac_libobjs=
24735ac_ltlibobjs=
24736for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24737 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024738 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24739 ac_i=`echo "$ac_i" | sed "$ac_script"`
24740 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24741 # will be set to the directory where LIBOBJS objects are built.
24742 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24743 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024744done
24745LIBOBJS=$ac_libobjs
24746
24747LTLIBOBJS=$ac_ltlibobjs
24748
24749
Martin v. Löwis11437992002-04-12 09:54:03 +000024750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024751: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024752ac_clean_files_save=$ac_clean_files
24753ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24754{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24755echo "$as_me: creating $CONFIG_STATUS" >&6;}
24756cat >$CONFIG_STATUS <<_ACEOF
24757#! $SHELL
24758# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024759# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024760# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024761# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024762
Martin v. Löwis11437992002-04-12 09:54:03 +000024763debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024764ac_cs_recheck=false
24765ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024766SHELL=\${CONFIG_SHELL-$SHELL}
24767_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024768
Martin v. Löwis11437992002-04-12 09:54:03 +000024769cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024770## --------------------- ##
24771## M4sh Initialization. ##
24772## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024773
Martin v. Löwiseba40652007-08-30 20:10:57 +000024774# Be more Bourne compatible
24775DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024776if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24777 emulate sh
24778 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024779 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24780 # is contrary to our usage. Disable this feature.
24781 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024782 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024783else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024784 case `(set -o) 2>/dev/null` in
24785 *posix*) set -o posix ;;
24786esac
24787
Martin v. Löwis11437992002-04-12 09:54:03 +000024788fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024789
Skip Montanaro6dead952003-09-25 14:50:04 +000024790
Martin v. Löwis11437992002-04-12 09:54:03 +000024791
24792
Martin v. Löwiseba40652007-08-30 20:10:57 +000024793# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024794# Avoid depending upon Character Ranges.
24795as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24796as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24797as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24798as_cr_digits='0123456789'
24799as_cr_alnum=$as_cr_Letters$as_cr_digits
24800
24801# The user is always right.
24802if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024803 echo "#! /bin/sh" >conf$$.sh
24804 echo "exit 0" >>conf$$.sh
24805 chmod +x conf$$.sh
24806 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024807 PATH_SEPARATOR=';'
24808 else
24809 PATH_SEPARATOR=:
24810 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024811 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024812fi
24813
Martin v. Löwiseba40652007-08-30 20:10:57 +000024814# Support unset when possible.
24815if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24816 as_unset=unset
24817else
24818 as_unset=false
24819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024820
Martin v. Löwiseba40652007-08-30 20:10:57 +000024821
24822# IFS
24823# We need space, tab and new line, in precisely that order. Quoting is
24824# there to prevent editors from complaining about space-tab.
24825# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24826# splitting by setting IFS to empty value.)
24827as_nl='
24828'
24829IFS=" "" $as_nl"
24830
24831# Find who we are. Look in the path if we contain no directory separator.
24832case $0 in
24833 *[\\/]* ) as_myself=$0 ;;
24834 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024835for as_dir in $PATH
24836do
24837 IFS=$as_save_IFS
24838 test -z "$as_dir" && as_dir=.
24839 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24840done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024841IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024842
Martin v. Löwiseba40652007-08-30 20:10:57 +000024843 ;;
24844esac
24845# We did not find ourselves, most probably we were run as `sh COMMAND'
24846# in which case we are not to be found in the path.
24847if test "x$as_myself" = x; then
24848 as_myself=$0
24849fi
24850if test ! -f "$as_myself"; then
24851 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24852 { (exit 1); exit 1; }
24853fi
24854
24855# Work around bugs in pre-3.0 UWIN ksh.
24856for as_var in ENV MAIL MAILPATH
24857do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24858done
24859PS1='$ '
24860PS2='> '
24861PS4='+ '
24862
24863# NLS nuisances.
24864for as_var in \
24865 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24866 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24867 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024868do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024869 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24870 eval $as_var=C; export $as_var
24871 else
24872 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24873 fi
24874done
24875
24876# Required to use basename.
24877if expr a : '\(a\)' >/dev/null 2>&1 &&
24878 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24879 as_expr=expr
24880else
24881 as_expr=false
24882fi
24883
24884if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24885 as_basename=basename
24886else
24887 as_basename=false
24888fi
24889
24890
24891# Name of the executable.
24892as_me=`$as_basename -- "$0" ||
24893$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24894 X"$0" : 'X\(//\)$' \| \
24895 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24896echo X/"$0" |
24897 sed '/^.*\/\([^/][^/]*\)\/*$/{
24898 s//\1/
24899 q
24900 }
24901 /^X\/\(\/\/\)$/{
24902 s//\1/
24903 q
24904 }
24905 /^X\/\(\/\).*/{
24906 s//\1/
24907 q
24908 }
24909 s/.*/./; q'`
24910
24911# CDPATH.
24912$as_unset CDPATH
24913
24914
24915
Martin v. Löwis11437992002-04-12 09:54:03 +000024916 as_lineno_1=$LINENO
24917 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024918 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024919 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024920
Martin v. Löwis11437992002-04-12 09:54:03 +000024921 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24922 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024923 # line-number line after each line using $LINENO; the second 'sed'
24924 # does the real work. The second script uses 'N' to pair each
24925 # line-number line with the line containing $LINENO, and appends
24926 # trailing '-' during substitution so that $LINENO is not a special
24927 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024928 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929 # scripts with optimization help from Paolo Bonzini. Blame Lee
24930 # E. McMahon (1931-1989) for sed's syntax. :-)
24931 sed -n '
24932 p
24933 /[$]LINENO/=
24934 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024935 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936 s/[$]LINENO.*/&-/
24937 t lineno
24938 b
24939 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024940 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941 :loop
24942 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024943 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024944 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024945 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024946 chmod +x "$as_me.lineno" ||
24947 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024948 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024949
Martin v. Löwis11437992002-04-12 09:54:03 +000024950 # Don't try to exec as it changes $[0], causing all sort of problems
24951 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024952 # original and so on. Autoconf is especially sensitive to this).
24953 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024954 # Exit status is that of the last command.
24955 exit
24956}
24957
24958
Martin v. Löwiseba40652007-08-30 20:10:57 +000024959if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24960 as_dirname=dirname
24961else
24962 as_dirname=false
24963fi
24964
24965ECHO_C= ECHO_N= ECHO_T=
24966case `echo -n x` in
24967-n*)
24968 case `echo 'x\c'` in
24969 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24970 *) ECHO_C='\c';;
24971 esac;;
24972*)
24973 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024974esac
24975
Martin v. Löwiseba40652007-08-30 20:10:57 +000024976if expr a : '\(a\)' >/dev/null 2>&1 &&
24977 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024978 as_expr=expr
24979else
24980 as_expr=false
24981fi
24982
24983rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024984if test -d conf$$.dir; then
24985 rm -f conf$$.dir/conf$$.file
24986else
24987 rm -f conf$$.dir
24988 mkdir conf$$.dir
24989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024990echo >conf$$.file
24991if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024992 as_ln_s='ln -s'
24993 # ... but there are two gotchas:
24994 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24995 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24996 # In both cases, we have to default to `cp -p'.
24997 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024998 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024999elif ln conf$$.file conf$$ 2>/dev/null; then
25000 as_ln_s=ln
25001else
25002 as_ln_s='cp -p'
25003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025004rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25005rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025006
Skip Montanaro6dead952003-09-25 14:50:04 +000025007if mkdir -p . 2>/dev/null; then
25008 as_mkdir_p=:
25009else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025010 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025011 as_mkdir_p=false
25012fi
25013
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014if test -x / >/dev/null 2>&1; then
25015 as_test_x='test -x'
25016else
25017 if ls -dL / >/dev/null 2>&1; then
25018 as_ls_L_option=L
25019 else
25020 as_ls_L_option=
25021 fi
25022 as_test_x='
25023 eval sh -c '\''
25024 if test -d "$1"; then
25025 test -d "$1/.";
25026 else
25027 case $1 in
25028 -*)set "./$1";;
25029 esac;
25030 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25031 ???[sx]*):;;*)false;;esac;fi
25032 '\'' sh
25033 '
25034fi
25035as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025036
25037# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025038as_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 +000025039
25040# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025041as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025042
25043
Martin v. Löwis11437992002-04-12 09:54:03 +000025044exec 6>&1
25045
Martin v. Löwiseba40652007-08-30 20:10:57 +000025046# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025047# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025048# values after options handling.
25049ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025050This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025052
25053 CONFIG_FILES = $CONFIG_FILES
25054 CONFIG_HEADERS = $CONFIG_HEADERS
25055 CONFIG_LINKS = $CONFIG_LINKS
25056 CONFIG_COMMANDS = $CONFIG_COMMANDS
25057 $ $0 $@
25058
Martin v. Löwiseba40652007-08-30 20:10:57 +000025059on `(hostname || uname -n) 2>/dev/null | sed 1q`
25060"
25061
Martin v. Löwis11437992002-04-12 09:54:03 +000025062_ACEOF
25063
Martin v. Löwiseba40652007-08-30 20:10:57 +000025064cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025065# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025066config_files="$ac_config_files"
25067config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025068
Martin v. Löwiseba40652007-08-30 20:10:57 +000025069_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025070
25071cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025072ac_cs_usage="\
25073\`$as_me' instantiates files from templates according to the
25074current configuration.
25075
25076Usage: $0 [OPTIONS] [FILE]...
25077
25078 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025079 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025080 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025081 -d, --debug don't remove temporary files
25082 --recheck update $as_me by reconfiguring in the same conditions
25083 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025084 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025085 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025086 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025087
25088Configuration files:
25089$config_files
25090
25091Configuration headers:
25092$config_headers
25093
25094Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025095
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025097cat >>$CONFIG_STATUS <<_ACEOF
25098ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025099python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100configured by $0, generated by GNU Autoconf 2.61,
25101 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025102
Martin v. Löwiseba40652007-08-30 20:10:57 +000025103Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025104This config.status script is free software; the Free Software Foundation
25105gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025106
25107ac_pwd='$ac_pwd'
25108srcdir='$srcdir'
25109INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025110_ACEOF
25111
25112cat >>$CONFIG_STATUS <<\_ACEOF
25113# If no file are specified by the user, then we need to provide default
25114# value. By we need to know if files were specified by the user.
25115ac_need_defaults=:
25116while test $# != 0
25117do
25118 case $1 in
25119 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025120 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25121 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025122 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025123 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025124 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025125 ac_option=$1
25126 ac_optarg=$2
25127 ac_shift=shift
25128 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025129 esac
25130
Skip Montanaro6dead952003-09-25 14:50:04 +000025131 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025132 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025133 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25134 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025135 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25136 echo "$ac_cs_version"; exit ;;
25137 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025138 debug=: ;;
25139 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025140 $ac_shift
25141 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025142 ac_need_defaults=false;;
25143 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025144 $ac_shift
25145 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025146 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025147 --he | --h)
25148 # Conflict between --help and --header
25149 { echo "$as_me: error: ambiguous option: $1
25150Try \`$0 --help' for more information." >&2
25151 { (exit 1); exit 1; }; };;
25152 --help | --hel | -h )
25153 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025154 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25155 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25156 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025157
25158 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025159 -*) { echo "$as_me: error: unrecognized option: $1
25160Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025161 { (exit 1); exit 1; }; } ;;
25162
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 *) ac_config_targets="$ac_config_targets $1"
25164 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025165
25166 esac
25167 shift
25168done
25169
Skip Montanaro6dead952003-09-25 14:50:04 +000025170ac_configure_extra_args=
25171
25172if $ac_cs_silent; then
25173 exec 6>/dev/null
25174 ac_configure_extra_args="$ac_configure_extra_args --silent"
25175fi
25176
25177_ACEOF
25178cat >>$CONFIG_STATUS <<_ACEOF
25179if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025180 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25181 CONFIG_SHELL=$SHELL
25182 export CONFIG_SHELL
25183 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025184fi
25185
Martin v. Löwis11437992002-04-12 09:54:03 +000025186_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025187cat >>$CONFIG_STATUS <<\_ACEOF
25188exec 5>>config.log
25189{
25190 echo
25191 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25192## Running $as_me. ##
25193_ASBOX
25194 echo "$ac_log"
25195} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025196
Martin v. Löwiseba40652007-08-30 20:10:57 +000025197_ACEOF
25198cat >>$CONFIG_STATUS <<_ACEOF
25199_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025200
25201cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025202
25203# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025204for ac_config_target in $ac_config_targets
25205do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025206 case $ac_config_target in
25207 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25208 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25209 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25210 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025211 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25212 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25214 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25215
Martin v. Löwis11437992002-04-12 09:54:03 +000025216 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25217echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25218 { (exit 1); exit 1; }; };;
25219 esac
25220done
25221
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222
Martin v. Löwis11437992002-04-12 09:54:03 +000025223# If the user did not use the arguments to specify the items to instantiate,
25224# then the envvar interface is used. Set only those that are not.
25225# We use the long form for the default assignment because of an extremely
25226# bizarre bug on SunOS 4.1.3.
25227if $ac_need_defaults; then
25228 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25229 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25230fi
25231
Skip Montanaro6dead952003-09-25 14:50:04 +000025232# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025234# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025235# Hook for its removal unless debugging.
25236# Note that there is a small window in which the directory will not be cleaned:
25237# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025238$debug ||
25239{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240 tmp=
25241 trap 'exit_status=$?
25242 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25243' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025244 trap '{ (exit 1); exit 1; }' 1 2 13 15
25245}
Martin v. Löwis11437992002-04-12 09:54:03 +000025246# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025247
Martin v. Löwis11437992002-04-12 09:54:03 +000025248{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025249 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 test -n "$tmp" && test -d "$tmp"
25251} ||
25252{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253 tmp=./conf$$-$RANDOM
25254 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025255} ||
25256{
Skip Montanaro6dead952003-09-25 14:50:04 +000025257 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 { (exit 1); exit 1; }
25259}
25260
Martin v. Löwis11437992002-04-12 09:54:03 +000025261#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025263#
25264
25265# No need to generate the scripts if there are no CONFIG_FILES.
25266# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025268
25269_ACEOF
25270
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271
25272
25273ac_delim='%!_!# '
25274for ac_last_try in false false false false false :; do
25275 cat >conf$$subs.sed <<_ACEOF
25276SHELL!$SHELL$ac_delim
25277PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25278PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25279PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25280PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25281PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25282PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25283exec_prefix!$exec_prefix$ac_delim
25284prefix!$prefix$ac_delim
25285program_transform_name!$program_transform_name$ac_delim
25286bindir!$bindir$ac_delim
25287sbindir!$sbindir$ac_delim
25288libexecdir!$libexecdir$ac_delim
25289datarootdir!$datarootdir$ac_delim
25290datadir!$datadir$ac_delim
25291sysconfdir!$sysconfdir$ac_delim
25292sharedstatedir!$sharedstatedir$ac_delim
25293localstatedir!$localstatedir$ac_delim
25294includedir!$includedir$ac_delim
25295oldincludedir!$oldincludedir$ac_delim
25296docdir!$docdir$ac_delim
25297infodir!$infodir$ac_delim
25298htmldir!$htmldir$ac_delim
25299dvidir!$dvidir$ac_delim
25300pdfdir!$pdfdir$ac_delim
25301psdir!$psdir$ac_delim
25302libdir!$libdir$ac_delim
25303localedir!$localedir$ac_delim
25304mandir!$mandir$ac_delim
25305DEFS!$DEFS$ac_delim
25306ECHO_C!$ECHO_C$ac_delim
25307ECHO_N!$ECHO_N$ac_delim
25308ECHO_T!$ECHO_T$ac_delim
25309LIBS!$LIBS$ac_delim
25310build_alias!$build_alias$ac_delim
25311host_alias!$host_alias$ac_delim
25312target_alias!$target_alias$ac_delim
25313VERSION!$VERSION$ac_delim
25314SOVERSION!$SOVERSION$ac_delim
25315CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25316UNIVERSALSDK!$UNIVERSALSDK$ac_delim
25317PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025318PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025319PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25320PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25321PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25322FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25323FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25324FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25325FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25326FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25327MACHDEP!$MACHDEP$ac_delim
25328SGI_ABI!$SGI_ABI$ac_delim
25329EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25330EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25331CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25332EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25333CC!$CC$ac_delim
25334CFLAGS!$CFLAGS$ac_delim
25335LDFLAGS!$LDFLAGS$ac_delim
25336CPPFLAGS!$CPPFLAGS$ac_delim
25337ac_ct_CC!$ac_ct_CC$ac_delim
25338EXEEXT!$EXEEXT$ac_delim
25339OBJEXT!$OBJEXT$ac_delim
25340CXX!$CXX$ac_delim
25341MAINCC!$MAINCC$ac_delim
25342CPP!$CPP$ac_delim
25343GREP!$GREP$ac_delim
25344EGREP!$EGREP$ac_delim
25345BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25346LIBRARY!$LIBRARY$ac_delim
25347LDLIBRARY!$LDLIBRARY$ac_delim
25348DLLLIBRARY!$DLLLIBRARY$ac_delim
25349BLDLIBRARY!$BLDLIBRARY$ac_delim
25350LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25351INSTSONAME!$INSTSONAME$ac_delim
25352RUNSHARED!$RUNSHARED$ac_delim
25353LINKCC!$LINKCC$ac_delim
25354RANLIB!$RANLIB$ac_delim
25355AR!$AR$ac_delim
25356SVNVERSION!$SVNVERSION$ac_delim
25357INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25358INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25359INSTALL_DATA!$INSTALL_DATA$ac_delim
25360LN!$LN$ac_delim
25361OPT!$OPT$ac_delim
25362BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025363UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025364OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25365LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25366SO!$SO$ac_delim
25367LDSHARED!$LDSHARED$ac_delim
25368BLDSHARED!$BLDSHARED$ac_delim
25369CCSHARED!$CCSHARED$ac_delim
25370LINKFORSHARED!$LINKFORSHARED$ac_delim
25371CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
25372SHLIBS!$SHLIBS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373_ACEOF
25374
25375 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25376 break
25377 elif $ac_last_try; then
25378 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25379echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25380 { (exit 1); exit 1; }; }
25381 else
25382 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025383 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025384done
25385
25386ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25387if test -n "$ac_eof"; then
25388 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25389 ac_eof=`expr $ac_eof + 1`
25390fi
25391
25392cat >>$CONFIG_STATUS <<_ACEOF
25393cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25394/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25395_ACEOF
25396sed '
25397s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25398s/^/s,@/; s/!/@,|#_!!_#|/
25399:n
25400t n
25401s/'"$ac_delim"'$/,g/; t
25402s/$/\\/; p
25403N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25404' >>$CONFIG_STATUS <conf$$subs.sed
25405rm -f conf$$subs.sed
25406cat >>$CONFIG_STATUS <<_ACEOF
25407CEOF$ac_eof
25408_ACEOF
25409
25410
25411ac_delim='%!_!# '
25412for ac_last_try in false false false false false :; do
25413 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025414USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025415SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025416USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25417LDLAST!$LDLAST$ac_delim
25418THREADOBJ!$THREADOBJ$ac_delim
25419DLINCLDIR!$DLINCLDIR$ac_delim
25420DYNLOADFILE!$DYNLOADFILE$ac_delim
25421MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25422TRUE!$TRUE$ac_delim
25423LIBOBJS!$LIBOBJS$ac_delim
25424HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25425HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25426HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25427HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25428HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25429LIBM!$LIBM$ac_delim
25430LIBC!$LIBC$ac_delim
25431UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25432THREADHEADERS!$THREADHEADERS$ac_delim
25433SRCDIRS!$SRCDIRS$ac_delim
25434LTLIBOBJS!$LTLIBOBJS$ac_delim
25435_ACEOF
25436
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025437 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025438 break
25439 elif $ac_last_try; then
25440 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25441echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25442 { (exit 1); exit 1; }; }
25443 else
25444 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25445 fi
25446done
25447
25448ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25449if test -n "$ac_eof"; then
25450 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25451 ac_eof=`expr $ac_eof + 1`
25452fi
25453
25454cat >>$CONFIG_STATUS <<_ACEOF
25455cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25456/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25457_ACEOF
25458sed '
25459s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25460s/^/s,@/; s/!/@,|#_!!_#|/
25461:n
25462t n
25463s/'"$ac_delim"'$/,g/; t
25464s/$/\\/; p
25465N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25466' >>$CONFIG_STATUS <conf$$subs.sed
25467rm -f conf$$subs.sed
25468cat >>$CONFIG_STATUS <<_ACEOF
25469:end
25470s/|#_!!_#|//g
25471CEOF$ac_eof
25472_ACEOF
25473
25474
25475# VPATH may cause trouble with some makes, so we remove $(srcdir),
25476# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25477# trailing colons and then remove the whole line if VPATH becomes empty
25478# (actually we leave an empty line to preserve line numbers).
25479if test "x$srcdir" = x.; then
25480 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25481s/:*\$(srcdir):*/:/
25482s/:*\${srcdir}:*/:/
25483s/:*@srcdir@:*/:/
25484s/^\([^=]*=[ ]*\):*/\1/
25485s/:*$//
25486s/^[^=]*=[ ]*$//
25487}'
25488fi
25489
25490cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025491fi # test -n "$CONFIG_FILES"
25492
Martin v. Löwiseba40652007-08-30 20:10:57 +000025493
25494for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25495do
25496 case $ac_tag in
25497 :[FHLC]) ac_mode=$ac_tag; continue;;
25498 esac
25499 case $ac_mode$ac_tag in
25500 :[FHL]*:*);;
25501 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25502echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25503 { (exit 1); exit 1; }; };;
25504 :[FH]-) ac_tag=-:-;;
25505 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25506 esac
25507 ac_save_IFS=$IFS
25508 IFS=:
25509 set x $ac_tag
25510 IFS=$ac_save_IFS
25511 shift
25512 ac_file=$1
25513 shift
25514
25515 case $ac_mode in
25516 :L) ac_source=$1;;
25517 :[FH])
25518 ac_file_inputs=
25519 for ac_f
25520 do
25521 case $ac_f in
25522 -) ac_f="$tmp/stdin";;
25523 *) # Look for the file first in the build tree, then in the source tree
25524 # (if the path is not absolute). The absolute path cannot be DOS-style,
25525 # because $ac_f cannot contain `:'.
25526 test -f "$ac_f" ||
25527 case $ac_f in
25528 [\\/$]*) false;;
25529 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25530 esac ||
25531 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25532echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25533 { (exit 1); exit 1; }; };;
25534 esac
25535 ac_file_inputs="$ac_file_inputs $ac_f"
25536 done
25537
25538 # Let's still pretend it is `configure' which instantiates (i.e., don't
25539 # use $as_me), people would be surprised to read:
25540 # /* config.h. Generated by config.status. */
25541 configure_input="Generated from "`IFS=:
25542 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25543 if test x"$ac_file" != x-; then
25544 configure_input="$ac_file. $configure_input"
25545 { echo "$as_me:$LINENO: creating $ac_file" >&5
25546echo "$as_me: creating $ac_file" >&6;}
25547 fi
25548
25549 case $ac_tag in
25550 *:-:* | *:-) cat >"$tmp/stdin";;
25551 esac
25552 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025553 esac
25554
Martin v. Löwiseba40652007-08-30 20:10:57 +000025555 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025556$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025557 X"$ac_file" : 'X\(//\)[^/]' \| \
25558 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025559 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025560echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025561 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25562 s//\1/
25563 q
25564 }
25565 /^X\(\/\/\)[^/].*/{
25566 s//\1/
25567 q
25568 }
25569 /^X\(\/\/\)$/{
25570 s//\1/
25571 q
25572 }
25573 /^X\(\/\).*/{
25574 s//\1/
25575 q
25576 }
25577 s/.*/./; q'`
25578 { as_dir="$ac_dir"
25579 case $as_dir in #(
25580 -*) as_dir=./$as_dir;;
25581 esac
25582 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025583 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025584 while :; do
25585 case $as_dir in #(
25586 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25587 *) as_qdir=$as_dir;;
25588 esac
25589 as_dirs="'$as_qdir' $as_dirs"
25590 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025591$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025592 X"$as_dir" : 'X\(//\)[^/]' \| \
25593 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025594 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025595echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025596 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25597 s//\1/
25598 q
25599 }
25600 /^X\(\/\/\)[^/].*/{
25601 s//\1/
25602 q
25603 }
25604 /^X\(\/\/\)$/{
25605 s//\1/
25606 q
25607 }
25608 /^X\(\/\).*/{
25609 s//\1/
25610 q
25611 }
25612 s/.*/./; q'`
25613 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025614 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025615 test -z "$as_dirs" || eval "mkdir $as_dirs"
25616 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25617echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025618 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025619 ac_builddir=.
25620
Martin v. Löwiseba40652007-08-30 20:10:57 +000025621case "$ac_dir" in
25622.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25623*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025624 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025625 # A ".." for each directory in $ac_dir_suffix.
25626 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25627 case $ac_top_builddir_sub in
25628 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25629 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25630 esac ;;
25631esac
25632ac_abs_top_builddir=$ac_pwd
25633ac_abs_builddir=$ac_pwd$ac_dir_suffix
25634# for backward compatibility:
25635ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025636
25637case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025638 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025639 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025640 ac_top_srcdir=$ac_top_builddir_sub
25641 ac_abs_top_srcdir=$ac_pwd ;;
25642 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025643 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025644 ac_top_srcdir=$srcdir
25645 ac_abs_top_srcdir=$srcdir ;;
25646 *) # Relative name.
25647 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25648 ac_top_srcdir=$ac_top_build_prefix$srcdir
25649 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025650esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025651ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025652
Martin v. Löwis11437992002-04-12 09:54:03 +000025653
Martin v. Löwiseba40652007-08-30 20:10:57 +000025654 case $ac_mode in
25655 :F)
25656 #
25657 # CONFIG_FILE
25658 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025659
25660 case $INSTALL in
25661 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025662 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025663 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025664_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025665
25666cat >>$CONFIG_STATUS <<\_ACEOF
25667# If the template does not know about datarootdir, expand it.
25668# FIXME: This hack should be removed a few years after 2.60.
25669ac_datarootdir_hack=; ac_datarootdir_seen=
25670
25671case `sed -n '/datarootdir/ {
25672 p
25673 q
25674}
25675/@datadir@/p
25676/@docdir@/p
25677/@infodir@/p
25678/@localedir@/p
25679/@mandir@/p
25680' $ac_file_inputs` in
25681*datarootdir*) ac_datarootdir_seen=yes;;
25682*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25683 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25684echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25685_ACEOF
25686cat >>$CONFIG_STATUS <<_ACEOF
25687 ac_datarootdir_hack='
25688 s&@datadir@&$datadir&g
25689 s&@docdir@&$docdir&g
25690 s&@infodir@&$infodir&g
25691 s&@localedir@&$localedir&g
25692 s&@mandir@&$mandir&g
25693 s&\\\${datarootdir}&$datarootdir&g' ;;
25694esac
25695_ACEOF
25696
25697# Neutralize VPATH when `$srcdir' = `.'.
25698# Shell code in configure.ac might set extrasub.
25699# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025700cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025701 sed "$ac_vpsub
25702$extrasub
25703_ACEOF
25704cat >>$CONFIG_STATUS <<\_ACEOF
25705:t
25706/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025707s&@configure_input@&$configure_input&;t t
25708s&@top_builddir@&$ac_top_builddir_sub&;t t
25709s&@srcdir@&$ac_srcdir&;t t
25710s&@abs_srcdir@&$ac_abs_srcdir&;t t
25711s&@top_srcdir@&$ac_top_srcdir&;t t
25712s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25713s&@builddir@&$ac_builddir&;t t
25714s&@abs_builddir@&$ac_abs_builddir&;t t
25715s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25716s&@INSTALL@&$ac_INSTALL&;t t
25717$ac_datarootdir_hack
25718" $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 +000025719
Martin v. Löwiseba40652007-08-30 20:10:57 +000025720test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25721 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25722 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25723 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25724which seems to be undefined. Please make sure it is defined." >&5
25725echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25726which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025727
Martin v. Löwiseba40652007-08-30 20:10:57 +000025728 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025729 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025730 -) cat "$tmp/out"; rm -f "$tmp/out";;
25731 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025732 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733 ;;
25734 :H)
25735 #
25736 # CONFIG_HEADER
25737 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025738_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025739
Martin v. Löwiseba40652007-08-30 20:10:57 +000025740# Transform confdefs.h into a sed script `conftest.defines', that
25741# substitutes the proper values into config.h.in to produce config.h.
25742rm -f conftest.defines conftest.tail
25743# First, append a space to every undef/define line, to ease matching.
25744echo 's/$/ /' >conftest.defines
25745# Then, protect against being on the right side of a sed subst, or in
25746# an unquoted here document, in config.status. If some macros were
25747# called several times there might be several #defines for the same
25748# symbol, which is useless. But do not sort them, since the last
25749# AC_DEFINE must be honored.
25750ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25751# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25752# NAME is the cpp macro being defined, VALUE is the value it is being given.
25753# PARAMS is the parameter list in the macro definition--in most cases, it's
25754# just an empty string.
25755ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25756ac_dB='\\)[ (].*,\\1define\\2'
25757ac_dC=' '
25758ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025759
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760uniq confdefs.h |
25761 sed -n '
25762 t rset
25763 :rset
25764 s/^[ ]*#[ ]*define[ ][ ]*//
25765 t ok
25766 d
25767 :ok
25768 s/[\\&,]/\\&/g
25769 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25770 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25771 ' >>conftest.defines
25772
25773# Remove the space that was appended to ease matching.
25774# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025775# example, in the case of _POSIX_SOURCE, which is predefined and required
25776# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025777# (The regexp can be short, since the line contains either #define or #undef.)
25778echo 's/ $//
25779s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025780
Martin v. Löwiseba40652007-08-30 20:10:57 +000025781# Break up conftest.defines:
25782ac_max_sed_lines=50
25783
25784# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25785# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25786# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25787# et cetera.
25788ac_in='$ac_file_inputs'
25789ac_out='"$tmp/out1"'
25790ac_nxt='"$tmp/out2"'
25791
25792while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025793do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025794 # Write a here document:
25795 cat >>$CONFIG_STATUS <<_ACEOF
25796 # First, check the format of the line:
25797 cat >"\$tmp/defines.sed" <<\\CEOF
25798/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25799/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25800b
25801:def
25802_ACEOF
25803 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025804 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025805 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25806 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25807 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25808 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025809 rm -f conftest.defines
25810 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025811done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025812rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025813
Martin v. Löwiseba40652007-08-30 20:10:57 +000025814echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025815cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025816 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025817 echo "/* $configure_input */" >"$tmp/config.h"
25818 cat "$ac_result" >>"$tmp/config.h"
25819 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025820 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25821echo "$as_me: $ac_file is unchanged" >&6;}
25822 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025825 fi
25826 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827 echo "/* $configure_input */"
25828 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025829 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025830 rm -f "$tmp/out12"
25831 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025832
Martin v. Löwiseba40652007-08-30 20:10:57 +000025833
25834 esac
25835
25836done # for ac_tag
25837
Guido van Rossum627b2d71993-12-24 10:39:16 +000025838
Martin v. Löwis11437992002-04-12 09:54:03 +000025839{ (exit 0); exit 0; }
25840_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025841chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025842ac_clean_files=$ac_clean_files_save
25843
25844
25845# configure is writing to config.log, and then calls config.status.
25846# config.status does its own redirection, appending to config.log.
25847# Unfortunately, on DOS this fails, as config.log is still kept open
25848# by configure, so config.status won't be able to write to it; its
25849# output is simply discarded. So we exec the FD to /dev/null,
25850# effectively closing config.log, so it can be properly (re)opened and
25851# appended to by config.status. When coming back to configure, we
25852# need to make the FD available again.
25853if test "$no_create" != yes; then
25854 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025855 ac_config_status_args=
25856 test "$silent" = yes &&
25857 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025858 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025859 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025860 exec 5>>config.log
25861 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25862 # would make configure fail if this is the last instruction.
25863 $ac_cs_success || { (exit 1); exit 1; }
25864fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025865
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025866
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025867echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025868if test ! -f Modules/Setup
25869then
25870 cp $srcdir/Modules/Setup.dist Modules/Setup
25871fi
25872
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025873echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025874if test ! -f Modules/Setup.local
25875then
25876 echo "# Edit this file for local setup changes" >Modules/Setup.local
25877fi
25878
25879echo "creating Makefile"
25880$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25881 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025882 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025883
25884case $ac_sys_system in
25885BeOS)
25886 { echo "$as_me:$LINENO: WARNING:
25887
25888 Support for BeOS is deprecated as of Python 2.6.
25889 See PEP 11 for the gory details.
25890 " >&5
25891echo "$as_me: WARNING:
25892
25893 Support for BeOS is deprecated as of Python 2.6.
25894 See PEP 11 for the gory details.
25895 " >&2;}
25896 ;;
25897*) ;;
25898esac
25899
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025900mv config.c Modules