blob: cded3b57bf92ac4e9c94de662387fafcc70a0d07 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002# From configure.in Revision: 63690 .
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 Norwitz4bc2c092006-09-05 02:57:01 +00002075 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
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 Oussoren988117f2006-04-29 11:31:35 +00004662 fi
4663
Skip Montanarodecc6a42003-01-01 20:07:49 +00004664 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004665 OSF*)
4666 BASECFLAGS="$BASECFLAGS -mieee"
4667 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004668 esac
4669 ;;
4670
4671*)
4672 case $ac_sys_system in
4673 OpenUNIX*|UnixWare*)
4674 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4675 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004676 OSF*)
4677 BASECFLAGS="$BASECFLAGS -ieee -std"
4678 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004679 SCO_SV*)
4680 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4681 ;;
4682 esac
4683 ;;
4684esac
4685
Fred Drakee1ceaa02001-12-04 20:55:47 +00004686if test "$Py_DEBUG" = 'true'; then
4687 :
4688else
4689 OPT="-DNDEBUG $OPT"
4690fi
4691
Guido van Rossum563e7081996-09-10 18:20:48 +00004692if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004693then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004694 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004695fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004696
Neal Norwitz020c46a2006-01-07 21:39:28 +00004697# disable check for icc since it seems to pass, but generates a warning
4698if test "$CC" = icc
4699then
4700 ac_cv_opt_olimit_ok=no
4701fi
4702
Martin v. Löwiseba40652007-08-30 20:10:57 +00004703{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4704echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004705if test "${ac_cv_opt_olimit_ok+set}" = set; then
4706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004707else
4708 ac_save_cc="$CC"
4709CC="$CC -OPT:Olimit=0"
4710if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004711 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004712else
Martin v. Löwis11437992002-04-12 09:54:03 +00004713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004714/* confdefs.h. */
4715_ACEOF
4716cat confdefs.h >>conftest.$ac_ext
4717cat >>conftest.$ac_ext <<_ACEOF
4718/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004719int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004720_ACEOF
4721rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004722if { (ac_try="$ac_link"
4723case "(($ac_try" in
4724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4725 *) ac_try_echo=$ac_try;;
4726esac
4727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4728 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 ac_status=$?
4730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4731 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004732 { (case "(($ac_try" in
4733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4734 *) ac_try_echo=$ac_try;;
4735esac
4736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4737 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004738 ac_status=$?
4739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004741 ac_cv_opt_olimit_ok=yes
4742else
Martin v. Löwis11437992002-04-12 09:54:03 +00004743 echo "$as_me: program exited with status $ac_status" >&5
4744echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004745sed 's/^/| /' conftest.$ac_ext >&5
4746
Martin v. Löwis11437992002-04-12 09:54:03 +00004747( exit $ac_status )
4748ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004750rm -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 +00004751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004752
4753
Guido van Rossum91922671997-10-09 20:24:13 +00004754CC="$ac_save_cc"
4755fi
4756
Martin v. Löwiseba40652007-08-30 20:10:57 +00004757{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4758echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004759if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004760 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004761 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4762 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4763 # environment?
4764 Darwin*)
4765 ;;
4766 *)
4767 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4768 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004769 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004770else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4772echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004773 if test "${ac_cv_olimit_ok+set}" = set; then
4774 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004775else
4776 ac_save_cc="$CC"
4777 CC="$CC -Olimit 1500"
4778 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004779 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004780else
Martin v. Löwis11437992002-04-12 09:54:03 +00004781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004782/* confdefs.h. */
4783_ACEOF
4784cat confdefs.h >>conftest.$ac_ext
4785cat >>conftest.$ac_ext <<_ACEOF
4786/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004787int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004788_ACEOF
4789rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004790if { (ac_try="$ac_link"
4791case "(($ac_try" in
4792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4793 *) ac_try_echo=$ac_try;;
4794esac
4795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4796 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 ac_status=$?
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004800 { (case "(($ac_try" in
4801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4802 *) ac_try_echo=$ac_try;;
4803esac
4804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4805 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004806 ac_status=$?
4807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004809 ac_cv_olimit_ok=yes
4810else
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 echo "$as_me: program exited with status $ac_status" >&5
4812echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004813sed 's/^/| /' conftest.$ac_ext >&5
4814
Martin v. Löwis11437992002-04-12 09:54:03 +00004815( exit $ac_status )
4816ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004818rm -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 +00004819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820
4821
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004822 CC="$ac_save_cc"
4823fi
4824
Martin v. Löwiseba40652007-08-30 20:10:57 +00004825 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4826echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004827 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004828 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004829 fi
4830fi
4831
Martin v. Löwisaac13162006-10-19 10:58:46 +00004832# Check whether GCC supports PyArg_ParseTuple format
4833if test "$GCC" = "yes"
4834then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004835 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4836echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004837 save_CFLAGS=$CFLAGS
4838 CFLAGS="$CFLAGS -Werror"
4839 cat >conftest.$ac_ext <<_ACEOF
4840/* confdefs.h. */
4841_ACEOF
4842cat confdefs.h >>conftest.$ac_ext
4843cat >>conftest.$ac_ext <<_ACEOF
4844/* end confdefs.h. */
4845
4846 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4847
4848int
4849main ()
4850{
4851
4852 ;
4853 return 0;
4854}
4855_ACEOF
4856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857if { (ac_try="$ac_compile"
4858case "(($ac_try" in
4859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4860 *) ac_try_echo=$ac_try;;
4861esac
4862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004864 ac_status=$?
4865 grep -v '^ *+' conftest.er1 >conftest.err
4866 rm -f conftest.er1
4867 cat conftest.err >&5
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869 (exit $ac_status); } && {
4870 test -z "$ac_c_werror_flag" ||
4871 test ! -s conftest.err
4872 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004873
4874cat >>confdefs.h <<\_ACEOF
4875#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4876_ACEOF
4877
Martin v. Löwiseba40652007-08-30 20:10:57 +00004878 { echo "$as_me:$LINENO: result: yes" >&5
4879echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004880else
4881 echo "$as_me: failed program was:" >&5
4882sed 's/^/| /' conftest.$ac_ext >&5
4883
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 { echo "$as_me:$LINENO: result: no" >&5
4885echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004886
4887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004888
4889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004890 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004891fi
4892
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004893# On some compilers, pthreads are available without further options
4894# (e.g. MacOS X). On some of these systems, the compiler will not
4895# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4896# So we have to see first whether pthreads are available without
4897# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004898{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4899echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004900if test "${ac_cv_pthread_is_default+set}" = set; then
4901 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004902else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004903 if test "$cross_compiling" = yes; then
4904 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004905else
Martin v. Löwis11437992002-04-12 09:54:03 +00004906 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004907/* confdefs.h. */
4908_ACEOF
4909cat confdefs.h >>conftest.$ac_ext
4910cat >>conftest.$ac_ext <<_ACEOF
4911/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004912
Martin v. Löwis130fb172001-07-19 11:00:41 +00004913#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004914
4915void* routine(void* p){return NULL;}
4916
4917int main(){
4918 pthread_t p;
4919 if(pthread_create(&p,NULL,routine,NULL)!=0)
4920 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004921 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004922 return 0;
4923}
4924
Martin v. Löwis11437992002-04-12 09:54:03 +00004925_ACEOF
4926rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927if { (ac_try="$ac_link"
4928case "(($ac_try" in
4929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4930 *) ac_try_echo=$ac_try;;
4931esac
4932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4933 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 ac_status=$?
4935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937 { (case "(($ac_try" in
4938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4939 *) ac_try_echo=$ac_try;;
4940esac
4941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4942 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 ac_status=$?
4944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004946
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004947 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004948 ac_cv_kthread=no
4949 ac_cv_pthread=no
4950
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004951else
Martin v. Löwis11437992002-04-12 09:54:03 +00004952 echo "$as_me: program exited with status $ac_status" >&5
4953echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004954sed 's/^/| /' conftest.$ac_ext >&5
4955
Martin v. Löwis11437992002-04-12 09:54:03 +00004956( exit $ac_status )
4957ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004959rm -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 +00004960fi
4961
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962
4963
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004964fi
4965
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4967echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004968
Michael W. Hudson54241132001-12-07 15:38:26 +00004969
Martin v. Löwis11437992002-04-12 09:54:03 +00004970if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004971then
4972 ac_cv_kpthread=no
4973else
4974# -Kpthread, if available, provides the right #defines
4975# and linker options to make pthread_create available
4976# Some compilers won't report that they do not support -Kpthread,
4977# so we need to run a program to see whether it really made the
4978# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4980echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004981if test "${ac_cv_kpthread+set}" = set; then
4982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004983else
4984 ac_save_cc="$CC"
4985CC="$CC -Kpthread"
4986if test "$cross_compiling" = yes; then
4987 ac_cv_kpthread=no
4988else
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004990/* confdefs.h. */
4991_ACEOF
4992cat confdefs.h >>conftest.$ac_ext
4993cat >>conftest.$ac_ext <<_ACEOF
4994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004995
4996#include <pthread.h>
4997
4998void* routine(void* p){return NULL;}
4999
5000int main(){
5001 pthread_t p;
5002 if(pthread_create(&p,NULL,routine,NULL)!=0)
5003 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005004 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005005 return 0;
5006}
5007
Martin v. Löwis11437992002-04-12 09:54:03 +00005008_ACEOF
5009rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005010if { (ac_try="$ac_link"
5011case "(($ac_try" in
5012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5013 *) ac_try_echo=$ac_try;;
5014esac
5015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5016 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005020 { (case "(($ac_try" in
5021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5022 *) ac_try_echo=$ac_try;;
5023esac
5024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5025 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005026 ac_status=$?
5027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005029 ac_cv_kpthread=yes
5030else
Martin v. Löwis11437992002-04-12 09:54:03 +00005031 echo "$as_me: program exited with status $ac_status" >&5
5032echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005033sed 's/^/| /' conftest.$ac_ext >&5
5034
Martin v. Löwis11437992002-04-12 09:54:03 +00005035( exit $ac_status )
5036ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005038rm -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 +00005039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005040
5041
Martin v. Löwis130fb172001-07-19 11:00:41 +00005042CC="$ac_save_cc"
5043fi
5044
Martin v. Löwiseba40652007-08-30 20:10:57 +00005045{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5046echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005047fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005048
Skip Montanarod8d39a02003-07-10 20:44:10 +00005049if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005050then
5051# -Kthread, if available, provides the right #defines
5052# and linker options to make pthread_create available
5053# Some compilers won't report that they do not support -Kthread,
5054# so we need to run a program to see whether it really made the
5055# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005056{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5057echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005058if test "${ac_cv_kthread+set}" = set; then
5059 echo $ECHO_N "(cached) $ECHO_C" >&6
5060else
5061 ac_save_cc="$CC"
5062CC="$CC -Kthread"
5063if test "$cross_compiling" = yes; then
5064 ac_cv_kthread=no
5065else
5066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005067/* confdefs.h. */
5068_ACEOF
5069cat confdefs.h >>conftest.$ac_ext
5070cat >>conftest.$ac_ext <<_ACEOF
5071/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005072
5073#include <pthread.h>
5074
5075void* routine(void* p){return NULL;}
5076
5077int main(){
5078 pthread_t p;
5079 if(pthread_create(&p,NULL,routine,NULL)!=0)
5080 return 1;
5081 (void)pthread_detach(p);
5082 return 0;
5083}
5084
5085_ACEOF
5086rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005087if { (ac_try="$ac_link"
5088case "(($ac_try" in
5089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5090 *) ac_try_echo=$ac_try;;
5091esac
5092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5093 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005094 ac_status=$?
5095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005097 { (case "(($ac_try" in
5098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5099 *) ac_try_echo=$ac_try;;
5100esac
5101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5102 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005103 ac_status=$?
5104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105 (exit $ac_status); }; }; then
5106 ac_cv_kthread=yes
5107else
5108 echo "$as_me: program exited with status $ac_status" >&5
5109echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005110sed 's/^/| /' conftest.$ac_ext >&5
5111
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005112( exit $ac_status )
5113ac_cv_kthread=no
5114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005115rm -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 +00005116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005117
5118
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005119CC="$ac_save_cc"
5120fi
5121
Martin v. Löwiseba40652007-08-30 20:10:57 +00005122{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5123echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005124fi
5125
Skip Montanarod8d39a02003-07-10 20:44:10 +00005126if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005127then
5128# -pthread, if available, provides the right #defines
5129# and linker options to make pthread_create available
5130# Some compilers won't report that they do not support -pthread,
5131# so we need to run a program to see whether it really made the
5132# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005133{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5134echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005135if test "${ac_cv_thread+set}" = set; then
5136 echo $ECHO_N "(cached) $ECHO_C" >&6
5137else
5138 ac_save_cc="$CC"
5139CC="$CC -pthread"
5140if test "$cross_compiling" = yes; then
5141 ac_cv_pthread=no
5142else
5143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005144/* confdefs.h. */
5145_ACEOF
5146cat confdefs.h >>conftest.$ac_ext
5147cat >>conftest.$ac_ext <<_ACEOF
5148/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005149
5150#include <pthread.h>
5151
5152void* routine(void* p){return NULL;}
5153
5154int main(){
5155 pthread_t p;
5156 if(pthread_create(&p,NULL,routine,NULL)!=0)
5157 return 1;
5158 (void)pthread_detach(p);
5159 return 0;
5160}
5161
5162_ACEOF
5163rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005164if { (ac_try="$ac_link"
5165case "(($ac_try" in
5166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5167 *) ac_try_echo=$ac_try;;
5168esac
5169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5170 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005171 ac_status=$?
5172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005174 { (case "(($ac_try" in
5175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5176 *) ac_try_echo=$ac_try;;
5177esac
5178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5179 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005180 ac_status=$?
5181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182 (exit $ac_status); }; }; then
5183 ac_cv_pthread=yes
5184else
5185 echo "$as_me: program exited with status $ac_status" >&5
5186echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005187sed 's/^/| /' conftest.$ac_ext >&5
5188
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005189( exit $ac_status )
5190ac_cv_pthread=no
5191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005192rm -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 +00005193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005194
5195
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005196CC="$ac_save_cc"
5197fi
5198
Martin v. Löwiseba40652007-08-30 20:10:57 +00005199{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5200echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005201fi
5202
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005203# If we have set a CC compiler flag for thread support then
5204# check if it works for CXX, too.
5205ac_cv_cxx_thread=no
5206if test ! -z "$CXX"
5207then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005208{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5209echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005210ac_save_cxx="$CXX"
5211
5212if test "$ac_cv_kpthread" = "yes"
5213then
5214 CXX="$CXX -Kpthread"
5215 ac_cv_cxx_thread=yes
5216elif test "$ac_cv_kthread" = "yes"
5217then
5218 CXX="$CXX -Kthread"
5219 ac_cv_cxx_thread=yes
5220elif test "$ac_cv_pthread" = "yes"
5221then
5222 CXX="$CXX -pthread"
5223 ac_cv_cxx_thread=yes
5224fi
5225
5226if test $ac_cv_cxx_thread = yes
5227then
5228 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5229 $CXX -c conftest.$ac_ext 2>&5
5230 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5231 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5232 then
5233 ac_cv_cxx_thread=yes
5234 else
5235 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005236 fi
5237 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005239{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5240echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005241fi
5242CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005243
Michael W. Hudson54241132001-12-07 15:38:26 +00005244
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005245# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005246{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5247echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005248if test "${ac_cv_header_stdc+set}" = set; then
5249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250else
Martin v. Löwis11437992002-04-12 09:54:03 +00005251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005252/* confdefs.h. */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005257#include <stdlib.h>
5258#include <stdarg.h>
5259#include <string.h>
5260#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005261
Skip Montanaro6dead952003-09-25 14:50:04 +00005262int
5263main ()
5264{
5265
5266 ;
5267 return 0;
5268}
Martin v. Löwis11437992002-04-12 09:54:03 +00005269_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005271if { (ac_try="$ac_compile"
5272case "(($ac_try" in
5273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5274 *) ac_try_echo=$ac_try;;
5275esac
5276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005279 grep -v '^ *+' conftest.er1 >conftest.err
5280 rm -f conftest.er1
5281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005283 (exit $ac_status); } && {
5284 test -z "$ac_c_werror_flag" ||
5285 test ! -s conftest.err
5286 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005287 ac_cv_header_stdc=yes
5288else
Martin v. Löwis11437992002-04-12 09:54:03 +00005289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005290sed 's/^/| /' conftest.$ac_ext >&5
5291
Martin v. Löwiseba40652007-08-30 20:10:57 +00005292 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005294
5295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005296
5297if test $ac_cv_header_stdc = yes; then
5298 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005300/* confdefs.h. */
5301_ACEOF
5302cat confdefs.h >>conftest.$ac_ext
5303cat >>conftest.$ac_ext <<_ACEOF
5304/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005305#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005306
5307_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005309 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005310 :
5311else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005312 ac_cv_header_stdc=no
5313fi
5314rm -f conftest*
5315
5316fi
5317
5318if test $ac_cv_header_stdc = yes; then
5319 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005321/* confdefs.h. */
5322_ACEOF
5323cat confdefs.h >>conftest.$ac_ext
5324cat >>conftest.$ac_ext <<_ACEOF
5325/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005327
5328_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005330 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005331 :
5332else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333 ac_cv_header_stdc=no
5334fi
5335rm -f conftest*
5336
5337fi
5338
5339if test $ac_cv_header_stdc = yes; then
5340 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005341 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005342 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005343else
Martin v. Löwis11437992002-04-12 09:54:03 +00005344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005345/* confdefs.h. */
5346_ACEOF
5347cat confdefs.h >>conftest.$ac_ext
5348cat >>conftest.$ac_ext <<_ACEOF
5349/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005350#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005351#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005352#if ((' ' & 0x0FF) == 0x020)
5353# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5354# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5355#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005356# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005357 (('a' <= (c) && (c) <= 'i') \
5358 || ('j' <= (c) && (c) <= 'r') \
5359 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005360# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5361#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005362
Martin v. Löwis11437992002-04-12 09:54:03 +00005363#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5364int
5365main ()
5366{
5367 int i;
5368 for (i = 0; i < 256; i++)
5369 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005370 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005371 return 2;
5372 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005373}
5374_ACEOF
5375rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005376if { (ac_try="$ac_link"
5377case "(($ac_try" in
5378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5379 *) ac_try_echo=$ac_try;;
5380esac
5381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5382 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005383 ac_status=$?
5384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005386 { (case "(($ac_try" in
5387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5388 *) ac_try_echo=$ac_try;;
5389esac
5390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5391 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005392 ac_status=$?
5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395 :
5396else
Martin v. Löwis11437992002-04-12 09:54:03 +00005397 echo "$as_me: program exited with status $ac_status" >&5
5398echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005399sed 's/^/| /' conftest.$ac_ext >&5
5400
Martin v. Löwis11437992002-04-12 09:54:03 +00005401( exit $ac_status )
5402ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5405fi
5406
5407
Michael W. Hudson54241132001-12-07 15:38:26 +00005408fi
5409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005410{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5411echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005412if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005413
5414cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005415#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005416_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005417
5418fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419
Skip Montanarob9820a32004-01-17 00:16:12 +00005420# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005431 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005432do
5433as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005434{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5435echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5436if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005437 echo $ECHO_N "(cached) $ECHO_C" >&6
5438else
5439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005440/* confdefs.h. */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h. */
5445$ac_includes_default
5446
5447#include <$ac_header>
5448_ACEOF
5449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005450if { (ac_try="$ac_compile"
5451case "(($ac_try" in
5452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5453 *) ac_try_echo=$ac_try;;
5454esac
5455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5456 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005458 grep -v '^ *+' conftest.er1 >conftest.err
5459 rm -f conftest.er1
5460 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005462 (exit $ac_status); } && {
5463 test -z "$ac_c_werror_flag" ||
5464 test ! -s conftest.err
5465 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005466 eval "$as_ac_Header=yes"
5467else
5468 echo "$as_me: failed program was:" >&5
5469sed 's/^/| /' conftest.$ac_ext >&5
5470
Martin v. Löwiseba40652007-08-30 20:10:57 +00005471 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005473
5474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005476ac_res=`eval echo '${'$as_ac_Header'}'`
5477 { echo "$as_me:$LINENO: result: $ac_res" >&5
5478echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005479if test `eval echo '${'$as_ac_Header'}'` = yes; then
5480 cat >>confdefs.h <<_ACEOF
5481#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5482_ACEOF
5483
5484fi
5485
5486done
5487
5488
Martin v. Löwis11437992002-04-12 09:54:03 +00005489
5490
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
Anthony Baxter8a560de2004-10-13 15:30:56 +00005525
Martin v. Löwisc3001752005-01-23 09:27:24 +00005526
Martin v. Löwis11017b12006-01-14 18:12:57 +00005527
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005528
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005529
5530
5531
5532
5533
5534
5535
5536
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005537
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005538
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005539
5540
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005541
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005542
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005543for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5544fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005545ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005546shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005547unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005548sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5549sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005550sys/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 +00005551sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005552sys/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 +00005553sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005554bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005555do
Martin v. Löwis11437992002-04-12 09:54:03 +00005556as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005557if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5558 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5559echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5560if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005561 echo $ECHO_N "(cached) $ECHO_C" >&6
5562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005563ac_res=`eval echo '${'$as_ac_Header'}'`
5564 { echo "$as_me:$LINENO: result: $ac_res" >&5
5565echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005566else
Martin v. Löwis11437992002-04-12 09:54:03 +00005567 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005568{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5569echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005571/* confdefs.h. */
5572_ACEOF
5573cat confdefs.h >>conftest.$ac_ext
5574cat >>conftest.$ac_ext <<_ACEOF
5575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005576$ac_includes_default
5577#include <$ac_header>
5578_ACEOF
5579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005580if { (ac_try="$ac_compile"
5581case "(($ac_try" in
5582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5583 *) ac_try_echo=$ac_try;;
5584esac
5585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005588 grep -v '^ *+' conftest.er1 >conftest.err
5589 rm -f conftest.er1
5590 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005592 (exit $ac_status); } && {
5593 test -z "$ac_c_werror_flag" ||
5594 test ! -s conftest.err
5595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005596 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005597else
Martin v. Löwis11437992002-04-12 09:54:03 +00005598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005599sed 's/^/| /' conftest.$ac_ext >&5
5600
Martin v. Löwiseba40652007-08-30 20:10:57 +00005601 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005603
5604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5605{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5606echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005607
5608# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005609{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5610echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005612/* confdefs.h. */
5613_ACEOF
5614cat confdefs.h >>conftest.$ac_ext
5615cat >>conftest.$ac_ext <<_ACEOF
5616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005617#include <$ac_header>
5618_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005619if { (ac_try="$ac_cpp conftest.$ac_ext"
5620case "(($ac_try" in
5621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5622 *) ac_try_echo=$ac_try;;
5623esac
5624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005627 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005628 rm -f conftest.er1
5629 cat conftest.err >&5
5630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005631 (exit $ac_status); } >/dev/null && {
5632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5633 test ! -s conftest.err
5634 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 ac_header_preproc=yes
5636else
5637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005638sed 's/^/| /' conftest.$ac_ext >&5
5639
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005642
Martin v. Löwis11437992002-04-12 09:54:03 +00005643rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005644{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5645echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5649 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005650 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5651echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005652 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5653echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5654 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005655 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005656 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005657 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5658echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005659 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5660echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5661 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5662echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5663 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5664echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005665 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5666echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005667 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5668echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005669 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005670## ------------------------------------------------ ##
5671## Report this to http://www.python.org/python-bugs ##
5672## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005673_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005674 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005676esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005677{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5678echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5679if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005680 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005681else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684ac_res=`eval echo '${'$as_ac_Header'}'`
5685 { echo "$as_me:$LINENO: result: $ac_res" >&5
5686echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005687
5688fi
5689if test `eval echo '${'$as_ac_Header'}'` = yes; then
5690 cat >>confdefs.h <<_ACEOF
5691#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5692_ACEOF
5693
5694fi
5695
Guido van Rossum627b2d71993-12-24 10:39:16 +00005696done
5697
Martin v. Löwis11437992002-04-12 09:54:03 +00005698
5699
5700
5701
5702
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005703ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005704for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5705 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005706{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5707echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5708if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005710else
Martin v. Löwis11437992002-04-12 09:54:03 +00005711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005712/* confdefs.h. */
5713_ACEOF
5714cat confdefs.h >>conftest.$ac_ext
5715cat >>conftest.$ac_ext <<_ACEOF
5716/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005717#include <sys/types.h>
5718#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005719
Martin v. Löwis11437992002-04-12 09:54:03 +00005720int
5721main ()
5722{
5723if ((DIR *) 0)
5724return 0;
5725 ;
5726 return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730if { (ac_try="$ac_compile"
5731case "(($ac_try" in
5732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5733 *) ac_try_echo=$ac_try;;
5734esac
5735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005738 grep -v '^ *+' conftest.er1 >conftest.err
5739 rm -f conftest.er1
5740 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005742 (exit $ac_status); } && {
5743 test -z "$ac_c_werror_flag" ||
5744 test ! -s conftest.err
5745 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005746 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005747else
Martin v. Löwis11437992002-04-12 09:54:03 +00005748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005749sed 's/^/| /' conftest.$ac_ext >&5
5750
Martin v. Löwiseba40652007-08-30 20:10:57 +00005751 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005753
5754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005756ac_res=`eval echo '${'$as_ac_Header'}'`
5757 { echo "$as_me:$LINENO: result: $ac_res" >&5
5758echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005759if test `eval echo '${'$as_ac_Header'}'` = yes; then
5760 cat >>confdefs.h <<_ACEOF
5761#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5762_ACEOF
5763
5764ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767done
5768# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5769if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005770 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5771echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005772if test "${ac_cv_search_opendir+set}" = set; then
5773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005774else
Martin v. Löwis11437992002-04-12 09:54:03 +00005775 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005777/* confdefs.h. */
5778_ACEOF
5779cat confdefs.h >>conftest.$ac_ext
5780cat >>conftest.$ac_ext <<_ACEOF
5781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005782
Martin v. Löwiseba40652007-08-30 20:10:57 +00005783/* Override any GCC internal prototype to avoid an error.
5784 Use char because int might match the return type of a GCC
5785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005786#ifdef __cplusplus
5787extern "C"
5788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005789char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005790int
5791main ()
5792{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 ;
5795 return 0;
5796}
5797_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798for ac_lib in '' dir; do
5799 if test -z "$ac_lib"; then
5800 ac_res="none required"
5801 else
5802 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005803 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804 fi
5805 rm -f conftest.$ac_objext conftest$ac_exeext
5806if { (ac_try="$ac_link"
5807case "(($ac_try" in
5808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5809 *) ac_try_echo=$ac_try;;
5810esac
5811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5812 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005813 ac_status=$?
5814 grep -v '^ *+' conftest.er1 >conftest.err
5815 rm -f conftest.er1
5816 cat conftest.err >&5
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005818 (exit $ac_status); } && {
5819 test -z "$ac_c_werror_flag" ||
5820 test ! -s conftest.err
5821 } && test -s conftest$ac_exeext &&
5822 $as_test_x conftest$ac_exeext; then
5823 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005824else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005825 echo "$as_me: failed program was:" >&5
5826sed 's/^/| /' conftest.$ac_ext >&5
5827
Martin v. Löwiseba40652007-08-30 20:10:57 +00005828
Brett Cannon19fab762007-06-02 03:02:29 +00005829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005830
5831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5832 conftest$ac_exeext
5833 if test "${ac_cv_search_opendir+set}" = set; then
5834 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005836done
5837if test "${ac_cv_search_opendir+set}" = set; then
5838 :
5839else
5840 ac_cv_search_opendir=no
5841fi
5842rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005843LIBS=$ac_func_search_save_LIBS
5844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005845{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5846echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5847ac_res=$ac_cv_search_opendir
5848if test "$ac_res" != no; then
5849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005850
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005852
Michael W. Hudson54241132001-12-07 15:38:26 +00005853else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5855echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005856if test "${ac_cv_search_opendir+set}" = set; then
5857 echo $ECHO_N "(cached) $ECHO_C" >&6
5858else
5859 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005861/* confdefs.h. */
5862_ACEOF
5863cat confdefs.h >>conftest.$ac_ext
5864cat >>conftest.$ac_ext <<_ACEOF
5865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005866
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867/* Override any GCC internal prototype to avoid an error.
5868 Use char because int might match the return type of a GCC
5869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005870#ifdef __cplusplus
5871extern "C"
5872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005873char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005874int
5875main ()
5876{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005877return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005878 ;
5879 return 0;
5880}
5881_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005882for ac_lib in '' x; do
5883 if test -z "$ac_lib"; then
5884 ac_res="none required"
5885 else
5886 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005887 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005888 fi
5889 rm -f conftest.$ac_objext conftest$ac_exeext
5890if { (ac_try="$ac_link"
5891case "(($ac_try" in
5892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5893 *) ac_try_echo=$ac_try;;
5894esac
5895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5896 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005897 ac_status=$?
5898 grep -v '^ *+' conftest.er1 >conftest.err
5899 rm -f conftest.er1
5900 cat conftest.err >&5
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005902 (exit $ac_status); } && {
5903 test -z "$ac_c_werror_flag" ||
5904 test ! -s conftest.err
5905 } && test -s conftest$ac_exeext &&
5906 $as_test_x conftest$ac_exeext; then
5907 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005908else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005909 echo "$as_me: failed program was:" >&5
5910sed 's/^/| /' conftest.$ac_ext >&5
5911
Martin v. Löwiseba40652007-08-30 20:10:57 +00005912
Brett Cannon19fab762007-06-02 03:02:29 +00005913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914
5915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5916 conftest$ac_exeext
5917 if test "${ac_cv_search_opendir+set}" = set; then
5918 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920done
5921if test "${ac_cv_search_opendir+set}" = set; then
5922 :
5923else
5924 ac_cv_search_opendir=no
5925fi
5926rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005927LIBS=$ac_func_search_save_LIBS
5928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005929{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5930echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5931ac_res=$ac_cv_search_opendir
5932if test "$ac_res" != no; then
5933 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005934
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935fi
5936
5937fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005938
Martin v. Löwiseba40652007-08-30 20:10:57 +00005939{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5940echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005941if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5942 echo $ECHO_N "(cached) $ECHO_C" >&6
5943else
5944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005945/* confdefs.h. */
5946_ACEOF
5947cat confdefs.h >>conftest.$ac_ext
5948cat >>conftest.$ac_ext <<_ACEOF
5949/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005950#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005951int
5952main ()
5953{
5954return makedev(0, 0);
5955 ;
5956 return 0;
5957}
5958_ACEOF
5959rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005960if { (ac_try="$ac_link"
5961case "(($ac_try" in
5962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5963 *) ac_try_echo=$ac_try;;
5964esac
5965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5966 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005968 grep -v '^ *+' conftest.er1 >conftest.err
5969 rm -f conftest.er1
5970 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005972 (exit $ac_status); } && {
5973 test -z "$ac_c_werror_flag" ||
5974 test ! -s conftest.err
5975 } && test -s conftest$ac_exeext &&
5976 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977 ac_cv_header_sys_types_h_makedev=yes
5978else
5979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005980sed 's/^/| /' conftest.$ac_ext >&5
5981
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984
5985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005987
5988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5990echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005991
5992if test $ac_cv_header_sys_types_h_makedev = no; then
5993if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005994 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5995echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005996if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5997 echo $ECHO_N "(cached) $ECHO_C" >&6
5998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6000echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006001else
6002 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006003{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6004echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006005cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006006/* confdefs.h. */
6007_ACEOF
6008cat confdefs.h >>conftest.$ac_ext
6009cat >>conftest.$ac_ext <<_ACEOF
6010/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006011$ac_includes_default
6012#include <sys/mkdev.h>
6013_ACEOF
6014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006015if { (ac_try="$ac_compile"
6016case "(($ac_try" in
6017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6018 *) ac_try_echo=$ac_try;;
6019esac
6020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006023 grep -v '^ *+' conftest.er1 >conftest.err
6024 rm -f conftest.er1
6025 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006027 (exit $ac_status); } && {
6028 test -z "$ac_c_werror_flag" ||
6029 test ! -s conftest.err
6030 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031 ac_header_compiler=yes
6032else
6033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006034sed 's/^/| /' conftest.$ac_ext >&5
6035
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038
6039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6040{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6041echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042
6043# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006044{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6045echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006047/* confdefs.h. */
6048_ACEOF
6049cat confdefs.h >>conftest.$ac_ext
6050cat >>conftest.$ac_ext <<_ACEOF
6051/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052#include <sys/mkdev.h>
6053_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054if { (ac_try="$ac_cpp conftest.$ac_ext"
6055case "(($ac_try" in
6056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6057 *) ac_try_echo=$ac_try;;
6058esac
6059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6060 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006062 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063 rm -f conftest.er1
6064 cat conftest.err >&5
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006066 (exit $ac_status); } >/dev/null && {
6067 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6068 test ! -s conftest.err
6069 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_header_preproc=yes
6071else
6072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 ac_header_preproc=no
6076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006079{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6080echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081
6082# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6084 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6086echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006087 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6088echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6089 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006090 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006091 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006092 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6093echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006094 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6095echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6096 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6097echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6098 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6099echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006100 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6101echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006102 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6103echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006104 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006105## ------------------------------------------------ ##
6106## Report this to http://www.python.org/python-bugs ##
6107## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006108_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006109 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006110 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006112{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6113echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6115 echo $ECHO_N "(cached) $ECHO_C" >&6
6116else
6117 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6120echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121
6122fi
6123if test $ac_cv_header_sys_mkdev_h = yes; then
6124
6125cat >>confdefs.h <<\_ACEOF
6126#define MAJOR_IN_MKDEV 1
6127_ACEOF
6128
6129fi
6130
6131
6132
6133 if test $ac_cv_header_sys_mkdev_h = no; then
6134 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006135 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6136echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6138 echo $ECHO_N "(cached) $ECHO_C" >&6
6139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6141echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142else
6143 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006144{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6145echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006147/* confdefs.h. */
6148_ACEOF
6149cat confdefs.h >>conftest.$ac_ext
6150cat >>conftest.$ac_ext <<_ACEOF
6151/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006152$ac_includes_default
6153#include <sys/sysmacros.h>
6154_ACEOF
6155rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006156if { (ac_try="$ac_compile"
6157case "(($ac_try" in
6158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6159 *) ac_try_echo=$ac_try;;
6160esac
6161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006164 grep -v '^ *+' conftest.er1 >conftest.err
6165 rm -f conftest.er1
6166 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168 (exit $ac_status); } && {
6169 test -z "$ac_c_werror_flag" ||
6170 test ! -s conftest.err
6171 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_compiler=yes
6173else
6174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006175sed 's/^/| /' conftest.$ac_ext >&5
6176
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179
6180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6181{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6182echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183
6184# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006185{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6186echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006188/* confdefs.h. */
6189_ACEOF
6190cat confdefs.h >>conftest.$ac_ext
6191cat >>conftest.$ac_ext <<_ACEOF
6192/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193#include <sys/sysmacros.h>
6194_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195if { (ac_try="$ac_cpp conftest.$ac_ext"
6196case "(($ac_try" in
6197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6198 *) ac_try_echo=$ac_try;;
6199esac
6200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6201 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006203 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204 rm -f conftest.er1
6205 cat conftest.err >&5
6206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006207 (exit $ac_status); } >/dev/null && {
6208 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6209 test ! -s conftest.err
6210 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 ac_header_preproc=yes
6212else
6213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006214sed 's/^/| /' conftest.$ac_ext >&5
6215
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 ac_header_preproc=no
6217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006220{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6221echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006224case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6225 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6227echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006228 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6229echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6230 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006231 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006232 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006233 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6234echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006235 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6236echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6237 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6238echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6239 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6240echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006241 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6242echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006243 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6244echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006245 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006246## ------------------------------------------------ ##
6247## Report this to http://www.python.org/python-bugs ##
6248## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006249_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006250 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006251 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006253{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6254echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6256 echo $ECHO_N "(cached) $ECHO_C" >&6
6257else
6258 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6261echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262
6263fi
6264if test $ac_cv_header_sys_sysmacros_h = yes; then
6265
6266cat >>confdefs.h <<\_ACEOF
6267#define MAJOR_IN_SYSMACROS 1
6268_ACEOF
6269
6270fi
6271
6272
6273 fi
6274fi
6275
Michael W. Hudson54241132001-12-07 15:38:26 +00006276
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006277# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006278
6279for ac_header in term.h
6280do
6281as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006282{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6283echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6284if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006285 echo $ECHO_N "(cached) $ECHO_C" >&6
6286else
6287 cat >conftest.$ac_ext <<_ACEOF
6288/* confdefs.h. */
6289_ACEOF
6290cat confdefs.h >>conftest.$ac_ext
6291cat >>conftest.$ac_ext <<_ACEOF
6292/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006293
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006294#ifdef HAVE_CURSES_H
6295#include <curses.h>
6296#endif
6297
6298
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006299#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006300_ACEOF
6301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302if { (ac_try="$ac_compile"
6303case "(($ac_try" in
6304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6305 *) ac_try_echo=$ac_try;;
6306esac
6307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006309 ac_status=$?
6310 grep -v '^ *+' conftest.er1 >conftest.err
6311 rm -f conftest.er1
6312 cat conftest.err >&5
6313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006314 (exit $ac_status); } && {
6315 test -z "$ac_c_werror_flag" ||
6316 test ! -s conftest.err
6317 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006318 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319else
6320 echo "$as_me: failed program was:" >&5
6321sed 's/^/| /' conftest.$ac_ext >&5
6322
Martin v. Löwiseba40652007-08-30 20:10:57 +00006323 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006325
6326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006328ac_res=`eval echo '${'$as_ac_Header'}'`
6329 { echo "$as_me:$LINENO: result: $ac_res" >&5
6330echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006331if test `eval echo '${'$as_ac_Header'}'` = yes; then
6332 cat >>confdefs.h <<_ACEOF
6333#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6334_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006336fi
6337
6338done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006339
6340
Martin v. Löwis11017b12006-01-14 18:12:57 +00006341# On Linux, netlink.h requires asm/types.h
6342
6343for ac_header in linux/netlink.h
6344do
6345as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006346{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6347echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6348if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006349 echo $ECHO_N "(cached) $ECHO_C" >&6
6350else
6351 cat >conftest.$ac_ext <<_ACEOF
6352/* confdefs.h. */
6353_ACEOF
6354cat confdefs.h >>conftest.$ac_ext
6355cat >>conftest.$ac_ext <<_ACEOF
6356/* end confdefs.h. */
6357
6358#ifdef HAVE_ASM_TYPES_H
6359#include <asm/types.h>
6360#endif
6361#ifdef HAVE_SYS_SOCKET_H
6362#include <sys/socket.h>
6363#endif
6364
6365
6366#include <$ac_header>
6367_ACEOF
6368rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006369if { (ac_try="$ac_compile"
6370case "(($ac_try" in
6371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6372 *) ac_try_echo=$ac_try;;
6373esac
6374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376 ac_status=$?
6377 grep -v '^ *+' conftest.er1 >conftest.err
6378 rm -f conftest.er1
6379 cat conftest.err >&5
6380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006381 (exit $ac_status); } && {
6382 test -z "$ac_c_werror_flag" ||
6383 test ! -s conftest.err
6384 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385 eval "$as_ac_Header=yes"
6386else
6387 echo "$as_me: failed program was:" >&5
6388sed 's/^/| /' conftest.$ac_ext >&5
6389
Martin v. Löwiseba40652007-08-30 20:10:57 +00006390 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006392
6393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395ac_res=`eval echo '${'$as_ac_Header'}'`
6396 { echo "$as_me:$LINENO: result: $ac_res" >&5
6397echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006398if test `eval echo '${'$as_ac_Header'}'` = yes; then
6399 cat >>confdefs.h <<_ACEOF
6400#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6401_ACEOF
6402
6403fi
6404
6405done
6406
6407
Guido van Rossum627b2d71993-12-24 10:39:16 +00006408# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006409was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6411echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006413/* confdefs.h. */
6414_ACEOF
6415cat confdefs.h >>conftest.$ac_ext
6416cat >>conftest.$ac_ext <<_ACEOF
6417/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006418#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006419
6420_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006422 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006423 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006424else
Martin v. Löwis11437992002-04-12 09:54:03 +00006425
6426
6427cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006429_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006430
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006431
Guido van Rossum627b2d71993-12-24 10:39:16 +00006432fi
6433rm -f conftest*
6434
Martin v. Löwiseba40652007-08-30 20:10:57 +00006435{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6436echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006437
Neal Norwitz11690112002-07-30 01:08:28 +00006438# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439{ echo "$as_me:$LINENO: checking for makedev" >&5
6440echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* confdefs.h. */
6443_ACEOF
6444cat confdefs.h >>conftest.$ac_ext
6445cat >>conftest.$ac_ext <<_ACEOF
6446/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006447#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006448int
6449main ()
6450{
6451 makedev(0, 0)
6452 ;
6453 return 0;
6454}
6455_ACEOF
6456rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006457if { (ac_try="$ac_link"
6458case "(($ac_try" in
6459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6460 *) ac_try_echo=$ac_try;;
6461esac
6462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6463 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006465 grep -v '^ *+' conftest.er1 >conftest.err
6466 rm -f conftest.er1
6467 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006469 (exit $ac_status); } && {
6470 test -z "$ac_c_werror_flag" ||
6471 test ! -s conftest.err
6472 } && test -s conftest$ac_exeext &&
6473 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006474 ac_cv_has_makedev=yes
6475else
6476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006477sed 's/^/| /' conftest.$ac_ext >&5
6478
Martin v. Löwiseba40652007-08-30 20:10:57 +00006479 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481
6482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006483 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006484if test "$ac_cv_has_makedev" = "no"; then
6485 # we didn't link, try if _OSF_SOURCE will allow us to link
6486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006487/* confdefs.h. */
6488_ACEOF
6489cat confdefs.h >>conftest.$ac_ext
6490cat >>conftest.$ac_ext <<_ACEOF
6491/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006492
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006493#define _OSF_SOURCE 1
6494#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006495
Neal Norwitz11690112002-07-30 01:08:28 +00006496int
6497main ()
6498{
6499 makedev(0, 0)
6500 ;
6501 return 0;
6502}
6503_ACEOF
6504rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006505if { (ac_try="$ac_link"
6506case "(($ac_try" in
6507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6508 *) ac_try_echo=$ac_try;;
6509esac
6510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6511 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006513 grep -v '^ *+' conftest.er1 >conftest.err
6514 rm -f conftest.er1
6515 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006517 (exit $ac_status); } && {
6518 test -z "$ac_c_werror_flag" ||
6519 test ! -s conftest.err
6520 } && test -s conftest$ac_exeext &&
6521 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006522 ac_cv_has_makedev=yes
6523else
6524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006525sed 's/^/| /' conftest.$ac_ext >&5
6526
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006529
6530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006531 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006532 if test "$ac_cv_has_makedev" = "yes"; then
6533
6534cat >>confdefs.h <<\_ACEOF
6535#define _OSF_SOURCE 1
6536_ACEOF
6537
6538 fi
6539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006540{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6541echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006542if test "$ac_cv_has_makedev" = "yes"; then
6543
6544cat >>confdefs.h <<\_ACEOF
6545#define HAVE_MAKEDEV 1
6546_ACEOF
6547
6548fi
6549
Martin v. Löwis399a6892002-10-04 10:22:02 +00006550# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6551# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6552# defined, but the compiler does not support pragma redefine_extname,
6553# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6554# structures (such as rlimit64) without declaring them. As a
6555# work-around, disable LFS on such configurations
6556
6557use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6559echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006561/* confdefs.h. */
6562_ACEOF
6563cat confdefs.h >>conftest.$ac_ext
6564cat >>conftest.$ac_ext <<_ACEOF
6565/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006566
6567#define _LARGEFILE_SOURCE 1
6568#define _FILE_OFFSET_BITS 64
6569#include <sys/resource.h>
6570
Martin v. Löwis399a6892002-10-04 10:22:02 +00006571int
6572main ()
6573{
6574struct rlimit foo;
6575 ;
6576 return 0;
6577}
6578_ACEOF
6579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580if { (ac_try="$ac_compile"
6581case "(($ac_try" in
6582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6583 *) ac_try_echo=$ac_try;;
6584esac
6585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006588 grep -v '^ *+' conftest.er1 >conftest.err
6589 rm -f conftest.er1
6590 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592 (exit $ac_status); } && {
6593 test -z "$ac_c_werror_flag" ||
6594 test ! -s conftest.err
6595 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006596 sol_lfs_bug=no
6597else
6598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006599sed 's/^/| /' conftest.$ac_ext >&5
6600
Martin v. Löwiseba40652007-08-30 20:10:57 +00006601 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006603
6604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6606echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006607if test "$sol_lfs_bug" = "yes"; then
6608 use_lfs=no
6609fi
6610
6611if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006612# Two defines needed to enable largefile support on various platforms
6613# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006614
Martin v. Löwis11437992002-04-12 09:54:03 +00006615cat >>confdefs.h <<\_ACEOF
6616#define _LARGEFILE_SOURCE 1
6617_ACEOF
6618
6619
6620cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006621#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006622_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006623
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006625
Guido van Rossum84e7b241996-08-19 21:59:00 +00006626# Add some code to confdefs.h so that the test for off_t works on SCO
6627cat >> confdefs.h <<\EOF
6628#if defined(SCO_DS)
6629#undef _OFF_T
6630#endif
6631EOF
6632
Guido van Rossumef2255b2000-03-10 22:30:29 +00006633# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006634{ echo "$as_me:$LINENO: checking for mode_t" >&5
6635echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006636if test "${ac_cv_type_mode_t+set}" = set; then
6637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006638else
Martin v. Löwis11437992002-04-12 09:54:03 +00006639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006640/* confdefs.h. */
6641_ACEOF
6642cat confdefs.h >>conftest.$ac_ext
6643cat >>conftest.$ac_ext <<_ACEOF
6644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006645$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006646typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006647int
6648main ()
6649{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006651 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006652if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006653 return 0;
6654 ;
6655 return 0;
6656}
6657_ACEOF
6658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006659if { (ac_try="$ac_compile"
6660case "(($ac_try" in
6661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6662 *) ac_try_echo=$ac_try;;
6663esac
6664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006667 grep -v '^ *+' conftest.er1 >conftest.err
6668 rm -f conftest.er1
6669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006671 (exit $ac_status); } && {
6672 test -z "$ac_c_werror_flag" ||
6673 test ! -s conftest.err
6674 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006675 ac_cv_type_mode_t=yes
6676else
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006678sed 's/^/| /' conftest.$ac_ext >&5
6679
Martin v. Löwiseba40652007-08-30 20:10:57 +00006680 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682
6683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006685{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6686echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006687if test $ac_cv_type_mode_t = yes; then
6688 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006689else
Martin v. Löwis11437992002-04-12 09:54:03 +00006690
6691cat >>confdefs.h <<_ACEOF
6692#define mode_t int
6693_ACEOF
6694
6695fi
6696
Martin v. Löwiseba40652007-08-30 20:10:57 +00006697{ echo "$as_me:$LINENO: checking for off_t" >&5
6698echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006699if test "${ac_cv_type_off_t+set}" = set; then
6700 echo $ECHO_N "(cached) $ECHO_C" >&6
6701else
6702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006703/* confdefs.h. */
6704_ACEOF
6705cat confdefs.h >>conftest.$ac_ext
6706cat >>conftest.$ac_ext <<_ACEOF
6707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006708$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006710int
6711main ()
6712{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006713if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006715if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 return 0;
6717 ;
6718 return 0;
6719}
6720_ACEOF
6721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722if { (ac_try="$ac_compile"
6723case "(($ac_try" in
6724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6725 *) ac_try_echo=$ac_try;;
6726esac
6727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006730 grep -v '^ *+' conftest.er1 >conftest.err
6731 rm -f conftest.er1
6732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006734 (exit $ac_status); } && {
6735 test -z "$ac_c_werror_flag" ||
6736 test ! -s conftest.err
6737 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006738 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006739else
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006741sed 's/^/| /' conftest.$ac_ext >&5
6742
Martin v. Löwiseba40652007-08-30 20:10:57 +00006743 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745
6746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006748{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6749echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006750if test $ac_cv_type_off_t = yes; then
6751 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006752else
Martin v. Löwis11437992002-04-12 09:54:03 +00006753
6754cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006756_ACEOF
6757
6758fi
6759
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760{ echo "$as_me:$LINENO: checking for pid_t" >&5
6761echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006762if test "${ac_cv_type_pid_t+set}" = set; then
6763 echo $ECHO_N "(cached) $ECHO_C" >&6
6764else
6765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006766/* confdefs.h. */
6767_ACEOF
6768cat confdefs.h >>conftest.$ac_ext
6769cat >>conftest.$ac_ext <<_ACEOF
6770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006771$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006772typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006773int
6774main ()
6775{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 return 0;
6780 ;
6781 return 0;
6782}
6783_ACEOF
6784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785if { (ac_try="$ac_compile"
6786case "(($ac_try" in
6787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6788 *) ac_try_echo=$ac_try;;
6789esac
6790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006793 grep -v '^ *+' conftest.er1 >conftest.err
6794 rm -f conftest.er1
6795 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006797 (exit $ac_status); } && {
6798 test -z "$ac_c_werror_flag" ||
6799 test ! -s conftest.err
6800 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006801 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006802else
Martin v. Löwis11437992002-04-12 09:54:03 +00006803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006804sed 's/^/| /' conftest.$ac_ext >&5
6805
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808
6809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6812echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006813if test $ac_cv_type_pid_t = yes; then
6814 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006815else
Martin v. Löwis11437992002-04-12 09:54:03 +00006816
6817cat >>confdefs.h <<_ACEOF
6818#define pid_t int
6819_ACEOF
6820
6821fi
6822
Martin v. Löwiseba40652007-08-30 20:10:57 +00006823{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6824echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006825if test "${ac_cv_type_signal+set}" = set; then
6826 echo $ECHO_N "(cached) $ECHO_C" >&6
6827else
6828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006829/* confdefs.h. */
6830_ACEOF
6831cat confdefs.h >>conftest.$ac_ext
6832cat >>conftest.$ac_ext <<_ACEOF
6833/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006834#include <sys/types.h>
6835#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006836
Martin v. Löwis11437992002-04-12 09:54:03 +00006837int
6838main ()
6839{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006840return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 ;
6842 return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006846if { (ac_try="$ac_compile"
6847case "(($ac_try" in
6848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6849 *) ac_try_echo=$ac_try;;
6850esac
6851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006854 grep -v '^ *+' conftest.er1 >conftest.err
6855 rm -f conftest.er1
6856 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006858 (exit $ac_status); } && {
6859 test -z "$ac_c_werror_flag" ||
6860 test ! -s conftest.err
6861 } && test -s conftest.$ac_objext; then
6862 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006863else
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006865sed 's/^/| /' conftest.$ac_ext >&5
6866
Martin v. Löwiseba40652007-08-30 20:10:57 +00006867 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006869
6870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6873echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006874
Martin v. Löwis11437992002-04-12 09:54:03 +00006875cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006876#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006878
Michael W. Hudson54241132001-12-07 15:38:26 +00006879
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880{ echo "$as_me:$LINENO: checking for size_t" >&5
6881echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006882if test "${ac_cv_type_size_t+set}" = set; then
6883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006884else
Martin v. Löwis11437992002-04-12 09:54:03 +00006885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006886/* confdefs.h. */
6887_ACEOF
6888cat confdefs.h >>conftest.$ac_ext
6889cat >>conftest.$ac_ext <<_ACEOF
6890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006891$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006892typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006893int
6894main ()
6895{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006896if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006898if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006899 return 0;
6900 ;
6901 return 0;
6902}
6903_ACEOF
6904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905if { (ac_try="$ac_compile"
6906case "(($ac_try" in
6907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6908 *) ac_try_echo=$ac_try;;
6909esac
6910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006913 grep -v '^ *+' conftest.er1 >conftest.err
6914 rm -f conftest.er1
6915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006917 (exit $ac_status); } && {
6918 test -z "$ac_c_werror_flag" ||
6919 test ! -s conftest.err
6920 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006921 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006922else
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006924sed 's/^/| /' conftest.$ac_ext >&5
6925
Martin v. Löwiseba40652007-08-30 20:10:57 +00006926 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928
6929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006931{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6932echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006933if test $ac_cv_type_size_t = yes; then
6934 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006935else
Martin v. Löwis11437992002-04-12 09:54:03 +00006936
6937cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006939_ACEOF
6940
6941fi
6942
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6944echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006945if test "${ac_cv_type_uid_t+set}" = set; then
6946 echo $ECHO_N "(cached) $ECHO_C" >&6
6947else
6948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006949/* confdefs.h. */
6950_ACEOF
6951cat confdefs.h >>conftest.$ac_ext
6952cat >>conftest.$ac_ext <<_ACEOF
6953/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006955
6956_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006958 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959 ac_cv_type_uid_t=yes
6960else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006961 ac_cv_type_uid_t=no
6962fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006963rm -f conftest*
6964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6967echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006968if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006969
Martin v. Löwis11437992002-04-12 09:54:03 +00006970cat >>confdefs.h <<\_ACEOF
6971#define uid_t int
6972_ACEOF
6973
6974
6975cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006976#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006977_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006978
6979fi
6980
Martin v. Löwiseba40652007-08-30 20:10:57 +00006981{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6982echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006983if test "${ac_cv_type_ssize_t+set}" = set; then
6984 echo $ECHO_N "(cached) $ECHO_C" >&6
6985else
6986 cat >conftest.$ac_ext <<_ACEOF
6987/* confdefs.h. */
6988_ACEOF
6989cat confdefs.h >>conftest.$ac_ext
6990cat >>conftest.$ac_ext <<_ACEOF
6991/* end confdefs.h. */
6992$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006993typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006994int
6995main ()
6996{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006997if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006998 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007000 return 0;
7001 ;
7002 return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007006if { (ac_try="$ac_compile"
7007case "(($ac_try" in
7008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7009 *) ac_try_echo=$ac_try;;
7010esac
7011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007013 ac_status=$?
7014 grep -v '^ *+' conftest.er1 >conftest.err
7015 rm -f conftest.er1
7016 cat conftest.err >&5
7017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007018 (exit $ac_status); } && {
7019 test -z "$ac_c_werror_flag" ||
7020 test ! -s conftest.err
7021 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007022 ac_cv_type_ssize_t=yes
7023else
7024 echo "$as_me: failed program was:" >&5
7025sed 's/^/| /' conftest.$ac_ext >&5
7026
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029
7030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007032{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7033echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007034if test $ac_cv_type_ssize_t = yes; then
7035
7036cat >>confdefs.h <<\_ACEOF
7037#define HAVE_SSIZE_T 1
7038_ACEOF
7039
7040fi
7041
Jack Jansendd19cf82001-12-06 22:36:17 +00007042
Michael W. Hudson54241132001-12-07 15:38:26 +00007043# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007044# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007045{ echo "$as_me:$LINENO: checking for int" >&5
7046echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007047if test "${ac_cv_type_int+set}" = set; then
7048 echo $ECHO_N "(cached) $ECHO_C" >&6
7049else
7050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007051/* confdefs.h. */
7052_ACEOF
7053cat confdefs.h >>conftest.$ac_ext
7054cat >>conftest.$ac_ext <<_ACEOF
7055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007056$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007057typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007058int
7059main ()
7060{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007061if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007062 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007064 return 0;
7065 ;
7066 return 0;
7067}
7068_ACEOF
7069rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007070if { (ac_try="$ac_compile"
7071case "(($ac_try" in
7072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7073 *) ac_try_echo=$ac_try;;
7074esac
7075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007078 grep -v '^ *+' conftest.er1 >conftest.err
7079 rm -f conftest.er1
7080 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007082 (exit $ac_status); } && {
7083 test -z "$ac_c_werror_flag" ||
7084 test ! -s conftest.err
7085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007086 ac_cv_type_int=yes
7087else
7088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007089sed 's/^/| /' conftest.$ac_ext >&5
7090
Martin v. Löwiseba40652007-08-30 20:10:57 +00007091 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007092fi
Brett Cannon19fab762007-06-02 03:02:29 +00007093
Martin v. Löwiseba40652007-08-30 20:10:57 +00007094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7095fi
7096{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7097echo "${ECHO_T}$ac_cv_type_int" >&6; }
7098
7099# The cast to long int works around a bug in the HP C Compiler
7100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7102# This bug is HP SR number 8606223364.
7103{ echo "$as_me:$LINENO: checking size of int" >&5
7104echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007105if test "${ac_cv_sizeof_int+set}" = set; then
7106 echo $ECHO_N "(cached) $ECHO_C" >&6
7107else
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 if test "$cross_compiling" = yes; then
7109 # Depending upon the size, compute the lo and hi bounds.
7110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007117 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007118int
7119main ()
7120{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007122test_array [0] = 0
7123
7124 ;
7125 return 0;
7126}
7127_ACEOF
7128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129if { (ac_try="$ac_compile"
7130case "(($ac_try" in
7131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7132 *) ac_try_echo=$ac_try;;
7133esac
7134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007137 grep -v '^ *+' conftest.er1 >conftest.err
7138 rm -f conftest.er1
7139 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007141 (exit $ac_status); } && {
7142 test -z "$ac_c_werror_flag" ||
7143 test ! -s conftest.err
7144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 ac_lo=0 ac_mid=0
7146 while :; do
7147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007148/* confdefs.h. */
7149_ACEOF
7150cat confdefs.h >>conftest.$ac_ext
7151cat >>conftest.$ac_ext <<_ACEOF
7152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007153$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007155int
7156main ()
7157{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007159test_array [0] = 0
7160
7161 ;
7162 return 0;
7163}
7164_ACEOF
7165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007166if { (ac_try="$ac_compile"
7167case "(($ac_try" in
7168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7169 *) ac_try_echo=$ac_try;;
7170esac
7171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007174 grep -v '^ *+' conftest.er1 >conftest.err
7175 rm -f conftest.er1
7176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178 (exit $ac_status); } && {
7179 test -z "$ac_c_werror_flag" ||
7180 test ! -s conftest.err
7181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007182 ac_hi=$ac_mid; break
7183else
7184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007185sed 's/^/| /' conftest.$ac_ext >&5
7186
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 ac_lo=`expr $ac_mid + 1`
7188 if test $ac_lo -le $ac_mid; then
7189 ac_lo= ac_hi=
7190 break
7191 fi
7192 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007196 done
7197else
7198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007199sed 's/^/| /' conftest.$ac_ext >&5
7200
Martin v. Löwiseba40652007-08-30 20:10:57 +00007201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007202/* confdefs.h. */
7203_ACEOF
7204cat confdefs.h >>conftest.$ac_ext
7205cat >>conftest.$ac_ext <<_ACEOF
7206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007207$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007208 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007209int
7210main ()
7211{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007213test_array [0] = 0
7214
7215 ;
7216 return 0;
7217}
7218_ACEOF
7219rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007220if { (ac_try="$ac_compile"
7221case "(($ac_try" in
7222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7223 *) ac_try_echo=$ac_try;;
7224esac
7225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007228 grep -v '^ *+' conftest.er1 >conftest.err
7229 rm -f conftest.er1
7230 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232 (exit $ac_status); } && {
7233 test -z "$ac_c_werror_flag" ||
7234 test ! -s conftest.err
7235 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007236 ac_hi=-1 ac_mid=-1
7237 while :; do
7238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007239/* confdefs.h. */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007244$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007245 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007246int
7247main ()
7248{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007249static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007257if { (ac_try="$ac_compile"
7258case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
7262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7263 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007265 grep -v '^ *+' conftest.er1 >conftest.err
7266 rm -f conftest.er1
7267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007269 (exit $ac_status); } && {
7270 test -z "$ac_c_werror_flag" ||
7271 test ! -s conftest.err
7272 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 ac_lo=$ac_mid; break
7274else
7275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007276sed 's/^/| /' conftest.$ac_ext >&5
7277
Martin v. Löwiseba40652007-08-30 20:10:57 +00007278 ac_hi=`expr '(' $ac_mid ')' - 1`
7279 if test $ac_mid -le $ac_hi; then
7280 ac_lo= ac_hi=
7281 break
7282 fi
7283 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007285
7286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 done
7288else
7289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007290sed 's/^/| /' conftest.$ac_ext >&5
7291
Martin v. Löwiseba40652007-08-30 20:10:57 +00007292 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007294
7295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007297
7298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007299# Binary search between lo and hi bounds.
7300while test "x$ac_lo" != "x$ac_hi"; do
7301 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007303/* confdefs.h. */
7304_ACEOF
7305cat confdefs.h >>conftest.$ac_ext
7306cat >>conftest.$ac_ext <<_ACEOF
7307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007308$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007310int
7311main ()
7312{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007313static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007314test_array [0] = 0
7315
7316 ;
7317 return 0;
7318}
7319_ACEOF
7320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007321if { (ac_try="$ac_compile"
7322case "(($ac_try" in
7323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7324 *) ac_try_echo=$ac_try;;
7325esac
7326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007329 grep -v '^ *+' conftest.er1 >conftest.err
7330 rm -f conftest.er1
7331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007333 (exit $ac_status); } && {
7334 test -z "$ac_c_werror_flag" ||
7335 test ! -s conftest.err
7336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007337 ac_hi=$ac_mid
7338else
7339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007340sed 's/^/| /' conftest.$ac_ext >&5
7341
Martin v. Löwiseba40652007-08-30 20:10:57 +00007342 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007344
7345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007346done
7347case $ac_lo in
7348?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007349'') if test "$ac_cv_type_int" = yes; then
7350 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007351See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007352echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007353See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007354 { (exit 77); exit 77; }; }
7355 else
7356 ac_cv_sizeof_int=0
7357 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007358esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007359else
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007361/* confdefs.h. */
7362_ACEOF
7363cat confdefs.h >>conftest.$ac_ext
7364cat >>conftest.$ac_ext <<_ACEOF
7365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007366$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367 typedef int ac__type_sizeof_;
7368static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7369static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007370#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007371#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007372int
7373main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007374{
Martin v. Löwis11437992002-04-12 09:54:03 +00007375
7376 FILE *f = fopen ("conftest.val", "w");
7377 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378 return 1;
7379 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007380 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007381 long int i = longval ();
7382 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7383 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007384 fprintf (f, "%ld\n", i);
7385 }
7386 else
7387 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388 unsigned long int i = ulongval ();
7389 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7390 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 fprintf (f, "%lu\n", i);
7392 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007393 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007394
7395 ;
7396 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007397}
Martin v. Löwis11437992002-04-12 09:54:03 +00007398_ACEOF
7399rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400if { (ac_try="$ac_link"
7401case "(($ac_try" in
7402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7403 *) ac_try_echo=$ac_try;;
7404esac
7405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7406 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007407 ac_status=$?
7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007410 { (case "(($ac_try" in
7411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7412 *) ac_try_echo=$ac_try;;
7413esac
7414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7415 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); }; }; then
7419 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007420else
Martin v. Löwis11437992002-04-12 09:54:03 +00007421 echo "$as_me: program exited with status $ac_status" >&5
7422echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007423sed 's/^/| /' conftest.$ac_ext >&5
7424
Martin v. Löwis11437992002-04-12 09:54:03 +00007425( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007426if test "$ac_cv_type_int" = yes; then
7427 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007428See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007429echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007430See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007431 { (exit 77); exit 77; }; }
7432 else
7433 ac_cv_sizeof_int=0
7434 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436rm -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 +00007437fi
7438rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7441echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7442
7443
7444
Martin v. Löwis11437992002-04-12 09:54:03 +00007445cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007446#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007447_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007448
7449
Martin v. Löwiseba40652007-08-30 20:10:57 +00007450{ echo "$as_me:$LINENO: checking for long" >&5
7451echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007452if test "${ac_cv_type_long+set}" = set; then
7453 echo $ECHO_N "(cached) $ECHO_C" >&6
7454else
7455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007456/* confdefs.h. */
7457_ACEOF
7458cat confdefs.h >>conftest.$ac_ext
7459cat >>conftest.$ac_ext <<_ACEOF
7460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007461$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007463int
7464main ()
7465{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007466if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007468if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007469 return 0;
7470 ;
7471 return 0;
7472}
7473_ACEOF
7474rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007475if { (ac_try="$ac_compile"
7476case "(($ac_try" in
7477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7478 *) ac_try_echo=$ac_try;;
7479esac
7480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007483 grep -v '^ *+' conftest.er1 >conftest.err
7484 rm -f conftest.er1
7485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487 (exit $ac_status); } && {
7488 test -z "$ac_c_werror_flag" ||
7489 test ! -s conftest.err
7490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007491 ac_cv_type_long=yes
7492else
7493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007494sed 's/^/| /' conftest.$ac_ext >&5
7495
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007497fi
Brett Cannon19fab762007-06-02 03:02:29 +00007498
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7500fi
7501{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7502echo "${ECHO_T}$ac_cv_type_long" >&6; }
7503
7504# The cast to long int works around a bug in the HP C Compiler
7505# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7506# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7507# This bug is HP SR number 8606223364.
7508{ echo "$as_me:$LINENO: checking size of long" >&5
7509echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007510if test "${ac_cv_sizeof_long+set}" = set; then
7511 echo $ECHO_N "(cached) $ECHO_C" >&6
7512else
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 if test "$cross_compiling" = yes; then
7514 # Depending upon the size, compute the lo and hi bounds.
7515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007522 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007523int
7524main ()
7525{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007526static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007527test_array [0] = 0
7528
7529 ;
7530 return 0;
7531}
7532_ACEOF
7533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007534if { (ac_try="$ac_compile"
7535case "(($ac_try" in
7536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7537 *) ac_try_echo=$ac_try;;
7538esac
7539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007542 grep -v '^ *+' conftest.er1 >conftest.err
7543 rm -f conftest.er1
7544 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007546 (exit $ac_status); } && {
7547 test -z "$ac_c_werror_flag" ||
7548 test ! -s conftest.err
7549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 ac_lo=0 ac_mid=0
7551 while :; do
7552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* confdefs.h. */
7554_ACEOF
7555cat confdefs.h >>conftest.$ac_ext
7556cat >>conftest.$ac_ext <<_ACEOF
7557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007558$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007559 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007560int
7561main ()
7562{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007564test_array [0] = 0
7565
7566 ;
7567 return 0;
7568}
7569_ACEOF
7570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571if { (ac_try="$ac_compile"
7572case "(($ac_try" in
7573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7574 *) ac_try_echo=$ac_try;;
7575esac
7576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007579 grep -v '^ *+' conftest.er1 >conftest.err
7580 rm -f conftest.er1
7581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583 (exit $ac_status); } && {
7584 test -z "$ac_c_werror_flag" ||
7585 test ! -s conftest.err
7586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 ac_hi=$ac_mid; break
7588else
7589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007590sed 's/^/| /' conftest.$ac_ext >&5
7591
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592 ac_lo=`expr $ac_mid + 1`
7593 if test $ac_lo -le $ac_mid; then
7594 ac_lo= ac_hi=
7595 break
7596 fi
7597 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599
7600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 done
7602else
7603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007604sed 's/^/| /' conftest.$ac_ext >&5
7605
Martin v. Löwiseba40652007-08-30 20:10:57 +00007606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007607/* confdefs.h. */
7608_ACEOF
7609cat confdefs.h >>conftest.$ac_ext
7610cat >>conftest.$ac_ext <<_ACEOF
7611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007612$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007614int
7615main ()
7616{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007618test_array [0] = 0
7619
7620 ;
7621 return 0;
7622}
7623_ACEOF
7624rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007625if { (ac_try="$ac_compile"
7626case "(($ac_try" in
7627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7628 *) ac_try_echo=$ac_try;;
7629esac
7630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007633 grep -v '^ *+' conftest.er1 >conftest.err
7634 rm -f conftest.er1
7635 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637 (exit $ac_status); } && {
7638 test -z "$ac_c_werror_flag" ||
7639 test ! -s conftest.err
7640 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 ac_hi=-1 ac_mid=-1
7642 while :; do
7643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007644/* confdefs.h. */
7645_ACEOF
7646cat confdefs.h >>conftest.$ac_ext
7647cat >>conftest.$ac_ext <<_ACEOF
7648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007649$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007650 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007651int
7652main ()
7653{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007655test_array [0] = 0
7656
7657 ;
7658 return 0;
7659}
7660_ACEOF
7661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007662if { (ac_try="$ac_compile"
7663case "(($ac_try" in
7664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7665 *) ac_try_echo=$ac_try;;
7666esac
7667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007670 grep -v '^ *+' conftest.er1 >conftest.err
7671 rm -f conftest.er1
7672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 (exit $ac_status); } && {
7675 test -z "$ac_c_werror_flag" ||
7676 test ! -s conftest.err
7677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 ac_lo=$ac_mid; break
7679else
7680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007681sed 's/^/| /' conftest.$ac_ext >&5
7682
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683 ac_hi=`expr '(' $ac_mid ')' - 1`
7684 if test $ac_mid -le $ac_hi; then
7685 ac_lo= ac_hi=
7686 break
7687 fi
7688 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690
7691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 done
7693else
7694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007695sed 's/^/| /' conftest.$ac_ext >&5
7696
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007699
7700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702
7703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007704# Binary search between lo and hi bounds.
7705while test "x$ac_lo" != "x$ac_hi"; do
7706 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007708/* confdefs.h. */
7709_ACEOF
7710cat confdefs.h >>conftest.$ac_ext
7711cat >>conftest.$ac_ext <<_ACEOF
7712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007713$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007715int
7716main ()
7717{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007719test_array [0] = 0
7720
7721 ;
7722 return 0;
7723}
7724_ACEOF
7725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726if { (ac_try="$ac_compile"
7727case "(($ac_try" in
7728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7729 *) ac_try_echo=$ac_try;;
7730esac
7731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007734 grep -v '^ *+' conftest.er1 >conftest.err
7735 rm -f conftest.er1
7736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007738 (exit $ac_status); } && {
7739 test -z "$ac_c_werror_flag" ||
7740 test ! -s conftest.err
7741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ac_hi=$ac_mid
7743else
7744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007745sed 's/^/| /' conftest.$ac_ext >&5
7746
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007749
7750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007751done
7752case $ac_lo in
7753?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754'') if test "$ac_cv_type_long" = yes; then
7755 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007756See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007758See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759 { (exit 77); exit 77; }; }
7760 else
7761 ac_cv_sizeof_long=0
7762 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007763esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007764else
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007766/* confdefs.h. */
7767_ACEOF
7768cat confdefs.h >>conftest.$ac_ext
7769cat >>conftest.$ac_ext <<_ACEOF
7770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007771$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007772 typedef long ac__type_sizeof_;
7773static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7774static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007775#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007776#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007777int
7778main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007779{
Martin v. Löwis11437992002-04-12 09:54:03 +00007780
7781 FILE *f = fopen ("conftest.val", "w");
7782 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 return 1;
7784 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786 long int i = longval ();
7787 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7788 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 fprintf (f, "%ld\n", i);
7790 }
7791 else
7792 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793 unsigned long int i = ulongval ();
7794 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7795 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 fprintf (f, "%lu\n", i);
7797 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007799
7800 ;
7801 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007802}
Martin v. Löwis11437992002-04-12 09:54:03 +00007803_ACEOF
7804rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805if { (ac_try="$ac_link"
7806case "(($ac_try" in
7807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7808 *) ac_try_echo=$ac_try;;
7809esac
7810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7811 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ac_status=$?
7813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815 { (case "(($ac_try" in
7816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7817 *) ac_try_echo=$ac_try;;
7818esac
7819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7820 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 ac_status=$?
7822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7823 (exit $ac_status); }; }; then
7824 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007825else
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 echo "$as_me: program exited with status $ac_status" >&5
7827echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007828sed 's/^/| /' conftest.$ac_ext >&5
7829
Martin v. Löwis11437992002-04-12 09:54:03 +00007830( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831if test "$ac_cv_type_long" = yes; then
7832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007833See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836 { (exit 77); exit 77; }; }
7837 else
7838 ac_cv_sizeof_long=0
7839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841rm -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 +00007842fi
7843rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7846echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7847
7848
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007852_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853
7854
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855{ echo "$as_me:$LINENO: checking for void *" >&5
7856echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007857if test "${ac_cv_type_void_p+set}" = set; then
7858 echo $ECHO_N "(cached) $ECHO_C" >&6
7859else
7860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007861/* confdefs.h. */
7862_ACEOF
7863cat confdefs.h >>conftest.$ac_ext
7864cat >>conftest.$ac_ext <<_ACEOF
7865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007866$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007868int
7869main ()
7870{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 return 0;
7875 ;
7876 return 0;
7877}
7878_ACEOF
7879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880if { (ac_try="$ac_compile"
7881case "(($ac_try" in
7882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7883 *) ac_try_echo=$ac_try;;
7884esac
7885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007888 grep -v '^ *+' conftest.er1 >conftest.err
7889 rm -f conftest.er1
7890 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 (exit $ac_status); } && {
7893 test -z "$ac_c_werror_flag" ||
7894 test ! -s conftest.err
7895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 ac_cv_type_void_p=yes
7897else
7898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007899sed 's/^/| /' conftest.$ac_ext >&5
7900
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007902fi
Brett Cannon19fab762007-06-02 03:02:29 +00007903
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7905fi
7906{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7907echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7908
7909# The cast to long int works around a bug in the HP C Compiler
7910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7912# This bug is HP SR number 8606223364.
7913{ echo "$as_me:$LINENO: checking size of void *" >&5
7914echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007915if test "${ac_cv_sizeof_void_p+set}" = set; then
7916 echo $ECHO_N "(cached) $ECHO_C" >&6
7917else
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 if test "$cross_compiling" = yes; then
7919 # Depending upon the size, compute the lo and hi bounds.
7920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* confdefs.h. */
7922_ACEOF
7923cat confdefs.h >>conftest.$ac_ext
7924cat >>conftest.$ac_ext <<_ACEOF
7925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007927 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007931static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007932test_array [0] = 0
7933
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939if { (ac_try="$ac_compile"
7940case "(($ac_try" in
7941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7942 *) ac_try_echo=$ac_try;;
7943esac
7944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951 (exit $ac_status); } && {
7952 test -z "$ac_c_werror_flag" ||
7953 test ! -s conftest.err
7954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ac_lo=0 ac_mid=0
7956 while :; do
7957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* confdefs.h. */
7959_ACEOF
7960cat confdefs.h >>conftest.$ac_ext
7961cat >>conftest.$ac_ext <<_ACEOF
7962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007969test_array [0] = 0
7970
7971 ;
7972 return 0;
7973}
7974_ACEOF
7975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976if { (ac_try="$ac_compile"
7977case "(($ac_try" in
7978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7979 *) ac_try_echo=$ac_try;;
7980esac
7981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007984 grep -v '^ *+' conftest.er1 >conftest.err
7985 rm -f conftest.er1
7986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988 (exit $ac_status); } && {
7989 test -z "$ac_c_werror_flag" ||
7990 test ! -s conftest.err
7991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ac_hi=$ac_mid; break
7993else
7994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007995sed 's/^/| /' conftest.$ac_ext >&5
7996
Martin v. Löwiseba40652007-08-30 20:10:57 +00007997 ac_lo=`expr $ac_mid + 1`
7998 if test $ac_lo -le $ac_mid; then
7999 ac_lo= ac_hi=
8000 break
8001 fi
8002 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004
8005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 done
8007else
8008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008009sed 's/^/| /' conftest.$ac_ext >&5
8010
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008012/* confdefs.h. */
8013_ACEOF
8014cat confdefs.h >>conftest.$ac_ext
8015cat >>conftest.$ac_ext <<_ACEOF
8016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008017$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008018 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008019int
8020main ()
8021{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008023test_array [0] = 0
8024
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030if { (ac_try="$ac_compile"
8031case "(($ac_try" in
8032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8033 *) ac_try_echo=$ac_try;;
8034esac
8035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008038 grep -v '^ *+' conftest.er1 >conftest.err
8039 rm -f conftest.er1
8040 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042 (exit $ac_status); } && {
8043 test -z "$ac_c_werror_flag" ||
8044 test ! -s conftest.err
8045 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ac_hi=-1 ac_mid=-1
8047 while :; do
8048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008049/* confdefs.h. */
8050_ACEOF
8051cat confdefs.h >>conftest.$ac_ext
8052cat >>conftest.$ac_ext <<_ACEOF
8053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008055 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008056int
8057main ()
8058{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008060test_array [0] = 0
8061
8062 ;
8063 return 0;
8064}
8065_ACEOF
8066rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008067if { (ac_try="$ac_compile"
8068case "(($ac_try" in
8069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8070 *) ac_try_echo=$ac_try;;
8071esac
8072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008075 grep -v '^ *+' conftest.er1 >conftest.err
8076 rm -f conftest.er1
8077 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079 (exit $ac_status); } && {
8080 test -z "$ac_c_werror_flag" ||
8081 test ! -s conftest.err
8082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ac_lo=$ac_mid; break
8084else
8085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008086sed 's/^/| /' conftest.$ac_ext >&5
8087
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088 ac_hi=`expr '(' $ac_mid ')' - 1`
8089 if test $ac_mid -le $ac_hi; then
8090 ac_lo= ac_hi=
8091 break
8092 fi
8093 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095
8096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 done
8098else
8099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008100sed 's/^/| /' conftest.$ac_ext >&5
8101
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008104
8105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008109# Binary search between lo and hi bounds.
8110while test "x$ac_lo" != "x$ac_hi"; do
8111 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008113/* confdefs.h. */
8114_ACEOF
8115cat confdefs.h >>conftest.$ac_ext
8116cat >>conftest.$ac_ext <<_ACEOF
8117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008118$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008120int
8121main ()
8122{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008124test_array [0] = 0
8125
8126 ;
8127 return 0;
8128}
8129_ACEOF
8130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131if { (ac_try="$ac_compile"
8132case "(($ac_try" in
8133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8134 *) ac_try_echo=$ac_try;;
8135esac
8136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008139 grep -v '^ *+' conftest.er1 >conftest.err
8140 rm -f conftest.er1
8141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143 (exit $ac_status); } && {
8144 test -z "$ac_c_werror_flag" ||
8145 test ! -s conftest.err
8146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_hi=$ac_mid
8148else
8149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008150sed 's/^/| /' conftest.$ac_ext >&5
8151
Martin v. Löwiseba40652007-08-30 20:10:57 +00008152 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154
8155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008156done
8157case $ac_lo in
8158?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159'') if test "$ac_cv_type_void_p" = yes; then
8160 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008161See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008163See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164 { (exit 77); exit 77; }; }
8165 else
8166 ac_cv_sizeof_void_p=0
8167 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008168esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008169else
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008171/* confdefs.h. */
8172_ACEOF
8173cat confdefs.h >>conftest.$ac_ext
8174cat >>conftest.$ac_ext <<_ACEOF
8175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008176$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008177 typedef void * ac__type_sizeof_;
8178static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8179static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008180#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008181#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008182int
8183main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008184{
Martin v. Löwis11437992002-04-12 09:54:03 +00008185
8186 FILE *f = fopen ("conftest.val", "w");
8187 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 return 1;
8189 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008191 long int i = longval ();
8192 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8193 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 fprintf (f, "%ld\n", i);
8195 }
8196 else
8197 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198 unsigned long int i = ulongval ();
8199 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8200 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 fprintf (f, "%lu\n", i);
8202 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008203 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
8205 ;
8206 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008207}
Martin v. Löwis11437992002-04-12 09:54:03 +00008208_ACEOF
8209rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210if { (ac_try="$ac_link"
8211case "(($ac_try" in
8212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8213 *) ac_try_echo=$ac_try;;
8214esac
8215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8216 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 ac_status=$?
8218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 { (case "(($ac_try" in
8221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8222 *) ac_try_echo=$ac_try;;
8223esac
8224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8225 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 ac_status=$?
8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); }; }; then
8229 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008230else
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 echo "$as_me: program exited with status $ac_status" >&5
8232echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008233sed 's/^/| /' conftest.$ac_ext >&5
8234
Martin v. Löwis11437992002-04-12 09:54:03 +00008235( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236if test "$ac_cv_type_void_p" = yes; then
8237 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008238See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241 { (exit 77); exit 77; }; }
8242 else
8243 ac_cv_sizeof_void_p=0
8244 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246rm -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 +00008247fi
8248rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008250{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8251echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8252
8253
8254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008256#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008257_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008258
8259
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260{ echo "$as_me:$LINENO: checking for short" >&5
8261echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008262if test "${ac_cv_type_short+set}" = set; then
8263 echo $ECHO_N "(cached) $ECHO_C" >&6
8264else
8265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008271$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008273int
8274main ()
8275{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008277 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 return 0;
8280 ;
8281 return 0;
8282}
8283_ACEOF
8284rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285if { (ac_try="$ac_compile"
8286case "(($ac_try" in
8287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8288 *) ac_try_echo=$ac_try;;
8289esac
8290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293 grep -v '^ *+' conftest.er1 >conftest.err
8294 rm -f conftest.er1
8295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 (exit $ac_status); } && {
8298 test -z "$ac_c_werror_flag" ||
8299 test ! -s conftest.err
8300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008301 ac_cv_type_short=yes
8302else
8303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008304sed 's/^/| /' conftest.$ac_ext >&5
8305
Martin v. Löwiseba40652007-08-30 20:10:57 +00008306 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Brett Cannon19fab762007-06-02 03:02:29 +00008308
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8310fi
8311{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8312echo "${ECHO_T}$ac_cv_type_short" >&6; }
8313
8314# The cast to long int works around a bug in the HP C Compiler
8315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8317# This bug is HP SR number 8606223364.
8318{ echo "$as_me:$LINENO: checking size of short" >&5
8319echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008320if test "${ac_cv_sizeof_short+set}" = set; then
8321 echo $ECHO_N "(cached) $ECHO_C" >&6
8322else
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 if test "$cross_compiling" = yes; then
8324 # Depending upon the size, compute the lo and hi bounds.
8325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008326/* confdefs.h. */
8327_ACEOF
8328cat confdefs.h >>conftest.$ac_ext
8329cat >>conftest.$ac_ext <<_ACEOF
8330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008331$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008332 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008333int
8334main ()
8335{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008337test_array [0] = 0
8338
8339 ;
8340 return 0;
8341}
8342_ACEOF
8343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008344if { (ac_try="$ac_compile"
8345case "(($ac_try" in
8346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8347 *) ac_try_echo=$ac_try;;
8348esac
8349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008352 grep -v '^ *+' conftest.er1 >conftest.err
8353 rm -f conftest.er1
8354 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356 (exit $ac_status); } && {
8357 test -z "$ac_c_werror_flag" ||
8358 test ! -s conftest.err
8359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 ac_lo=0 ac_mid=0
8361 while :; do
8362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008363/* confdefs.h. */
8364_ACEOF
8365cat confdefs.h >>conftest.$ac_ext
8366cat >>conftest.$ac_ext <<_ACEOF
8367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008368$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008369 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008370int
8371main ()
8372{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008374test_array [0] = 0
8375
8376 ;
8377 return 0;
8378}
8379_ACEOF
8380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381if { (ac_try="$ac_compile"
8382case "(($ac_try" in
8383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8384 *) ac_try_echo=$ac_try;;
8385esac
8386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008389 grep -v '^ *+' conftest.er1 >conftest.err
8390 rm -f conftest.er1
8391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393 (exit $ac_status); } && {
8394 test -z "$ac_c_werror_flag" ||
8395 test ! -s conftest.err
8396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 ac_hi=$ac_mid; break
8398else
8399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008400sed 's/^/| /' conftest.$ac_ext >&5
8401
Martin v. Löwiseba40652007-08-30 20:10:57 +00008402 ac_lo=`expr $ac_mid + 1`
8403 if test $ac_lo -le $ac_mid; then
8404 ac_lo= ac_hi=
8405 break
8406 fi
8407 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409
8410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 done
8412else
8413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008414sed 's/^/| /' conftest.$ac_ext >&5
8415
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008417/* confdefs.h. */
8418_ACEOF
8419cat confdefs.h >>conftest.$ac_ext
8420cat >>conftest.$ac_ext <<_ACEOF
8421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008422$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008423 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008424int
8425main ()
8426{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008428test_array [0] = 0
8429
8430 ;
8431 return 0;
8432}
8433_ACEOF
8434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435if { (ac_try="$ac_compile"
8436case "(($ac_try" in
8437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8438 *) ac_try_echo=$ac_try;;
8439esac
8440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008443 grep -v '^ *+' conftest.er1 >conftest.err
8444 rm -f conftest.er1
8445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 (exit $ac_status); } && {
8448 test -z "$ac_c_werror_flag" ||
8449 test ! -s conftest.err
8450 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ac_hi=-1 ac_mid=-1
8452 while :; do
8453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008460 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008465test_array [0] = 0
8466
8467 ;
8468 return 0;
8469}
8470_ACEOF
8471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472if { (ac_try="$ac_compile"
8473case "(($ac_try" in
8474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8475 *) ac_try_echo=$ac_try;;
8476esac
8477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008480 grep -v '^ *+' conftest.er1 >conftest.err
8481 rm -f conftest.er1
8482 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484 (exit $ac_status); } && {
8485 test -z "$ac_c_werror_flag" ||
8486 test ! -s conftest.err
8487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 ac_lo=$ac_mid; break
8489else
8490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008491sed 's/^/| /' conftest.$ac_ext >&5
8492
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493 ac_hi=`expr '(' $ac_mid ')' - 1`
8494 if test $ac_mid -le $ac_hi; then
8495 ac_lo= ac_hi=
8496 break
8497 fi
8498 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500
8501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 done
8503else
8504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008505sed 's/^/| /' conftest.$ac_ext >&5
8506
Martin v. Löwiseba40652007-08-30 20:10:57 +00008507 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509
8510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512
8513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008514# Binary search between lo and hi bounds.
8515while test "x$ac_lo" != "x$ac_hi"; do
8516 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* confdefs.h. */
8519_ACEOF
8520cat confdefs.h >>conftest.$ac_ext
8521cat >>conftest.$ac_ext <<_ACEOF
8522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008525int
8526main ()
8527{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008529test_array [0] = 0
8530
8531 ;
8532 return 0;
8533}
8534_ACEOF
8535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536if { (ac_try="$ac_compile"
8537case "(($ac_try" in
8538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8539 *) ac_try_echo=$ac_try;;
8540esac
8541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008544 grep -v '^ *+' conftest.er1 >conftest.err
8545 rm -f conftest.er1
8546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008548 (exit $ac_status); } && {
8549 test -z "$ac_c_werror_flag" ||
8550 test ! -s conftest.err
8551 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_hi=$ac_mid
8553else
8554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008555sed 's/^/| /' conftest.$ac_ext >&5
8556
Martin v. Löwiseba40652007-08-30 20:10:57 +00008557 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008559
8560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008561done
8562case $ac_lo in
8563?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564'') if test "$ac_cv_type_short" = yes; then
8565 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008566See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008568See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569 { (exit 77); exit 77; }; }
8570 else
8571 ac_cv_sizeof_short=0
8572 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008573esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008574else
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008576/* confdefs.h. */
8577_ACEOF
8578cat confdefs.h >>conftest.$ac_ext
8579cat >>conftest.$ac_ext <<_ACEOF
8580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008581$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008582 typedef short ac__type_sizeof_;
8583static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8584static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008585#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008586#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008587int
8588main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008589{
Martin v. Löwis11437992002-04-12 09:54:03 +00008590
8591 FILE *f = fopen ("conftest.val", "w");
8592 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 return 1;
8594 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008596 long int i = longval ();
8597 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8598 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 fprintf (f, "%ld\n", i);
8600 }
8601 else
8602 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603 unsigned long int i = ulongval ();
8604 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8605 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 fprintf (f, "%lu\n", i);
8607 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008609
8610 ;
8611 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008612}
Martin v. Löwis11437992002-04-12 09:54:03 +00008613_ACEOF
8614rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615if { (ac_try="$ac_link"
8616case "(($ac_try" in
8617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8618 *) ac_try_echo=$ac_try;;
8619esac
8620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8621 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 ac_status=$?
8623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 { (case "(($ac_try" in
8626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8627 *) ac_try_echo=$ac_try;;
8628esac
8629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8630 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 ac_status=$?
8632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8633 (exit $ac_status); }; }; then
8634 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008635else
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 echo "$as_me: program exited with status $ac_status" >&5
8637echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008638sed 's/^/| /' conftest.$ac_ext >&5
8639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008641if test "$ac_cv_type_short" = yes; then
8642 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008643See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646 { (exit 77); exit 77; }; }
8647 else
8648 ac_cv_sizeof_short=0
8649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651rm -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 +00008652fi
8653rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008655{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8656echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8657
8658
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008661#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008662_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008663
8664
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665{ echo "$as_me:$LINENO: checking for float" >&5
8666echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008667if test "${ac_cv_type_float+set}" = set; then
8668 echo $ECHO_N "(cached) $ECHO_C" >&6
8669else
8670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008671/* confdefs.h. */
8672_ACEOF
8673cat confdefs.h >>conftest.$ac_ext
8674cat >>conftest.$ac_ext <<_ACEOF
8675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008676$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008678int
8679main ()
8680{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 return 0;
8685 ;
8686 return 0;
8687}
8688_ACEOF
8689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008690if { (ac_try="$ac_compile"
8691case "(($ac_try" in
8692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8693 *) ac_try_echo=$ac_try;;
8694esac
8695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008698 grep -v '^ *+' conftest.er1 >conftest.err
8699 rm -f conftest.er1
8700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 (exit $ac_status); } && {
8703 test -z "$ac_c_werror_flag" ||
8704 test ! -s conftest.err
8705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 ac_cv_type_float=yes
8707else
8708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008709sed 's/^/| /' conftest.$ac_ext >&5
8710
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008712fi
Brett Cannon19fab762007-06-02 03:02:29 +00008713
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8715fi
8716{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8717echo "${ECHO_T}$ac_cv_type_float" >&6; }
8718
8719# The cast to long int works around a bug in the HP C Compiler
8720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8722# This bug is HP SR number 8606223364.
8723{ echo "$as_me:$LINENO: checking size of float" >&5
8724echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008725if test "${ac_cv_sizeof_float+set}" = set; then
8726 echo $ECHO_N "(cached) $ECHO_C" >&6
8727else
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 if test "$cross_compiling" = yes; then
8729 # Depending upon the size, compute the lo and hi bounds.
8730cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008731/* confdefs.h. */
8732_ACEOF
8733cat confdefs.h >>conftest.$ac_ext
8734cat >>conftest.$ac_ext <<_ACEOF
8735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008742test_array [0] = 0
8743
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749if { (ac_try="$ac_compile"
8750case "(($ac_try" in
8751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8752 *) ac_try_echo=$ac_try;;
8753esac
8754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008757 grep -v '^ *+' conftest.er1 >conftest.err
8758 rm -f conftest.er1
8759 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761 (exit $ac_status); } && {
8762 test -z "$ac_c_werror_flag" ||
8763 test ! -s conftest.err
8764 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_lo=0 ac_mid=0
8766 while :; do
8767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008768/* confdefs.h. */
8769_ACEOF
8770cat confdefs.h >>conftest.$ac_ext
8771cat >>conftest.$ac_ext <<_ACEOF
8772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008773$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008775int
8776main ()
8777{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008779test_array [0] = 0
8780
8781 ;
8782 return 0;
8783}
8784_ACEOF
8785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786if { (ac_try="$ac_compile"
8787case "(($ac_try" in
8788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8789 *) ac_try_echo=$ac_try;;
8790esac
8791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008794 grep -v '^ *+' conftest.er1 >conftest.err
8795 rm -f conftest.er1
8796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798 (exit $ac_status); } && {
8799 test -z "$ac_c_werror_flag" ||
8800 test ! -s conftest.err
8801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ac_hi=$ac_mid; break
8803else
8804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008805sed 's/^/| /' conftest.$ac_ext >&5
8806
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807 ac_lo=`expr $ac_mid + 1`
8808 if test $ac_lo -le $ac_mid; then
8809 ac_lo= ac_hi=
8810 break
8811 fi
8812 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814
8815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 done
8817else
8818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008819sed 's/^/| /' conftest.$ac_ext >&5
8820
Martin v. Löwiseba40652007-08-30 20:10:57 +00008821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008822/* confdefs.h. */
8823_ACEOF
8824cat confdefs.h >>conftest.$ac_ext
8825cat >>conftest.$ac_ext <<_ACEOF
8826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008827$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008828 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008829int
8830main ()
8831{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008833test_array [0] = 0
8834
8835 ;
8836 return 0;
8837}
8838_ACEOF
8839rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840if { (ac_try="$ac_compile"
8841case "(($ac_try" in
8842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8843 *) ac_try_echo=$ac_try;;
8844esac
8845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008848 grep -v '^ *+' conftest.er1 >conftest.err
8849 rm -f conftest.er1
8850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852 (exit $ac_status); } && {
8853 test -z "$ac_c_werror_flag" ||
8854 test ! -s conftest.err
8855 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_hi=-1 ac_mid=-1
8857 while :; do
8858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008865 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008870test_array [0] = 0
8871
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008877if { (ac_try="$ac_compile"
8878case "(($ac_try" in
8879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8880 *) ac_try_echo=$ac_try;;
8881esac
8882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008885 grep -v '^ *+' conftest.er1 >conftest.err
8886 rm -f conftest.er1
8887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889 (exit $ac_status); } && {
8890 test -z "$ac_c_werror_flag" ||
8891 test ! -s conftest.err
8892 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 ac_lo=$ac_mid; break
8894else
8895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898 ac_hi=`expr '(' $ac_mid ')' - 1`
8899 if test $ac_mid -le $ac_hi; then
8900 ac_lo= ac_hi=
8901 break
8902 fi
8903 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905
8906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 done
8908else
8909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008910sed 's/^/| /' conftest.$ac_ext >&5
8911
Martin v. Löwiseba40652007-08-30 20:10:57 +00008912 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008914
8915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917
8918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919# Binary search between lo and hi bounds.
8920while test "x$ac_lo" != "x$ac_hi"; do
8921 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008930int
8931main ()
8932{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008934test_array [0] = 0
8935
8936 ;
8937 return 0;
8938}
8939_ACEOF
8940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941if { (ac_try="$ac_compile"
8942case "(($ac_try" in
8943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8944 *) ac_try_echo=$ac_try;;
8945esac
8946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008949 grep -v '^ *+' conftest.er1 >conftest.err
8950 rm -f conftest.er1
8951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953 (exit $ac_status); } && {
8954 test -z "$ac_c_werror_flag" ||
8955 test ! -s conftest.err
8956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 ac_hi=$ac_mid
8958else
8959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008960sed 's/^/| /' conftest.$ac_ext >&5
8961
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008964
8965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008966done
8967case $ac_lo in
8968?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969'') if test "$ac_cv_type_float" = yes; then
8970 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008971See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008973See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974 { (exit 77); exit 77; }; }
8975 else
8976 ac_cv_sizeof_float=0
8977 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008978esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008979else
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008981/* confdefs.h. */
8982_ACEOF
8983cat confdefs.h >>conftest.$ac_ext
8984cat >>conftest.$ac_ext <<_ACEOF
8985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008986$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987 typedef float ac__type_sizeof_;
8988static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8989static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008990#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008991#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008992int
8993main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008994{
Martin v. Löwis11437992002-04-12 09:54:03 +00008995
8996 FILE *f = fopen ("conftest.val", "w");
8997 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 return 1;
8999 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009000 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001 long int i = longval ();
9002 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9003 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 fprintf (f, "%ld\n", i);
9005 }
9006 else
9007 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008 unsigned long int i = ulongval ();
9009 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9010 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 fprintf (f, "%lu\n", i);
9012 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009014
9015 ;
9016 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009017}
Martin v. Löwis11437992002-04-12 09:54:03 +00009018_ACEOF
9019rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020if { (ac_try="$ac_link"
9021case "(($ac_try" in
9022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9023 *) ac_try_echo=$ac_try;;
9024esac
9025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9026 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 ac_status=$?
9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 { (case "(($ac_try" in
9031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9032 *) ac_try_echo=$ac_try;;
9033esac
9034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9035 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 ac_status=$?
9037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038 (exit $ac_status); }; }; then
9039 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009040else
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 echo "$as_me: program exited with status $ac_status" >&5
9042echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009043sed 's/^/| /' conftest.$ac_ext >&5
9044
Martin v. Löwis11437992002-04-12 09:54:03 +00009045( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046if test "$ac_cv_type_float" = yes; then
9047 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009048See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051 { (exit 77); exit 77; }; }
9052 else
9053 ac_cv_sizeof_float=0
9054 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056rm -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 +00009057fi
9058rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009060{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9061echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9062
9063
9064
Martin v. Löwis11437992002-04-12 09:54:03 +00009065cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068
9069
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070{ echo "$as_me:$LINENO: checking for double" >&5
9071echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009072if test "${ac_cv_type_double+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
9074else
9075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009076/* confdefs.h. */
9077_ACEOF
9078cat confdefs.h >>conftest.$ac_ext
9079cat >>conftest.$ac_ext <<_ACEOF
9080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009081$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009083int
9084main ()
9085{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 return 0;
9090 ;
9091 return 0;
9092}
9093_ACEOF
9094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009095if { (ac_try="$ac_compile"
9096case "(($ac_try" in
9097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9098 *) ac_try_echo=$ac_try;;
9099esac
9100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009103 grep -v '^ *+' conftest.er1 >conftest.err
9104 rm -f conftest.er1
9105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 (exit $ac_status); } && {
9108 test -z "$ac_c_werror_flag" ||
9109 test ! -s conftest.err
9110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 ac_cv_type_double=yes
9112else
9113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009114sed 's/^/| /' conftest.$ac_ext >&5
9115
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009117fi
Brett Cannon19fab762007-06-02 03:02:29 +00009118
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9120fi
9121{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9122echo "${ECHO_T}$ac_cv_type_double" >&6; }
9123
9124# The cast to long int works around a bug in the HP C Compiler
9125# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9126# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9127# This bug is HP SR number 8606223364.
9128{ echo "$as_me:$LINENO: checking size of double" >&5
9129echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009130if test "${ac_cv_sizeof_double+set}" = set; then
9131 echo $ECHO_N "(cached) $ECHO_C" >&6
9132else
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 if test "$cross_compiling" = yes; then
9134 # Depending upon the size, compute the lo and hi bounds.
9135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009136/* confdefs.h. */
9137_ACEOF
9138cat confdefs.h >>conftest.$ac_ext
9139cat >>conftest.$ac_ext <<_ACEOF
9140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009141$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009142 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009143int
9144main ()
9145{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009146static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009147test_array [0] = 0
9148
9149 ;
9150 return 0;
9151}
9152_ACEOF
9153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009154if { (ac_try="$ac_compile"
9155case "(($ac_try" in
9156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9157 *) ac_try_echo=$ac_try;;
9158esac
9159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009162 grep -v '^ *+' conftest.er1 >conftest.err
9163 rm -f conftest.er1
9164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166 (exit $ac_status); } && {
9167 test -z "$ac_c_werror_flag" ||
9168 test ! -s conftest.err
9169 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_lo=0 ac_mid=0
9171 while :; do
9172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009173/* confdefs.h. */
9174_ACEOF
9175cat confdefs.h >>conftest.$ac_ext
9176cat >>conftest.$ac_ext <<_ACEOF
9177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009178$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009180int
9181main ()
9182{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009183static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009184test_array [0] = 0
9185
9186 ;
9187 return 0;
9188}
9189_ACEOF
9190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191if { (ac_try="$ac_compile"
9192case "(($ac_try" in
9193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9194 *) ac_try_echo=$ac_try;;
9195esac
9196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009199 grep -v '^ *+' conftest.er1 >conftest.err
9200 rm -f conftest.er1
9201 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203 (exit $ac_status); } && {
9204 test -z "$ac_c_werror_flag" ||
9205 test ! -s conftest.err
9206 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 ac_hi=$ac_mid; break
9208else
9209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009210sed 's/^/| /' conftest.$ac_ext >&5
9211
Martin v. Löwiseba40652007-08-30 20:10:57 +00009212 ac_lo=`expr $ac_mid + 1`
9213 if test $ac_lo -le $ac_mid; then
9214 ac_lo= ac_hi=
9215 break
9216 fi
9217 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219
9220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 done
9222else
9223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009224sed 's/^/| /' conftest.$ac_ext >&5
9225
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009227/* confdefs.h. */
9228_ACEOF
9229cat confdefs.h >>conftest.$ac_ext
9230cat >>conftest.$ac_ext <<_ACEOF
9231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009232$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009233 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009234int
9235main ()
9236{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009238test_array [0] = 0
9239
9240 ;
9241 return 0;
9242}
9243_ACEOF
9244rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245if { (ac_try="$ac_compile"
9246case "(($ac_try" in
9247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9248 *) ac_try_echo=$ac_try;;
9249esac
9250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009253 grep -v '^ *+' conftest.er1 >conftest.err
9254 rm -f conftest.er1
9255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257 (exit $ac_status); } && {
9258 test -z "$ac_c_werror_flag" ||
9259 test ! -s conftest.err
9260 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009261 ac_hi=-1 ac_mid=-1
9262 while :; do
9263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009264/* confdefs.h. */
9265_ACEOF
9266cat confdefs.h >>conftest.$ac_ext
9267cat >>conftest.$ac_ext <<_ACEOF
9268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009269$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009270 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009271int
9272main ()
9273{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009275test_array [0] = 0
9276
9277 ;
9278 return 0;
9279}
9280_ACEOF
9281rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009282if { (ac_try="$ac_compile"
9283case "(($ac_try" in
9284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9285 *) ac_try_echo=$ac_try;;
9286esac
9287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009290 grep -v '^ *+' conftest.er1 >conftest.err
9291 rm -f conftest.er1
9292 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294 (exit $ac_status); } && {
9295 test -z "$ac_c_werror_flag" ||
9296 test ! -s conftest.err
9297 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 ac_lo=$ac_mid; break
9299else
9300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009301sed 's/^/| /' conftest.$ac_ext >&5
9302
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303 ac_hi=`expr '(' $ac_mid ')' - 1`
9304 if test $ac_mid -le $ac_hi; then
9305 ac_lo= ac_hi=
9306 break
9307 fi
9308 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310
9311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 done
9313else
9314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009315sed 's/^/| /' conftest.$ac_ext >&5
9316
Martin v. Löwiseba40652007-08-30 20:10:57 +00009317 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009319
9320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322
9323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009324# Binary search between lo and hi bounds.
9325while test "x$ac_lo" != "x$ac_hi"; do
9326 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009328/* confdefs.h. */
9329_ACEOF
9330cat confdefs.h >>conftest.$ac_ext
9331cat >>conftest.$ac_ext <<_ACEOF
9332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009333$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009335int
9336main ()
9337{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009339test_array [0] = 0
9340
9341 ;
9342 return 0;
9343}
9344_ACEOF
9345rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346if { (ac_try="$ac_compile"
9347case "(($ac_try" in
9348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9349 *) ac_try_echo=$ac_try;;
9350esac
9351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009354 grep -v '^ *+' conftest.er1 >conftest.err
9355 rm -f conftest.er1
9356 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009358 (exit $ac_status); } && {
9359 test -z "$ac_c_werror_flag" ||
9360 test ! -s conftest.err
9361 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_hi=$ac_mid
9363else
9364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009365sed 's/^/| /' conftest.$ac_ext >&5
9366
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009369
9370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009371done
9372case $ac_lo in
9373?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374'') if test "$ac_cv_type_double" = yes; then
9375 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009376See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009378See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379 { (exit 77); exit 77; }; }
9380 else
9381 ac_cv_sizeof_double=0
9382 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009383esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009384else
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009386/* confdefs.h. */
9387_ACEOF
9388cat confdefs.h >>conftest.$ac_ext
9389cat >>conftest.$ac_ext <<_ACEOF
9390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009391$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009392 typedef double ac__type_sizeof_;
9393static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9394static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009395#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009396#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009397int
9398main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009399{
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
9401 FILE *f = fopen ("conftest.val", "w");
9402 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 return 1;
9404 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009406 long int i = longval ();
9407 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9408 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 fprintf (f, "%ld\n", i);
9410 }
9411 else
9412 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413 unsigned long int i = ulongval ();
9414 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9415 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 fprintf (f, "%lu\n", i);
9417 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009418 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
9420 ;
9421 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009422}
Martin v. Löwis11437992002-04-12 09:54:03 +00009423_ACEOF
9424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425if { (ac_try="$ac_link"
9426case "(($ac_try" in
9427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9428 *) ac_try_echo=$ac_try;;
9429esac
9430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ac_status=$?
9433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435 { (case "(($ac_try" in
9436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9437 *) ac_try_echo=$ac_try;;
9438esac
9439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ac_status=$?
9442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9443 (exit $ac_status); }; }; then
9444 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009445else
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 echo "$as_me: program exited with status $ac_status" >&5
9447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009448sed 's/^/| /' conftest.$ac_ext >&5
9449
Martin v. Löwis11437992002-04-12 09:54:03 +00009450( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009451if test "$ac_cv_type_double" = yes; then
9452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009453See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 { (exit 77); exit 77; }; }
9457 else
9458 ac_cv_sizeof_double=0
9459 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461rm -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 +00009462fi
9463rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9466echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9467
9468
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009472_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473
9474
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9476echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009477if test "${ac_cv_type_fpos_t+set}" = set; then
9478 echo $ECHO_N "(cached) $ECHO_C" >&6
9479else
9480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009481/* confdefs.h. */
9482_ACEOF
9483cat confdefs.h >>conftest.$ac_ext
9484cat >>conftest.$ac_ext <<_ACEOF
9485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009486$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009488int
9489main ()
9490{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 return 0;
9495 ;
9496 return 0;
9497}
9498_ACEOF
9499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009500if { (ac_try="$ac_compile"
9501case "(($ac_try" in
9502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9503 *) ac_try_echo=$ac_try;;
9504esac
9505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009508 grep -v '^ *+' conftest.er1 >conftest.err
9509 rm -f conftest.er1
9510 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 (exit $ac_status); } && {
9513 test -z "$ac_c_werror_flag" ||
9514 test ! -s conftest.err
9515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ac_cv_type_fpos_t=yes
9517else
9518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009519sed 's/^/| /' conftest.$ac_ext >&5
9520
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009522fi
Brett Cannon19fab762007-06-02 03:02:29 +00009523
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9525fi
9526{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9527echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9528
9529# The cast to long int works around a bug in the HP C Compiler
9530# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9531# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9532# This bug is HP SR number 8606223364.
9533{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9534echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009535if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9536 echo $ECHO_N "(cached) $ECHO_C" >&6
9537else
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 if test "$cross_compiling" = yes; then
9539 # Depending upon the size, compute the lo and hi bounds.
9540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009541/* confdefs.h. */
9542_ACEOF
9543cat confdefs.h >>conftest.$ac_ext
9544cat >>conftest.$ac_ext <<_ACEOF
9545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009546$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009547 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009548int
9549main ()
9550{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009552test_array [0] = 0
9553
9554 ;
9555 return 0;
9556}
9557_ACEOF
9558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009559if { (ac_try="$ac_compile"
9560case "(($ac_try" in
9561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9562 *) ac_try_echo=$ac_try;;
9563esac
9564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009567 grep -v '^ *+' conftest.er1 >conftest.err
9568 rm -f conftest.er1
9569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571 (exit $ac_status); } && {
9572 test -z "$ac_c_werror_flag" ||
9573 test ! -s conftest.err
9574 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_lo=0 ac_mid=0
9576 while :; do
9577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* confdefs.h. */
9579_ACEOF
9580cat confdefs.h >>conftest.$ac_ext
9581cat >>conftest.$ac_ext <<_ACEOF
9582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009583$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009584 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009585int
9586main ()
9587{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009588static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009589test_array [0] = 0
9590
9591 ;
9592 return 0;
9593}
9594_ACEOF
9595rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596if { (ac_try="$ac_compile"
9597case "(($ac_try" in
9598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9599 *) ac_try_echo=$ac_try;;
9600esac
9601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009604 grep -v '^ *+' conftest.er1 >conftest.err
9605 rm -f conftest.er1
9606 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608 (exit $ac_status); } && {
9609 test -z "$ac_c_werror_flag" ||
9610 test ! -s conftest.err
9611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ac_hi=$ac_mid; break
9613else
9614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009615sed 's/^/| /' conftest.$ac_ext >&5
9616
Martin v. Löwiseba40652007-08-30 20:10:57 +00009617 ac_lo=`expr $ac_mid + 1`
9618 if test $ac_lo -le $ac_mid; then
9619 ac_lo= ac_hi=
9620 break
9621 fi
9622 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624
9625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 done
9627else
9628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009629sed 's/^/| /' conftest.$ac_ext >&5
9630
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009632/* confdefs.h. */
9633_ACEOF
9634cat confdefs.h >>conftest.$ac_ext
9635cat >>conftest.$ac_ext <<_ACEOF
9636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009637$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009638 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009639int
9640main ()
9641{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009643test_array [0] = 0
9644
9645 ;
9646 return 0;
9647}
9648_ACEOF
9649rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650if { (ac_try="$ac_compile"
9651case "(($ac_try" in
9652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9653 *) ac_try_echo=$ac_try;;
9654esac
9655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009658 grep -v '^ *+' conftest.er1 >conftest.err
9659 rm -f conftest.er1
9660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662 (exit $ac_status); } && {
9663 test -z "$ac_c_werror_flag" ||
9664 test ! -s conftest.err
9665 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_hi=-1 ac_mid=-1
9667 while :; do
9668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* confdefs.h. */
9670_ACEOF
9671cat confdefs.h >>conftest.$ac_ext
9672cat >>conftest.$ac_ext <<_ACEOF
9673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009675 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009676int
9677main ()
9678{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009680test_array [0] = 0
9681
9682 ;
9683 return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009687if { (ac_try="$ac_compile"
9688case "(($ac_try" in
9689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9690 *) ac_try_echo=$ac_try;;
9691esac
9692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009695 grep -v '^ *+' conftest.er1 >conftest.err
9696 rm -f conftest.er1
9697 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699 (exit $ac_status); } && {
9700 test -z "$ac_c_werror_flag" ||
9701 test ! -s conftest.err
9702 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_lo=$ac_mid; break
9704else
9705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009706sed 's/^/| /' conftest.$ac_ext >&5
9707
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708 ac_hi=`expr '(' $ac_mid ')' - 1`
9709 if test $ac_mid -le $ac_hi; then
9710 ac_lo= ac_hi=
9711 break
9712 fi
9713 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715
9716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 done
9718else
9719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009720sed 's/^/| /' conftest.$ac_ext >&5
9721
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009724
9725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727
9728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009729# Binary search between lo and hi bounds.
9730while test "x$ac_lo" != "x$ac_hi"; do
9731 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009733/* confdefs.h. */
9734_ACEOF
9735cat confdefs.h >>conftest.$ac_ext
9736cat >>conftest.$ac_ext <<_ACEOF
9737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009738$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009740int
9741main ()
9742{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009744test_array [0] = 0
9745
9746 ;
9747 return 0;
9748}
9749_ACEOF
9750rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751if { (ac_try="$ac_compile"
9752case "(($ac_try" in
9753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9754 *) ac_try_echo=$ac_try;;
9755esac
9756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9757 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009759 grep -v '^ *+' conftest.er1 >conftest.err
9760 rm -f conftest.er1
9761 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009763 (exit $ac_status); } && {
9764 test -z "$ac_c_werror_flag" ||
9765 test ! -s conftest.err
9766 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 ac_hi=$ac_mid
9768else
9769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009770sed 's/^/| /' conftest.$ac_ext >&5
9771
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774
9775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009776done
9777case $ac_lo in
9778?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779'') if test "$ac_cv_type_fpos_t" = yes; then
9780 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009781See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009783See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784 { (exit 77); exit 77; }; }
9785 else
9786 ac_cv_sizeof_fpos_t=0
9787 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009788esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* confdefs.h. */
9792_ACEOF
9793cat confdefs.h >>conftest.$ac_ext
9794cat >>conftest.$ac_ext <<_ACEOF
9795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009797 typedef fpos_t ac__type_sizeof_;
9798static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9799static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009800#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009801#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009802int
9803main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009804{
Martin v. Löwis11437992002-04-12 09:54:03 +00009805
9806 FILE *f = fopen ("conftest.val", "w");
9807 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 return 1;
9809 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009811 long int i = longval ();
9812 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9813 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 fprintf (f, "%ld\n", i);
9815 }
9816 else
9817 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818 unsigned long int i = ulongval ();
9819 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9820 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 fprintf (f, "%lu\n", i);
9822 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
9825 ;
9826 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009827}
Martin v. Löwis11437992002-04-12 09:54:03 +00009828_ACEOF
9829rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830if { (ac_try="$ac_link"
9831case "(($ac_try" in
9832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9833 *) ac_try_echo=$ac_try;;
9834esac
9835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9836 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ac_status=$?
9838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840 { (case "(($ac_try" in
9841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9842 *) ac_try_echo=$ac_try;;
9843esac
9844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9845 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ac_status=$?
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9848 (exit $ac_status); }; }; then
9849 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009850else
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 echo "$as_me: program exited with status $ac_status" >&5
9852echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009853sed 's/^/| /' conftest.$ac_ext >&5
9854
Martin v. Löwis11437992002-04-12 09:54:03 +00009855( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009856if test "$ac_cv_type_fpos_t" = yes; then
9857 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009858See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861 { (exit 77); exit 77; }; }
9862 else
9863 ac_cv_sizeof_fpos_t=0
9864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866rm -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 +00009867fi
9868rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009870{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9871echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9872
9873
9874
Martin v. Löwis11437992002-04-12 09:54:03 +00009875cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009876#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009877_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009878
Michael W. Hudson54241132001-12-07 15:38:26 +00009879
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880{ echo "$as_me:$LINENO: checking for size_t" >&5
9881echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009882if test "${ac_cv_type_size_t+set}" = set; then
9883 echo $ECHO_N "(cached) $ECHO_C" >&6
9884else
9885 cat >conftest.$ac_ext <<_ACEOF
9886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
9891$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009893int
9894main ()
9895{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009897 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009899 return 0;
9900 ;
9901 return 0;
9902}
9903_ACEOF
9904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009905if { (ac_try="$ac_compile"
9906case "(($ac_try" in
9907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9908 *) ac_try_echo=$ac_try;;
9909esac
9910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009912 ac_status=$?
9913 grep -v '^ *+' conftest.er1 >conftest.err
9914 rm -f conftest.er1
9915 cat conftest.err >&5
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 (exit $ac_status); } && {
9918 test -z "$ac_c_werror_flag" ||
9919 test ! -s conftest.err
9920 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009921 ac_cv_type_size_t=yes
9922else
9923 echo "$as_me: failed program was:" >&5
9924sed 's/^/| /' conftest.$ac_ext >&5
9925
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009927fi
Brett Cannon19fab762007-06-02 03:02:29 +00009928
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9930fi
9931{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9932echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9933
9934# The cast to long int works around a bug in the HP C Compiler
9935# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9936# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9937# This bug is HP SR number 8606223364.
9938{ echo "$as_me:$LINENO: checking size of size_t" >&5
9939echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009940if test "${ac_cv_sizeof_size_t+set}" = set; then
9941 echo $ECHO_N "(cached) $ECHO_C" >&6
9942else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009943 if test "$cross_compiling" = yes; then
9944 # Depending upon the size, compute the lo and hi bounds.
9945cat >conftest.$ac_ext <<_ACEOF
9946/* confdefs.h. */
9947_ACEOF
9948cat confdefs.h >>conftest.$ac_ext
9949cat >>conftest.$ac_ext <<_ACEOF
9950/* end confdefs.h. */
9951$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009952 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009953int
9954main ()
9955{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009957test_array [0] = 0
9958
9959 ;
9960 return 0;
9961}
9962_ACEOF
9963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009964if { (ac_try="$ac_compile"
9965case "(($ac_try" in
9966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9967 *) ac_try_echo=$ac_try;;
9968esac
9969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009971 ac_status=$?
9972 grep -v '^ *+' conftest.er1 >conftest.err
9973 rm -f conftest.er1
9974 cat conftest.err >&5
9975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976 (exit $ac_status); } && {
9977 test -z "$ac_c_werror_flag" ||
9978 test ! -s conftest.err
9979 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009980 ac_lo=0 ac_mid=0
9981 while :; do
9982 cat >conftest.$ac_ext <<_ACEOF
9983/* confdefs.h. */
9984_ACEOF
9985cat confdefs.h >>conftest.$ac_ext
9986cat >>conftest.$ac_ext <<_ACEOF
9987/* end confdefs.h. */
9988$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009990int
9991main ()
9992{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009993static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009994test_array [0] = 0
9995
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001if { (ac_try="$ac_compile"
10002case "(($ac_try" in
10003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10004 *) ac_try_echo=$ac_try;;
10005esac
10006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010008 ac_status=$?
10009 grep -v '^ *+' conftest.er1 >conftest.err
10010 rm -f conftest.er1
10011 cat conftest.err >&5
10012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013 (exit $ac_status); } && {
10014 test -z "$ac_c_werror_flag" ||
10015 test ! -s conftest.err
10016 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010017 ac_hi=$ac_mid; break
10018else
10019 echo "$as_me: failed program was:" >&5
10020sed 's/^/| /' conftest.$ac_ext >&5
10021
Martin v. Löwiseba40652007-08-30 20:10:57 +000010022 ac_lo=`expr $ac_mid + 1`
10023 if test $ac_lo -le $ac_mid; then
10024 ac_lo= ac_hi=
10025 break
10026 fi
10027 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029
10030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010031 done
10032else
10033 echo "$as_me: failed program was:" >&5
10034sed 's/^/| /' conftest.$ac_ext >&5
10035
Martin v. Löwiseba40652007-08-30 20:10:57 +000010036 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010037/* confdefs.h. */
10038_ACEOF
10039cat confdefs.h >>conftest.$ac_ext
10040cat >>conftest.$ac_ext <<_ACEOF
10041/* end confdefs.h. */
10042$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010043 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010044int
10045main ()
10046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010048test_array [0] = 0
10049
10050 ;
10051 return 0;
10052}
10053_ACEOF
10054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055if { (ac_try="$ac_compile"
10056case "(($ac_try" in
10057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10058 *) ac_try_echo=$ac_try;;
10059esac
10060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010062 ac_status=$?
10063 grep -v '^ *+' conftest.er1 >conftest.err
10064 rm -f conftest.er1
10065 cat conftest.err >&5
10066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067 (exit $ac_status); } && {
10068 test -z "$ac_c_werror_flag" ||
10069 test ! -s conftest.err
10070 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010071 ac_hi=-1 ac_mid=-1
10072 while :; do
10073 cat >conftest.$ac_ext <<_ACEOF
10074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
10079$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010080 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010081int
10082main ()
10083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010085test_array [0] = 0
10086
10087 ;
10088 return 0;
10089}
10090_ACEOF
10091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010092if { (ac_try="$ac_compile"
10093case "(($ac_try" in
10094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10095 *) ac_try_echo=$ac_try;;
10096esac
10097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010099 ac_status=$?
10100 grep -v '^ *+' conftest.er1 >conftest.err
10101 rm -f conftest.er1
10102 cat conftest.err >&5
10103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010104 (exit $ac_status); } && {
10105 test -z "$ac_c_werror_flag" ||
10106 test ! -s conftest.err
10107 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010108 ac_lo=$ac_mid; break
10109else
10110 echo "$as_me: failed program was:" >&5
10111sed 's/^/| /' conftest.$ac_ext >&5
10112
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113 ac_hi=`expr '(' $ac_mid ')' - 1`
10114 if test $ac_mid -le $ac_hi; then
10115 ac_lo= ac_hi=
10116 break
10117 fi
10118 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120
10121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010122 done
10123else
10124 echo "$as_me: failed program was:" >&5
10125sed 's/^/| /' conftest.$ac_ext >&5
10126
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010129
10130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132
10133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010134# Binary search between lo and hi bounds.
10135while test "x$ac_lo" != "x$ac_hi"; do
10136 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10137 cat >conftest.$ac_ext <<_ACEOF
10138/* confdefs.h. */
10139_ACEOF
10140cat confdefs.h >>conftest.$ac_ext
10141cat >>conftest.$ac_ext <<_ACEOF
10142/* end confdefs.h. */
10143$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010145int
10146main ()
10147{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010148static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010149test_array [0] = 0
10150
10151 ;
10152 return 0;
10153}
10154_ACEOF
10155rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156if { (ac_try="$ac_compile"
10157case "(($ac_try" in
10158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10159 *) ac_try_echo=$ac_try;;
10160esac
10161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010163 ac_status=$?
10164 grep -v '^ *+' conftest.er1 >conftest.err
10165 rm -f conftest.er1
10166 cat conftest.err >&5
10167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168 (exit $ac_status); } && {
10169 test -z "$ac_c_werror_flag" ||
10170 test ! -s conftest.err
10171 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010172 ac_hi=$ac_mid
10173else
10174 echo "$as_me: failed program was:" >&5
10175sed 's/^/| /' conftest.$ac_ext >&5
10176
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010179
10180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010181done
10182case $ac_lo in
10183?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184'') if test "$ac_cv_type_size_t" = yes; then
10185 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010186See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010188See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189 { (exit 77); exit 77; }; }
10190 else
10191 ac_cv_sizeof_size_t=0
10192 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010193esac
10194else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010195 cat >conftest.$ac_ext <<_ACEOF
10196/* confdefs.h. */
10197_ACEOF
10198cat confdefs.h >>conftest.$ac_ext
10199cat >>conftest.$ac_ext <<_ACEOF
10200/* end confdefs.h. */
10201$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010202 typedef size_t ac__type_sizeof_;
10203static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10204static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010205#include <stdio.h>
10206#include <stdlib.h>
10207int
10208main ()
10209{
10210
10211 FILE *f = fopen ("conftest.val", "w");
10212 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 return 1;
10214 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010215 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010216 long int i = longval ();
10217 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10218 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010219 fprintf (f, "%ld\n", i);
10220 }
10221 else
10222 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223 unsigned long int i = ulongval ();
10224 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10225 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010226 fprintf (f, "%lu\n", i);
10227 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010229
10230 ;
10231 return 0;
10232}
10233_ACEOF
10234rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235if { (ac_try="$ac_link"
10236case "(($ac_try" in
10237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10238 *) ac_try_echo=$ac_try;;
10239esac
10240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10241 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010242 ac_status=$?
10243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010245 { (case "(($ac_try" in
10246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10247 *) ac_try_echo=$ac_try;;
10248esac
10249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10250 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010251 ac_status=$?
10252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10253 (exit $ac_status); }; }; then
10254 ac_cv_sizeof_size_t=`cat conftest.val`
10255else
10256 echo "$as_me: program exited with status $ac_status" >&5
10257echo "$as_me: failed program was:" >&5
10258sed 's/^/| /' conftest.$ac_ext >&5
10259
10260( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261if test "$ac_cv_type_size_t" = yes; then
10262 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010263See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010265See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010266 { (exit 77); exit 77; }; }
10267 else
10268 ac_cv_sizeof_size_t=0
10269 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271rm -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 +000010272fi
10273rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010275{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10276echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10277
10278
10279
Martin v. Löwis18e16552006-02-15 17:27:45 +000010280cat >>confdefs.h <<_ACEOF
10281#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10282_ACEOF
10283
10284
Christian Heimes951cc0f2008-01-31 23:08:23 +000010285{ echo "$as_me:$LINENO: checking for pid_t" >&5
10286echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10287if test "${ac_cv_type_pid_t+set}" = set; then
10288 echo $ECHO_N "(cached) $ECHO_C" >&6
10289else
10290 cat >conftest.$ac_ext <<_ACEOF
10291/* confdefs.h. */
10292_ACEOF
10293cat confdefs.h >>conftest.$ac_ext
10294cat >>conftest.$ac_ext <<_ACEOF
10295/* end confdefs.h. */
10296$ac_includes_default
10297typedef pid_t ac__type_new_;
10298int
10299main ()
10300{
10301if ((ac__type_new_ *) 0)
10302 return 0;
10303if (sizeof (ac__type_new_))
10304 return 0;
10305 ;
10306 return 0;
10307}
10308_ACEOF
10309rm -f conftest.$ac_objext
10310if { (ac_try="$ac_compile"
10311case "(($ac_try" in
10312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10313 *) ac_try_echo=$ac_try;;
10314esac
10315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10316 (eval "$ac_compile") 2>conftest.er1
10317 ac_status=$?
10318 grep -v '^ *+' conftest.er1 >conftest.err
10319 rm -f conftest.er1
10320 cat conftest.err >&5
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); } && {
10323 test -z "$ac_c_werror_flag" ||
10324 test ! -s conftest.err
10325 } && test -s conftest.$ac_objext; then
10326 ac_cv_type_pid_t=yes
10327else
10328 echo "$as_me: failed program was:" >&5
10329sed 's/^/| /' conftest.$ac_ext >&5
10330
10331 ac_cv_type_pid_t=no
10332fi
10333
10334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10335fi
10336{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10337echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10338
10339# The cast to long int works around a bug in the HP C Compiler
10340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10342# This bug is HP SR number 8606223364.
10343{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10344echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10345if test "${ac_cv_sizeof_pid_t+set}" = set; then
10346 echo $ECHO_N "(cached) $ECHO_C" >&6
10347else
10348 if test "$cross_compiling" = yes; then
10349 # Depending upon the size, compute the lo and hi bounds.
10350cat >conftest.$ac_ext <<_ACEOF
10351/* confdefs.h. */
10352_ACEOF
10353cat confdefs.h >>conftest.$ac_ext
10354cat >>conftest.$ac_ext <<_ACEOF
10355/* end confdefs.h. */
10356$ac_includes_default
10357 typedef pid_t ac__type_sizeof_;
10358int
10359main ()
10360{
10361static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10362test_array [0] = 0
10363
10364 ;
10365 return 0;
10366}
10367_ACEOF
10368rm -f conftest.$ac_objext
10369if { (ac_try="$ac_compile"
10370case "(($ac_try" in
10371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10372 *) ac_try_echo=$ac_try;;
10373esac
10374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10375 (eval "$ac_compile") 2>conftest.er1
10376 ac_status=$?
10377 grep -v '^ *+' conftest.er1 >conftest.err
10378 rm -f conftest.er1
10379 cat conftest.err >&5
10380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381 (exit $ac_status); } && {
10382 test -z "$ac_c_werror_flag" ||
10383 test ! -s conftest.err
10384 } && test -s conftest.$ac_objext; then
10385 ac_lo=0 ac_mid=0
10386 while :; do
10387 cat >conftest.$ac_ext <<_ACEOF
10388/* confdefs.h. */
10389_ACEOF
10390cat confdefs.h >>conftest.$ac_ext
10391cat >>conftest.$ac_ext <<_ACEOF
10392/* end confdefs.h. */
10393$ac_includes_default
10394 typedef pid_t ac__type_sizeof_;
10395int
10396main ()
10397{
10398static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10399test_array [0] = 0
10400
10401 ;
10402 return 0;
10403}
10404_ACEOF
10405rm -f conftest.$ac_objext
10406if { (ac_try="$ac_compile"
10407case "(($ac_try" in
10408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10409 *) ac_try_echo=$ac_try;;
10410esac
10411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10412 (eval "$ac_compile") 2>conftest.er1
10413 ac_status=$?
10414 grep -v '^ *+' conftest.er1 >conftest.err
10415 rm -f conftest.er1
10416 cat conftest.err >&5
10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); } && {
10419 test -z "$ac_c_werror_flag" ||
10420 test ! -s conftest.err
10421 } && test -s conftest.$ac_objext; then
10422 ac_hi=$ac_mid; break
10423else
10424 echo "$as_me: failed program was:" >&5
10425sed 's/^/| /' conftest.$ac_ext >&5
10426
10427 ac_lo=`expr $ac_mid + 1`
10428 if test $ac_lo -le $ac_mid; then
10429 ac_lo= ac_hi=
10430 break
10431 fi
10432 ac_mid=`expr 2 '*' $ac_mid + 1`
10433fi
10434
10435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10436 done
10437else
10438 echo "$as_me: failed program was:" >&5
10439sed 's/^/| /' conftest.$ac_ext >&5
10440
10441 cat >conftest.$ac_ext <<_ACEOF
10442/* confdefs.h. */
10443_ACEOF
10444cat confdefs.h >>conftest.$ac_ext
10445cat >>conftest.$ac_ext <<_ACEOF
10446/* end confdefs.h. */
10447$ac_includes_default
10448 typedef pid_t ac__type_sizeof_;
10449int
10450main ()
10451{
10452static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10453test_array [0] = 0
10454
10455 ;
10456 return 0;
10457}
10458_ACEOF
10459rm -f conftest.$ac_objext
10460if { (ac_try="$ac_compile"
10461case "(($ac_try" in
10462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10463 *) ac_try_echo=$ac_try;;
10464esac
10465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10466 (eval "$ac_compile") 2>conftest.er1
10467 ac_status=$?
10468 grep -v '^ *+' conftest.er1 >conftest.err
10469 rm -f conftest.er1
10470 cat conftest.err >&5
10471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10472 (exit $ac_status); } && {
10473 test -z "$ac_c_werror_flag" ||
10474 test ! -s conftest.err
10475 } && test -s conftest.$ac_objext; then
10476 ac_hi=-1 ac_mid=-1
10477 while :; do
10478 cat >conftest.$ac_ext <<_ACEOF
10479/* confdefs.h. */
10480_ACEOF
10481cat confdefs.h >>conftest.$ac_ext
10482cat >>conftest.$ac_ext <<_ACEOF
10483/* end confdefs.h. */
10484$ac_includes_default
10485 typedef pid_t ac__type_sizeof_;
10486int
10487main ()
10488{
10489static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10490test_array [0] = 0
10491
10492 ;
10493 return 0;
10494}
10495_ACEOF
10496rm -f conftest.$ac_objext
10497if { (ac_try="$ac_compile"
10498case "(($ac_try" in
10499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10500 *) ac_try_echo=$ac_try;;
10501esac
10502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10503 (eval "$ac_compile") 2>conftest.er1
10504 ac_status=$?
10505 grep -v '^ *+' conftest.er1 >conftest.err
10506 rm -f conftest.er1
10507 cat conftest.err >&5
10508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10509 (exit $ac_status); } && {
10510 test -z "$ac_c_werror_flag" ||
10511 test ! -s conftest.err
10512 } && test -s conftest.$ac_objext; then
10513 ac_lo=$ac_mid; break
10514else
10515 echo "$as_me: failed program was:" >&5
10516sed 's/^/| /' conftest.$ac_ext >&5
10517
10518 ac_hi=`expr '(' $ac_mid ')' - 1`
10519 if test $ac_mid -le $ac_hi; then
10520 ac_lo= ac_hi=
10521 break
10522 fi
10523 ac_mid=`expr 2 '*' $ac_mid`
10524fi
10525
10526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10527 done
10528else
10529 echo "$as_me: failed program was:" >&5
10530sed 's/^/| /' conftest.$ac_ext >&5
10531
10532 ac_lo= ac_hi=
10533fi
10534
10535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10536fi
10537
10538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10539# Binary search between lo and hi bounds.
10540while test "x$ac_lo" != "x$ac_hi"; do
10541 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10542 cat >conftest.$ac_ext <<_ACEOF
10543/* confdefs.h. */
10544_ACEOF
10545cat confdefs.h >>conftest.$ac_ext
10546cat >>conftest.$ac_ext <<_ACEOF
10547/* end confdefs.h. */
10548$ac_includes_default
10549 typedef pid_t ac__type_sizeof_;
10550int
10551main ()
10552{
10553static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10554test_array [0] = 0
10555
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560rm -f conftest.$ac_objext
10561if { (ac_try="$ac_compile"
10562case "(($ac_try" in
10563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10564 *) ac_try_echo=$ac_try;;
10565esac
10566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10567 (eval "$ac_compile") 2>conftest.er1
10568 ac_status=$?
10569 grep -v '^ *+' conftest.er1 >conftest.err
10570 rm -f conftest.er1
10571 cat conftest.err >&5
10572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10573 (exit $ac_status); } && {
10574 test -z "$ac_c_werror_flag" ||
10575 test ! -s conftest.err
10576 } && test -s conftest.$ac_objext; then
10577 ac_hi=$ac_mid
10578else
10579 echo "$as_me: failed program was:" >&5
10580sed 's/^/| /' conftest.$ac_ext >&5
10581
10582 ac_lo=`expr '(' $ac_mid ')' + 1`
10583fi
10584
10585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10586done
10587case $ac_lo in
10588?*) ac_cv_sizeof_pid_t=$ac_lo;;
10589'') if test "$ac_cv_type_pid_t" = yes; then
10590 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10591See \`config.log' for more details." >&5
10592echo "$as_me: error: cannot compute sizeof (pid_t)
10593See \`config.log' for more details." >&2;}
10594 { (exit 77); exit 77; }; }
10595 else
10596 ac_cv_sizeof_pid_t=0
10597 fi ;;
10598esac
10599else
10600 cat >conftest.$ac_ext <<_ACEOF
10601/* confdefs.h. */
10602_ACEOF
10603cat confdefs.h >>conftest.$ac_ext
10604cat >>conftest.$ac_ext <<_ACEOF
10605/* end confdefs.h. */
10606$ac_includes_default
10607 typedef pid_t ac__type_sizeof_;
10608static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10609static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10610#include <stdio.h>
10611#include <stdlib.h>
10612int
10613main ()
10614{
10615
10616 FILE *f = fopen ("conftest.val", "w");
10617 if (! f)
10618 return 1;
10619 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10620 {
10621 long int i = longval ();
10622 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10623 return 1;
10624 fprintf (f, "%ld\n", i);
10625 }
10626 else
10627 {
10628 unsigned long int i = ulongval ();
10629 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10630 return 1;
10631 fprintf (f, "%lu\n", i);
10632 }
10633 return ferror (f) || fclose (f) != 0;
10634
10635 ;
10636 return 0;
10637}
10638_ACEOF
10639rm -f conftest$ac_exeext
10640if { (ac_try="$ac_link"
10641case "(($ac_try" in
10642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10643 *) ac_try_echo=$ac_try;;
10644esac
10645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10646 (eval "$ac_link") 2>&5
10647 ac_status=$?
10648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10649 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10650 { (case "(($ac_try" in
10651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10652 *) ac_try_echo=$ac_try;;
10653esac
10654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10655 (eval "$ac_try") 2>&5
10656 ac_status=$?
10657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658 (exit $ac_status); }; }; then
10659 ac_cv_sizeof_pid_t=`cat conftest.val`
10660else
10661 echo "$as_me: program exited with status $ac_status" >&5
10662echo "$as_me: failed program was:" >&5
10663sed 's/^/| /' conftest.$ac_ext >&5
10664
10665( exit $ac_status )
10666if test "$ac_cv_type_pid_t" = yes; then
10667 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10668See \`config.log' for more details." >&5
10669echo "$as_me: error: cannot compute sizeof (pid_t)
10670See \`config.log' for more details." >&2;}
10671 { (exit 77); exit 77; }; }
10672 else
10673 ac_cv_sizeof_pid_t=0
10674 fi
10675fi
10676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10677fi
10678rm -f conftest.val
10679fi
10680{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10681echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10682
10683
10684
10685cat >>confdefs.h <<_ACEOF
10686#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10687_ACEOF
10688
10689
Michael W. Hudson54241132001-12-07 15:38:26 +000010690
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691{ echo "$as_me:$LINENO: checking for long long support" >&5
10692echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010693have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010695/* confdefs.h. */
10696_ACEOF
10697cat confdefs.h >>conftest.$ac_ext
10698cat >>conftest.$ac_ext <<_ACEOF
10699/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010700
Martin v. Löwis11437992002-04-12 09:54:03 +000010701int
10702main ()
10703{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010704long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710if { (ac_try="$ac_compile"
10711case "(($ac_try" in
10712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10713 *) ac_try_echo=$ac_try;;
10714esac
10715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010718 grep -v '^ *+' conftest.er1 >conftest.err
10719 rm -f conftest.er1
10720 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 (exit $ac_status); } && {
10723 test -z "$ac_c_werror_flag" ||
10724 test ! -s conftest.err
10725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
10727
10728cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010729#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
10731
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010732 have_long_long=yes
10733
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010734else
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010736sed 's/^/| /' conftest.$ac_ext >&5
10737
Martin v. Löwiseba40652007-08-30 20:10:57 +000010738
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010740
10741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10742{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10743echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010744if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010745{ echo "$as_me:$LINENO: checking for long long" >&5
10746echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010747if test "${ac_cv_type_long_long+set}" = set; then
10748 echo $ECHO_N "(cached) $ECHO_C" >&6
10749else
10750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* confdefs.h. */
10752_ACEOF
10753cat confdefs.h >>conftest.$ac_ext
10754cat >>conftest.$ac_ext <<_ACEOF
10755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010756$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010757typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010758int
10759main ()
10760{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010761if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010763if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 return 0;
10765 ;
10766 return 0;
10767}
10768_ACEOF
10769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010770if { (ac_try="$ac_compile"
10771case "(($ac_try" in
10772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10773 *) ac_try_echo=$ac_try;;
10774esac
10775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010778 grep -v '^ *+' conftest.er1 >conftest.err
10779 rm -f conftest.er1
10780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 (exit $ac_status); } && {
10783 test -z "$ac_c_werror_flag" ||
10784 test ! -s conftest.err
10785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 ac_cv_type_long_long=yes
10787else
10788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010789sed 's/^/| /' conftest.$ac_ext >&5
10790
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010792fi
Brett Cannon19fab762007-06-02 03:02:29 +000010793
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10795fi
10796{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10797echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10798
10799# The cast to long int works around a bug in the HP C Compiler
10800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10802# This bug is HP SR number 8606223364.
10803{ echo "$as_me:$LINENO: checking size of long long" >&5
10804echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010805if test "${ac_cv_sizeof_long_long+set}" = set; then
10806 echo $ECHO_N "(cached) $ECHO_C" >&6
10807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 if test "$cross_compiling" = yes; then
10809 # Depending upon the size, compute the lo and hi bounds.
10810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* confdefs.h. */
10812_ACEOF
10813cat confdefs.h >>conftest.$ac_ext
10814cat >>conftest.$ac_ext <<_ACEOF
10815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010816$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010817 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010818int
10819main ()
10820{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010822test_array [0] = 0
10823
10824 ;
10825 return 0;
10826}
10827_ACEOF
10828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829if { (ac_try="$ac_compile"
10830case "(($ac_try" in
10831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10832 *) ac_try_echo=$ac_try;;
10833esac
10834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010837 grep -v '^ *+' conftest.er1 >conftest.err
10838 rm -f conftest.er1
10839 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010841 (exit $ac_status); } && {
10842 test -z "$ac_c_werror_flag" ||
10843 test ! -s conftest.err
10844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ac_lo=0 ac_mid=0
10846 while :; do
10847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010848/* confdefs.h. */
10849_ACEOF
10850cat confdefs.h >>conftest.$ac_ext
10851cat >>conftest.$ac_ext <<_ACEOF
10852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010853$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010854 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010855int
10856main ()
10857{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010858static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010859test_array [0] = 0
10860
10861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010866if { (ac_try="$ac_compile"
10867case "(($ac_try" in
10868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10869 *) ac_try_echo=$ac_try;;
10870esac
10871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010874 grep -v '^ *+' conftest.er1 >conftest.err
10875 rm -f conftest.er1
10876 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878 (exit $ac_status); } && {
10879 test -z "$ac_c_werror_flag" ||
10880 test ! -s conftest.err
10881 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ac_hi=$ac_mid; break
10883else
10884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010885sed 's/^/| /' conftest.$ac_ext >&5
10886
Martin v. Löwiseba40652007-08-30 20:10:57 +000010887 ac_lo=`expr $ac_mid + 1`
10888 if test $ac_lo -le $ac_mid; then
10889 ac_lo= ac_hi=
10890 break
10891 fi
10892 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010894
10895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 done
10897else
10898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010899sed 's/^/| /' conftest.$ac_ext >&5
10900
Martin v. Löwiseba40652007-08-30 20:10:57 +000010901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* confdefs.h. */
10903_ACEOF
10904cat confdefs.h >>conftest.$ac_ext
10905cat >>conftest.$ac_ext <<_ACEOF
10906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010907$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010908 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010909int
10910main ()
10911{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010913test_array [0] = 0
10914
10915 ;
10916 return 0;
10917}
10918_ACEOF
10919rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920if { (ac_try="$ac_compile"
10921case "(($ac_try" in
10922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10923 *) ac_try_echo=$ac_try;;
10924esac
10925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010928 grep -v '^ *+' conftest.er1 >conftest.err
10929 rm -f conftest.er1
10930 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010932 (exit $ac_status); } && {
10933 test -z "$ac_c_werror_flag" ||
10934 test ! -s conftest.err
10935 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 ac_hi=-1 ac_mid=-1
10937 while :; do
10938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010944$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010945 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010946int
10947main ()
10948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010949static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010950test_array [0] = 0
10951
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010957if { (ac_try="$ac_compile"
10958case "(($ac_try" in
10959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10960 *) ac_try_echo=$ac_try;;
10961esac
10962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010965 grep -v '^ *+' conftest.er1 >conftest.err
10966 rm -f conftest.er1
10967 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010969 (exit $ac_status); } && {
10970 test -z "$ac_c_werror_flag" ||
10971 test ! -s conftest.err
10972 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ac_lo=$ac_mid; break
10974else
10975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010976sed 's/^/| /' conftest.$ac_ext >&5
10977
Martin v. Löwiseba40652007-08-30 20:10:57 +000010978 ac_hi=`expr '(' $ac_mid ')' - 1`
10979 if test $ac_mid -le $ac_hi; then
10980 ac_lo= ac_hi=
10981 break
10982 fi
10983 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010985
10986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 done
10988else
10989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010990sed 's/^/| /' conftest.$ac_ext >&5
10991
Martin v. Löwiseba40652007-08-30 20:10:57 +000010992 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010994
10995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010997
10998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010999# Binary search between lo and hi bounds.
11000while test "x$ac_lo" != "x$ac_hi"; do
11001 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* confdefs.h. */
11004_ACEOF
11005cat confdefs.h >>conftest.$ac_ext
11006cat >>conftest.$ac_ext <<_ACEOF
11007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011008$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011010int
11011main ()
11012{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011014test_array [0] = 0
11015
11016 ;
11017 return 0;
11018}
11019_ACEOF
11020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021if { (ac_try="$ac_compile"
11022case "(($ac_try" in
11023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11024 *) ac_try_echo=$ac_try;;
11025esac
11026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011029 grep -v '^ *+' conftest.er1 >conftest.err
11030 rm -f conftest.er1
11031 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033 (exit $ac_status); } && {
11034 test -z "$ac_c_werror_flag" ||
11035 test ! -s conftest.err
11036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 ac_hi=$ac_mid
11038else
11039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011040sed 's/^/| /' conftest.$ac_ext >&5
11041
Martin v. Löwiseba40652007-08-30 20:10:57 +000011042 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011044
11045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011046done
11047case $ac_lo in
11048?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011049'') if test "$ac_cv_type_long_long" = yes; then
11050 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011051See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011053See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011054 { (exit 77); exit 77; }; }
11055 else
11056 ac_cv_sizeof_long_long=0
11057 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011058esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011059else
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011061/* confdefs.h. */
11062_ACEOF
11063cat confdefs.h >>conftest.$ac_ext
11064cat >>conftest.$ac_ext <<_ACEOF
11065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011066$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011067 typedef long long ac__type_sizeof_;
11068static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11069static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011070#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011071#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011072int
11073main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011074{
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
11076 FILE *f = fopen ("conftest.val", "w");
11077 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078 return 1;
11079 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011081 long int i = longval ();
11082 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11083 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 fprintf (f, "%ld\n", i);
11085 }
11086 else
11087 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088 unsigned long int i = ulongval ();
11089 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11090 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 fprintf (f, "%lu\n", i);
11092 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011093 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011094
11095 ;
11096 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011097}
Martin v. Löwis11437992002-04-12 09:54:03 +000011098_ACEOF
11099rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100if { (ac_try="$ac_link"
11101case "(($ac_try" in
11102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11103 *) ac_try_echo=$ac_try;;
11104esac
11105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11106 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 ac_status=$?
11108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11109 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011110 { (case "(($ac_try" in
11111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11112 *) ac_try_echo=$ac_try;;
11113esac
11114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11115 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 ac_status=$?
11117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118 (exit $ac_status); }; }; then
11119 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011120else
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 echo "$as_me: program exited with status $ac_status" >&5
11122echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011123sed 's/^/| /' conftest.$ac_ext >&5
11124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011126if test "$ac_cv_type_long_long" = yes; then
11127 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011128See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011129echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011130See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011131 { (exit 77); exit 77; }; }
11132 else
11133 ac_cv_sizeof_long_long=0
11134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136rm -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 +000011137fi
11138rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011140{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11141echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11142
11143
11144
Martin v. Löwis11437992002-04-12 09:54:03 +000011145cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011147_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011148
Michael W. Hudson54241132001-12-07 15:38:26 +000011149
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011150fi
11151
Martin v. Löwiseba40652007-08-30 20:10:57 +000011152{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11153echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011154have_c99_bool=no
11155cat >conftest.$ac_ext <<_ACEOF
11156/* confdefs.h. */
11157_ACEOF
11158cat confdefs.h >>conftest.$ac_ext
11159cat >>conftest.$ac_ext <<_ACEOF
11160/* end confdefs.h. */
11161
11162int
11163main ()
11164{
11165_Bool x; x = (_Bool)0;
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171if { (ac_try="$ac_compile"
11172case "(($ac_try" in
11173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11174 *) ac_try_echo=$ac_try;;
11175esac
11176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011178 ac_status=$?
11179 grep -v '^ *+' conftest.er1 >conftest.err
11180 rm -f conftest.er1
11181 cat conftest.err >&5
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011183 (exit $ac_status); } && {
11184 test -z "$ac_c_werror_flag" ||
11185 test ! -s conftest.err
11186 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011187
11188
11189cat >>confdefs.h <<\_ACEOF
11190#define HAVE_C99_BOOL 1
11191_ACEOF
11192
11193 have_c99_bool=yes
11194
11195else
11196 echo "$as_me: failed program was:" >&5
11197sed 's/^/| /' conftest.$ac_ext >&5
11198
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011201
11202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11203{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11204echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011205if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011206{ echo "$as_me:$LINENO: checking for _Bool" >&5
11207echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011208if test "${ac_cv_type__Bool+set}" = set; then
11209 echo $ECHO_N "(cached) $ECHO_C" >&6
11210else
11211 cat >conftest.$ac_ext <<_ACEOF
11212/* confdefs.h. */
11213_ACEOF
11214cat confdefs.h >>conftest.$ac_ext
11215cat >>conftest.$ac_ext <<_ACEOF
11216/* end confdefs.h. */
11217$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011219int
11220main ()
11221{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011222if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011223 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011224if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011225 return 0;
11226 ;
11227 return 0;
11228}
11229_ACEOF
11230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011231if { (ac_try="$ac_compile"
11232case "(($ac_try" in
11233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11234 *) ac_try_echo=$ac_try;;
11235esac
11236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011238 ac_status=$?
11239 grep -v '^ *+' conftest.er1 >conftest.err
11240 rm -f conftest.er1
11241 cat conftest.err >&5
11242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243 (exit $ac_status); } && {
11244 test -z "$ac_c_werror_flag" ||
11245 test ! -s conftest.err
11246 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011247 ac_cv_type__Bool=yes
11248else
11249 echo "$as_me: failed program was:" >&5
11250sed 's/^/| /' conftest.$ac_ext >&5
11251
Martin v. Löwiseba40652007-08-30 20:10:57 +000011252 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011253fi
Brett Cannon19fab762007-06-02 03:02:29 +000011254
Martin v. Löwiseba40652007-08-30 20:10:57 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11256fi
11257{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11258echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11259
11260# The cast to long int works around a bug in the HP C Compiler
11261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11263# This bug is HP SR number 8606223364.
11264{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11265echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011266if test "${ac_cv_sizeof__Bool+set}" = set; then
11267 echo $ECHO_N "(cached) $ECHO_C" >&6
11268else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011269 if test "$cross_compiling" = yes; then
11270 # Depending upon the size, compute the lo and hi bounds.
11271cat >conftest.$ac_ext <<_ACEOF
11272/* confdefs.h. */
11273_ACEOF
11274cat confdefs.h >>conftest.$ac_ext
11275cat >>conftest.$ac_ext <<_ACEOF
11276/* end confdefs.h. */
11277$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011278 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011279int
11280main ()
11281{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011283test_array [0] = 0
11284
11285 ;
11286 return 0;
11287}
11288_ACEOF
11289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290if { (ac_try="$ac_compile"
11291case "(($ac_try" in
11292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11293 *) ac_try_echo=$ac_try;;
11294esac
11295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011297 ac_status=$?
11298 grep -v '^ *+' conftest.er1 >conftest.err
11299 rm -f conftest.er1
11300 cat conftest.err >&5
11301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011302 (exit $ac_status); } && {
11303 test -z "$ac_c_werror_flag" ||
11304 test ! -s conftest.err
11305 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011306 ac_lo=0 ac_mid=0
11307 while :; do
11308 cat >conftest.$ac_ext <<_ACEOF
11309/* confdefs.h. */
11310_ACEOF
11311cat confdefs.h >>conftest.$ac_ext
11312cat >>conftest.$ac_ext <<_ACEOF
11313/* end confdefs.h. */
11314$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011316int
11317main ()
11318{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011320test_array [0] = 0
11321
11322 ;
11323 return 0;
11324}
11325_ACEOF
11326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011327if { (ac_try="$ac_compile"
11328case "(($ac_try" in
11329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11330 *) ac_try_echo=$ac_try;;
11331esac
11332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011334 ac_status=$?
11335 grep -v '^ *+' conftest.er1 >conftest.err
11336 rm -f conftest.er1
11337 cat conftest.err >&5
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339 (exit $ac_status); } && {
11340 test -z "$ac_c_werror_flag" ||
11341 test ! -s conftest.err
11342 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011343 ac_hi=$ac_mid; break
11344else
11345 echo "$as_me: failed program was:" >&5
11346sed 's/^/| /' conftest.$ac_ext >&5
11347
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348 ac_lo=`expr $ac_mid + 1`
11349 if test $ac_lo -le $ac_mid; then
11350 ac_lo= ac_hi=
11351 break
11352 fi
11353 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355
11356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011357 done
11358else
11359 echo "$as_me: failed program was:" >&5
11360sed 's/^/| /' conftest.$ac_ext >&5
11361
Martin v. Löwiseba40652007-08-30 20:10:57 +000011362 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011363/* confdefs.h. */
11364_ACEOF
11365cat confdefs.h >>conftest.$ac_ext
11366cat >>conftest.$ac_ext <<_ACEOF
11367/* end confdefs.h. */
11368$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011370int
11371main ()
11372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011374test_array [0] = 0
11375
11376 ;
11377 return 0;
11378}
11379_ACEOF
11380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381if { (ac_try="$ac_compile"
11382case "(($ac_try" in
11383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11384 *) ac_try_echo=$ac_try;;
11385esac
11386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011388 ac_status=$?
11389 grep -v '^ *+' conftest.er1 >conftest.err
11390 rm -f conftest.er1
11391 cat conftest.err >&5
11392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011393 (exit $ac_status); } && {
11394 test -z "$ac_c_werror_flag" ||
11395 test ! -s conftest.err
11396 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011397 ac_hi=-1 ac_mid=-1
11398 while :; do
11399 cat >conftest.$ac_ext <<_ACEOF
11400/* confdefs.h. */
11401_ACEOF
11402cat confdefs.h >>conftest.$ac_ext
11403cat >>conftest.$ac_ext <<_ACEOF
11404/* end confdefs.h. */
11405$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011407int
11408main ()
11409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011411test_array [0] = 0
11412
11413 ;
11414 return 0;
11415}
11416_ACEOF
11417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418if { (ac_try="$ac_compile"
11419case "(($ac_try" in
11420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11421 *) ac_try_echo=$ac_try;;
11422esac
11423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011425 ac_status=$?
11426 grep -v '^ *+' conftest.er1 >conftest.err
11427 rm -f conftest.er1
11428 cat conftest.err >&5
11429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430 (exit $ac_status); } && {
11431 test -z "$ac_c_werror_flag" ||
11432 test ! -s conftest.err
11433 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011434 ac_lo=$ac_mid; break
11435else
11436 echo "$as_me: failed program was:" >&5
11437sed 's/^/| /' conftest.$ac_ext >&5
11438
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439 ac_hi=`expr '(' $ac_mid ')' - 1`
11440 if test $ac_mid -le $ac_hi; then
11441 ac_lo= ac_hi=
11442 break
11443 fi
11444 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446
11447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011448 done
11449else
11450 echo "$as_me: failed program was:" >&5
11451sed 's/^/| /' conftest.$ac_ext >&5
11452
Martin v. Löwiseba40652007-08-30 20:10:57 +000011453 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455
11456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011458
11459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011460# Binary search between lo and hi bounds.
11461while test "x$ac_lo" != "x$ac_hi"; do
11462 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11463 cat >conftest.$ac_ext <<_ACEOF
11464/* confdefs.h. */
11465_ACEOF
11466cat confdefs.h >>conftest.$ac_ext
11467cat >>conftest.$ac_ext <<_ACEOF
11468/* end confdefs.h. */
11469$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011471int
11472main ()
11473{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011475test_array [0] = 0
11476
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482if { (ac_try="$ac_compile"
11483case "(($ac_try" in
11484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11485 *) ac_try_echo=$ac_try;;
11486esac
11487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011489 ac_status=$?
11490 grep -v '^ *+' conftest.er1 >conftest.err
11491 rm -f conftest.er1
11492 cat conftest.err >&5
11493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011494 (exit $ac_status); } && {
11495 test -z "$ac_c_werror_flag" ||
11496 test ! -s conftest.err
11497 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011498 ac_hi=$ac_mid
11499else
11500 echo "$as_me: failed program was:" >&5
11501sed 's/^/| /' conftest.$ac_ext >&5
11502
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505
11506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011507done
11508case $ac_lo in
11509?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510'') if test "$ac_cv_type__Bool" = yes; then
11511 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011512See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011514See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 { (exit 77); exit 77; }; }
11516 else
11517 ac_cv_sizeof__Bool=0
11518 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011519esac
11520else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011521 cat >conftest.$ac_ext <<_ACEOF
11522/* confdefs.h. */
11523_ACEOF
11524cat confdefs.h >>conftest.$ac_ext
11525cat >>conftest.$ac_ext <<_ACEOF
11526/* end confdefs.h. */
11527$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528 typedef _Bool ac__type_sizeof_;
11529static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11530static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011531#include <stdio.h>
11532#include <stdlib.h>
11533int
11534main ()
11535{
11536
11537 FILE *f = fopen ("conftest.val", "w");
11538 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539 return 1;
11540 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011541 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542 long int i = longval ();
11543 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11544 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011545 fprintf (f, "%ld\n", i);
11546 }
11547 else
11548 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011549 unsigned long int i = ulongval ();
11550 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11551 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011552 fprintf (f, "%lu\n", i);
11553 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011554 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011555
11556 ;
11557 return 0;
11558}
11559_ACEOF
11560rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011561if { (ac_try="$ac_link"
11562case "(($ac_try" in
11563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11564 *) ac_try_echo=$ac_try;;
11565esac
11566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11567 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011568 ac_status=$?
11569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 { (case "(($ac_try" in
11572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11573 *) ac_try_echo=$ac_try;;
11574esac
11575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11576 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011577 ac_status=$?
11578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11579 (exit $ac_status); }; }; then
11580 ac_cv_sizeof__Bool=`cat conftest.val`
11581else
11582 echo "$as_me: program exited with status $ac_status" >&5
11583echo "$as_me: failed program was:" >&5
11584sed 's/^/| /' conftest.$ac_ext >&5
11585
11586( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587if test "$ac_cv_type__Bool" = yes; then
11588 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011589See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011590echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011591See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 { (exit 77); exit 77; }; }
11593 else
11594 ac_cv_sizeof__Bool=0
11595 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597rm -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 +000011598fi
11599rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011601{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11602echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11603
11604
11605
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011606cat >>confdefs.h <<_ACEOF
11607#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11608_ACEOF
11609
11610
11611fi
11612
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11614echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011615if test "${ac_cv_type_uintptr_t+set}" = set; then
11616 echo $ECHO_N "(cached) $ECHO_C" >&6
11617else
11618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011624#ifdef HAVE_STDINT_H
11625 #include <stdint.h>
11626 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011627
Martin v. Löwiseba40652007-08-30 20:10:57 +000011628typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011629int
11630main ()
11631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011633 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011634if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011635 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011636 ;
11637 return 0;
11638}
11639_ACEOF
11640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011641if { (ac_try="$ac_compile"
11642case "(($ac_try" in
11643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11644 *) ac_try_echo=$ac_try;;
11645esac
11646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011649 grep -v '^ *+' conftest.er1 >conftest.err
11650 rm -f conftest.er1
11651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653 (exit $ac_status); } && {
11654 test -z "$ac_c_werror_flag" ||
11655 test ! -s conftest.err
11656 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011657 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011658else
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011660sed 's/^/| /' conftest.$ac_ext >&5
11661
Martin v. Löwiseba40652007-08-30 20:10:57 +000011662 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011664
11665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011667{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11668echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011669if test $ac_cv_type_uintptr_t = yes; then
11670
11671cat >>confdefs.h <<_ACEOF
11672#define HAVE_UINTPTR_T 1
11673_ACEOF
11674
Martin v. Löwiseba40652007-08-30 20:10:57 +000011675{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11676echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011677if test "${ac_cv_type_uintptr_t+set}" = set; then
11678 echo $ECHO_N "(cached) $ECHO_C" >&6
11679else
11680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* confdefs.h. */
11682_ACEOF
11683cat confdefs.h >>conftest.$ac_ext
11684cat >>conftest.$ac_ext <<_ACEOF
11685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011686$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011687typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011688int
11689main ()
11690{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011693if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 return 0;
11695 ;
11696 return 0;
11697}
11698_ACEOF
11699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011700if { (ac_try="$ac_compile"
11701case "(($ac_try" in
11702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11703 *) ac_try_echo=$ac_try;;
11704esac
11705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011708 grep -v '^ *+' conftest.er1 >conftest.err
11709 rm -f conftest.er1
11710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011712 (exit $ac_status); } && {
11713 test -z "$ac_c_werror_flag" ||
11714 test ! -s conftest.err
11715 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 ac_cv_type_uintptr_t=yes
11717else
11718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011719sed 's/^/| /' conftest.$ac_ext >&5
11720
Martin v. Löwiseba40652007-08-30 20:10:57 +000011721 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011722fi
Brett Cannon19fab762007-06-02 03:02:29 +000011723
Martin v. Löwiseba40652007-08-30 20:10:57 +000011724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11725fi
11726{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11727echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11728
11729# The cast to long int works around a bug in the HP C Compiler
11730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11732# This bug is HP SR number 8606223364.
11733{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11734echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011735if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11736 echo $ECHO_N "(cached) $ECHO_C" >&6
11737else
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 if test "$cross_compiling" = yes; then
11739 # Depending upon the size, compute the lo and hi bounds.
11740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011741/* confdefs.h. */
11742_ACEOF
11743cat confdefs.h >>conftest.$ac_ext
11744cat >>conftest.$ac_ext <<_ACEOF
11745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011746$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011747 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011748int
11749main ()
11750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011752test_array [0] = 0
11753
11754 ;
11755 return 0;
11756}
11757_ACEOF
11758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759if { (ac_try="$ac_compile"
11760case "(($ac_try" in
11761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11762 *) ac_try_echo=$ac_try;;
11763esac
11764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011767 grep -v '^ *+' conftest.er1 >conftest.err
11768 rm -f conftest.er1
11769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771 (exit $ac_status); } && {
11772 test -z "$ac_c_werror_flag" ||
11773 test ! -s conftest.err
11774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ac_lo=0 ac_mid=0
11776 while :; do
11777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* confdefs.h. */
11779_ACEOF
11780cat confdefs.h >>conftest.$ac_ext
11781cat >>conftest.$ac_ext <<_ACEOF
11782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011783$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011784 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011785int
11786main ()
11787{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011789test_array [0] = 0
11790
11791 ;
11792 return 0;
11793}
11794_ACEOF
11795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011796if { (ac_try="$ac_compile"
11797case "(($ac_try" in
11798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11799 *) ac_try_echo=$ac_try;;
11800esac
11801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011804 grep -v '^ *+' conftest.er1 >conftest.err
11805 rm -f conftest.er1
11806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808 (exit $ac_status); } && {
11809 test -z "$ac_c_werror_flag" ||
11810 test ! -s conftest.err
11811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 ac_hi=$ac_mid; break
11813else
11814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011815sed 's/^/| /' conftest.$ac_ext >&5
11816
Martin v. Löwiseba40652007-08-30 20:10:57 +000011817 ac_lo=`expr $ac_mid + 1`
11818 if test $ac_lo -le $ac_mid; then
11819 ac_lo= ac_hi=
11820 break
11821 fi
11822 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824
11825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 done
11827else
11828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011829sed 's/^/| /' conftest.$ac_ext >&5
11830
Martin v. Löwiseba40652007-08-30 20:10:57 +000011831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* confdefs.h. */
11833_ACEOF
11834cat confdefs.h >>conftest.$ac_ext
11835cat >>conftest.$ac_ext <<_ACEOF
11836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011837$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011838 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011839int
11840main ()
11841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011843test_array [0] = 0
11844
11845 ;
11846 return 0;
11847}
11848_ACEOF
11849rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011850if { (ac_try="$ac_compile"
11851case "(($ac_try" in
11852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11853 *) ac_try_echo=$ac_try;;
11854esac
11855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011858 grep -v '^ *+' conftest.er1 >conftest.err
11859 rm -f conftest.er1
11860 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011862 (exit $ac_status); } && {
11863 test -z "$ac_c_werror_flag" ||
11864 test ! -s conftest.err
11865 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 ac_hi=-1 ac_mid=-1
11867 while :; do
11868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* confdefs.h. */
11870_ACEOF
11871cat confdefs.h >>conftest.$ac_ext
11872cat >>conftest.$ac_ext <<_ACEOF
11873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011874$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011876int
11877main ()
11878{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011879static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011880test_array [0] = 0
11881
11882 ;
11883 return 0;
11884}
11885_ACEOF
11886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011887if { (ac_try="$ac_compile"
11888case "(($ac_try" in
11889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11890 *) ac_try_echo=$ac_try;;
11891esac
11892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011895 grep -v '^ *+' conftest.er1 >conftest.err
11896 rm -f conftest.er1
11897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011899 (exit $ac_status); } && {
11900 test -z "$ac_c_werror_flag" ||
11901 test ! -s conftest.err
11902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011903 ac_lo=$ac_mid; break
11904else
11905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011906sed 's/^/| /' conftest.$ac_ext >&5
11907
Martin v. Löwiseba40652007-08-30 20:10:57 +000011908 ac_hi=`expr '(' $ac_mid ')' - 1`
11909 if test $ac_mid -le $ac_hi; then
11910 ac_lo= ac_hi=
11911 break
11912 fi
11913 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011915
11916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 done
11918else
11919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011920sed 's/^/| /' conftest.$ac_ext >&5
11921
Martin v. Löwiseba40652007-08-30 20:10:57 +000011922 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011924
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011927
11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011929# Binary search between lo and hi bounds.
11930while test "x$ac_lo" != "x$ac_hi"; do
11931 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011933/* confdefs.h. */
11934_ACEOF
11935cat confdefs.h >>conftest.$ac_ext
11936cat >>conftest.$ac_ext <<_ACEOF
11937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011938$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011939 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011940int
11941main ()
11942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011944test_array [0] = 0
11945
11946 ;
11947 return 0;
11948}
11949_ACEOF
11950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951if { (ac_try="$ac_compile"
11952case "(($ac_try" in
11953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11954 *) ac_try_echo=$ac_try;;
11955esac
11956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011959 grep -v '^ *+' conftest.er1 >conftest.err
11960 rm -f conftest.er1
11961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011963 (exit $ac_status); } && {
11964 test -z "$ac_c_werror_flag" ||
11965 test ! -s conftest.err
11966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 ac_hi=$ac_mid
11968else
11969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011970sed 's/^/| /' conftest.$ac_ext >&5
11971
Martin v. Löwiseba40652007-08-30 20:10:57 +000011972 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011974
11975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011976done
11977case $ac_lo in
11978?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011979'') if test "$ac_cv_type_uintptr_t" = yes; then
11980 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011981See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011982echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011983See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011984 { (exit 77); exit 77; }; }
11985 else
11986 ac_cv_sizeof_uintptr_t=0
11987 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011988esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011989else
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011991/* confdefs.h. */
11992_ACEOF
11993cat confdefs.h >>conftest.$ac_ext
11994cat >>conftest.$ac_ext <<_ACEOF
11995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011996$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011997 typedef uintptr_t ac__type_sizeof_;
11998static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11999static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012000#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012001#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012002int
12003main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012004{
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
12006 FILE *f = fopen ("conftest.val", "w");
12007 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008 return 1;
12009 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012011 long int i = longval ();
12012 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12013 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 fprintf (f, "%ld\n", i);
12015 }
12016 else
12017 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012018 unsigned long int i = ulongval ();
12019 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12020 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012021 fprintf (f, "%lu\n", i);
12022 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012024
12025 ;
12026 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012027}
Martin v. Löwis11437992002-04-12 09:54:03 +000012028_ACEOF
12029rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012030if { (ac_try="$ac_link"
12031case "(($ac_try" in
12032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12033 *) ac_try_echo=$ac_try;;
12034esac
12035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12036 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ac_status=$?
12038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012040 { (case "(($ac_try" in
12041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12042 *) ac_try_echo=$ac_try;;
12043esac
12044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12045 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 ac_status=$?
12047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12048 (exit $ac_status); }; }; then
12049 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012050else
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 echo "$as_me: program exited with status $ac_status" >&5
12052echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012053sed 's/^/| /' conftest.$ac_ext >&5
12054
Martin v. Löwis11437992002-04-12 09:54:03 +000012055( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012056if test "$ac_cv_type_uintptr_t" = yes; then
12057 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012058See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012059echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012060See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012061 { (exit 77); exit 77; }; }
12062 else
12063 ac_cv_sizeof_uintptr_t=0
12064 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012066rm -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 +000012067fi
12068rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012070{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12071echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12072
12073
12074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012076#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012077_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012078
Michael W. Hudson54241132001-12-07 15:38:26 +000012079
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012080fi
12081
Martin v. Löwisebe26702006-10-02 14:55:51 +000012082
12083
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012084# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012085{ echo "$as_me:$LINENO: checking size of off_t" >&5
12086echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012087if test "${ac_cv_sizeof_off_t+set}" = set; then
12088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012089else
12090 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012091 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012092else
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012094/* confdefs.h. */
12095_ACEOF
12096cat confdefs.h >>conftest.$ac_ext
12097cat >>conftest.$ac_ext <<_ACEOF
12098/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012099#include <stdio.h>
12100#include <sys/types.h>
12101main()
12102{
12103 FILE *f=fopen("conftestval", "w");
12104 if (!f) exit(1);
12105 fprintf(f, "%d\n", sizeof(off_t));
12106 exit(0);
12107}
Martin v. Löwis11437992002-04-12 09:54:03 +000012108_ACEOF
12109rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012110if { (ac_try="$ac_link"
12111case "(($ac_try" in
12112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12113 *) ac_try_echo=$ac_try;;
12114esac
12115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12116 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 ac_status=$?
12118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120 { (case "(($ac_try" in
12121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12122 *) ac_try_echo=$ac_try;;
12123esac
12124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12125 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 ac_status=$?
12127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12128 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012129 ac_cv_sizeof_off_t=`cat conftestval`
12130else
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 echo "$as_me: program exited with status $ac_status" >&5
12132echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012133sed 's/^/| /' conftest.$ac_ext >&5
12134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135( exit $ac_status )
12136ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012138rm -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 +000012139fi
12140
Martin v. Löwiseba40652007-08-30 20:10:57 +000012141
12142
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012143fi
12144
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12146echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012147
12148cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012149#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012150_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012151
Michael W. Hudson54241132001-12-07 15:38:26 +000012152
Martin v. Löwiseba40652007-08-30 20:10:57 +000012153{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12154echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012155if test "$have_long_long" = yes -a \
12156 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12157 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012158
Martin v. Löwis11437992002-04-12 09:54:03 +000012159cat >>confdefs.h <<\_ACEOF
12160#define HAVE_LARGEFILE_SUPPORT 1
12161_ACEOF
12162
Martin v. Löwiseba40652007-08-30 20:10:57 +000012163 { echo "$as_me:$LINENO: result: yes" >&5
12164echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012165else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012166 { echo "$as_me:$LINENO: result: no" >&5
12167echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012168fi
12169
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012170# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012171{ echo "$as_me:$LINENO: checking size of time_t" >&5
12172echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012173if test "${ac_cv_sizeof_time_t+set}" = set; then
12174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012175else
12176 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012177 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012178else
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012180/* confdefs.h. */
12181_ACEOF
12182cat confdefs.h >>conftest.$ac_ext
12183cat >>conftest.$ac_ext <<_ACEOF
12184/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012185#include <stdio.h>
12186#include <time.h>
12187main()
12188{
12189 FILE *f=fopen("conftestval", "w");
12190 if (!f) exit(1);
12191 fprintf(f, "%d\n", sizeof(time_t));
12192 exit(0);
12193}
Martin v. Löwis11437992002-04-12 09:54:03 +000012194_ACEOF
12195rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012196if { (ac_try="$ac_link"
12197case "(($ac_try" in
12198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12199 *) ac_try_echo=$ac_try;;
12200esac
12201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12202 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 ac_status=$?
12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012206 { (case "(($ac_try" in
12207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12208 *) ac_try_echo=$ac_try;;
12209esac
12210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12211 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 ac_status=$?
12213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12214 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012215 ac_cv_sizeof_time_t=`cat conftestval`
12216else
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 echo "$as_me: program exited with status $ac_status" >&5
12218echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012219sed 's/^/| /' conftest.$ac_ext >&5
12220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221( exit $ac_status )
12222ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012224rm -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 +000012225fi
12226
Martin v. Löwiseba40652007-08-30 20:10:57 +000012227
12228
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012229fi
12230
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12232echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012233
12234cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012235#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012236_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012237
Michael W. Hudson54241132001-12-07 15:38:26 +000012238
12239
Trent Mick635f6fb2000-08-23 21:33:05 +000012240# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012241ac_save_cc="$CC"
12242if test "$ac_cv_kpthread" = "yes"
12243then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012244elif test "$ac_cv_kthread" = "yes"
12245then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012246elif test "$ac_cv_pthread" = "yes"
12247then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012249{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12250echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012251have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012253/* confdefs.h. */
12254_ACEOF
12255cat confdefs.h >>conftest.$ac_ext
12256cat >>conftest.$ac_ext <<_ACEOF
12257/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012258#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012259int
12260main ()
12261{
Guido van Rossum12580492000-09-24 16:47:19 +000012262pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
12267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012268if { (ac_try="$ac_compile"
12269case "(($ac_try" in
12270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12271 *) ac_try_echo=$ac_try;;
12272esac
12273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012276 grep -v '^ *+' conftest.er1 >conftest.err
12277 rm -f conftest.er1
12278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012280 (exit $ac_status); } && {
12281 test -z "$ac_c_werror_flag" ||
12282 test ! -s conftest.err
12283 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012284 have_pthread_t=yes
12285else
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012287sed 's/^/| /' conftest.$ac_ext >&5
12288
Martin v. Löwiseba40652007-08-30 20:10:57 +000012289
Trent Mick635f6fb2000-08-23 21:33:05 +000012290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291
12292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12293{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12294echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012295if test "$have_pthread_t" = yes ; then
12296 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012297 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12298echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12300 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012301else
12302 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012303 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012304else
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012311#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012312#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012313 main()
12314 {
12315 FILE *f=fopen("conftestval", "w");
12316 if (!f) exit(1);
12317 fprintf(f, "%d\n", sizeof(pthread_t));
12318 exit(0);
12319 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012320_ACEOF
12321rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012322if { (ac_try="$ac_link"
12323case "(($ac_try" in
12324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12325 *) ac_try_echo=$ac_try;;
12326esac
12327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12328 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 ac_status=$?
12330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332 { (case "(($ac_try" in
12333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12334 *) ac_try_echo=$ac_try;;
12335esac
12336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12337 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ac_status=$?
12339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12340 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012341 ac_cv_sizeof_pthread_t=`cat conftestval`
12342else
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 echo "$as_me: program exited with status $ac_status" >&5
12344echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012345sed 's/^/| /' conftest.$ac_ext >&5
12346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347( exit $ac_status )
12348ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350rm -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 +000012351fi
12352
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353
12354
Trent Mick635f6fb2000-08-23 21:33:05 +000012355fi
12356
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12358echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
12360cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012361#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012362_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012363
12364fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012365CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012366
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12368echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12369# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012370if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012371 enableval=$enable_toolbox_glue;
12372fi
Jack Jansene578a632001-08-15 01:27:14 +000012373
12374
12375if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012376then
Jack Jansene578a632001-08-15 01:27:14 +000012377 case $ac_sys_system/$ac_sys_release in
12378 Darwin/*)
12379 enable_toolbox_glue="yes";;
12380 *)
12381 enable_toolbox_glue="no";;
12382 esac
12383fi
12384case "$enable_toolbox_glue" in
12385yes)
Jack Jansene578a632001-08-15 01:27:14 +000012386 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012387 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012388
12389cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012390#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012391_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012392
12393 ;;
12394*)
Jack Jansene578a632001-08-15 01:27:14 +000012395 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012396 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012397 ;;
12398esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12400echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012401
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012402
12403case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012404 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012405 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12406 ;;
12407 Darwin/*)
12408 OTHER_LIBTOOL_OPT=""
12409 ;;
12410esac
12411
12412
12413case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012414 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012415 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12416 if test "${enable_universalsdk}"; then
12417 :
12418 else
12419 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12420 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012421 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012423 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012424 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12425 if test ${gcc_version} '<' 4.0
12426 then
12427 LIBTOOL_CRUFT="-lcc_dynamic"
12428 else
12429 LIBTOOL_CRUFT=""
12430 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012431 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012432 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012433 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012434esac
12435
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12437echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012438if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012439then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012440 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012442 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444cat >>confdefs.h <<\_ACEOF
12445#define WITH_NEXT_FRAMEWORK 1
12446_ACEOF
12447
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448 { echo "$as_me:$LINENO: result: yes" >&5
12449echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012450else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451 { echo "$as_me:$LINENO: result: no" >&5
12452echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012453fi
12454
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455{ echo "$as_me:$LINENO: checking for dyld" >&5
12456echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012457case $ac_sys_system/$ac_sys_release in
12458 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460cat >>confdefs.h <<\_ACEOF
12461#define WITH_DYLD 1
12462_ACEOF
12463
Martin v. Löwiseba40652007-08-30 20:10:57 +000012464 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12465echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012466 ;;
12467 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468 { echo "$as_me:$LINENO: result: no" >&5
12469echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012470 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012471esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012472
Guido van Rossum0a516c91994-09-12 10:58:40 +000012473# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012474
Michael W. Hudson54241132001-12-07 15:38:26 +000012475
12476
12477
12478
Guido van Rossum0a516c91994-09-12 10:58:40 +000012479# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012480# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481{ echo "$as_me:$LINENO: checking SO" >&5
12482echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012483if test -z "$SO"
12484then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012486 hp*|HP*)
12487 case `uname -m` in
12488 ia64) SO=.so;;
12489 *) SO=.sl;;
12490 esac
12491 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012492 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012493 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012494 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012495else
12496 # this might also be a termcap variable, see #610332
12497 echo
12498 echo '====================================================================='
12499 echo '+ +'
12500 echo '+ WARNING: You have set SO in your environment. +'
12501 echo '+ Do you really mean to change the extension for shared libraries? +'
12502 echo '+ Continuing in 10 seconds to let you to ponder. +'
12503 echo '+ +'
12504 echo '====================================================================='
12505 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507{ echo "$as_me:$LINENO: result: $SO" >&5
12508echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012509
12510cat >>confdefs.h <<_ACEOF
12511#define SHLIB_EXT "$SO"
12512_ACEOF
12513
Guido van Rossum0a516c91994-09-12 10:58:40 +000012514# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012515# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012516# (Shared libraries in this instance are shared modules to be loaded into
12517# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12519echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012520if test -z "$LDSHARED"
12521then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012523 AIX*)
12524 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012525 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012526 ;;
12527 BeOS*)
12528 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012529 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012530 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012531 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012532 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012534 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012535 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012536 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012537 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012538 hp*|HP*)
12539 if test "$GCC" = "yes"
12540 then LDSHARED='$(CC) -shared'
12541 else LDSHARED='ld -b';
12542 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012543 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012544 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012545 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12546 if test "$enable_framework" ; then
12547 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012548 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12549 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012550 else
12551 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012552 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012553 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012554 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012555 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12556 if test "$enable_framework" ; then
12557 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012558 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12559 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012560 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012561 # No framework, use the Python app as bundle-loader
12562 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012563 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012564 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012565 Darwin/*)
12566 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12567 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012568 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012569 if test ${cur_target} '>' 10.2; then
12570 cur_target=10.3
12571 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +000012572 if test "${UNIVERSAL_ARCHS}" = "all"; then
12573 # Ensure that the default platform for a 4-way
12574 # universal build is OSX 10.5, that's the first
12575 # OS release where 4-way builds make sense.
12576 cur_target='10.5'
12577 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012578 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012579
12580 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12581 # environment with a value that is the same as what we'll use
12582 # in the Makefile to ensure that we'll get the same compiler
12583 # environment during configure and build time.
12584 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12585 export MACOSX_DEPLOYMENT_TARGET
12586
Ronald Oussoren988117f2006-04-29 11:31:35 +000012587 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Ronald Oussoren5640ce22008-06-05 12:58:24 +000012588 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012589 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012590 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000012591 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000012592 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012593 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12594 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012595 else
12596 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12597 if test "$enable_framework" ; then
12598 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012599 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12600 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012601 else
12602 # No framework, use the Python app as bundle-loader
12603 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12604 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12605 fi
12606 fi
12607 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012608 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012609 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012610 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012611 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012612 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012613 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012614 else
12615 LDSHARED="ld -Bshareable ${LDFLAGS}"
12616 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012617 OpenBSD*)
12618 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12619 then
12620 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12621 else
12622 case `uname -r` in
12623 [01].* | 2.[0-7] | 2.[0-7].*)
12624 LDSHARED="ld -Bshareable ${LDFLAGS}"
12625 ;;
12626 *)
12627 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12628 ;;
12629 esac
12630 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012631 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012632 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012633 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012634 then LDSHARED='$(CC) -shared'
12635 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012636 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012637 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012638 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012639 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012640 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012641 *) LDSHARED="ld";;
12642 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12645echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012646BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012647# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012648# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12650echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012651if test -z "$CCSHARED"
12652then
Guido van Rossum07397971997-04-29 21:49:50 +000012653 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012654 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012655 then CCSHARED="-fPIC";
12656 elif test `uname -p` = sparc;
12657 then CCSHARED="-xcode=pic32";
12658 else CCSHARED="-Kpic";
12659 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012660 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012661 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012662 else CCSHARED="+z";
12663 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012664 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012665 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012666 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012667 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012668 if test "$GCC" = "yes"
12669 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012670 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012671 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012672 SCO_SV*)
12673 if test "$GCC" = "yes"
12674 then CCSHARED="-fPIC"
12675 else CCSHARED="-Kpic -belf"
12676 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012677 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012678 IRIX*/6*) case $CC in
12679 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012680 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012681 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012682 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012683 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12686echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012687# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012688# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12690echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012691if test -z "$LINKFORSHARED"
12692then
Guido van Rossum07397971997-04-29 21:49:50 +000012693 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012694 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012695 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012696 LINKFORSHARED="-Wl,-E -Wl,+s";;
12697# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012698 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012699 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012700 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012702 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12703 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012704 # not used by the core itself but which needs to be in the core so
12705 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012706 # -prebind is no longer used, because it actually seems to give a
12707 # slowdown in stead of a speedup, maybe due to the large number of
12708 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012709
12710 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012711 if test "$enable_framework"
12712 then
Jack Jansenda49e192005-01-07 13:08:22 +000012713 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012714 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012715 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012716 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012717 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012718 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012719 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012720 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12721 then
12722 LINKFORSHARED="-Wl,--export-dynamic"
12723 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012724 SunOS/5*) case $CC in
12725 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012726 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012727 then
12728 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012729 fi;;
12730 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012731 CYGWIN*)
12732 if test $enable_shared = "no"
12733 then
12734 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12735 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012736 QNX*)
12737 # -Wl,-E causes the symbols to be added to the dynamic
12738 # symbol table so that they can be found when a module
12739 # is loaded. -N 2048K causes the stack size to be set
12740 # to 2048 kilobytes so that the stack doesn't overflow
12741 # when running test_compile.py.
12742 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012743 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12746echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012747
Michael W. Hudson54241132001-12-07 15:38:26 +000012748
Martin v. Löwiseba40652007-08-30 20:10:57 +000012749{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12750echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012751if test ! "$LIBRARY" = "$LDLIBRARY"
12752then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012753 case $ac_sys_system in
12754 CYGWIN*)
12755 # Cygwin needs CCSHARED when building extension DLLs
12756 # but not when building the interpreter DLL.
12757 CFLAGSFORSHARED='';;
12758 *)
12759 CFLAGSFORSHARED='$(CCSHARED)'
12760 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012762{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12763echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012764
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012765# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12766# library (with --enable-shared).
12767# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012768# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12769# if it is not required, since it creates a dependency of the shared library
12770# to LIBS. This, in turn, means that applications linking the shared libpython
12771# don't need to link LIBS explicitly. The default should be only changed
12772# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012773
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12775echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012776case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012777 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012778 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012779esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12781echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012782
12783
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012785
Martin v. Löwiseba40652007-08-30 20:10:57 +000012786{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12787echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012788if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790else
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012792LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012794/* confdefs.h. */
12795_ACEOF
12796cat confdefs.h >>conftest.$ac_ext
12797cat >>conftest.$ac_ext <<_ACEOF
12798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800/* Override any GCC internal prototype to avoid an error.
12801 Use char because int might match the return type of a GCC
12802 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012803#ifdef __cplusplus
12804extern "C"
12805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012806char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012807int
12808main ()
12809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ;
12812 return 0;
12813}
12814_ACEOF
12815rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816if { (ac_try="$ac_link"
12817case "(($ac_try" in
12818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12819 *) ac_try_echo=$ac_try;;
12820esac
12821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12822 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012824 grep -v '^ *+' conftest.er1 >conftest.err
12825 rm -f conftest.er1
12826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828 (exit $ac_status); } && {
12829 test -z "$ac_c_werror_flag" ||
12830 test ! -s conftest.err
12831 } && test -s conftest$ac_exeext &&
12832 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012836sed 's/^/| /' conftest.$ac_ext >&5
12837
Martin v. Löwiseba40652007-08-30 20:10:57 +000012838 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012840
12841rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12846echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012847if test $ac_cv_lib_dl_dlopen = yes; then
12848 cat >>confdefs.h <<_ACEOF
12849#define HAVE_LIBDL 1
12850_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012851
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012852 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012854fi
12855 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12858echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012859if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861else
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012863LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012865/* confdefs.h. */
12866_ACEOF
12867cat confdefs.h >>conftest.$ac_ext
12868cat >>conftest.$ac_ext <<_ACEOF
12869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871/* Override any GCC internal prototype to avoid an error.
12872 Use char because int might match the return type of a GCC
12873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012874#ifdef __cplusplus
12875extern "C"
12876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012877char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012878int
12879main ()
12880{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012881return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ;
12883 return 0;
12884}
12885_ACEOF
12886rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887if { (ac_try="$ac_link"
12888case "(($ac_try" in
12889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12890 *) ac_try_echo=$ac_try;;
12891esac
12892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012895 grep -v '^ *+' conftest.er1 >conftest.err
12896 rm -f conftest.er1
12897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012899 (exit $ac_status); } && {
12900 test -z "$ac_c_werror_flag" ||
12901 test ! -s conftest.err
12902 } && test -s conftest$ac_exeext &&
12903 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012907sed 's/^/| /' conftest.$ac_ext >&5
12908
Martin v. Löwiseba40652007-08-30 20:10:57 +000012909 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911
12912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012914LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12917echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012918if test $ac_cv_lib_dld_shl_load = yes; then
12919 cat >>confdefs.h <<_ACEOF
12920#define HAVE_LIBDLD 1
12921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012923 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925fi
12926 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012927
12928# only check for sem_ini if thread support is requested
12929if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012930 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12931echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012932if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012934else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012935 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012937/* confdefs.h. */
12938_ACEOF
12939cat confdefs.h >>conftest.$ac_ext
12940cat >>conftest.$ac_ext <<_ACEOF
12941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
Martin v. Löwiseba40652007-08-30 20:10:57 +000012943/* Override any GCC internal prototype to avoid an error.
12944 Use char because int might match the return type of a GCC
12945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012946#ifdef __cplusplus
12947extern "C"
12948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012949char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
12956}
12957_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958for ac_lib in '' pthread rt posix4; do
12959 if test -z "$ac_lib"; then
12960 ac_res="none required"
12961 else
12962 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012964 fi
12965 rm -f conftest.$ac_objext conftest$ac_exeext
12966if { (ac_try="$ac_link"
12967case "(($ac_try" in
12968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12969 *) ac_try_echo=$ac_try;;
12970esac
12971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12972 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012973 ac_status=$?
12974 grep -v '^ *+' conftest.er1 >conftest.err
12975 rm -f conftest.er1
12976 cat conftest.err >&5
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 (exit $ac_status); } && {
12979 test -z "$ac_c_werror_flag" ||
12980 test ! -s conftest.err
12981 } && test -s conftest$ac_exeext &&
12982 $as_test_x conftest$ac_exeext; then
12983 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012984else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012985 echo "$as_me: failed program was:" >&5
12986sed 's/^/| /' conftest.$ac_ext >&5
12987
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988
Brett Cannon19fab762007-06-02 03:02:29 +000012989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012990
12991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12992 conftest$ac_exeext
12993 if test "${ac_cv_search_sem_init+set}" = set; then
12994 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012996done
12997if test "${ac_cv_search_sem_init+set}" = set; then
12998 :
12999else
13000 ac_cv_search_sem_init=no
13001fi
13002rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013003LIBS=$ac_func_search_save_LIBS
13004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13006echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13007ac_res=$ac_cv_search_sem_init
13008if test "$ac_res" != no; then
13009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013010
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013011fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013012 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013013 # posix4 on Solaris 2.6
13014 # pthread (first!) on Linux
13015fi
13016
Martin v. Löwis19d17342003-06-14 21:03:05 +000013017# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013018{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13019echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013020if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13021 echo $ECHO_N "(cached) $ECHO_C" >&6
13022else
13023 ac_check_lib_save_LIBS=$LIBS
13024LIBS="-lintl $LIBS"
13025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013026/* confdefs.h. */
13027_ACEOF
13028cat confdefs.h >>conftest.$ac_ext
13029cat >>conftest.$ac_ext <<_ACEOF
13030/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013031
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032/* Override any GCC internal prototype to avoid an error.
13033 Use char because int might match the return type of a GCC
13034 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013035#ifdef __cplusplus
13036extern "C"
13037#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013038char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013039int
13040main ()
13041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013042return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
13047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013048if { (ac_try="$ac_link"
13049case "(($ac_try" in
13050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13051 *) ac_try_echo=$ac_try;;
13052esac
13053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013056 grep -v '^ *+' conftest.er1 >conftest.err
13057 rm -f conftest.er1
13058 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060 (exit $ac_status); } && {
13061 test -z "$ac_c_werror_flag" ||
13062 test ! -s conftest.err
13063 } && test -s conftest$ac_exeext &&
13064 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013065 ac_cv_lib_intl_textdomain=yes
13066else
13067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013068sed 's/^/| /' conftest.$ac_ext >&5
13069
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072
13073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013075LIBS=$ac_check_lib_save_LIBS
13076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013077{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13078echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013079if test $ac_cv_lib_intl_textdomain = yes; then
13080
13081cat >>confdefs.h <<\_ACEOF
13082#define WITH_LIBINTL 1
13083_ACEOF
13084
13085fi
13086
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013087
13088# checks for system dependent C++ extensions support
13089case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13091echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013093/* confdefs.h. */
13094_ACEOF
13095cat confdefs.h >>conftest.$ac_ext
13096cat >>conftest.$ac_ext <<_ACEOF
13097/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013098#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013099int
13100main ()
13101{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013102loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ;
13104 return 0;
13105}
13106_ACEOF
13107rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013108if { (ac_try="$ac_link"
13109case "(($ac_try" in
13110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13111 *) ac_try_echo=$ac_try;;
13112esac
13113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13114 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013116 grep -v '^ *+' conftest.er1 >conftest.err
13117 rm -f conftest.er1
13118 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013120 (exit $ac_status); } && {
13121 test -z "$ac_c_werror_flag" ||
13122 test ! -s conftest.err
13123 } && test -s conftest$ac_exeext &&
13124 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126cat >>confdefs.h <<\_ACEOF
13127#define AIX_GENUINE_CPLUSPLUS 1
13128_ACEOF
13129
Martin v. Löwiseba40652007-08-30 20:10:57 +000013130 { echo "$as_me:$LINENO: result: yes" >&5
13131echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013132else
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013134sed 's/^/| /' conftest.$ac_ext >&5
13135
Martin v. Löwiseba40652007-08-30 20:10:57 +000013136 { echo "$as_me:$LINENO: result: no" >&5
13137echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013139
13140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013141 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013142 *) ;;
13143esac
13144
Guido van Rossum70c7f481998-03-26 18:44:10 +000013145# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013146# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013147{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13148echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013149if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013151else
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013153LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013155/* confdefs.h. */
13156_ACEOF
13157cat confdefs.h >>conftest.$ac_ext
13158cat >>conftest.$ac_ext <<_ACEOF
13159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013160
Martin v. Löwiseba40652007-08-30 20:10:57 +000013161/* Override any GCC internal prototype to avoid an error.
13162 Use char because int might match the return type of a GCC
13163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013164#ifdef __cplusplus
13165extern "C"
13166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013167char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013168int
13169main ()
13170{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013171return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 ;
13173 return 0;
13174}
13175_ACEOF
13176rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013177if { (ac_try="$ac_link"
13178case "(($ac_try" in
13179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13180 *) ac_try_echo=$ac_try;;
13181esac
13182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013185 grep -v '^ *+' conftest.er1 >conftest.err
13186 rm -f conftest.er1
13187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013189 (exit $ac_status); } && {
13190 test -z "$ac_c_werror_flag" ||
13191 test ! -s conftest.err
13192 } && test -s conftest$ac_exeext &&
13193 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013197sed 's/^/| /' conftest.$ac_ext >&5
13198
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013201
13202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013204LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013206{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13207echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013208if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013209 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013210fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013211 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13213echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013214if test "${ac_cv_lib_socket_socket+set}" = set; then
13215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013218LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013220/* confdefs.h. */
13221_ACEOF
13222cat confdefs.h >>conftest.$ac_ext
13223cat >>conftest.$ac_ext <<_ACEOF
13224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
Martin v. Löwiseba40652007-08-30 20:10:57 +000013226/* Override any GCC internal prototype to avoid an error.
13227 Use char because int might match the return type of a GCC
13228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013229#ifdef __cplusplus
13230extern "C"
13231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013232char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013233int
13234main ()
13235{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013236return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 ;
13238 return 0;
13239}
13240_ACEOF
13241rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013242if { (ac_try="$ac_link"
13243case "(($ac_try" in
13244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13245 *) ac_try_echo=$ac_try;;
13246esac
13247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13248 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013250 grep -v '^ *+' conftest.er1 >conftest.err
13251 rm -f conftest.er1
13252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254 (exit $ac_status); } && {
13255 test -z "$ac_c_werror_flag" ||
13256 test ! -s conftest.err
13257 } && test -s conftest$ac_exeext &&
13258 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013260else
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013262sed 's/^/| /' conftest.$ac_ext >&5
13263
Martin v. Löwiseba40652007-08-30 20:10:57 +000013264 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013266
13267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013269LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13272echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013273if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013274 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013275fi
13276 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013277
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013278case "$ac_sys_system" in
13279BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013280{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13281echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013282if test "${ac_cv_lib_net_socket+set}" = set; then
13283 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013284else
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013286LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013288/* confdefs.h. */
13289_ACEOF
13290cat confdefs.h >>conftest.$ac_ext
13291cat >>conftest.$ac_ext <<_ACEOF
13292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
Martin v. Löwiseba40652007-08-30 20:10:57 +000013294/* Override any GCC internal prototype to avoid an error.
13295 Use char because int might match the return type of a GCC
13296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013297#ifdef __cplusplus
13298extern "C"
13299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013300char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 ;
13306 return 0;
13307}
13308_ACEOF
13309rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310if { (ac_try="$ac_link"
13311case "(($ac_try" in
13312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13313 *) ac_try_echo=$ac_try;;
13314esac
13315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013318 grep -v '^ *+' conftest.er1 >conftest.err
13319 rm -f conftest.er1
13320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013322 (exit $ac_status); } && {
13323 test -z "$ac_c_werror_flag" ||
13324 test ! -s conftest.err
13325 } && test -s conftest$ac_exeext &&
13326 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013328else
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013330sed 's/^/| /' conftest.$ac_ext >&5
13331
Martin v. Löwiseba40652007-08-30 20:10:57 +000013332 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013334
13335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013337LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13340echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013341if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013342 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013343fi
13344 # BeOS
13345;;
13346esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013347
Martin v. Löwiseba40652007-08-30 20:10:57 +000013348{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13349echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013352if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013353 withval=$with_libs;
13354{ echo "$as_me:$LINENO: result: $withval" >&5
13355echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013356LIBS="$withval $LIBS"
13357
13358else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359 { echo "$as_me:$LINENO: result: no" >&5
13360echo "${ECHO_T}no" >&6; }
13361fi
13362
Guido van Rossum7f43da71994-08-01 12:15:30 +000013363
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013364# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13366echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013367
Martin v. Löwiseba40652007-08-30 20:10:57 +000013368# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013369if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013370 withval=$with_system_ffi;
13371fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013372
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013373
Martin v. Löwiseba40652007-08-30 20:10:57 +000013374{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13375echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013376
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013377# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013378
13379
Martin v. Löwiseba40652007-08-30 20:10:57 +000013380{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13381echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Martin v. Löwiseba40652007-08-30 20:10:57 +000013383# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013384if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013385 withval=$with_signal_module;
13386fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013387
13388
13389if test -z "$with_signal_module"
13390then with_signal_module="yes"
13391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013392{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13393echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013394
13395if test "${with_signal_module}" = "yes"; then
13396 USE_SIGNAL_MODULE=""
13397 SIGNAL_OBJS=""
13398else
13399 USE_SIGNAL_MODULE="#"
13400 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13401fi
13402
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013403# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013404
Barry Warsawc0d24d82000-06-29 16:12:00 +000013405USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013406
Martin v. Löwiseba40652007-08-30 20:10:57 +000013407{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13408echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Guido van Rossumec2f0731997-01-22 20:54:01 +000013410
Martin v. Löwiseba40652007-08-30 20:10:57 +000013411# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013412if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413 withval=$with_dec_threads;
13414{ echo "$as_me:$LINENO: result: $withval" >&5
13415echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013416LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013417if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013418 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013419fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013420else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421 { echo "$as_me:$LINENO: result: no" >&5
13422echo "${ECHO_T}no" >&6; }
13423fi
13424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
13426# Templates for things AC_DEFINEd more than once.
13427# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013428
13429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
13431
13432
13433
13434
Martin v. Löwiseba40652007-08-30 20:10:57 +000013435{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13436echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013439if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440 withval=$with_threads;
13441fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013442
13443
Barry Warsawc0d24d82000-06-29 16:12:00 +000013444# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
Martin v. Löwiseba40652007-08-30 20:10:57 +000013446# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013447if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448 withval=$with_thread; with_threads=$with_thread
13449fi
13450
Barry Warsawc0d24d82000-06-29 16:12:00 +000013451
13452if test -z "$with_threads"
13453then with_threads="yes"
13454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013455{ echo "$as_me:$LINENO: result: $with_threads" >&5
13456echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013457
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013458
Barry Warsawc0d24d82000-06-29 16:12:00 +000013459if test "$with_threads" = "no"
13460then
13461 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013462elif test "$ac_cv_pthread_is_default" = yes
13463then
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013465#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013466_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013467
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013468 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013470#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013471_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013472
13473 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013475elif test "$ac_cv_kpthread" = "yes"
13476then
13477 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013478 if test "$ac_cv_cxx_thread" = "yes"; then
13479 CXX="$CXX -Kpthread"
13480 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013482#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013485 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013486 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013487elif test "$ac_cv_kthread" = "yes"
13488then
13489 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013490 if test "$ac_cv_cxx_thread" = "yes"; then
13491 CXX="$CXX -Kthread"
13492 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013493 cat >>confdefs.h <<\_ACEOF
13494#define WITH_THREAD 1
13495_ACEOF
13496
13497 posix_threads=yes
13498 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013499elif test "$ac_cv_pthread" = "yes"
13500then
13501 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013502 if test "$ac_cv_cxx_thread" = "yes"; then
13503 CXX="$CXX -pthread"
13504 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013505 cat >>confdefs.h <<\_ACEOF
13506#define WITH_THREAD 1
13507_ACEOF
13508
13509 posix_threads=yes
13510 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013511else
13512 if test ! -z "$with_threads" -a -d "$with_threads"
13513 then LDFLAGS="$LDFLAGS -L$with_threads"
13514 fi
13515 if test ! -z "$withval" -a -d "$withval"
13516 then LDFLAGS="$LDFLAGS -L$withval"
13517 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013518
13519 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013520 # define _POSIX_THREADS in unistd.h. Some apparently don't
13521 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13523echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* confdefs.h. */
13526_ACEOF
13527cat confdefs.h >>conftest.$ac_ext
13528cat >>conftest.$ac_ext <<_ACEOF
13529/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013530
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013531#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013532#ifdef _POSIX_THREADS
13533yes
13534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
13536_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013538 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013539 unistd_defines_pthreads=yes
13540else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013541 unistd_defines_pthreads=no
13542fi
13543rm -f conftest*
13544
Martin v. Löwiseba40652007-08-30 20:10:57 +000013545 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13546echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013549#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013550_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013553 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13554echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013555if test "${ac_cv_header_cthreads_h+set}" = set; then
13556 echo $ECHO_N "(cached) $ECHO_C" >&6
13557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013558{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13559echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013560else
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13563echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013565/* confdefs.h. */
13566_ACEOF
13567cat confdefs.h >>conftest.$ac_ext
13568cat >>conftest.$ac_ext <<_ACEOF
13569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013570$ac_includes_default
13571#include <cthreads.h>
13572_ACEOF
13573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574if { (ac_try="$ac_compile"
13575case "(($ac_try" in
13576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13577 *) ac_try_echo=$ac_try;;
13578esac
13579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013582 grep -v '^ *+' conftest.er1 >conftest.err
13583 rm -f conftest.er1
13584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586 (exit $ac_status); } && {
13587 test -z "$ac_c_werror_flag" ||
13588 test ! -s conftest.err
13589 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 ac_header_compiler=yes
13591else
13592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013593sed 's/^/| /' conftest.$ac_ext >&5
13594
Martin v. Löwiseba40652007-08-30 20:10:57 +000013595 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597
13598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13599{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13600echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
13602# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013603{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13604echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* confdefs.h. */
13607_ACEOF
13608cat confdefs.h >>conftest.$ac_ext
13609cat >>conftest.$ac_ext <<_ACEOF
13610/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013611#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013612_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013613if { (ac_try="$ac_cpp conftest.$ac_ext"
13614case "(($ac_try" in
13615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13616 *) ac_try_echo=$ac_try;;
13617esac
13618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13619 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013621 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 rm -f conftest.er1
13623 cat conftest.err >&5
13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625 (exit $ac_status); } >/dev/null && {
13626 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13627 test ! -s conftest.err
13628 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 ac_header_preproc=yes
13630else
13631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013632sed 's/^/| /' conftest.$ac_ext >&5
13633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013638{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13639echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
13641# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013642case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13643 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13645echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013646 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13647echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13648 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013649 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013650 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013651 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13652echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013653 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13654echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13655 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13656echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13657 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13658echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013659 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13660echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013661 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13662echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013663 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013664## ------------------------------------------------ ##
13665## Report this to http://www.python.org/python-bugs ##
13666## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013667_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013668 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013669 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013670esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013671{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13672echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013673if test "${ac_cv_header_cthreads_h+set}" = set; then
13674 echo $ECHO_N "(cached) $ECHO_C" >&6
13675else
13676 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013678{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13679echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
13681fi
13682if test $ac_cv_header_cthreads_h = yes; then
13683 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013684#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013685_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013686
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013688#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013689_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013690
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
13692cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013693#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013694_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013695
13696 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013697 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013698else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013699
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013701 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13702echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013703if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13704 echo $ECHO_N "(cached) $ECHO_C" >&6
13705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013706{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13707echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013708else
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013710{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13711echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013713/* confdefs.h. */
13714_ACEOF
13715cat confdefs.h >>conftest.$ac_ext
13716cat >>conftest.$ac_ext <<_ACEOF
13717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013718$ac_includes_default
13719#include <mach/cthreads.h>
13720_ACEOF
13721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013722if { (ac_try="$ac_compile"
13723case "(($ac_try" in
13724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13725 *) ac_try_echo=$ac_try;;
13726esac
13727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013730 grep -v '^ *+' conftest.er1 >conftest.err
13731 rm -f conftest.er1
13732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013734 (exit $ac_status); } && {
13735 test -z "$ac_c_werror_flag" ||
13736 test ! -s conftest.err
13737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 ac_header_compiler=yes
13739else
13740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013741sed 's/^/| /' conftest.$ac_ext >&5
13742
Martin v. Löwiseba40652007-08-30 20:10:57 +000013743 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745
13746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13747{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13748echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
13750# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13752echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013754/* confdefs.h. */
13755_ACEOF
13756cat confdefs.h >>conftest.$ac_ext
13757cat >>conftest.$ac_ext <<_ACEOF
13758/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013759#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013760_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013761if { (ac_try="$ac_cpp conftest.$ac_ext"
13762case "(($ac_try" in
13763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13764 *) ac_try_echo=$ac_try;;
13765esac
13766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13767 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013769 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 rm -f conftest.er1
13771 cat conftest.err >&5
13772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773 (exit $ac_status); } >/dev/null && {
13774 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13775 test ! -s conftest.err
13776 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 ac_header_preproc=yes
13778else
13779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013780sed 's/^/| /' conftest.$ac_ext >&5
13781
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13787echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
13789# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013790case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13791 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13793echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013794 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13795echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13796 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013797 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013798 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013799 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13800echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013801 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13802echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13803 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13804echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13805 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13806echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013807 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13808echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013809 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13810echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013811 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013812## ------------------------------------------------ ##
13813## Report this to http://www.python.org/python-bugs ##
13814## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013815_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013816 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013817 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013818esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13820echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013821if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13822 echo $ECHO_N "(cached) $ECHO_C" >&6
13823else
13824 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013826{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13827echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
13829fi
13830if test $ac_cv_header_mach_cthreads_h = yes; then
13831 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013832#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013833_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013834
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013836#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013837_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839
13840cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013841#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013842_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013843
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013844 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013845else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013846
Martin v. Löwiseba40652007-08-30 20:10:57 +000013847 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13848echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013849
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013851if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13853echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013854 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013855#define WITH_THREAD 1
13856_ACEOF
13857
13858
13859cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013860#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013861_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013862
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013863 LIBS="-lpth $LIBS"
13864 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013865else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866 { echo "$as_me:$LINENO: result: no" >&5
13867echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013868
13869 # Just looking for pthread_create in libpthread is not enough:
13870 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13871 # So we really have to include pthread.h, and then link.
13872 _libs=$LIBS
13873 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13875echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013877/* confdefs.h. */
13878_ACEOF
13879cat confdefs.h >>conftest.$ac_ext
13880cat >>conftest.$ac_ext <<_ACEOF
13881/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013882#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013883
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013884void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013885int
13886main ()
13887{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013888
13889pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 ;
13891 return 0;
13892}
13893_ACEOF
13894rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013895if { (ac_try="$ac_link"
13896case "(($ac_try" in
13897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13898 *) ac_try_echo=$ac_try;;
13899esac
13900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13901 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013903 grep -v '^ *+' conftest.er1 >conftest.err
13904 rm -f conftest.er1
13905 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013907 (exit $ac_status); } && {
13908 test -z "$ac_c_werror_flag" ||
13909 test ! -s conftest.err
13910 } && test -s conftest$ac_exeext &&
13911 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013912
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913 { echo "$as_me:$LINENO: result: yes" >&5
13914echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013916#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013917_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013918
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013919 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013920 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013921else
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013923sed 's/^/| /' conftest.$ac_ext >&5
13924
Martin v. Löwis11437992002-04-12 09:54:03 +000013925
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013926 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13928echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013929if test "${ac_cv_func_pthread_detach+set}" = set; then
13930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013931else
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013933/* confdefs.h. */
13934_ACEOF
13935cat confdefs.h >>conftest.$ac_ext
13936cat >>conftest.$ac_ext <<_ACEOF
13937/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013938/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13939 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13940#define pthread_detach innocuous_pthread_detach
13941
Guido van Rossumad678af1998-10-02 14:42:15 +000013942/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013943 which can conflict with char pthread_detach (); below.
13944 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013945 <limits.h> exists even on freestanding compilers. */
13946
13947#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013948# include <limits.h>
13949#else
13950# include <assert.h>
13951#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013952
13953#undef pthread_detach
13954
Martin v. Löwiseba40652007-08-30 20:10:57 +000013955/* Override any GCC internal prototype to avoid an error.
13956 Use char because int might match the return type of a GCC
13957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013958#ifdef __cplusplus
13959extern "C"
13960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013961char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013962/* The GNU C library defines this for functions which it implements
13963 to always fail with ENOSYS. Some functions are actually named
13964 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013966choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013967#endif
13968
Skip Montanaro6dead952003-09-25 14:50:04 +000013969int
13970main ()
13971{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013972return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ;
13974 return 0;
13975}
13976_ACEOF
13977rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013978if { (ac_try="$ac_link"
13979case "(($ac_try" in
13980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13981 *) ac_try_echo=$ac_try;;
13982esac
13983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13984 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013986 grep -v '^ *+' conftest.er1 >conftest.err
13987 rm -f conftest.er1
13988 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990 (exit $ac_status); } && {
13991 test -z "$ac_c_werror_flag" ||
13992 test ! -s conftest.err
13993 } && test -s conftest$ac_exeext &&
13994 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013998sed 's/^/| /' conftest.$ac_ext >&5
13999
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002
14003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014004 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14007echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014008if test $ac_cv_func_pthread_detach = yes; then
14009 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014010#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014011_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014012
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014013 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014014 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014015else
Guido van Rossumad678af1998-10-02 14:42:15 +000014016
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014017 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014018 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14019echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014020if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14021 echo $ECHO_N "(cached) $ECHO_C" >&6
14022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14024echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014025else
14026 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014027{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14028echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014035$ac_includes_default
14036#include <atheos/threads.h>
14037_ACEOF
14038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014039if { (ac_try="$ac_compile"
14040case "(($ac_try" in
14041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14042 *) ac_try_echo=$ac_try;;
14043esac
14044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047 grep -v '^ *+' conftest.er1 >conftest.err
14048 rm -f conftest.er1
14049 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051 (exit $ac_status); } && {
14052 test -z "$ac_c_werror_flag" ||
14053 test ! -s conftest.err
14054 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014055 ac_header_compiler=yes
14056else
14057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014058sed 's/^/| /' conftest.$ac_ext >&5
14059
Martin v. Löwiseba40652007-08-30 20:10:57 +000014060 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062
14063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14064{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14065echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014066
14067# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14069echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014071/* confdefs.h. */
14072_ACEOF
14073cat confdefs.h >>conftest.$ac_ext
14074cat >>conftest.$ac_ext <<_ACEOF
14075/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014076#include <atheos/threads.h>
14077_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078if { (ac_try="$ac_cpp conftest.$ac_ext"
14079case "(($ac_try" in
14080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14081 *) ac_try_echo=$ac_try;;
14082esac
14083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14084 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014085 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014086 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014087 rm -f conftest.er1
14088 cat conftest.err >&5
14089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090 (exit $ac_status); } >/dev/null && {
14091 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14092 test ! -s conftest.err
14093 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014094 ac_header_preproc=yes
14095else
14096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014097sed 's/^/| /' conftest.$ac_ext >&5
14098
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014099 ac_header_preproc=no
14100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014102rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14104echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014105
14106# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014107case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14108 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014109 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14110echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014111 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14112echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14113 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014114 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014115 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014116 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14117echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014118 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14119echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14120 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14121echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14122 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14123echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014124 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14125echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014126 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14127echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014129## ------------------------------------------------ ##
14130## Report this to http://www.python.org/python-bugs ##
14131## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014132_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014133 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014134 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014135esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14137echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014138if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14139 echo $ECHO_N "(cached) $ECHO_C" >&6
14140else
14141 ac_cv_header_atheos_threads_h=$ac_header_preproc
14142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014143{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14144echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014145
14146fi
14147if test $ac_cv_header_atheos_threads_h = yes; then
14148 cat >>confdefs.h <<\_ACEOF
14149#define WITH_THREAD 1
14150_ACEOF
14151
14152
14153cat >>confdefs.h <<\_ACEOF
14154#define ATHEOS_THREADS 1
14155_ACEOF
14156
14157 THREADOBJ="Python/thread.o"
14158else
14159
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14162echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014163if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14164 echo $ECHO_N "(cached) $ECHO_C" >&6
14165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014166{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14167echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014168else
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014170{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14171echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014173/* confdefs.h. */
14174_ACEOF
14175cat confdefs.h >>conftest.$ac_ext
14176cat >>conftest.$ac_ext <<_ACEOF
14177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014178$ac_includes_default
14179#include <kernel/OS.h>
14180_ACEOF
14181rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014182if { (ac_try="$ac_compile"
14183case "(($ac_try" in
14184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14185 *) ac_try_echo=$ac_try;;
14186esac
14187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014190 grep -v '^ *+' conftest.er1 >conftest.err
14191 rm -f conftest.er1
14192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194 (exit $ac_status); } && {
14195 test -z "$ac_c_werror_flag" ||
14196 test ! -s conftest.err
14197 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 ac_header_compiler=yes
14199else
14200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014201sed 's/^/| /' conftest.$ac_ext >&5
14202
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014205
14206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14207{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14208echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014209
14210# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014211{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14212echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014214/* confdefs.h. */
14215_ACEOF
14216cat confdefs.h >>conftest.$ac_ext
14217cat >>conftest.$ac_ext <<_ACEOF
14218/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014219#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014220_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221if { (ac_try="$ac_cpp conftest.$ac_ext"
14222case "(($ac_try" in
14223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14224 *) ac_try_echo=$ac_try;;
14225esac
14226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14227 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014228 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014229 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 rm -f conftest.er1
14231 cat conftest.err >&5
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014233 (exit $ac_status); } >/dev/null && {
14234 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14235 test ! -s conftest.err
14236 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 ac_header_preproc=yes
14238else
14239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014240sed 's/^/| /' conftest.$ac_ext >&5
14241
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014244
Martin v. Löwis11437992002-04-12 09:54:03 +000014245rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014246{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14247echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014248
Martin v. Löwis11437992002-04-12 09:54:03 +000014249# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014250case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14251 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14253echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014254 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14255echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14256 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014257 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014258 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014259 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14260echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014261 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14262echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14263 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14264echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14265 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14266echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014267 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14268echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014269 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14270echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014271 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014272## ------------------------------------------------ ##
14273## Report this to http://www.python.org/python-bugs ##
14274## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014275_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014276 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014277 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014278esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014279{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14280echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014281if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14282 echo $ECHO_N "(cached) $ECHO_C" >&6
14283else
14284 ac_cv_header_kernel_OS_h=$ac_header_preproc
14285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014286{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14287echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014288
14289fi
14290if test $ac_cv_header_kernel_OS_h = yes; then
14291 cat >>confdefs.h <<\_ACEOF
14292#define WITH_THREAD 1
14293_ACEOF
14294
14295
14296cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014297#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014298_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014299
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014300 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014301else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014302
Martin v. Löwiseba40652007-08-30 20:10:57 +000014303 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14304echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014305if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014307else
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014309LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014311/* confdefs.h. */
14312_ACEOF
14313cat confdefs.h >>conftest.$ac_ext
14314cat >>conftest.$ac_ext <<_ACEOF
14315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014316
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317/* Override any GCC internal prototype to avoid an error.
14318 Use char because int might match the return type of a GCC
14319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014320#ifdef __cplusplus
14321extern "C"
14322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014323char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014324int
14325main ()
14326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014327return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014328 ;
14329 return 0;
14330}
14331_ACEOF
14332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333if { (ac_try="$ac_link"
14334case "(($ac_try" in
14335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14336 *) ac_try_echo=$ac_try;;
14337esac
14338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14339 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014341 grep -v '^ *+' conftest.er1 >conftest.err
14342 rm -f conftest.er1
14343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345 (exit $ac_status); } && {
14346 test -z "$ac_c_werror_flag" ||
14347 test ! -s conftest.err
14348 } && test -s conftest$ac_exeext &&
14349 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014351else
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014353sed 's/^/| /' conftest.$ac_ext >&5
14354
Martin v. Löwiseba40652007-08-30 20:10:57 +000014355 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014357
14358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014360LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14363echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014364if test $ac_cv_lib_pthreads_pthread_create = yes; then
14365 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014366#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014367_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014369 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014370 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014371 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014372else
Greg Steinadf63d62000-07-05 10:38:09 +000014373
Martin v. Löwiseba40652007-08-30 20:10:57 +000014374 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14375echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014376if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14377 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014378else
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014380LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014382/* confdefs.h. */
14383_ACEOF
14384cat confdefs.h >>conftest.$ac_ext
14385cat >>conftest.$ac_ext <<_ACEOF
14386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
Martin v. Löwiseba40652007-08-30 20:10:57 +000014388/* Override any GCC internal prototype to avoid an error.
14389 Use char because int might match the return type of a GCC
14390 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014391#ifdef __cplusplus
14392extern "C"
14393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014394char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014395int
14396main ()
14397{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014398return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ;
14400 return 0;
14401}
14402_ACEOF
14403rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404if { (ac_try="$ac_link"
14405case "(($ac_try" in
14406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14407 *) ac_try_echo=$ac_try;;
14408esac
14409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14410 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014412 grep -v '^ *+' conftest.er1 >conftest.err
14413 rm -f conftest.er1
14414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416 (exit $ac_status); } && {
14417 test -z "$ac_c_werror_flag" ||
14418 test ! -s conftest.err
14419 } && test -s conftest$ac_exeext &&
14420 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014422else
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014424sed 's/^/| /' conftest.$ac_ext >&5
14425
Martin v. Löwiseba40652007-08-30 20:10:57 +000014426 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428
14429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14434echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014435if test $ac_cv_lib_c_r_pthread_create = yes; then
14436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014438_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014440 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014441 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014442 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014443else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014444
Martin v. Löwiseba40652007-08-30 20:10:57 +000014445 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14446echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014447if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014449else
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014451LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014453/* confdefs.h. */
14454_ACEOF
14455cat confdefs.h >>conftest.$ac_ext
14456cat >>conftest.$ac_ext <<_ACEOF
14457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459/* Override any GCC internal prototype to avoid an error.
14460 Use char because int might match the return type of a GCC
14461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014462#ifdef __cplusplus
14463extern "C"
14464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014465char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014466int
14467main ()
14468{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014469return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 ;
14471 return 0;
14472}
14473_ACEOF
14474rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475if { (ac_try="$ac_link"
14476case "(($ac_try" in
14477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14478 *) ac_try_echo=$ac_try;;
14479esac
14480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14481 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014483 grep -v '^ *+' conftest.er1 >conftest.err
14484 rm -f conftest.er1
14485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487 (exit $ac_status); } && {
14488 test -z "$ac_c_werror_flag" ||
14489 test ! -s conftest.err
14490 } && test -s conftest$ac_exeext &&
14491 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014493else
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014495sed 's/^/| /' conftest.$ac_ext >&5
14496
Martin v. Löwiseba40652007-08-30 20:10:57 +000014497 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499
14500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014501 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014502LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14505echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014506if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14507 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014508#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014509_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014510
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014511 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014512 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014513 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014514else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014515
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14517echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014518if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014520else
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014522LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014524/* confdefs.h. */
14525_ACEOF
14526cat confdefs.h >>conftest.$ac_ext
14527cat >>conftest.$ac_ext <<_ACEOF
14528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530/* Override any GCC internal prototype to avoid an error.
14531 Use char because int might match the return type of a GCC
14532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014533#ifdef __cplusplus
14534extern "C"
14535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014536char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014537int
14538main ()
14539{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014540return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ;
14542 return 0;
14543}
14544_ACEOF
14545rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546if { (ac_try="$ac_link"
14547case "(($ac_try" in
14548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14549 *) ac_try_echo=$ac_try;;
14550esac
14551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14552 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014554 grep -v '^ *+' conftest.er1 >conftest.err
14555 rm -f conftest.er1
14556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014558 (exit $ac_status); } && {
14559 test -z "$ac_c_werror_flag" ||
14560 test ! -s conftest.err
14561 } && test -s conftest$ac_exeext &&
14562 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014564else
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014566sed 's/^/| /' conftest.$ac_ext >&5
14567
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570
14571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014572 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014573LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014575{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14576echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014577if test $ac_cv_lib_cma_pthread_create = yes; then
14578 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014579#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014580_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014582 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014583 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014584 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014585else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014586
Martin v. Löwis130fb172001-07-19 11:00:41 +000014587 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014588fi
14589
Guido van Rossum627b2d71993-12-24 10:39:16 +000014590
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014591fi
14592
Guido van Rossum0be3e491997-05-22 20:33:33 +000014593fi
14594
Guido van Rossum49545951997-12-02 19:28:29 +000014595fi
14596
Guido van Rossumb93a8621998-05-07 13:27:32 +000014597fi
14598
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014599
Michael W. Hudson54241132001-12-07 15:38:26 +000014600fi
14601
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014602
14603fi
14604
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606
14607rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014608 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014609fi
14610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611fi
14612
14613
14614fi
14615
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014616
Michael W. Hudson54241132001-12-07 15:38:26 +000014617
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14619echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014620if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14621 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014622else
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014624LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014626/* confdefs.h. */
14627_ACEOF
14628cat confdefs.h >>conftest.$ac_ext
14629cat >>conftest.$ac_ext <<_ACEOF
14630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014631
Martin v. Löwiseba40652007-08-30 20:10:57 +000014632/* Override any GCC internal prototype to avoid an error.
14633 Use char because int might match the return type of a GCC
14634 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014635#ifdef __cplusplus
14636extern "C"
14637#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014638char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014639int
14640main ()
14641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014642return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 ;
14644 return 0;
14645}
14646_ACEOF
14647rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648if { (ac_try="$ac_link"
14649case "(($ac_try" in
14650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14651 *) ac_try_echo=$ac_try;;
14652esac
14653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14654 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014656 grep -v '^ *+' conftest.er1 >conftest.err
14657 rm -f conftest.er1
14658 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660 (exit $ac_status); } && {
14661 test -z "$ac_c_werror_flag" ||
14662 test ! -s conftest.err
14663 } && test -s conftest$ac_exeext &&
14664 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014665 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014666else
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014668sed 's/^/| /' conftest.$ac_ext >&5
14669
Martin v. Löwiseba40652007-08-30 20:10:57 +000014670 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014672
14673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014675LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014677{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14678echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014679if test $ac_cv_lib_mpc_usconfig = yes; then
14680 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014681#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014682_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014683
Martin v. Löwis130fb172001-07-19 11:00:41 +000014684 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014685 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014686 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014687fi
14688
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014689
Neal Norwitza978ab02002-11-02 16:58:05 +000014690 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14692echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014693if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14694 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014695else
Martin v. Löwis11437992002-04-12 09:54:03 +000014696 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014697LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014699/* confdefs.h. */
14700_ACEOF
14701cat confdefs.h >>conftest.$ac_ext
14702cat >>conftest.$ac_ext <<_ACEOF
14703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
Martin v. Löwiseba40652007-08-30 20:10:57 +000014705/* Override any GCC internal prototype to avoid an error.
14706 Use char because int might match the return type of a GCC
14707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014708#ifdef __cplusplus
14709extern "C"
14710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014711char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014712int
14713main ()
14714{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014715return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 ;
14717 return 0;
14718}
14719_ACEOF
14720rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721if { (ac_try="$ac_link"
14722case "(($ac_try" in
14723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14724 *) ac_try_echo=$ac_try;;
14725esac
14726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14727 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014729 grep -v '^ *+' conftest.er1 >conftest.err
14730 rm -f conftest.er1
14731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733 (exit $ac_status); } && {
14734 test -z "$ac_c_werror_flag" ||
14735 test ! -s conftest.err
14736 } && test -s conftest$ac_exeext &&
14737 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014739else
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014741sed 's/^/| /' conftest.$ac_ext >&5
14742
Martin v. Löwiseba40652007-08-30 20:10:57 +000014743 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745
14746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014750{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14751echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014752if test $ac_cv_lib_thread_thr_create = yes; then
14753 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014754#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014755_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014756
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014757 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014758 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014759 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014760fi
14761
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014762 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014763
Martin v. Löwis130fb172001-07-19 11:00:41 +000014764 if test "$USE_THREAD_MODULE" != "#"
14765 then
14766 # If the above checks didn't disable threads, (at least) OSF1
14767 # needs this '-threads' argument during linking.
14768 case $ac_sys_system in
14769 OSF1) LDLAST=-threads;;
14770 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014771 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014772fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014773
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014774if test "$posix_threads" = "yes"; then
14775 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014776
14777cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014778#define _POSIX_THREADS 1
14779_ACEOF
14780
14781 fi
14782
14783 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14784 case $ac_sys_system/$ac_sys_release in
14785 SunOS/5.6)
14786cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014787#define HAVE_PTHREAD_DESTRUCTOR 1
14788_ACEOF
14789
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014790 ;;
14791 SunOS/5.8)
14792cat >>confdefs.h <<\_ACEOF
14793#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14794_ACEOF
14795
14796 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014797 AIX/5)
14798cat >>confdefs.h <<\_ACEOF
14799#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14800_ACEOF
14801
14802 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014803 esac
14804
Martin v. Löwiseba40652007-08-30 20:10:57 +000014805 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14806echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014807 if test "${ac_cv_pthread_system_supported+set}" = set; then
14808 echo $ECHO_N "(cached) $ECHO_C" >&6
14809else
14810 if test "$cross_compiling" = yes; then
14811 ac_cv_pthread_system_supported=no
14812else
14813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014814/* confdefs.h. */
14815_ACEOF
14816cat confdefs.h >>conftest.$ac_ext
14817cat >>conftest.$ac_ext <<_ACEOF
14818/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014819#include <pthread.h>
14820 void *foo(void *parm) {
14821 return NULL;
14822 }
14823 main() {
14824 pthread_attr_t attr;
14825 pthread_t id;
14826 if (pthread_attr_init(&attr)) exit(-1);
14827 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14828 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14829 exit(0);
14830 }
14831_ACEOF
14832rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014833if { (ac_try="$ac_link"
14834case "(($ac_try" in
14835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14836 *) ac_try_echo=$ac_try;;
14837esac
14838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14839 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014840 ac_status=$?
14841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014843 { (case "(($ac_try" in
14844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14845 *) ac_try_echo=$ac_try;;
14846esac
14847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14848 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014849 ac_status=$?
14850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14851 (exit $ac_status); }; }; then
14852 ac_cv_pthread_system_supported=yes
14853else
14854 echo "$as_me: program exited with status $ac_status" >&5
14855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014856sed 's/^/| /' conftest.$ac_ext >&5
14857
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014858( exit $ac_status )
14859ac_cv_pthread_system_supported=no
14860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014861rm -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 +000014862fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014863
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864
14865
Guido van Rossum627b2d71993-12-24 10:39:16 +000014866fi
14867
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14869echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014870 if test "$ac_cv_pthread_system_supported" = "yes"; then
14871
14872cat >>confdefs.h <<\_ACEOF
14873#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14874_ACEOF
14875
14876 fi
14877
14878for ac_func in pthread_sigmask
14879do
14880as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014881{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14882echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14883if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014884 echo $ECHO_N "(cached) $ECHO_C" >&6
14885else
14886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014887/* confdefs.h. */
14888_ACEOF
14889cat confdefs.h >>conftest.$ac_ext
14890cat >>conftest.$ac_ext <<_ACEOF
14891/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014892/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14893 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14894#define $ac_func innocuous_$ac_func
14895
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014896/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014897 which can conflict with char $ac_func (); below.
14898 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014899 <limits.h> exists even on freestanding compilers. */
14900
14901#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014902# include <limits.h>
14903#else
14904# include <assert.h>
14905#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014906
14907#undef $ac_func
14908
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909/* Override any GCC internal prototype to avoid an error.
14910 Use char because int might match the return type of a GCC
14911 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014912#ifdef __cplusplus
14913extern "C"
14914#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014915char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014916/* The GNU C library defines this for functions which it implements
14917 to always fail with ENOSYS. Some functions are actually named
14918 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014919#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014920choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014921#endif
14922
Skip Montanaro6dead952003-09-25 14:50:04 +000014923int
14924main ()
14925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014927 ;
14928 return 0;
14929}
14930_ACEOF
14931rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932if { (ac_try="$ac_link"
14933case "(($ac_try" in
14934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14935 *) ac_try_echo=$ac_try;;
14936esac
14937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14938 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014940 grep -v '^ *+' conftest.er1 >conftest.err
14941 rm -f conftest.er1
14942 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944 (exit $ac_status); } && {
14945 test -z "$ac_c_werror_flag" ||
14946 test ! -s conftest.err
14947 } && test -s conftest$ac_exeext &&
14948 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014949 eval "$as_ac_var=yes"
14950else
14951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014952sed 's/^/| /' conftest.$ac_ext >&5
14953
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956
14957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014960ac_res=`eval echo '${'$as_ac_var'}'`
14961 { echo "$as_me:$LINENO: result: $ac_res" >&5
14962echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014963if test `eval echo '${'$as_ac_var'}'` = yes; then
14964 cat >>confdefs.h <<_ACEOF
14965#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14966_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014967 case $ac_sys_system in
14968 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014969
Jason Tishlerfac083d2003-07-22 15:20:49 +000014970cat >>confdefs.h <<\_ACEOF
14971#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14972_ACEOF
14973
14974 ;;
14975 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014976fi
14977done
14978
14979fi
14980
14981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014982# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014983
14984
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14986echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14987# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014988if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014990 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991 { echo "$as_me:$LINENO: result: no" >&5
14992echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014993 ipv6=no
14994 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995 *) { echo "$as_me:$LINENO: result: yes" >&5
14996echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014998#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014999_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015000
15001 ipv6=yes
15002 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015004else
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015006 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007 { echo "$as_me:$LINENO: result: no" >&5
15008echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015009 ipv6=no
15010
15011else
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015013/* confdefs.h. */
15014_ACEOF
15015cat confdefs.h >>conftest.$ac_ext
15016cat >>conftest.$ac_ext <<_ACEOF
15017/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015018 /* AF_INET6 available check */
15019#include <sys/types.h>
15020#include <sys/socket.h>
15021main()
15022{
15023 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15024 exit(1);
15025 else
15026 exit(0);
15027}
15028
Martin v. Löwis11437992002-04-12 09:54:03 +000015029_ACEOF
15030rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031if { (ac_try="$ac_link"
15032case "(($ac_try" in
15033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15034 *) ac_try_echo=$ac_try;;
15035esac
15036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15037 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 ac_status=$?
15039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041 { (case "(($ac_try" in
15042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15043 *) ac_try_echo=$ac_try;;
15044esac
15045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ac_status=$?
15048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15049 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050 { echo "$as_me:$LINENO: result: yes" >&5
15051echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015052 ipv6=yes
15053else
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 echo "$as_me: program exited with status $ac_status" >&5
15055echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015056sed 's/^/| /' conftest.$ac_ext >&5
15057
Martin v. Löwis11437992002-04-12 09:54:03 +000015058( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059{ echo "$as_me:$LINENO: result: no" >&5
15060echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015061 ipv6=no
15062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063rm -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 +000015064fi
15065
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066
15067
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015068if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015069 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15070echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015072/* confdefs.h. */
15073_ACEOF
15074cat confdefs.h >>conftest.$ac_ext
15075cat >>conftest.$ac_ext <<_ACEOF
15076/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015077#include <sys/types.h>
15078#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015079int
15080main ()
15081{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015082struct sockaddr_in6 x;
15083x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015084 ;
15085 return 0;
15086}
15087_ACEOF
15088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015089if { (ac_try="$ac_compile"
15090case "(($ac_try" in
15091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15092 *) ac_try_echo=$ac_try;;
15093esac
15094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015097 grep -v '^ *+' conftest.er1 >conftest.err
15098 rm -f conftest.er1
15099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015101 (exit $ac_status); } && {
15102 test -z "$ac_c_werror_flag" ||
15103 test ! -s conftest.err
15104 } && test -s conftest.$ac_objext; then
15105 { echo "$as_me:$LINENO: result: yes" >&5
15106echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015107 ipv6=yes
15108else
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015110sed 's/^/| /' conftest.$ac_ext >&5
15111
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112 { echo "$as_me:$LINENO: result: no" >&5
15113echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015114 ipv6=no
15115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015116
15117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015118fi
15119
15120if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015122#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015123_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015124
15125fi
15126
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127fi
15128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015129
15130ipv6type=unknown
15131ipv6lib=none
15132ipv6trylibc=no
15133
15134if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015135 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15136echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015137 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15138 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015139 case $i in
15140 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015142/* confdefs.h. */
15143_ACEOF
15144cat confdefs.h >>conftest.$ac_ext
15145cat >>conftest.$ac_ext <<_ACEOF
15146/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015147
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015148#include <netinet/in.h>
15149#ifdef IPV6_INRIA_VERSION
15150yes
15151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015152_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015154 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015155 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015156fi
15157rm -f conftest*
15158
15159 ;;
15160 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015162/* confdefs.h. */
15163_ACEOF
15164cat confdefs.h >>conftest.$ac_ext
15165cat >>conftest.$ac_ext <<_ACEOF
15166/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015167
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015168#include <netinet/in.h>
15169#ifdef __KAME__
15170yes
15171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015172_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015173if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015174 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015175 ipv6type=$i;
15176 ipv6lib=inet6
15177 ipv6libdir=/usr/local/v6/lib
15178 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015179fi
15180rm -f conftest*
15181
15182 ;;
15183 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015185/* confdefs.h. */
15186_ACEOF
15187cat confdefs.h >>conftest.$ac_ext
15188cat >>conftest.$ac_ext <<_ACEOF
15189/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015190
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015191#include <features.h>
15192#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15193yes
15194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015195_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015197 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015198 ipv6type=$i;
15199 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015200fi
15201rm -f conftest*
15202
15203 ;;
15204 linux-inet6)
15205 if test -d /usr/inet6; then
15206 ipv6type=$i
15207 ipv6lib=inet6
15208 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015209 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015210 fi
15211 ;;
15212 solaris)
15213 if test -f /etc/netconfig; then
15214 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15215 ipv6type=$i
15216 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015217 fi
15218 fi
15219 ;;
15220 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015222/* confdefs.h. */
15223_ACEOF
15224cat confdefs.h >>conftest.$ac_ext
15225cat >>conftest.$ac_ext <<_ACEOF
15226/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015227
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015228#include <sys/param.h>
15229#ifdef _TOSHIBA_INET6
15230yes
15231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015232_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015234 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015235 ipv6type=$i;
15236 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015237 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015238fi
15239rm -f conftest*
15240
15241 ;;
15242 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015244/* confdefs.h. */
15245_ACEOF
15246cat confdefs.h >>conftest.$ac_ext
15247cat >>conftest.$ac_ext <<_ACEOF
15248/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015249
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015250#include </usr/local/v6/include/sys/v6config.h>
15251#ifdef __V6D__
15252yes
15253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015254_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015256 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015257 ipv6type=$i;
15258 ipv6lib=v6;
15259 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015260 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015261fi
15262rm -f conftest*
15263
15264 ;;
15265 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015267/* confdefs.h. */
15268_ACEOF
15269cat confdefs.h >>conftest.$ac_ext
15270cat >>conftest.$ac_ext <<_ACEOF
15271/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015272
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015273#include <sys/param.h>
15274#ifdef _ZETA_MINAMI_INET6
15275yes
15276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015277_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015279 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015280 ipv6type=$i;
15281 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015282 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015283fi
15284rm -f conftest*
15285
15286 ;;
15287 esac
15288 if test "$ipv6type" != "unknown"; then
15289 break
15290 fi
15291 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15293echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015294fi
15295
15296if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15297 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15298 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15299 echo "using lib$ipv6lib"
15300 else
15301 if test $ipv6trylibc = "yes"; then
15302 echo "using libc"
15303 else
15304 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15305 echo "You need to fetch lib$ipv6lib.a from appropriate"
15306 echo 'ipv6 kit and compile beforehand.'
15307 exit 1
15308 fi
15309 fi
15310fi
15311
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015312# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15314echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015317if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318 withval=$with_doc_strings;
15319fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015320
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015321
15322if test -z "$with_doc_strings"
15323then with_doc_strings="yes"
15324fi
15325if test "$with_doc_strings" != "no"
15326then
15327
15328cat >>confdefs.h <<\_ACEOF
15329#define WITH_DOC_STRINGS 1
15330_ACEOF
15331
15332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15334echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015335
Neil Schemenauera35c6882001-02-27 04:45:05 +000015336# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015337{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15338echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015339
Martin v. Löwiseba40652007-08-30 20:10:57 +000015340# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015341if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015343if test "$withval" != no
15344then
15345
15346cat >>confdefs.h <<\_ACEOF
15347#define WITH_TSC 1
15348_ACEOF
15349
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350 { echo "$as_me:$LINENO: result: yes" >&5
15351echo "${ECHO_T}yes" >&6; }
15352else { echo "$as_me:$LINENO: result: no" >&5
15353echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015354fi
15355else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356 { echo "$as_me:$LINENO: result: no" >&5
15357echo "${ECHO_T}no" >&6; }
15358fi
15359
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015360
15361# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15363echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015364
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015366if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367 withval=$with_pymalloc;
15368fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015369
Neil Schemenauera35c6882001-02-27 04:45:05 +000015370
Neil Schemenauer16c22972002-03-22 15:34:49 +000015371if test -z "$with_pymalloc"
15372then with_pymalloc="yes"
15373fi
15374if test "$with_pymalloc" != "no"
15375then
Martin v. Löwis11437992002-04-12 09:54:03 +000015376
15377cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015378#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015379_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015380
15381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15383echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015384
Barry Warsawef82cd72000-06-30 16:21:01 +000015385# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15387echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
Martin v. Löwiseba40652007-08-30 20:10:57 +000015389# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015390if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015393then
15394
15395cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015396#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015397_ACEOF
15398
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399 { echo "$as_me:$LINENO: result: yes" >&5
15400echo "${ECHO_T}yes" >&6; }
15401else { echo "$as_me:$LINENO: result: no" >&5
15402echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015403fi
15404else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405 { echo "$as_me:$LINENO: result: no" >&5
15406echo "${ECHO_T}no" >&6; }
15407fi
15408
Barry Warsawef82cd72000-06-30 16:21:01 +000015409
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015410# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015411
Guido van Rossum98935bf2001-09-05 19:13:16 +000015412DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015413
Guido van Rossume97ee181999-12-20 21:27:22 +000015414# the dlopen() function means we might want to use dynload_shlib.o. some
15415# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
Thomas Wouters3a584202000-08-05 23:28:51 +000015417for ac_func in dlopen
15418do
Martin v. Löwis11437992002-04-12 09:54:03 +000015419as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15421echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15422if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015424else
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015426/* confdefs.h. */
15427_ACEOF
15428cat confdefs.h >>conftest.$ac_ext
15429cat >>conftest.$ac_ext <<_ACEOF
15430/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015431/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15432 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15433#define $ac_func innocuous_$ac_func
15434
Guido van Rossume97ee181999-12-20 21:27:22 +000015435/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015436 which can conflict with char $ac_func (); below.
15437 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015438 <limits.h> exists even on freestanding compilers. */
15439
15440#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015441# include <limits.h>
15442#else
15443# include <assert.h>
15444#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015445
15446#undef $ac_func
15447
Martin v. Löwiseba40652007-08-30 20:10:57 +000015448/* Override any GCC internal prototype to avoid an error.
15449 Use char because int might match the return type of a GCC
15450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015451#ifdef __cplusplus
15452extern "C"
15453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015454char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015455/* The GNU C library defines this for functions which it implements
15456 to always fail with ENOSYS. Some functions are actually named
15457 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015458#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015459choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015460#endif
15461
Skip Montanaro6dead952003-09-25 14:50:04 +000015462int
15463main ()
15464{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471if { (ac_try="$ac_link"
15472case "(($ac_try" in
15473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15474 *) ac_try_echo=$ac_try;;
15475esac
15476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015479 grep -v '^ *+' conftest.er1 >conftest.err
15480 rm -f conftest.er1
15481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483 (exit $ac_status); } && {
15484 test -z "$ac_c_werror_flag" ||
15485 test ! -s conftest.err
15486 } && test -s conftest$ac_exeext &&
15487 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015489else
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015491sed 's/^/| /' conftest.$ac_ext >&5
15492
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015495
15496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015497 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015499ac_res=`eval echo '${'$as_ac_var'}'`
15500 { echo "$as_me:$LINENO: result: $ac_res" >&5
15501echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015502if test `eval echo '${'$as_ac_var'}'` = yes; then
15503 cat >>confdefs.h <<_ACEOF
15504#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15505_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015506
Guido van Rossume97ee181999-12-20 21:27:22 +000015507fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015508done
Guido van Rossume97ee181999-12-20 21:27:22 +000015509
Michael W. Hudson54241132001-12-07 15:38:26 +000015510
Guido van Rossume97ee181999-12-20 21:27:22 +000015511# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15512# loading of modules.
15513
Martin v. Löwiseba40652007-08-30 20:10:57 +000015514{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15515echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015516if test -z "$DYNLOADFILE"
15517then
15518 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015519 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15520 if test "$ac_cv_func_dlopen" = yes
15521 then DYNLOADFILE="dynload_shlib.o"
15522 else DYNLOADFILE="dynload_aix.o"
15523 fi
15524 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015525 BeOS*) DYNLOADFILE="dynload_beos.o";;
15526 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015527 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15528 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015529 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015530 *)
15531 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15532 # out any dynamic loading
15533 if test "$ac_cv_func_dlopen" = yes
15534 then DYNLOADFILE="dynload_shlib.o"
15535 else DYNLOADFILE="dynload_stub.o"
15536 fi
15537 ;;
15538 esac
15539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15541echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015542if test "$DYNLOADFILE" != "dynload_stub.o"
15543then
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
15545cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015546#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015547_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015548
15549fi
15550
Neil Schemenauer4e425612001-06-19 15:44:15 +000015551# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15552
Michael W. Hudson54241132001-12-07 15:38:26 +000015553
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15555echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015556if test -z "$MACHDEP_OBJS"
15557then
Jack Jansene578a632001-08-15 01:27:14 +000015558 MACHDEP_OBJS=$extra_machdep_objs
15559else
15560 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015562{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15563echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015564
Guido van Rossum627b2d71993-12-24 10:39:16 +000015565# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
Martin v. Löwisd6320502004-08-12 13:45:08 +000015637
Martin v. Löwisc3001752005-01-23 09:27:24 +000015638
15639
Neal Norwitz05a45592006-03-20 06:30:08 +000015640
15641
Martin v. Löwis382abef2007-02-19 10:55:19 +000015642
15643
Christian Heimes36281872007-11-30 21:11:28 +000015644
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015645
15646
15647for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15648 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015649 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015650 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015651 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015652 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015653 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015654 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015655 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015656 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015657 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015658 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015659do
Martin v. Löwis11437992002-04-12 09:54:03 +000015660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15663if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015665else
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015667/* confdefs.h. */
15668_ACEOF
15669cat confdefs.h >>conftest.$ac_ext
15670cat >>conftest.$ac_ext <<_ACEOF
15671/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15673 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15674#define $ac_func innocuous_$ac_func
15675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015677 which can conflict with char $ac_func (); below.
15678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015679 <limits.h> exists even on freestanding compilers. */
15680
15681#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015682# include <limits.h>
15683#else
15684# include <assert.h>
15685#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015686
15687#undef $ac_func
15688
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689/* Override any GCC internal prototype to avoid an error.
15690 Use char because int might match the return type of a GCC
15691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015692#ifdef __cplusplus
15693extern "C"
15694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015695char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015696/* The GNU C library defines this for functions which it implements
15697 to always fail with ENOSYS. Some functions are actually named
15698 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015699#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015700choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015701#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015702
Skip Montanaro6dead952003-09-25 14:50:04 +000015703int
15704main ()
15705{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 ;
15708 return 0;
15709}
15710_ACEOF
15711rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712if { (ac_try="$ac_link"
15713case "(($ac_try" in
15714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15715 *) ac_try_echo=$ac_try;;
15716esac
15717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15718 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015720 grep -v '^ *+' conftest.er1 >conftest.err
15721 rm -f conftest.er1
15722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 (exit $ac_status); } && {
15725 test -z "$ac_c_werror_flag" ||
15726 test ! -s conftest.err
15727 } && test -s conftest$ac_exeext &&
15728 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015730else
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015732sed 's/^/| /' conftest.$ac_ext >&5
15733
Martin v. Löwiseba40652007-08-30 20:10:57 +000015734 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015736
15737rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015738 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015740ac_res=`eval echo '${'$as_ac_var'}'`
15741 { echo "$as_me:$LINENO: result: $ac_res" >&5
15742echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015743if test `eval echo '${'$as_ac_var'}'` = yes; then
15744 cat >>confdefs.h <<_ACEOF
15745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15746_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015747
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015748fi
15749done
15750
Michael W. Hudson54241132001-12-07 15:38:26 +000015751
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015752# For some functions, having a definition is not sufficient, since
15753# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754{ echo "$as_me:$LINENO: checking for chroot" >&5
15755echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015757/* confdefs.h. */
15758_ACEOF
15759cat confdefs.h >>conftest.$ac_ext
15760cat >>conftest.$ac_ext <<_ACEOF
15761/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015762#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015763int
15764main ()
15765{
15766void *x=chroot
15767 ;
15768 return 0;
15769}
15770_ACEOF
15771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772if { (ac_try="$ac_compile"
15773case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
15777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015780 grep -v '^ *+' conftest.er1 >conftest.err
15781 rm -f conftest.er1
15782 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784 (exit $ac_status); } && {
15785 test -z "$ac_c_werror_flag" ||
15786 test ! -s conftest.err
15787 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015788
15789cat >>confdefs.h <<\_ACEOF
15790#define HAVE_CHROOT 1
15791_ACEOF
15792
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793 { echo "$as_me:$LINENO: result: yes" >&5
15794echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015795else
15796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015797sed 's/^/| /' conftest.$ac_ext >&5
15798
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 { echo "$as_me:$LINENO: result: no" >&5
15800echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015801
15802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803
15804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15805{ echo "$as_me:$LINENO: checking for link" >&5
15806echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015808/* confdefs.h. */
15809_ACEOF
15810cat confdefs.h >>conftest.$ac_ext
15811cat >>conftest.$ac_ext <<_ACEOF
15812/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015813#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015814int
15815main ()
15816{
15817void *x=link
15818 ;
15819 return 0;
15820}
15821_ACEOF
15822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823if { (ac_try="$ac_compile"
15824case "(($ac_try" in
15825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15826 *) ac_try_echo=$ac_try;;
15827esac
15828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015831 grep -v '^ *+' conftest.er1 >conftest.err
15832 rm -f conftest.er1
15833 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835 (exit $ac_status); } && {
15836 test -z "$ac_c_werror_flag" ||
15837 test ! -s conftest.err
15838 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015839
15840cat >>confdefs.h <<\_ACEOF
15841#define HAVE_LINK 1
15842_ACEOF
15843
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844 { echo "$as_me:$LINENO: result: yes" >&5
15845echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015846else
15847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015848sed 's/^/| /' conftest.$ac_ext >&5
15849
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 { echo "$as_me:$LINENO: result: no" >&5
15851echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015852
15853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854
15855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15856{ echo "$as_me:$LINENO: checking for symlink" >&5
15857echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015859/* confdefs.h. */
15860_ACEOF
15861cat confdefs.h >>conftest.$ac_ext
15862cat >>conftest.$ac_ext <<_ACEOF
15863/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015864#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015865int
15866main ()
15867{
15868void *x=symlink
15869 ;
15870 return 0;
15871}
15872_ACEOF
15873rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874if { (ac_try="$ac_compile"
15875case "(($ac_try" in
15876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15877 *) ac_try_echo=$ac_try;;
15878esac
15879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015882 grep -v '^ *+' conftest.er1 >conftest.err
15883 rm -f conftest.er1
15884 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015886 (exit $ac_status); } && {
15887 test -z "$ac_c_werror_flag" ||
15888 test ! -s conftest.err
15889 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015890
15891cat >>confdefs.h <<\_ACEOF
15892#define HAVE_SYMLINK 1
15893_ACEOF
15894
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895 { echo "$as_me:$LINENO: result: yes" >&5
15896echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015897else
15898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015899sed 's/^/| /' conftest.$ac_ext >&5
15900
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901 { echo "$as_me:$LINENO: result: no" >&5
15902echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015903
15904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905
15906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15907{ echo "$as_me:$LINENO: checking for fchdir" >&5
15908echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015910/* confdefs.h. */
15911_ACEOF
15912cat confdefs.h >>conftest.$ac_ext
15913cat >>conftest.$ac_ext <<_ACEOF
15914/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015915#include <unistd.h>
15916int
15917main ()
15918{
15919void *x=fchdir
15920 ;
15921 return 0;
15922}
15923_ACEOF
15924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925if { (ac_try="$ac_compile"
15926case "(($ac_try" in
15927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15928 *) ac_try_echo=$ac_try;;
15929esac
15930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015933 grep -v '^ *+' conftest.er1 >conftest.err
15934 rm -f conftest.er1
15935 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937 (exit $ac_status); } && {
15938 test -z "$ac_c_werror_flag" ||
15939 test ! -s conftest.err
15940 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015941
15942cat >>confdefs.h <<\_ACEOF
15943#define HAVE_FCHDIR 1
15944_ACEOF
15945
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946 { echo "$as_me:$LINENO: result: yes" >&5
15947echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015948else
15949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015950sed 's/^/| /' conftest.$ac_ext >&5
15951
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952 { echo "$as_me:$LINENO: result: no" >&5
15953echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015954
15955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956
15957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15958{ echo "$as_me:$LINENO: checking for fsync" >&5
15959echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015961/* confdefs.h. */
15962_ACEOF
15963cat confdefs.h >>conftest.$ac_ext
15964cat >>conftest.$ac_ext <<_ACEOF
15965/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015966#include <unistd.h>
15967int
15968main ()
15969{
15970void *x=fsync
15971 ;
15972 return 0;
15973}
15974_ACEOF
15975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976if { (ac_try="$ac_compile"
15977case "(($ac_try" in
15978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15979 *) ac_try_echo=$ac_try;;
15980esac
15981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984 grep -v '^ *+' conftest.er1 >conftest.err
15985 rm -f conftest.er1
15986 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988 (exit $ac_status); } && {
15989 test -z "$ac_c_werror_flag" ||
15990 test ! -s conftest.err
15991 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015992
15993cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015994#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015995_ACEOF
15996
Martin v. Löwiseba40652007-08-30 20:10:57 +000015997 { echo "$as_me:$LINENO: result: yes" >&5
15998echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015999else
16000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016001sed 's/^/| /' conftest.$ac_ext >&5
16002
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003 { echo "$as_me:$LINENO: result: no" >&5
16004echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016005
16006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016007
16008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16009{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16010echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016012/* confdefs.h. */
16013_ACEOF
16014cat confdefs.h >>conftest.$ac_ext
16015cat >>conftest.$ac_ext <<_ACEOF
16016/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016017#include <unistd.h>
16018int
16019main ()
16020{
16021void *x=fdatasync
16022 ;
16023 return 0;
16024}
16025_ACEOF
16026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016027if { (ac_try="$ac_compile"
16028case "(($ac_try" in
16029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16030 *) ac_try_echo=$ac_try;;
16031esac
16032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016035 grep -v '^ *+' conftest.er1 >conftest.err
16036 rm -f conftest.er1
16037 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016039 (exit $ac_status); } && {
16040 test -z "$ac_c_werror_flag" ||
16041 test ! -s conftest.err
16042 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016043
16044cat >>confdefs.h <<\_ACEOF
16045#define HAVE_FDATASYNC 1
16046_ACEOF
16047
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048 { echo "$as_me:$LINENO: result: yes" >&5
16049echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016050else
16051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016052sed 's/^/| /' conftest.$ac_ext >&5
16053
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054 { echo "$as_me:$LINENO: result: no" >&5
16055echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016056
16057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058
16059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016060{ echo "$as_me:$LINENO: checking for epoll" >&5
16061echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16062cat >conftest.$ac_ext <<_ACEOF
16063/* confdefs.h. */
16064_ACEOF
16065cat confdefs.h >>conftest.$ac_ext
16066cat >>conftest.$ac_ext <<_ACEOF
16067/* end confdefs.h. */
16068#include <sys/epoll.h>
16069int
16070main ()
16071{
16072void *x=epoll_create
16073 ;
16074 return 0;
16075}
16076_ACEOF
16077rm -f conftest.$ac_objext
16078if { (ac_try="$ac_compile"
16079case "(($ac_try" in
16080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16081 *) ac_try_echo=$ac_try;;
16082esac
16083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16084 (eval "$ac_compile") 2>conftest.er1
16085 ac_status=$?
16086 grep -v '^ *+' conftest.er1 >conftest.err
16087 rm -f conftest.er1
16088 cat conftest.err >&5
16089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16090 (exit $ac_status); } && {
16091 test -z "$ac_c_werror_flag" ||
16092 test ! -s conftest.err
16093 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016094
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016095cat >>confdefs.h <<\_ACEOF
16096#define HAVE_EPOLL 1
16097_ACEOF
16098
16099 { echo "$as_me:$LINENO: result: yes" >&5
16100echo "${ECHO_T}yes" >&6; }
16101else
16102 echo "$as_me: failed program was:" >&5
16103sed 's/^/| /' conftest.$ac_ext >&5
16104
16105 { echo "$as_me:$LINENO: result: no" >&5
16106echo "${ECHO_T}no" >&6; }
16107
16108fi
16109
16110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16111{ echo "$as_me:$LINENO: checking for kqueue" >&5
16112echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16113cat >conftest.$ac_ext <<_ACEOF
16114/* confdefs.h. */
16115_ACEOF
16116cat confdefs.h >>conftest.$ac_ext
16117cat >>conftest.$ac_ext <<_ACEOF
16118/* end confdefs.h. */
16119
16120#include <sys/types.h>
16121#include <sys/event.h>
16122
16123int
16124main ()
16125{
16126int x=kqueue()
16127 ;
16128 return 0;
16129}
16130_ACEOF
16131rm -f conftest.$ac_objext
16132if { (ac_try="$ac_compile"
16133case "(($ac_try" in
16134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16135 *) ac_try_echo=$ac_try;;
16136esac
16137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16138 (eval "$ac_compile") 2>conftest.er1
16139 ac_status=$?
16140 grep -v '^ *+' conftest.er1 >conftest.err
16141 rm -f conftest.er1
16142 cat conftest.err >&5
16143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16144 (exit $ac_status); } && {
16145 test -z "$ac_c_werror_flag" ||
16146 test ! -s conftest.err
16147 } && test -s conftest.$ac_objext; then
16148
16149cat >>confdefs.h <<\_ACEOF
16150#define HAVE_KQUEUE 1
16151_ACEOF
16152
16153 { echo "$as_me:$LINENO: result: yes" >&5
16154echo "${ECHO_T}yes" >&6; }
16155else
16156 echo "$as_me: failed program was:" >&5
16157sed 's/^/| /' conftest.$ac_ext >&5
16158
16159 { echo "$as_me:$LINENO: result: no" >&5
16160echo "${ECHO_T}no" >&6; }
16161
16162fi
16163
16164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016165# On some systems (eg. FreeBSD 5), we would find a definition of the
16166# functions ctermid_r, setgroups in the library, but no prototype
16167# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16168# address to avoid compiler warnings and potential miscompilations
16169# because of the missing prototypes.
16170
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16172echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016174/* confdefs.h. */
16175_ACEOF
16176cat confdefs.h >>conftest.$ac_ext
16177cat >>conftest.$ac_ext <<_ACEOF
16178/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016179
16180#include "confdefs.h"
16181#include <stdio.h>
16182
Martin v. Löwisd5843682002-11-21 20:41:28 +000016183int
16184main ()
16185{
16186void* p = ctermid_r
16187 ;
16188 return 0;
16189}
16190_ACEOF
16191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016192if { (ac_try="$ac_compile"
16193case "(($ac_try" in
16194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16195 *) ac_try_echo=$ac_try;;
16196esac
16197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016200 grep -v '^ *+' conftest.er1 >conftest.err
16201 rm -f conftest.er1
16202 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204 (exit $ac_status); } && {
16205 test -z "$ac_c_werror_flag" ||
16206 test ! -s conftest.err
16207 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016208
16209cat >>confdefs.h <<\_ACEOF
16210#define HAVE_CTERMID_R 1
16211_ACEOF
16212
Martin v. Löwiseba40652007-08-30 20:10:57 +000016213 { echo "$as_me:$LINENO: result: yes" >&5
16214echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016215else
16216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016217sed 's/^/| /' conftest.$ac_ext >&5
16218
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219 { echo "$as_me:$LINENO: result: no" >&5
16220echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016221
16222fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016223
Martin v. Löwiseba40652007-08-30 20:10:57 +000016224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16225
16226{ echo "$as_me:$LINENO: checking for flock" >&5
16227echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016229/* confdefs.h. */
16230_ACEOF
16231cat confdefs.h >>conftest.$ac_ext
16232cat >>conftest.$ac_ext <<_ACEOF
16233/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016234
16235#include "confdefs.h"
16236#include <sys/file.h>
16237
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016238int
16239main ()
16240{
16241void* p = flock
16242 ;
16243 return 0;
16244}
16245_ACEOF
16246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016247if { (ac_try="$ac_compile"
16248case "(($ac_try" in
16249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16250 *) ac_try_echo=$ac_try;;
16251esac
16252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016255 grep -v '^ *+' conftest.er1 >conftest.err
16256 rm -f conftest.er1
16257 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259 (exit $ac_status); } && {
16260 test -z "$ac_c_werror_flag" ||
16261 test ! -s conftest.err
16262 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016263
16264cat >>confdefs.h <<\_ACEOF
16265#define HAVE_FLOCK 1
16266_ACEOF
16267
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268 { echo "$as_me:$LINENO: result: yes" >&5
16269echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016270else
16271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016272sed 's/^/| /' conftest.$ac_ext >&5
16273
Martin v. Löwiseba40652007-08-30 20:10:57 +000016274 { echo "$as_me:$LINENO: result: no" >&5
16275echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016276
16277fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016278
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16280
16281{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16282echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016284/* confdefs.h. */
16285_ACEOF
16286cat confdefs.h >>conftest.$ac_ext
16287cat >>conftest.$ac_ext <<_ACEOF
16288/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016289
16290#include "confdefs.h"
16291#include <unistd.h>
16292
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016293int
16294main ()
16295{
16296void* p = getpagesize
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302if { (ac_try="$ac_compile"
16303case "(($ac_try" in
16304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16305 *) ac_try_echo=$ac_try;;
16306esac
16307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016310 grep -v '^ *+' conftest.er1 >conftest.err
16311 rm -f conftest.er1
16312 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016314 (exit $ac_status); } && {
16315 test -z "$ac_c_werror_flag" ||
16316 test ! -s conftest.err
16317 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016318
16319cat >>confdefs.h <<\_ACEOF
16320#define HAVE_GETPAGESIZE 1
16321_ACEOF
16322
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323 { echo "$as_me:$LINENO: result: yes" >&5
16324echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016325else
16326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016327sed 's/^/| /' conftest.$ac_ext >&5
16328
Martin v. Löwiseba40652007-08-30 20:10:57 +000016329 { echo "$as_me:$LINENO: result: no" >&5
16330echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016331
16332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016333
16334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016335
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016336for ac_prog in true
16337do
16338 # Extract the first word of "$ac_prog", so it can be a program name with args.
16339set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016340{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16341echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016342if test "${ac_cv_prog_TRUE+set}" = set; then
16343 echo $ECHO_N "(cached) $ECHO_C" >&6
16344else
16345 if test -n "$TRUE"; then
16346 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16347else
16348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16349for as_dir in $PATH
16350do
16351 IFS=$as_save_IFS
16352 test -z "$as_dir" && as_dir=.
16353 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016354 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 +000016355 ac_cv_prog_TRUE="$ac_prog"
16356 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16357 break 2
16358 fi
16359done
16360done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016362
16363fi
16364fi
16365TRUE=$ac_cv_prog_TRUE
16366if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367 { echo "$as_me:$LINENO: result: $TRUE" >&5
16368echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016369else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 { echo "$as_me:$LINENO: result: no" >&5
16371echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016372fi
16373
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016375 test -n "$TRUE" && break
16376done
16377test -n "$TRUE" || TRUE="/bin/true"
16378
16379
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16381echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016382if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16383 echo $ECHO_N "(cached) $ECHO_C" >&6
16384else
16385 ac_check_lib_save_LIBS=$LIBS
16386LIBS="-lc $LIBS"
16387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016388/* confdefs.h. */
16389_ACEOF
16390cat confdefs.h >>conftest.$ac_ext
16391cat >>conftest.$ac_ext <<_ACEOF
16392/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016393
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394/* Override any GCC internal prototype to avoid an error.
16395 Use char because int might match the return type of a GCC
16396 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016397#ifdef __cplusplus
16398extern "C"
16399#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016400char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016401int
16402main ()
16403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016405 ;
16406 return 0;
16407}
16408_ACEOF
16409rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016410if { (ac_try="$ac_link"
16411case "(($ac_try" in
16412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16413 *) ac_try_echo=$ac_try;;
16414esac
16415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016418 grep -v '^ *+' conftest.er1 >conftest.err
16419 rm -f conftest.er1
16420 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016422 (exit $ac_status); } && {
16423 test -z "$ac_c_werror_flag" ||
16424 test ! -s conftest.err
16425 } && test -s conftest$ac_exeext &&
16426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016427 ac_cv_lib_c_inet_aton=yes
16428else
16429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016430sed 's/^/| /' conftest.$ac_ext >&5
16431
Martin v. Löwiseba40652007-08-30 20:10:57 +000016432 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434
16435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016437LIBS=$ac_check_lib_save_LIBS
16438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016439{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16440echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016441if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016442 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016443else
16444
Martin v. Löwiseba40652007-08-30 20:10:57 +000016445{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16446echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016447if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16448 echo $ECHO_N "(cached) $ECHO_C" >&6
16449else
16450 ac_check_lib_save_LIBS=$LIBS
16451LIBS="-lresolv $LIBS"
16452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016453/* confdefs.h. */
16454_ACEOF
16455cat confdefs.h >>conftest.$ac_ext
16456cat >>conftest.$ac_ext <<_ACEOF
16457/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016458
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459/* Override any GCC internal prototype to avoid an error.
16460 Use char because int might match the return type of a GCC
16461 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016462#ifdef __cplusplus
16463extern "C"
16464#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016465char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016466int
16467main ()
16468{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016469return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016470 ;
16471 return 0;
16472}
16473_ACEOF
16474rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016475if { (ac_try="$ac_link"
16476case "(($ac_try" in
16477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16478 *) ac_try_echo=$ac_try;;
16479esac
16480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16481 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016483 grep -v '^ *+' conftest.er1 >conftest.err
16484 rm -f conftest.er1
16485 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016487 (exit $ac_status); } && {
16488 test -z "$ac_c_werror_flag" ||
16489 test ! -s conftest.err
16490 } && test -s conftest$ac_exeext &&
16491 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016492 ac_cv_lib_resolv_inet_aton=yes
16493else
16494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016495sed 's/^/| /' conftest.$ac_ext >&5
16496
Martin v. Löwiseba40652007-08-30 20:10:57 +000016497 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016499
16500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016501 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016502LIBS=$ac_check_lib_save_LIBS
16503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016504{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16505echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016506if test $ac_cv_lib_resolv_inet_aton = yes; then
16507 cat >>confdefs.h <<_ACEOF
16508#define HAVE_LIBRESOLV 1
16509_ACEOF
16510
16511 LIBS="-lresolv $LIBS"
16512
16513fi
16514
16515
16516fi
16517
16518
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016519# On Tru64, chflags seems to be present, but calling it will
16520# exit Python
16521{ echo "$as_me:$LINENO: checking for chflags" >&5
16522echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16523if test "$cross_compiling" = yes; then
16524 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16525See \`config.log' for more details." >&5
16526echo "$as_me: error: cannot run test program while cross compiling
16527See \`config.log' for more details." >&2;}
16528 { (exit 1); exit 1; }; }
16529else
16530 cat >conftest.$ac_ext <<_ACEOF
16531/* confdefs.h. */
16532_ACEOF
16533cat confdefs.h >>conftest.$ac_ext
16534cat >>conftest.$ac_ext <<_ACEOF
16535/* end confdefs.h. */
16536
16537#include <sys/stat.h>
16538#include <unistd.h>
16539int main(int argc, char*argv[])
16540{
16541 if(chflags(argv[0], 0) != 0)
16542 return 1;
16543 return 0;
16544}
16545
16546_ACEOF
16547rm -f conftest$ac_exeext
16548if { (ac_try="$ac_link"
16549case "(($ac_try" in
16550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16551 *) ac_try_echo=$ac_try;;
16552esac
16553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16554 (eval "$ac_link") 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16558 { (case "(($ac_try" in
16559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16560 *) ac_try_echo=$ac_try;;
16561esac
16562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16563 (eval "$ac_try") 2>&5
16564 ac_status=$?
16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); }; }; then
16567
16568cat >>confdefs.h <<\_ACEOF
16569#define HAVE_CHFLAGS 1
16570_ACEOF
16571
16572 { echo "$as_me:$LINENO: result: yes" >&5
16573echo "${ECHO_T}yes" >&6; }
16574else
16575 echo "$as_me: program exited with status $ac_status" >&5
16576echo "$as_me: failed program was:" >&5
16577sed 's/^/| /' conftest.$ac_ext >&5
16578
16579( exit $ac_status )
16580{ echo "$as_me:$LINENO: result: no" >&5
16581echo "${ECHO_T}no" >&6; }
16582
16583fi
16584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16585fi
16586
16587
16588
16589{ echo "$as_me:$LINENO: checking for lchflags" >&5
16590echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16591if test "$cross_compiling" = yes; then
16592 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16593See \`config.log' for more details." >&5
16594echo "$as_me: error: cannot run test program while cross compiling
16595See \`config.log' for more details." >&2;}
16596 { (exit 1); exit 1; }; }
16597else
16598 cat >conftest.$ac_ext <<_ACEOF
16599/* confdefs.h. */
16600_ACEOF
16601cat confdefs.h >>conftest.$ac_ext
16602cat >>conftest.$ac_ext <<_ACEOF
16603/* end confdefs.h. */
16604
16605#include <sys/stat.h>
16606#include <unistd.h>
16607int main(int argc, char*argv[])
16608{
16609 if(lchflags(argv[0], 0) != 0)
16610 return 1;
16611 return 0;
16612}
16613
16614_ACEOF
16615rm -f conftest$ac_exeext
16616if { (ac_try="$ac_link"
16617case "(($ac_try" in
16618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16619 *) ac_try_echo=$ac_try;;
16620esac
16621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16622 (eval "$ac_link") 2>&5
16623 ac_status=$?
16624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16626 { (case "(($ac_try" in
16627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16628 *) ac_try_echo=$ac_try;;
16629esac
16630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16631 (eval "$ac_try") 2>&5
16632 ac_status=$?
16633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16634 (exit $ac_status); }; }; then
16635
16636cat >>confdefs.h <<\_ACEOF
16637#define HAVE_LCHFLAGS 1
16638_ACEOF
16639
16640 { echo "$as_me:$LINENO: result: yes" >&5
16641echo "${ECHO_T}yes" >&6; }
16642else
16643 echo "$as_me: program exited with status $ac_status" >&5
16644echo "$as_me: failed program was:" >&5
16645sed 's/^/| /' conftest.$ac_ext >&5
16646
16647( exit $ac_status )
16648{ echo "$as_me:$LINENO: result: no" >&5
16649echo "${ECHO_T}no" >&6; }
16650
16651fi
16652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16653fi
16654
16655
16656
Ronald Oussorenf8752642006-07-06 10:13:35 +000016657case $ac_sys_system/$ac_sys_release in
16658Darwin/*)
16659 _CUR_CFLAGS="${CFLAGS}"
16660 _CUR_LDFLAGS="${LDFLAGS}"
16661 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16662 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16663 ;;
16664esac
16665
Martin v. Löwiseba40652007-08-30 20:10:57 +000016666{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16667echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016668if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16669 echo $ECHO_N "(cached) $ECHO_C" >&6
16670else
16671 ac_check_lib_save_LIBS=$LIBS
16672LIBS="-lz $LIBS"
16673cat >conftest.$ac_ext <<_ACEOF
16674/* confdefs.h. */
16675_ACEOF
16676cat confdefs.h >>conftest.$ac_ext
16677cat >>conftest.$ac_ext <<_ACEOF
16678/* end confdefs.h. */
16679
Martin v. Löwiseba40652007-08-30 20:10:57 +000016680/* Override any GCC internal prototype to avoid an error.
16681 Use char because int might match the return type of a GCC
16682 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016683#ifdef __cplusplus
16684extern "C"
16685#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016686char inflateCopy ();
16687int
16688main ()
16689{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016690return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016691 ;
16692 return 0;
16693}
16694_ACEOF
16695rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016696if { (ac_try="$ac_link"
16697case "(($ac_try" in
16698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16699 *) ac_try_echo=$ac_try;;
16700esac
16701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16702 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016703 ac_status=$?
16704 grep -v '^ *+' conftest.er1 >conftest.err
16705 rm -f conftest.er1
16706 cat conftest.err >&5
16707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708 (exit $ac_status); } && {
16709 test -z "$ac_c_werror_flag" ||
16710 test ! -s conftest.err
16711 } && test -s conftest$ac_exeext &&
16712 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016713 ac_cv_lib_z_inflateCopy=yes
16714else
16715 echo "$as_me: failed program was:" >&5
16716sed 's/^/| /' conftest.$ac_ext >&5
16717
Martin v. Löwiseba40652007-08-30 20:10:57 +000016718 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720
16721rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016722 conftest$ac_exeext conftest.$ac_ext
16723LIBS=$ac_check_lib_save_LIBS
16724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16726echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016727if test $ac_cv_lib_z_inflateCopy = yes; then
16728
16729cat >>confdefs.h <<\_ACEOF
16730#define HAVE_ZLIB_COPY 1
16731_ACEOF
16732
16733fi
16734
16735
Ronald Oussorenf8752642006-07-06 10:13:35 +000016736case $ac_sys_system/$ac_sys_release in
16737Darwin/*)
16738 CFLAGS="${_CUR_CFLAGS}"
16739 LDFLAGS="${_CUR_LDFLAGS}"
16740 ;;
16741esac
16742
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16744echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016746/* confdefs.h. */
16747_ACEOF
16748cat confdefs.h >>conftest.$ac_ext
16749cat >>conftest.$ac_ext <<_ACEOF
16750/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016751
16752#include "confdefs.h"
16753#include <netdb.h>
16754
Martin v. Löwise9416172003-05-03 10:12:45 +000016755int
16756main ()
16757{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016758void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016759 ;
16760 return 0;
16761}
16762_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016764if { (ac_try="$ac_link"
16765case "(($ac_try" in
16766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16767 *) ac_try_echo=$ac_try;;
16768esac
16769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016772 grep -v '^ *+' conftest.er1 >conftest.err
16773 rm -f conftest.er1
16774 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016776 (exit $ac_status); } && {
16777 test -z "$ac_c_werror_flag" ||
16778 test ! -s conftest.err
16779 } && test -s conftest$ac_exeext &&
16780 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016781
16782cat >>confdefs.h <<\_ACEOF
16783#define HAVE_HSTRERROR 1
16784_ACEOF
16785
Martin v. Löwiseba40652007-08-30 20:10:57 +000016786 { echo "$as_me:$LINENO: result: yes" >&5
16787echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016788else
16789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016790sed 's/^/| /' conftest.$ac_ext >&5
16791
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792 { echo "$as_me:$LINENO: result: no" >&5
16793echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016794
16795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796
16797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016799
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16801echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016803/* confdefs.h. */
16804_ACEOF
16805cat confdefs.h >>conftest.$ac_ext
16806cat >>conftest.$ac_ext <<_ACEOF
16807/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016808
16809#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016810#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016811#include <sys/socket.h>
16812#include <netinet/in.h>
16813#include <arpa/inet.h>
16814
Martin v. Löwise9416172003-05-03 10:12:45 +000016815int
16816main ()
16817{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016818void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016819 ;
16820 return 0;
16821}
16822_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016823rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824if { (ac_try="$ac_link"
16825case "(($ac_try" in
16826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16827 *) ac_try_echo=$ac_try;;
16828esac
16829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16830 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016832 grep -v '^ *+' conftest.er1 >conftest.err
16833 rm -f conftest.er1
16834 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836 (exit $ac_status); } && {
16837 test -z "$ac_c_werror_flag" ||
16838 test ! -s conftest.err
16839 } && test -s conftest$ac_exeext &&
16840 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016841
16842cat >>confdefs.h <<\_ACEOF
16843#define HAVE_INET_ATON 1
16844_ACEOF
16845
Martin v. Löwiseba40652007-08-30 20:10:57 +000016846 { echo "$as_me:$LINENO: result: yes" >&5
16847echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016848else
16849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016850sed 's/^/| /' conftest.$ac_ext >&5
16851
Martin v. Löwiseba40652007-08-30 20:10:57 +000016852 { echo "$as_me:$LINENO: result: no" >&5
16853echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016854
16855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016856
16857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016859
Martin v. Löwiseba40652007-08-30 20:10:57 +000016860{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16861echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016863/* confdefs.h. */
16864_ACEOF
16865cat confdefs.h >>conftest.$ac_ext
16866cat >>conftest.$ac_ext <<_ACEOF
16867/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016868
16869#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016870#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016871#include <sys/socket.h>
16872#include <netinet/in.h>
16873#include <arpa/inet.h>
16874
Martin v. Löwise9416172003-05-03 10:12:45 +000016875int
16876main ()
16877{
16878void* p = inet_pton
16879 ;
16880 return 0;
16881}
16882_ACEOF
16883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016884if { (ac_try="$ac_compile"
16885case "(($ac_try" in
16886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16887 *) ac_try_echo=$ac_try;;
16888esac
16889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016892 grep -v '^ *+' conftest.er1 >conftest.err
16893 rm -f conftest.er1
16894 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896 (exit $ac_status); } && {
16897 test -z "$ac_c_werror_flag" ||
16898 test ! -s conftest.err
16899 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016900
16901cat >>confdefs.h <<\_ACEOF
16902#define HAVE_INET_PTON 1
16903_ACEOF
16904
Martin v. Löwiseba40652007-08-30 20:10:57 +000016905 { echo "$as_me:$LINENO: result: yes" >&5
16906echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016907else
16908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016909sed 's/^/| /' conftest.$ac_ext >&5
16910
Martin v. Löwiseba40652007-08-30 20:10:57 +000016911 { echo "$as_me:$LINENO: result: no" >&5
16912echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016913
16914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915
16916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016917
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016918# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919{ echo "$as_me:$LINENO: checking for setgroups" >&5
16920echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016922/* confdefs.h. */
16923_ACEOF
16924cat confdefs.h >>conftest.$ac_ext
16925cat >>conftest.$ac_ext <<_ACEOF
16926/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016927
16928#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016929#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016930#ifdef HAVE_GRP_H
16931#include <grp.h>
16932#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016933
Martin v. Löwisd5843682002-11-21 20:41:28 +000016934int
16935main ()
16936{
16937void* p = setgroups
16938 ;
16939 return 0;
16940}
16941_ACEOF
16942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016943if { (ac_try="$ac_compile"
16944case "(($ac_try" in
16945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16946 *) ac_try_echo=$ac_try;;
16947esac
16948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016951 grep -v '^ *+' conftest.er1 >conftest.err
16952 rm -f conftest.er1
16953 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016955 (exit $ac_status); } && {
16956 test -z "$ac_c_werror_flag" ||
16957 test ! -s conftest.err
16958 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016959
16960cat >>confdefs.h <<\_ACEOF
16961#define HAVE_SETGROUPS 1
16962_ACEOF
16963
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964 { echo "$as_me:$LINENO: result: yes" >&5
16965echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016966else
16967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016968sed 's/^/| /' conftest.$ac_ext >&5
16969
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970 { echo "$as_me:$LINENO: result: no" >&5
16971echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016972
16973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016974
16975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016977# check for openpty and forkpty
16978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016980for ac_func in openpty
16981do
Martin v. Löwis11437992002-04-12 09:54:03 +000016982as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016983{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16984echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16985if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016987else
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016989/* confdefs.h. */
16990_ACEOF
16991cat confdefs.h >>conftest.$ac_ext
16992cat >>conftest.$ac_ext <<_ACEOF
16993/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016994/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16995 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16996#define $ac_func innocuous_$ac_func
16997
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016998/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016999 which can conflict with char $ac_func (); below.
17000 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017001 <limits.h> exists even on freestanding compilers. */
17002
17003#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017004# include <limits.h>
17005#else
17006# include <assert.h>
17007#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017008
17009#undef $ac_func
17010
Martin v. Löwiseba40652007-08-30 20:10:57 +000017011/* Override any GCC internal prototype to avoid an error.
17012 Use char because int might match the return type of a GCC
17013 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017014#ifdef __cplusplus
17015extern "C"
17016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017017char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017018/* The GNU C library defines this for functions which it implements
17019 to always fail with ENOSYS. Some functions are actually named
17020 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017022choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017023#endif
17024
Skip Montanaro6dead952003-09-25 14:50:04 +000017025int
17026main ()
17027{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017028return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 ;
17030 return 0;
17031}
17032_ACEOF
17033rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017034if { (ac_try="$ac_link"
17035case "(($ac_try" in
17036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17037 *) ac_try_echo=$ac_try;;
17038esac
17039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017042 grep -v '^ *+' conftest.er1 >conftest.err
17043 rm -f conftest.er1
17044 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046 (exit $ac_status); } && {
17047 test -z "$ac_c_werror_flag" ||
17048 test ! -s conftest.err
17049 } && test -s conftest$ac_exeext &&
17050 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017051 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017052else
Martin v. Löwis11437992002-04-12 09:54:03 +000017053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017054sed 's/^/| /' conftest.$ac_ext >&5
17055
Martin v. Löwiseba40652007-08-30 20:10:57 +000017056 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017058
17059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017060 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017062ac_res=`eval echo '${'$as_ac_var'}'`
17063 { echo "$as_me:$LINENO: result: $ac_res" >&5
17064echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017065if test `eval echo '${'$as_ac_var'}'` = yes; then
17066 cat >>confdefs.h <<_ACEOF
17067#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17068_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017069
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017070else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017071 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17072echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017073if test "${ac_cv_lib_util_openpty+set}" = set; then
17074 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017075else
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017077LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017079/* confdefs.h. */
17080_ACEOF
17081cat confdefs.h >>conftest.$ac_ext
17082cat >>conftest.$ac_ext <<_ACEOF
17083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017084
Martin v. Löwiseba40652007-08-30 20:10:57 +000017085/* Override any GCC internal prototype to avoid an error.
17086 Use char because int might match the return type of a GCC
17087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017088#ifdef __cplusplus
17089extern "C"
17090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017091char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017092int
17093main ()
17094{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017095return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 ;
17097 return 0;
17098}
17099_ACEOF
17100rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101if { (ac_try="$ac_link"
17102case "(($ac_try" in
17103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17104 *) ac_try_echo=$ac_try;;
17105esac
17106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017109 grep -v '^ *+' conftest.er1 >conftest.err
17110 rm -f conftest.er1
17111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113 (exit $ac_status); } && {
17114 test -z "$ac_c_werror_flag" ||
17115 test ! -s conftest.err
17116 } && test -s conftest$ac_exeext &&
17117 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017119else
Martin v. Löwis11437992002-04-12 09:54:03 +000017120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017121sed 's/^/| /' conftest.$ac_ext >&5
17122
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125
17126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017128LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17131echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017132if test $ac_cv_lib_util_openpty = yes; then
17133 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017134#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017135_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017136 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017137else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17139echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017140if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17141 echo $ECHO_N "(cached) $ECHO_C" >&6
17142else
17143 ac_check_lib_save_LIBS=$LIBS
17144LIBS="-lbsd $LIBS"
17145cat >conftest.$ac_ext <<_ACEOF
17146/* confdefs.h. */
17147_ACEOF
17148cat confdefs.h >>conftest.$ac_ext
17149cat >>conftest.$ac_ext <<_ACEOF
17150/* end confdefs.h. */
17151
Martin v. Löwiseba40652007-08-30 20:10:57 +000017152/* Override any GCC internal prototype to avoid an error.
17153 Use char because int might match the return type of a GCC
17154 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017155#ifdef __cplusplus
17156extern "C"
17157#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017158char openpty ();
17159int
17160main ()
17161{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017162return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017163 ;
17164 return 0;
17165}
17166_ACEOF
17167rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017168if { (ac_try="$ac_link"
17169case "(($ac_try" in
17170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17171 *) ac_try_echo=$ac_try;;
17172esac
17173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17174 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017175 ac_status=$?
17176 grep -v '^ *+' conftest.er1 >conftest.err
17177 rm -f conftest.er1
17178 cat conftest.err >&5
17179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017180 (exit $ac_status); } && {
17181 test -z "$ac_c_werror_flag" ||
17182 test ! -s conftest.err
17183 } && test -s conftest$ac_exeext &&
17184 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017185 ac_cv_lib_bsd_openpty=yes
17186else
17187 echo "$as_me: failed program was:" >&5
17188sed 's/^/| /' conftest.$ac_ext >&5
17189
Martin v. Löwiseba40652007-08-30 20:10:57 +000017190 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017192
17193rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017194 conftest$ac_exeext conftest.$ac_ext
17195LIBS=$ac_check_lib_save_LIBS
17196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017197{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17198echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017199if test $ac_cv_lib_bsd_openpty = yes; then
17200 cat >>confdefs.h <<\_ACEOF
17201#define HAVE_OPENPTY 1
17202_ACEOF
17203 LIBS="$LIBS -lbsd"
17204fi
17205
17206
17207fi
17208
Fred Drake8cef4cf2000-06-28 16:40:38 +000017209
17210fi
17211done
17212
Martin v. Löwis11437992002-04-12 09:54:03 +000017213
Fred Drake8cef4cf2000-06-28 16:40:38 +000017214for ac_func in forkpty
17215do
Martin v. Löwis11437992002-04-12 09:54:03 +000017216as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017217{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17218echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17219if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017221else
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017223/* confdefs.h. */
17224_ACEOF
17225cat confdefs.h >>conftest.$ac_ext
17226cat >>conftest.$ac_ext <<_ACEOF
17227/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017228/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17229 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17230#define $ac_func innocuous_$ac_func
17231
Fred Drake8cef4cf2000-06-28 16:40:38 +000017232/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017233 which can conflict with char $ac_func (); below.
17234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017235 <limits.h> exists even on freestanding compilers. */
17236
17237#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017238# include <limits.h>
17239#else
17240# include <assert.h>
17241#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017242
17243#undef $ac_func
17244
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245/* Override any GCC internal prototype to avoid an error.
17246 Use char because int might match the return type of a GCC
17247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017248#ifdef __cplusplus
17249extern "C"
17250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017251char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017252/* The GNU C library defines this for functions which it implements
17253 to always fail with ENOSYS. Some functions are actually named
17254 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017256choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017257#endif
17258
Skip Montanaro6dead952003-09-25 14:50:04 +000017259int
17260main ()
17261{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017262return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 ;
17264 return 0;
17265}
17266_ACEOF
17267rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017268if { (ac_try="$ac_link"
17269case "(($ac_try" in
17270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17271 *) ac_try_echo=$ac_try;;
17272esac
17273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017276 grep -v '^ *+' conftest.er1 >conftest.err
17277 rm -f conftest.er1
17278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280 (exit $ac_status); } && {
17281 test -z "$ac_c_werror_flag" ||
17282 test ! -s conftest.err
17283 } && test -s conftest$ac_exeext &&
17284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017286else
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017288sed 's/^/| /' conftest.$ac_ext >&5
17289
Martin v. Löwiseba40652007-08-30 20:10:57 +000017290 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017292
17293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017294 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017296ac_res=`eval echo '${'$as_ac_var'}'`
17297 { echo "$as_me:$LINENO: result: $ac_res" >&5
17298echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017299if test `eval echo '${'$as_ac_var'}'` = yes; then
17300 cat >>confdefs.h <<_ACEOF
17301#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17302_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017303
Fred Drake8cef4cf2000-06-28 16:40:38 +000017304else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017305 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17306echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017307if test "${ac_cv_lib_util_forkpty+set}" = set; then
17308 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017309else
Martin v. Löwis11437992002-04-12 09:54:03 +000017310 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017311LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017313/* confdefs.h. */
17314_ACEOF
17315cat confdefs.h >>conftest.$ac_ext
17316cat >>conftest.$ac_ext <<_ACEOF
17317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017318
Martin v. Löwiseba40652007-08-30 20:10:57 +000017319/* Override any GCC internal prototype to avoid an error.
17320 Use char because int might match the return type of a GCC
17321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017322#ifdef __cplusplus
17323extern "C"
17324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017325char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017326int
17327main ()
17328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017329return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 ;
17331 return 0;
17332}
17333_ACEOF
17334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017335if { (ac_try="$ac_link"
17336case "(($ac_try" in
17337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17338 *) ac_try_echo=$ac_try;;
17339esac
17340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343 grep -v '^ *+' conftest.er1 >conftest.err
17344 rm -f conftest.er1
17345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017347 (exit $ac_status); } && {
17348 test -z "$ac_c_werror_flag" ||
17349 test ! -s conftest.err
17350 } && test -s conftest$ac_exeext &&
17351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017352 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017353else
Martin v. Löwis11437992002-04-12 09:54:03 +000017354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017355sed 's/^/| /' conftest.$ac_ext >&5
17356
Martin v. Löwiseba40652007-08-30 20:10:57 +000017357 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017359
17360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017362LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017364{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17365echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017366if test $ac_cv_lib_util_forkpty = yes; then
17367 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017368#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017369_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017370 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017371else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017372 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17373echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017374if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17375 echo $ECHO_N "(cached) $ECHO_C" >&6
17376else
17377 ac_check_lib_save_LIBS=$LIBS
17378LIBS="-lbsd $LIBS"
17379cat >conftest.$ac_ext <<_ACEOF
17380/* confdefs.h. */
17381_ACEOF
17382cat confdefs.h >>conftest.$ac_ext
17383cat >>conftest.$ac_ext <<_ACEOF
17384/* end confdefs.h. */
17385
Martin v. Löwiseba40652007-08-30 20:10:57 +000017386/* Override any GCC internal prototype to avoid an error.
17387 Use char because int might match the return type of a GCC
17388 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017389#ifdef __cplusplus
17390extern "C"
17391#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017392char forkpty ();
17393int
17394main ()
17395{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017396return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017397 ;
17398 return 0;
17399}
17400_ACEOF
17401rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017402if { (ac_try="$ac_link"
17403case "(($ac_try" in
17404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17405 *) ac_try_echo=$ac_try;;
17406esac
17407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17408 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017409 ac_status=$?
17410 grep -v '^ *+' conftest.er1 >conftest.err
17411 rm -f conftest.er1
17412 cat conftest.err >&5
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017414 (exit $ac_status); } && {
17415 test -z "$ac_c_werror_flag" ||
17416 test ! -s conftest.err
17417 } && test -s conftest$ac_exeext &&
17418 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017419 ac_cv_lib_bsd_forkpty=yes
17420else
17421 echo "$as_me: failed program was:" >&5
17422sed 's/^/| /' conftest.$ac_ext >&5
17423
Martin v. Löwiseba40652007-08-30 20:10:57 +000017424 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017426
17427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017428 conftest$ac_exeext conftest.$ac_ext
17429LIBS=$ac_check_lib_save_LIBS
17430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017431{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17432echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017433if test $ac_cv_lib_bsd_forkpty = yes; then
17434 cat >>confdefs.h <<\_ACEOF
17435#define HAVE_FORKPTY 1
17436_ACEOF
17437 LIBS="$LIBS -lbsd"
17438fi
17439
17440
17441fi
17442
Fred Drake8cef4cf2000-06-28 16:40:38 +000017443
17444fi
17445done
17446
Jack Jansendd19cf82001-12-06 22:36:17 +000017447
Brett Cannonaa5778d2008-03-18 04:09:00 +000017448# Stuff for expat.
17449
17450for ac_func in memmove
17451do
17452as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17453{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17454echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17455if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17456 echo $ECHO_N "(cached) $ECHO_C" >&6
17457else
17458 cat >conftest.$ac_ext <<_ACEOF
17459/* confdefs.h. */
17460_ACEOF
17461cat confdefs.h >>conftest.$ac_ext
17462cat >>conftest.$ac_ext <<_ACEOF
17463/* end confdefs.h. */
17464/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17465 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17466#define $ac_func innocuous_$ac_func
17467
17468/* System header to define __stub macros and hopefully few prototypes,
17469 which can conflict with char $ac_func (); below.
17470 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17471 <limits.h> exists even on freestanding compilers. */
17472
17473#ifdef __STDC__
17474# include <limits.h>
17475#else
17476# include <assert.h>
17477#endif
17478
17479#undef $ac_func
17480
17481/* Override any GCC internal prototype to avoid an error.
17482 Use char because int might match the return type of a GCC
17483 builtin and then its argument prototype would still apply. */
17484#ifdef __cplusplus
17485extern "C"
17486#endif
17487char $ac_func ();
17488/* The GNU C library defines this for functions which it implements
17489 to always fail with ENOSYS. Some functions are actually named
17490 something starting with __ and the normal name is an alias. */
17491#if defined __stub_$ac_func || defined __stub___$ac_func
17492choke me
17493#endif
17494
17495int
17496main ()
17497{
17498return $ac_func ();
17499 ;
17500 return 0;
17501}
17502_ACEOF
17503rm -f conftest.$ac_objext conftest$ac_exeext
17504if { (ac_try="$ac_link"
17505case "(($ac_try" in
17506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17507 *) ac_try_echo=$ac_try;;
17508esac
17509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17510 (eval "$ac_link") 2>conftest.er1
17511 ac_status=$?
17512 grep -v '^ *+' conftest.er1 >conftest.err
17513 rm -f conftest.er1
17514 cat conftest.err >&5
17515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17516 (exit $ac_status); } && {
17517 test -z "$ac_c_werror_flag" ||
17518 test ! -s conftest.err
17519 } && test -s conftest$ac_exeext &&
17520 $as_test_x conftest$ac_exeext; then
17521 eval "$as_ac_var=yes"
17522else
17523 echo "$as_me: failed program was:" >&5
17524sed 's/^/| /' conftest.$ac_ext >&5
17525
17526 eval "$as_ac_var=no"
17527fi
17528
17529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17530 conftest$ac_exeext conftest.$ac_ext
17531fi
17532ac_res=`eval echo '${'$as_ac_var'}'`
17533 { echo "$as_me:$LINENO: result: $ac_res" >&5
17534echo "${ECHO_T}$ac_res" >&6; }
17535if test `eval echo '${'$as_ac_var'}'` = yes; then
17536 cat >>confdefs.h <<_ACEOF
17537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17538_ACEOF
17539
17540fi
17541done
17542
17543
Michael W. Hudson54241132001-12-07 15:38:26 +000017544# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
17546
17547
17548
17549
17550
Fred Drake8cef4cf2000-06-28 16:40:38 +000017551for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17552do
Martin v. Löwis11437992002-04-12 09:54:03 +000017553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017558else
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017560/* confdefs.h. */
17561_ACEOF
17562cat confdefs.h >>conftest.$ac_ext
17563cat >>conftest.$ac_ext <<_ACEOF
17564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17567#define $ac_func innocuous_$ac_func
17568
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017570 which can conflict with char $ac_func (); below.
17571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017572 <limits.h> exists even on freestanding compilers. */
17573
17574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017575# include <limits.h>
17576#else
17577# include <assert.h>
17578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017579
17580#undef $ac_func
17581
Martin v. Löwiseba40652007-08-30 20:10:57 +000017582/* Override any GCC internal prototype to avoid an error.
17583 Use char because int might match the return type of a GCC
17584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017585#ifdef __cplusplus
17586extern "C"
17587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017588char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017589/* The GNU C library defines this for functions which it implements
17590 to always fail with ENOSYS. Some functions are actually named
17591 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017593choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017594#endif
17595
Skip Montanaro6dead952003-09-25 14:50:04 +000017596int
17597main ()
17598{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017600 ;
17601 return 0;
17602}
17603_ACEOF
17604rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017605if { (ac_try="$ac_link"
17606case "(($ac_try" in
17607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17608 *) ac_try_echo=$ac_try;;
17609esac
17610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017613 grep -v '^ *+' conftest.er1 >conftest.err
17614 rm -f conftest.er1
17615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617 (exit $ac_status); } && {
17618 test -z "$ac_c_werror_flag" ||
17619 test ! -s conftest.err
17620 } && test -s conftest$ac_exeext &&
17621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017623else
Martin v. Löwis11437992002-04-12 09:54:03 +000017624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017625sed 's/^/| /' conftest.$ac_ext >&5
17626
Martin v. Löwiseba40652007-08-30 20:10:57 +000017627 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017629
17630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017631 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017633ac_res=`eval echo '${'$as_ac_var'}'`
17634 { echo "$as_me:$LINENO: result: $ac_res" >&5
17635echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017636if test `eval echo '${'$as_ac_var'}'` = yes; then
17637 cat >>confdefs.h <<_ACEOF
17638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17639_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017641fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017642done
17643
Michael W. Hudson54241132001-12-07 15:38:26 +000017644
Martin v. Löwis11437992002-04-12 09:54:03 +000017645
17646
17647
Brett Cannonaa5778d2008-03-18 04:09:00 +000017648for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017649do
Martin v. Löwis11437992002-04-12 09:54:03 +000017650as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017651{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17652echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17653if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017655else
Martin v. Löwis11437992002-04-12 09:54:03 +000017656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017657/* confdefs.h. */
17658_ACEOF
17659cat confdefs.h >>conftest.$ac_ext
17660cat >>conftest.$ac_ext <<_ACEOF
17661/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017662/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17663 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17664#define $ac_func innocuous_$ac_func
17665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017666/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017667 which can conflict with char $ac_func (); below.
17668 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017669 <limits.h> exists even on freestanding compilers. */
17670
17671#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017672# include <limits.h>
17673#else
17674# include <assert.h>
17675#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017676
17677#undef $ac_func
17678
Martin v. Löwiseba40652007-08-30 20:10:57 +000017679/* Override any GCC internal prototype to avoid an error.
17680 Use char because int might match the return type of a GCC
17681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017682#ifdef __cplusplus
17683extern "C"
17684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017685char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017686/* The GNU C library defines this for functions which it implements
17687 to always fail with ENOSYS. Some functions are actually named
17688 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017689#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017690choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017691#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017692
Skip Montanaro6dead952003-09-25 14:50:04 +000017693int
17694main ()
17695{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017696return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017697 ;
17698 return 0;
17699}
17700_ACEOF
17701rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017702if { (ac_try="$ac_link"
17703case "(($ac_try" in
17704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17705 *) ac_try_echo=$ac_try;;
17706esac
17707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17708 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017710 grep -v '^ *+' conftest.er1 >conftest.err
17711 rm -f conftest.er1
17712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017714 (exit $ac_status); } && {
17715 test -z "$ac_c_werror_flag" ||
17716 test ! -s conftest.err
17717 } && test -s conftest$ac_exeext &&
17718 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017720else
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017722sed 's/^/| /' conftest.$ac_ext >&5
17723
Martin v. Löwiseba40652007-08-30 20:10:57 +000017724 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017726
17727rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017730ac_res=`eval echo '${'$as_ac_var'}'`
17731 { echo "$as_me:$LINENO: result: $ac_res" >&5
17732echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017733if test `eval echo '${'$as_ac_var'}'` = yes; then
17734 cat >>confdefs.h <<_ACEOF
17735#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17736_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017737
Martin v. Löwis1142de32002-03-29 16:28:31 +000017738else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017739 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017740 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017741 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17742 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017743esac
17744
Martin v. Löwis1142de32002-03-29 16:28:31 +000017745fi
17746done
17747
17748
Martin v. Löwis11437992002-04-12 09:54:03 +000017749
Martin v. Löwis1142de32002-03-29 16:28:31 +000017750for ac_func in getpgrp
17751do
Martin v. Löwis11437992002-04-12 09:54:03 +000017752as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017753{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17754echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17755if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017757else
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017764/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17765 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17766#define $ac_func innocuous_$ac_func
17767
Martin v. Löwis1142de32002-03-29 16:28:31 +000017768/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017769 which can conflict with char $ac_func (); below.
17770 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017771 <limits.h> exists even on freestanding compilers. */
17772
17773#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017774# include <limits.h>
17775#else
17776# include <assert.h>
17777#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017778
17779#undef $ac_func
17780
Martin v. Löwiseba40652007-08-30 20:10:57 +000017781/* Override any GCC internal prototype to avoid an error.
17782 Use char because int might match the return type of a GCC
17783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017784#ifdef __cplusplus
17785extern "C"
17786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017787char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017788/* The GNU C library defines this for functions which it implements
17789 to always fail with ENOSYS. Some functions are actually named
17790 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017792choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017793#endif
17794
Skip Montanaro6dead952003-09-25 14:50:04 +000017795int
17796main ()
17797{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017798return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 ;
17800 return 0;
17801}
17802_ACEOF
17803rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017804if { (ac_try="$ac_link"
17805case "(($ac_try" in
17806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17807 *) ac_try_echo=$ac_try;;
17808esac
17809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17810 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017812 grep -v '^ *+' conftest.er1 >conftest.err
17813 rm -f conftest.er1
17814 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017816 (exit $ac_status); } && {
17817 test -z "$ac_c_werror_flag" ||
17818 test ! -s conftest.err
17819 } && test -s conftest$ac_exeext &&
17820 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017821 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017822else
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017824sed 's/^/| /' conftest.$ac_ext >&5
17825
Martin v. Löwiseba40652007-08-30 20:10:57 +000017826 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017828
17829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017830 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017832ac_res=`eval echo '${'$as_ac_var'}'`
17833 { echo "$as_me:$LINENO: result: $ac_res" >&5
17834echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017835if test `eval echo '${'$as_ac_var'}'` = yes; then
17836 cat >>confdefs.h <<_ACEOF
17837#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17838_ACEOF
17839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017840/* confdefs.h. */
17841_ACEOF
17842cat confdefs.h >>conftest.$ac_ext
17843cat >>conftest.$ac_ext <<_ACEOF
17844/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017845#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017846int
17847main ()
17848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017849getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017850 ;
17851 return 0;
17852}
17853_ACEOF
17854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017855if { (ac_try="$ac_compile"
17856case "(($ac_try" in
17857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17858 *) ac_try_echo=$ac_try;;
17859esac
17860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017863 grep -v '^ *+' conftest.er1 >conftest.err
17864 rm -f conftest.er1
17865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017867 (exit $ac_status); } && {
17868 test -z "$ac_c_werror_flag" ||
17869 test ! -s conftest.err
17870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017871
17872cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017873#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017874_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017875
Martin v. Löwis11437992002-04-12 09:54:03 +000017876
Guido van Rossumf78abae1997-01-21 22:02:36 +000017877else
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017879sed 's/^/| /' conftest.$ac_ext >&5
17880
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881
Guido van Rossum627b2d71993-12-24 10:39:16 +000017882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017883
17884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017885
Guido van Rossum627b2d71993-12-24 10:39:16 +000017886fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017887done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017888
Jack Jansen150753c2003-03-29 22:07:47 +000017889
17890for ac_func in setpgrp
17891do
17892as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017893{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17894echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17895if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017897else
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017899/* confdefs.h. */
17900_ACEOF
17901cat confdefs.h >>conftest.$ac_ext
17902cat >>conftest.$ac_ext <<_ACEOF
17903/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017904/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17906#define $ac_func innocuous_$ac_func
17907
Jack Jansen150753c2003-03-29 22:07:47 +000017908/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017909 which can conflict with char $ac_func (); below.
17910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017911 <limits.h> exists even on freestanding compilers. */
17912
17913#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017914# include <limits.h>
17915#else
17916# include <assert.h>
17917#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017918
17919#undef $ac_func
17920
Martin v. Löwiseba40652007-08-30 20:10:57 +000017921/* Override any GCC internal prototype to avoid an error.
17922 Use char because int might match the return type of a GCC
17923 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017924#ifdef __cplusplus
17925extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017926#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017927char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017928/* The GNU C library defines this for functions which it implements
17929 to always fail with ENOSYS. Some functions are actually named
17930 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017931#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017932choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017933#endif
17934
Skip Montanaro6dead952003-09-25 14:50:04 +000017935int
17936main ()
17937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017938return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017939 ;
17940 return 0;
17941}
17942_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017943rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017944if { (ac_try="$ac_link"
17945case "(($ac_try" in
17946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17947 *) ac_try_echo=$ac_try;;
17948esac
17949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017952 grep -v '^ *+' conftest.er1 >conftest.err
17953 rm -f conftest.er1
17954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017956 (exit $ac_status); } && {
17957 test -z "$ac_c_werror_flag" ||
17958 test ! -s conftest.err
17959 } && test -s conftest$ac_exeext &&
17960 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017961 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017962else
Jack Jansen150753c2003-03-29 22:07:47 +000017963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017964sed 's/^/| /' conftest.$ac_ext >&5
17965
Martin v. Löwiseba40652007-08-30 20:10:57 +000017966 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017968
17969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017970 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972ac_res=`eval echo '${'$as_ac_var'}'`
17973 { echo "$as_me:$LINENO: result: $ac_res" >&5
17974echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017975if test `eval echo '${'$as_ac_var'}'` = yes; then
17976 cat >>confdefs.h <<_ACEOF
17977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17978_ACEOF
17979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017980/* confdefs.h. */
17981_ACEOF
17982cat confdefs.h >>conftest.$ac_ext
17983cat >>conftest.$ac_ext <<_ACEOF
17984/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017985#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017986int
17987main ()
17988{
17989setpgrp(0,0);
17990 ;
17991 return 0;
17992}
17993_ACEOF
17994rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017995if { (ac_try="$ac_compile"
17996case "(($ac_try" in
17997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17998 *) ac_try_echo=$ac_try;;
17999esac
18000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18001 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018003 grep -v '^ *+' conftest.er1 >conftest.err
18004 rm -f conftest.er1
18005 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018007 (exit $ac_status); } && {
18008 test -z "$ac_c_werror_flag" ||
18009 test ! -s conftest.err
18010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018011
18012cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018013#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018014_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018015
Jack Jansen150753c2003-03-29 22:07:47 +000018016
18017else
18018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018019sed 's/^/| /' conftest.$ac_ext >&5
18020
Martin v. Löwiseba40652007-08-30 20:10:57 +000018021
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018022fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023
18024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018025
18026fi
18027done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018028
Martin v. Löwis11437992002-04-12 09:54:03 +000018029
Thomas Wouters3a584202000-08-05 23:28:51 +000018030for ac_func in gettimeofday
18031do
Martin v. Löwis11437992002-04-12 09:54:03 +000018032as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018033{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18034echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18035if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018036 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018037else
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018039/* confdefs.h. */
18040_ACEOF
18041cat confdefs.h >>conftest.$ac_ext
18042cat >>conftest.$ac_ext <<_ACEOF
18043/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018044/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18046#define $ac_func innocuous_$ac_func
18047
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018048/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018049 which can conflict with char $ac_func (); below.
18050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018051 <limits.h> exists even on freestanding compilers. */
18052
18053#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018054# include <limits.h>
18055#else
18056# include <assert.h>
18057#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018058
18059#undef $ac_func
18060
Martin v. Löwiseba40652007-08-30 20:10:57 +000018061/* Override any GCC internal prototype to avoid an error.
18062 Use char because int might match the return type of a GCC
18063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018064#ifdef __cplusplus
18065extern "C"
18066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018067char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018068/* The GNU C library defines this for functions which it implements
18069 to always fail with ENOSYS. Some functions are actually named
18070 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018072choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018073#endif
18074
Skip Montanaro6dead952003-09-25 14:50:04 +000018075int
18076main ()
18077{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018078return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018079 ;
18080 return 0;
18081}
18082_ACEOF
18083rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018084if { (ac_try="$ac_link"
18085case "(($ac_try" in
18086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18087 *) ac_try_echo=$ac_try;;
18088esac
18089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018092 grep -v '^ *+' conftest.er1 >conftest.err
18093 rm -f conftest.er1
18094 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018096 (exit $ac_status); } && {
18097 test -z "$ac_c_werror_flag" ||
18098 test ! -s conftest.err
18099 } && test -s conftest$ac_exeext &&
18100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018102else
Martin v. Löwis11437992002-04-12 09:54:03 +000018103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018104sed 's/^/| /' conftest.$ac_ext >&5
18105
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108
18109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018110 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018112ac_res=`eval echo '${'$as_ac_var'}'`
18113 { echo "$as_me:$LINENO: result: $ac_res" >&5
18114echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018115if test `eval echo '${'$as_ac_var'}'` = yes; then
18116 cat >>confdefs.h <<_ACEOF
18117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18118_ACEOF
18119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018120/* confdefs.h. */
18121_ACEOF
18122cat confdefs.h >>conftest.$ac_ext
18123cat >>conftest.$ac_ext <<_ACEOF
18124/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018125#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018126int
18127main ()
18128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018129gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018130 ;
18131 return 0;
18132}
18133_ACEOF
18134rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018135if { (ac_try="$ac_compile"
18136case "(($ac_try" in
18137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18138 *) ac_try_echo=$ac_try;;
18139esac
18140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018143 grep -v '^ *+' conftest.er1 >conftest.err
18144 rm -f conftest.er1
18145 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018147 (exit $ac_status); } && {
18148 test -z "$ac_c_werror_flag" ||
18149 test ! -s conftest.err
18150 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018151 :
18152else
Martin v. Löwis11437992002-04-12 09:54:03 +000018153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018154sed 's/^/| /' conftest.$ac_ext >&5
18155
Martin v. Löwis11437992002-04-12 09:54:03 +000018156
18157cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018158#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018159_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018160
Martin v. Löwis11437992002-04-12 09:54:03 +000018161
Guido van Rossum627b2d71993-12-24 10:39:16 +000018162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018163
18164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018165
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018166fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018167done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018168
Michael W. Hudson54241132001-12-07 15:38:26 +000018169
Martin v. Löwiseba40652007-08-30 20:10:57 +000018170{ echo "$as_me:$LINENO: checking for major" >&5
18171echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018172cat >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öwisdbe3f762002-10-10 14:27:30 +000018178
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018179#if defined(MAJOR_IN_MKDEV)
18180#include <sys/mkdev.h>
18181#elif defined(MAJOR_IN_SYSMACROS)
18182#include <sys/sysmacros.h>
18183#else
18184#include <sys/types.h>
18185#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018186
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018187int
18188main ()
18189{
18190
18191 makedev(major(0),minor(0));
18192
18193 ;
18194 return 0;
18195}
18196_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018197rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018198if { (ac_try="$ac_link"
18199case "(($ac_try" in
18200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18201 *) ac_try_echo=$ac_try;;
18202esac
18203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18204 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018206 grep -v '^ *+' conftest.er1 >conftest.err
18207 rm -f conftest.er1
18208 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018210 (exit $ac_status); } && {
18211 test -z "$ac_c_werror_flag" ||
18212 test ! -s conftest.err
18213 } && test -s conftest$ac_exeext &&
18214 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018215
18216
18217cat >>confdefs.h <<\_ACEOF
18218#define HAVE_DEVICE_MACROS 1
18219_ACEOF
18220
Martin v. Löwiseba40652007-08-30 20:10:57 +000018221 { echo "$as_me:$LINENO: result: yes" >&5
18222echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018223
18224else
18225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018226sed 's/^/| /' conftest.$ac_ext >&5
18227
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018228
Martin v. Löwiseba40652007-08-30 20:10:57 +000018229 { echo "$as_me:$LINENO: result: no" >&5
18230echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018231
18232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018233
18234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018235 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018236
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018237# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018238# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018239{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18240echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018242/* confdefs.h. */
18243_ACEOF
18244cat confdefs.h >>conftest.$ac_ext
18245cat >>conftest.$ac_ext <<_ACEOF
18246/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018247
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018248#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018249#include <sys/socket.h>
18250#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018251#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018252
Martin v. Löwis11437992002-04-12 09:54:03 +000018253int
18254main ()
18255{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018256
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018257getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018258
Martin v. Löwis11437992002-04-12 09:54:03 +000018259 ;
18260 return 0;
18261}
18262_ACEOF
18263rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018264if { (ac_try="$ac_link"
18265case "(($ac_try" in
18266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18267 *) ac_try_echo=$ac_try;;
18268esac
18269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018272 grep -v '^ *+' conftest.er1 >conftest.err
18273 rm -f conftest.er1
18274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018276 (exit $ac_status); } && {
18277 test -z "$ac_c_werror_flag" ||
18278 test ! -s conftest.err
18279 } && test -s conftest$ac_exeext &&
18280 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018281
Martin v. Löwiseba40652007-08-30 20:10:57 +000018282{ echo "$as_me:$LINENO: result: yes" >&5
18283echo "${ECHO_T}yes" >&6; }
18284{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18285echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018286if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018287 { echo "$as_me:$LINENO: result: buggy" >&5
18288echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018289buggygetaddrinfo=yes
18290else
Martin v. Löwis11437992002-04-12 09:54:03 +000018291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018292/* confdefs.h. */
18293_ACEOF
18294cat confdefs.h >>conftest.$ac_ext
18295cat >>conftest.$ac_ext <<_ACEOF
18296/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018297
18298#include <sys/types.h>
18299#include <netdb.h>
18300#include <string.h>
18301#include <sys/socket.h>
18302#include <netinet/in.h>
18303
18304main()
18305{
18306 int passive, gaierr, inet4 = 0, inet6 = 0;
18307 struct addrinfo hints, *ai, *aitop;
18308 char straddr[INET6_ADDRSTRLEN], strport[16];
18309
18310 for (passive = 0; passive <= 1; passive++) {
18311 memset(&hints, 0, sizeof(hints));
18312 hints.ai_family = AF_UNSPEC;
18313 hints.ai_flags = passive ? AI_PASSIVE : 0;
18314 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018315 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018316 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18317 (void)gai_strerror(gaierr);
18318 goto bad;
18319 }
18320 for (ai = aitop; ai; ai = ai->ai_next) {
18321 if (ai->ai_addr == NULL ||
18322 ai->ai_addrlen == 0 ||
18323 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18324 straddr, sizeof(straddr), strport, sizeof(strport),
18325 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18326 goto bad;
18327 }
18328 switch (ai->ai_family) {
18329 case AF_INET:
18330 if (strcmp(strport, "54321") != 0) {
18331 goto bad;
18332 }
18333 if (passive) {
18334 if (strcmp(straddr, "0.0.0.0") != 0) {
18335 goto bad;
18336 }
18337 } else {
18338 if (strcmp(straddr, "127.0.0.1") != 0) {
18339 goto bad;
18340 }
18341 }
18342 inet4++;
18343 break;
18344 case AF_INET6:
18345 if (strcmp(strport, "54321") != 0) {
18346 goto bad;
18347 }
18348 if (passive) {
18349 if (strcmp(straddr, "::") != 0) {
18350 goto bad;
18351 }
18352 } else {
18353 if (strcmp(straddr, "::1") != 0) {
18354 goto bad;
18355 }
18356 }
18357 inet6++;
18358 break;
18359 case AF_UNSPEC:
18360 goto bad;
18361 break;
18362 default:
18363 /* another family support? */
18364 break;
18365 }
18366 }
18367 }
18368
18369 if (!(inet4 == 0 || inet4 == 2))
18370 goto bad;
18371 if (!(inet6 == 0 || inet6 == 2))
18372 goto bad;
18373
18374 if (aitop)
18375 freeaddrinfo(aitop);
18376 exit(0);
18377
18378 bad:
18379 if (aitop)
18380 freeaddrinfo(aitop);
18381 exit(1);
18382}
18383
Martin v. Löwis11437992002-04-12 09:54:03 +000018384_ACEOF
18385rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018386if { (ac_try="$ac_link"
18387case "(($ac_try" in
18388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18389 *) ac_try_echo=$ac_try;;
18390esac
18391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18392 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018393 ac_status=$?
18394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018396 { (case "(($ac_try" in
18397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18398 *) ac_try_echo=$ac_try;;
18399esac
18400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18401 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018402 ac_status=$?
18403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18404 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018405 { echo "$as_me:$LINENO: result: good" >&5
18406echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018407buggygetaddrinfo=no
18408else
Martin v. Löwis11437992002-04-12 09:54:03 +000018409 echo "$as_me: program exited with status $ac_status" >&5
18410echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018411sed 's/^/| /' conftest.$ac_ext >&5
18412
Martin v. Löwis11437992002-04-12 09:54:03 +000018413( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414{ echo "$as_me:$LINENO: result: buggy" >&5
18415echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018416buggygetaddrinfo=yes
18417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018418rm -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 +000018419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018420
18421
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018422else
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018424sed 's/^/| /' conftest.$ac_ext >&5
18425
Martin v. Löwis11437992002-04-12 09:54:03 +000018426
Martin v. Löwiseba40652007-08-30 20:10:57 +000018427{ echo "$as_me:$LINENO: result: no" >&5
18428echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018429buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018430
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432
18433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018435
18436if test "$buggygetaddrinfo" = "yes"; then
18437 if test "$ipv6" = "yes"; then
18438 echo 'Fatal: You must get working getaddrinfo() function.'
18439 echo ' or you can specify "--disable-ipv6"'.
18440 exit 1
18441 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018442else
Martin v. Löwis11437992002-04-12 09:54:03 +000018443
18444cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018445#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018446_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018447
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018449
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018450for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018451do
Martin v. Löwis11437992002-04-12 09:54:03 +000018452as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18454echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18455if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018457else
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018459/* confdefs.h. */
18460_ACEOF
18461cat confdefs.h >>conftest.$ac_ext
18462cat >>conftest.$ac_ext <<_ACEOF
18463/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018464/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18465 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18466#define $ac_func innocuous_$ac_func
18467
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018468/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018469 which can conflict with char $ac_func (); below.
18470 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018471 <limits.h> exists even on freestanding compilers. */
18472
18473#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018474# include <limits.h>
18475#else
18476# include <assert.h>
18477#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018478
18479#undef $ac_func
18480
Martin v. Löwiseba40652007-08-30 20:10:57 +000018481/* Override any GCC internal prototype to avoid an error.
18482 Use char because int might match the return type of a GCC
18483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018484#ifdef __cplusplus
18485extern "C"
18486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018487char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018488/* The GNU C library defines this for functions which it implements
18489 to always fail with ENOSYS. Some functions are actually named
18490 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018491#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018492choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018493#endif
18494
Skip Montanaro6dead952003-09-25 14:50:04 +000018495int
18496main ()
18497{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018498return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 ;
18500 return 0;
18501}
18502_ACEOF
18503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018504if { (ac_try="$ac_link"
18505case "(($ac_try" in
18506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18507 *) ac_try_echo=$ac_try;;
18508esac
18509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018512 grep -v '^ *+' conftest.er1 >conftest.err
18513 rm -f conftest.er1
18514 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516 (exit $ac_status); } && {
18517 test -z "$ac_c_werror_flag" ||
18518 test ! -s conftest.err
18519 } && test -s conftest$ac_exeext &&
18520 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018521 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018522else
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018524sed 's/^/| /' conftest.$ac_ext >&5
18525
Martin v. Löwiseba40652007-08-30 20:10:57 +000018526 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018528
18529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018530 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018532ac_res=`eval echo '${'$as_ac_var'}'`
18533 { echo "$as_me:$LINENO: result: $ac_res" >&5
18534echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018535if test `eval echo '${'$as_ac_var'}'` = yes; then
18536 cat >>confdefs.h <<_ACEOF
18537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18538_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018539
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018540fi
18541done
18542
Michael W. Hudson54241132001-12-07 15:38:26 +000018543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018544# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018545{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18546echo $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 +000018547if test "${ac_cv_header_time+set}" = set; then
18548 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018549else
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018551/* confdefs.h. */
18552_ACEOF
18553cat confdefs.h >>conftest.$ac_ext
18554cat >>conftest.$ac_ext <<_ACEOF
18555/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018556#include <sys/types.h>
18557#include <sys/time.h>
18558#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018559
Martin v. Löwis11437992002-04-12 09:54:03 +000018560int
18561main ()
18562{
18563if ((struct tm *) 0)
18564return 0;
18565 ;
18566 return 0;
18567}
18568_ACEOF
18569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570if { (ac_try="$ac_compile"
18571case "(($ac_try" in
18572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18573 *) ac_try_echo=$ac_try;;
18574esac
18575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018578 grep -v '^ *+' conftest.er1 >conftest.err
18579 rm -f conftest.er1
18580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018582 (exit $ac_status); } && {
18583 test -z "$ac_c_werror_flag" ||
18584 test ! -s conftest.err
18585 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018586 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018587else
Martin v. Löwis11437992002-04-12 09:54:03 +000018588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018589sed 's/^/| /' conftest.$ac_ext >&5
18590
Martin v. Löwiseba40652007-08-30 20:10:57 +000018591 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593
18594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018596{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18597echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018598if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018599
18600cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018601#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018602_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018603
18604fi
18605
Martin v. Löwiseba40652007-08-30 20:10:57 +000018606{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18607echo $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 +000018608if test "${ac_cv_struct_tm+set}" = set; then
18609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018610else
Martin v. Löwis11437992002-04-12 09:54:03 +000018611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018612/* confdefs.h. */
18613_ACEOF
18614cat confdefs.h >>conftest.$ac_ext
18615cat >>conftest.$ac_ext <<_ACEOF
18616/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018617#include <sys/types.h>
18618#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018619
Martin v. Löwis11437992002-04-12 09:54:03 +000018620int
18621main ()
18622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018623struct tm tm;
18624 int *p = &tm.tm_sec;
18625 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 ;
18627 return 0;
18628}
18629_ACEOF
18630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018631if { (ac_try="$ac_compile"
18632case "(($ac_try" in
18633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18634 *) ac_try_echo=$ac_try;;
18635esac
18636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018639 grep -v '^ *+' conftest.er1 >conftest.err
18640 rm -f conftest.er1
18641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643 (exit $ac_status); } && {
18644 test -z "$ac_c_werror_flag" ||
18645 test ! -s conftest.err
18646 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018647 ac_cv_struct_tm=time.h
18648else
Martin v. Löwis11437992002-04-12 09:54:03 +000018649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018650sed 's/^/| /' conftest.$ac_ext >&5
18651
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018654
18655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018657{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18658echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018659if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018660
18661cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018662#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018663_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018664
18665fi
18666
Martin v. Löwiseba40652007-08-30 20:10:57 +000018667{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18668echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018669if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018671else
Martin v. Löwis11437992002-04-12 09:54:03 +000018672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018673/* confdefs.h. */
18674_ACEOF
18675cat confdefs.h >>conftest.$ac_ext
18676cat >>conftest.$ac_ext <<_ACEOF
18677/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018678#include <sys/types.h>
18679#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018680
18681
Martin v. Löwis11437992002-04-12 09:54:03 +000018682int
18683main ()
18684{
18685static struct tm ac_aggr;
18686if (ac_aggr.tm_zone)
18687return 0;
18688 ;
18689 return 0;
18690}
18691_ACEOF
18692rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018693if { (ac_try="$ac_compile"
18694case "(($ac_try" in
18695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18696 *) ac_try_echo=$ac_try;;
18697esac
18698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018701 grep -v '^ *+' conftest.er1 >conftest.err
18702 rm -f conftest.er1
18703 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018705 (exit $ac_status); } && {
18706 test -z "$ac_c_werror_flag" ||
18707 test ! -s conftest.err
18708 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018709 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018710else
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018712sed 's/^/| /' conftest.$ac_ext >&5
18713
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018715/* confdefs.h. */
18716_ACEOF
18717cat confdefs.h >>conftest.$ac_ext
18718cat >>conftest.$ac_ext <<_ACEOF
18719/* end confdefs.h. */
18720#include <sys/types.h>
18721#include <$ac_cv_struct_tm>
18722
18723
18724int
18725main ()
18726{
18727static struct tm ac_aggr;
18728if (sizeof ac_aggr.tm_zone)
18729return 0;
18730 ;
18731 return 0;
18732}
18733_ACEOF
18734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735if { (ac_try="$ac_compile"
18736case "(($ac_try" in
18737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18738 *) ac_try_echo=$ac_try;;
18739esac
18740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18741 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018743 grep -v '^ *+' conftest.er1 >conftest.err
18744 rm -f conftest.er1
18745 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747 (exit $ac_status); } && {
18748 test -z "$ac_c_werror_flag" ||
18749 test ! -s conftest.err
18750 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018751 ac_cv_member_struct_tm_tm_zone=yes
18752else
18753 echo "$as_me: failed program was:" >&5
18754sed 's/^/| /' conftest.$ac_ext >&5
18755
Martin v. Löwiseba40652007-08-30 20:10:57 +000018756 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018758
18759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018761
18762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018764{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18765echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018766if test $ac_cv_member_struct_tm_tm_zone = yes; then
18767
18768cat >>confdefs.h <<_ACEOF
18769#define HAVE_STRUCT_TM_TM_ZONE 1
18770_ACEOF
18771
18772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018773fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018774
Martin v. Löwis11437992002-04-12 09:54:03 +000018775if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18776
18777cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018778#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018779_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018780
18781else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018782 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18783echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18784if test "${ac_cv_have_decl_tzname+set}" = set; then
18785 echo $ECHO_N "(cached) $ECHO_C" >&6
18786else
18787 cat >conftest.$ac_ext <<_ACEOF
18788/* confdefs.h. */
18789_ACEOF
18790cat confdefs.h >>conftest.$ac_ext
18791cat >>conftest.$ac_ext <<_ACEOF
18792/* end confdefs.h. */
18793#include <time.h>
18794
18795int
18796main ()
18797{
18798#ifndef tzname
18799 (void) tzname;
18800#endif
18801
18802 ;
18803 return 0;
18804}
18805_ACEOF
18806rm -f conftest.$ac_objext
18807if { (ac_try="$ac_compile"
18808case "(($ac_try" in
18809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18810 *) ac_try_echo=$ac_try;;
18811esac
18812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18813 (eval "$ac_compile") 2>conftest.er1
18814 ac_status=$?
18815 grep -v '^ *+' conftest.er1 >conftest.err
18816 rm -f conftest.er1
18817 cat conftest.err >&5
18818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18819 (exit $ac_status); } && {
18820 test -z "$ac_c_werror_flag" ||
18821 test ! -s conftest.err
18822 } && test -s conftest.$ac_objext; then
18823 ac_cv_have_decl_tzname=yes
18824else
18825 echo "$as_me: failed program was:" >&5
18826sed 's/^/| /' conftest.$ac_ext >&5
18827
18828 ac_cv_have_decl_tzname=no
18829fi
18830
18831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18832fi
18833{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18834echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18835if test $ac_cv_have_decl_tzname = yes; then
18836
18837cat >>confdefs.h <<_ACEOF
18838#define HAVE_DECL_TZNAME 1
18839_ACEOF
18840
18841
18842else
18843 cat >>confdefs.h <<_ACEOF
18844#define HAVE_DECL_TZNAME 0
18845_ACEOF
18846
18847
18848fi
18849
18850
18851 { echo "$as_me:$LINENO: checking for tzname" >&5
18852echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018853if test "${ac_cv_var_tzname+set}" = set; then
18854 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018855else
Martin v. Löwis11437992002-04-12 09:54:03 +000018856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018857/* confdefs.h. */
18858_ACEOF
18859cat confdefs.h >>conftest.$ac_ext
18860cat >>conftest.$ac_ext <<_ACEOF
18861/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018862#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018863#if !HAVE_DECL_TZNAME
18864extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018866
Martin v. Löwis11437992002-04-12 09:54:03 +000018867int
18868main ()
18869{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018870return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018871 ;
18872 return 0;
18873}
18874_ACEOF
18875rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018876if { (ac_try="$ac_link"
18877case "(($ac_try" in
18878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879 *) ac_try_echo=$ac_try;;
18880esac
18881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018888 (exit $ac_status); } && {
18889 test -z "$ac_c_werror_flag" ||
18890 test ! -s conftest.err
18891 } && test -s conftest$ac_exeext &&
18892 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018893 ac_cv_var_tzname=yes
18894else
Martin v. Löwis11437992002-04-12 09:54:03 +000018895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018896sed 's/^/| /' conftest.$ac_ext >&5
18897
Martin v. Löwiseba40652007-08-30 20:10:57 +000018898 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018900
18901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018902 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18905echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018906 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018907
18908cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018909#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018910_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018911
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018912 fi
18913fi
18914
Martin v. Löwiseba40652007-08-30 20:10:57 +000018915{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18916echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018917if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18918 echo $ECHO_N "(cached) $ECHO_C" >&6
18919else
18920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018921/* confdefs.h. */
18922_ACEOF
18923cat confdefs.h >>conftest.$ac_ext
18924cat >>conftest.$ac_ext <<_ACEOF
18925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018927int
18928main ()
18929{
18930static struct stat ac_aggr;
18931if (ac_aggr.st_rdev)
18932return 0;
18933 ;
18934 return 0;
18935}
18936_ACEOF
18937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018938if { (ac_try="$ac_compile"
18939case "(($ac_try" in
18940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18941 *) ac_try_echo=$ac_try;;
18942esac
18943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018946 grep -v '^ *+' conftest.er1 >conftest.err
18947 rm -f conftest.er1
18948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018950 (exit $ac_status); } && {
18951 test -z "$ac_c_werror_flag" ||
18952 test ! -s conftest.err
18953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 ac_cv_member_struct_stat_st_rdev=yes
18955else
18956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018957sed 's/^/| /' conftest.$ac_ext >&5
18958
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018960/* confdefs.h. */
18961_ACEOF
18962cat confdefs.h >>conftest.$ac_ext
18963cat >>conftest.$ac_ext <<_ACEOF
18964/* end confdefs.h. */
18965$ac_includes_default
18966int
18967main ()
18968{
18969static struct stat ac_aggr;
18970if (sizeof ac_aggr.st_rdev)
18971return 0;
18972 ;
18973 return 0;
18974}
18975_ACEOF
18976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977if { (ac_try="$ac_compile"
18978case "(($ac_try" in
18979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18980 *) ac_try_echo=$ac_try;;
18981esac
18982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18983 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018985 grep -v '^ *+' conftest.er1 >conftest.err
18986 rm -f conftest.er1
18987 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018989 (exit $ac_status); } && {
18990 test -z "$ac_c_werror_flag" ||
18991 test ! -s conftest.err
18992 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018993 ac_cv_member_struct_stat_st_rdev=yes
18994else
18995 echo "$as_me: failed program was:" >&5
18996sed 's/^/| /' conftest.$ac_ext >&5
18997
Martin v. Löwiseba40652007-08-30 20:10:57 +000018998 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019000
19001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019003
19004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019006{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19007echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019008if test $ac_cv_member_struct_stat_st_rdev = yes; then
19009
19010cat >>confdefs.h <<_ACEOF
19011#define HAVE_STRUCT_STAT_ST_RDEV 1
19012_ACEOF
19013
19014
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019015fi
19016
Martin v. Löwiseba40652007-08-30 20:10:57 +000019017{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19018echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019019if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019021else
Martin v. Löwis11437992002-04-12 09:54:03 +000019022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019023/* confdefs.h. */
19024_ACEOF
19025cat confdefs.h >>conftest.$ac_ext
19026cat >>conftest.$ac_ext <<_ACEOF
19027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019028$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019029int
19030main ()
19031{
19032static struct stat ac_aggr;
19033if (ac_aggr.st_blksize)
19034return 0;
19035 ;
19036 return 0;
19037}
19038_ACEOF
19039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019040if { (ac_try="$ac_compile"
19041case "(($ac_try" in
19042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19043 *) ac_try_echo=$ac_try;;
19044esac
19045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019048 grep -v '^ *+' conftest.er1 >conftest.err
19049 rm -f conftest.er1
19050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019052 (exit $ac_status); } && {
19053 test -z "$ac_c_werror_flag" ||
19054 test ! -s conftest.err
19055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019057else
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019059sed 's/^/| /' conftest.$ac_ext >&5
19060
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019062/* confdefs.h. */
19063_ACEOF
19064cat confdefs.h >>conftest.$ac_ext
19065cat >>conftest.$ac_ext <<_ACEOF
19066/* end confdefs.h. */
19067$ac_includes_default
19068int
19069main ()
19070{
19071static struct stat ac_aggr;
19072if (sizeof ac_aggr.st_blksize)
19073return 0;
19074 ;
19075 return 0;
19076}
19077_ACEOF
19078rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079if { (ac_try="$ac_compile"
19080case "(($ac_try" in
19081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19082 *) ac_try_echo=$ac_try;;
19083esac
19084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19085 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019087 grep -v '^ *+' conftest.er1 >conftest.err
19088 rm -f conftest.er1
19089 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019091 (exit $ac_status); } && {
19092 test -z "$ac_c_werror_flag" ||
19093 test ! -s conftest.err
19094 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019095 ac_cv_member_struct_stat_st_blksize=yes
19096else
19097 echo "$as_me: failed program was:" >&5
19098sed 's/^/| /' conftest.$ac_ext >&5
19099
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019102
19103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019105
19106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019108{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19109echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019110if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019111
Martin v. Löwis11437992002-04-12 09:54:03 +000019112cat >>confdefs.h <<_ACEOF
19113#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19114_ACEOF
19115
19116
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019117fi
19118
Martin v. Löwiseba40652007-08-30 20:10:57 +000019119{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19120echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019121if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19122 echo $ECHO_N "(cached) $ECHO_C" >&6
19123else
19124 cat >conftest.$ac_ext <<_ACEOF
19125/* confdefs.h. */
19126_ACEOF
19127cat confdefs.h >>conftest.$ac_ext
19128cat >>conftest.$ac_ext <<_ACEOF
19129/* end confdefs.h. */
19130$ac_includes_default
19131int
19132main ()
19133{
19134static struct stat ac_aggr;
19135if (ac_aggr.st_flags)
19136return 0;
19137 ;
19138 return 0;
19139}
19140_ACEOF
19141rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019142if { (ac_try="$ac_compile"
19143case "(($ac_try" in
19144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19145 *) ac_try_echo=$ac_try;;
19146esac
19147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19148 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019149 ac_status=$?
19150 grep -v '^ *+' conftest.er1 >conftest.err
19151 rm -f conftest.er1
19152 cat conftest.err >&5
19153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019154 (exit $ac_status); } && {
19155 test -z "$ac_c_werror_flag" ||
19156 test ! -s conftest.err
19157 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019158 ac_cv_member_struct_stat_st_flags=yes
19159else
19160 echo "$as_me: failed program was:" >&5
19161sed 's/^/| /' conftest.$ac_ext >&5
19162
Martin v. Löwiseba40652007-08-30 20:10:57 +000019163 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019164/* confdefs.h. */
19165_ACEOF
19166cat confdefs.h >>conftest.$ac_ext
19167cat >>conftest.$ac_ext <<_ACEOF
19168/* end confdefs.h. */
19169$ac_includes_default
19170int
19171main ()
19172{
19173static struct stat ac_aggr;
19174if (sizeof ac_aggr.st_flags)
19175return 0;
19176 ;
19177 return 0;
19178}
19179_ACEOF
19180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019181if { (ac_try="$ac_compile"
19182case "(($ac_try" in
19183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19184 *) ac_try_echo=$ac_try;;
19185esac
19186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19187 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019188 ac_status=$?
19189 grep -v '^ *+' conftest.er1 >conftest.err
19190 rm -f conftest.er1
19191 cat conftest.err >&5
19192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019193 (exit $ac_status); } && {
19194 test -z "$ac_c_werror_flag" ||
19195 test ! -s conftest.err
19196 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019197 ac_cv_member_struct_stat_st_flags=yes
19198else
19199 echo "$as_me: failed program was:" >&5
19200sed 's/^/| /' conftest.$ac_ext >&5
19201
Martin v. Löwiseba40652007-08-30 20:10:57 +000019202 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019204
19205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019207
19208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019210{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19211echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019212if test $ac_cv_member_struct_stat_st_flags = yes; then
19213
19214cat >>confdefs.h <<_ACEOF
19215#define HAVE_STRUCT_STAT_ST_FLAGS 1
19216_ACEOF
19217
19218
19219fi
19220
Martin v. Löwiseba40652007-08-30 20:10:57 +000019221{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19222echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019223if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19224 echo $ECHO_N "(cached) $ECHO_C" >&6
19225else
19226 cat >conftest.$ac_ext <<_ACEOF
19227/* confdefs.h. */
19228_ACEOF
19229cat confdefs.h >>conftest.$ac_ext
19230cat >>conftest.$ac_ext <<_ACEOF
19231/* end confdefs.h. */
19232$ac_includes_default
19233int
19234main ()
19235{
19236static struct stat ac_aggr;
19237if (ac_aggr.st_gen)
19238return 0;
19239 ;
19240 return 0;
19241}
19242_ACEOF
19243rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019244if { (ac_try="$ac_compile"
19245case "(($ac_try" in
19246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19247 *) ac_try_echo=$ac_try;;
19248esac
19249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019251 ac_status=$?
19252 grep -v '^ *+' conftest.er1 >conftest.err
19253 rm -f conftest.er1
19254 cat conftest.err >&5
19255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019256 (exit $ac_status); } && {
19257 test -z "$ac_c_werror_flag" ||
19258 test ! -s conftest.err
19259 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019260 ac_cv_member_struct_stat_st_gen=yes
19261else
19262 echo "$as_me: failed program was:" >&5
19263sed 's/^/| /' conftest.$ac_ext >&5
19264
Martin v. Löwiseba40652007-08-30 20:10:57 +000019265 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019266/* confdefs.h. */
19267_ACEOF
19268cat confdefs.h >>conftest.$ac_ext
19269cat >>conftest.$ac_ext <<_ACEOF
19270/* end confdefs.h. */
19271$ac_includes_default
19272int
19273main ()
19274{
19275static struct stat ac_aggr;
19276if (sizeof ac_aggr.st_gen)
19277return 0;
19278 ;
19279 return 0;
19280}
19281_ACEOF
19282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019283if { (ac_try="$ac_compile"
19284case "(($ac_try" in
19285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19286 *) ac_try_echo=$ac_try;;
19287esac
19288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019290 ac_status=$?
19291 grep -v '^ *+' conftest.er1 >conftest.err
19292 rm -f conftest.er1
19293 cat conftest.err >&5
19294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019295 (exit $ac_status); } && {
19296 test -z "$ac_c_werror_flag" ||
19297 test ! -s conftest.err
19298 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019299 ac_cv_member_struct_stat_st_gen=yes
19300else
19301 echo "$as_me: failed program was:" >&5
19302sed 's/^/| /' conftest.$ac_ext >&5
19303
Martin v. Löwiseba40652007-08-30 20:10:57 +000019304 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019306
19307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019309
19310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19313echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019314if test $ac_cv_member_struct_stat_st_gen = yes; then
19315
19316cat >>confdefs.h <<_ACEOF
19317#define HAVE_STRUCT_STAT_ST_GEN 1
19318_ACEOF
19319
19320
19321fi
19322
Martin v. Löwiseba40652007-08-30 20:10:57 +000019323{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19324echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019325if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19326 echo $ECHO_N "(cached) $ECHO_C" >&6
19327else
19328 cat >conftest.$ac_ext <<_ACEOF
19329/* confdefs.h. */
19330_ACEOF
19331cat confdefs.h >>conftest.$ac_ext
19332cat >>conftest.$ac_ext <<_ACEOF
19333/* end confdefs.h. */
19334$ac_includes_default
19335int
19336main ()
19337{
19338static struct stat ac_aggr;
19339if (ac_aggr.st_birthtime)
19340return 0;
19341 ;
19342 return 0;
19343}
19344_ACEOF
19345rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019346if { (ac_try="$ac_compile"
19347case "(($ac_try" in
19348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19349 *) ac_try_echo=$ac_try;;
19350esac
19351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19352 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019353 ac_status=$?
19354 grep -v '^ *+' conftest.er1 >conftest.err
19355 rm -f conftest.er1
19356 cat conftest.err >&5
19357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019358 (exit $ac_status); } && {
19359 test -z "$ac_c_werror_flag" ||
19360 test ! -s conftest.err
19361 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019362 ac_cv_member_struct_stat_st_birthtime=yes
19363else
19364 echo "$as_me: failed program was:" >&5
19365sed 's/^/| /' conftest.$ac_ext >&5
19366
Martin v. Löwiseba40652007-08-30 20:10:57 +000019367 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019368/* confdefs.h. */
19369_ACEOF
19370cat confdefs.h >>conftest.$ac_ext
19371cat >>conftest.$ac_ext <<_ACEOF
19372/* end confdefs.h. */
19373$ac_includes_default
19374int
19375main ()
19376{
19377static struct stat ac_aggr;
19378if (sizeof ac_aggr.st_birthtime)
19379return 0;
19380 ;
19381 return 0;
19382}
19383_ACEOF
19384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385if { (ac_try="$ac_compile"
19386case "(($ac_try" in
19387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19388 *) ac_try_echo=$ac_try;;
19389esac
19390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019392 ac_status=$?
19393 grep -v '^ *+' conftest.er1 >conftest.err
19394 rm -f conftest.er1
19395 cat conftest.err >&5
19396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019397 (exit $ac_status); } && {
19398 test -z "$ac_c_werror_flag" ||
19399 test ! -s conftest.err
19400 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019401 ac_cv_member_struct_stat_st_birthtime=yes
19402else
19403 echo "$as_me: failed program was:" >&5
19404sed 's/^/| /' conftest.$ac_ext >&5
19405
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019408
19409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019411
19412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019414{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19415echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019416if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19417
19418cat >>confdefs.h <<_ACEOF
19419#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19420_ACEOF
19421
19422
19423fi
19424
Martin v. Löwiseba40652007-08-30 20:10:57 +000019425{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19426echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019427if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019429else
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019431/* confdefs.h. */
19432_ACEOF
19433cat confdefs.h >>conftest.$ac_ext
19434cat >>conftest.$ac_ext <<_ACEOF
19435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019436$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019437int
19438main ()
19439{
19440static struct stat ac_aggr;
19441if (ac_aggr.st_blocks)
19442return 0;
19443 ;
19444 return 0;
19445}
19446_ACEOF
19447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019448if { (ac_try="$ac_compile"
19449case "(($ac_try" in
19450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19451 *) ac_try_echo=$ac_try;;
19452esac
19453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 grep -v '^ *+' conftest.er1 >conftest.err
19457 rm -f conftest.er1
19458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460 (exit $ac_status); } && {
19461 test -z "$ac_c_werror_flag" ||
19462 test ! -s conftest.err
19463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019465else
Martin v. Löwis11437992002-04-12 09:54:03 +000019466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019467sed 's/^/| /' conftest.$ac_ext >&5
19468
Martin v. Löwiseba40652007-08-30 20:10:57 +000019469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019470/* confdefs.h. */
19471_ACEOF
19472cat confdefs.h >>conftest.$ac_ext
19473cat >>conftest.$ac_ext <<_ACEOF
19474/* end confdefs.h. */
19475$ac_includes_default
19476int
19477main ()
19478{
19479static struct stat ac_aggr;
19480if (sizeof ac_aggr.st_blocks)
19481return 0;
19482 ;
19483 return 0;
19484}
19485_ACEOF
19486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019487if { (ac_try="$ac_compile"
19488case "(($ac_try" in
19489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19490 *) ac_try_echo=$ac_try;;
19491esac
19492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19493 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019495 grep -v '^ *+' conftest.er1 >conftest.err
19496 rm -f conftest.er1
19497 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019499 (exit $ac_status); } && {
19500 test -z "$ac_c_werror_flag" ||
19501 test ! -s conftest.err
19502 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019503 ac_cv_member_struct_stat_st_blocks=yes
19504else
19505 echo "$as_me: failed program was:" >&5
19506sed 's/^/| /' conftest.$ac_ext >&5
19507
Martin v. Löwiseba40652007-08-30 20:10:57 +000019508 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510
19511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019513
19514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19517echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019518if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019519
Martin v. Löwis11437992002-04-12 09:54:03 +000019520cat >>confdefs.h <<_ACEOF
19521#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19522_ACEOF
19523
19524
19525cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019526#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019527_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019528
19529else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019530 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019531 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19533 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019534esac
19535
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019536fi
19537
Michael W. Hudson54241132001-12-07 15:38:26 +000019538
Martin v. Löwis11437992002-04-12 09:54:03 +000019539
Martin v. Löwiseba40652007-08-30 20:10:57 +000019540{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19541echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019542if test "${ac_cv_header_time_altzone+set}" = set; then
19543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019544else
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019546/* confdefs.h. */
19547_ACEOF
19548cat confdefs.h >>conftest.$ac_ext
19549cat >>conftest.$ac_ext <<_ACEOF
19550/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019551#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019552int
19553main ()
19554{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019555return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 ;
19557 return 0;
19558}
19559_ACEOF
19560rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561if { (ac_try="$ac_compile"
19562case "(($ac_try" in
19563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19564 *) ac_try_echo=$ac_try;;
19565esac
19566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019569 grep -v '^ *+' conftest.er1 >conftest.err
19570 rm -f conftest.er1
19571 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019573 (exit $ac_status); } && {
19574 test -z "$ac_c_werror_flag" ||
19575 test ! -s conftest.err
19576 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019577 ac_cv_header_time_altzone=yes
19578else
Martin v. Löwis11437992002-04-12 09:54:03 +000019579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019580sed 's/^/| /' conftest.$ac_ext >&5
19581
Martin v. Löwiseba40652007-08-30 20:10:57 +000019582 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019583fi
19584
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19586fi
19587
19588{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19589echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019590if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019591
19592cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019593#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019594_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019595
19596fi
19597
Guido van Rossumda88dad1995-01-26 00:46:29 +000019598was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019599{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19600echo $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 +000019601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019602/* confdefs.h. */
19603_ACEOF
19604cat confdefs.h >>conftest.$ac_ext
19605cat >>conftest.$ac_ext <<_ACEOF
19606/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019607
19608#include <sys/types.h>
19609#include <sys/select.h>
19610#include <sys/time.h>
19611
Martin v. Löwis11437992002-04-12 09:54:03 +000019612int
19613main ()
19614{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019615;
Martin v. Löwis11437992002-04-12 09:54:03 +000019616 ;
19617 return 0;
19618}
19619_ACEOF
19620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019621if { (ac_try="$ac_compile"
19622case "(($ac_try" in
19623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19624 *) ac_try_echo=$ac_try;;
19625esac
19626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019629 grep -v '^ *+' conftest.er1 >conftest.err
19630 rm -f conftest.er1
19631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019633 (exit $ac_status); } && {
19634 test -z "$ac_c_werror_flag" ||
19635 test ! -s conftest.err
19636 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019637
19638
19639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019640#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019641_ACEOF
19642
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019643 was_it_defined=yes
19644
Guido van Rossumf78abae1997-01-21 22:02:36 +000019645else
Martin v. Löwis11437992002-04-12 09:54:03 +000019646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019647sed 's/^/| /' conftest.$ac_ext >&5
19648
Brett Cannon19fab762007-06-02 03:02:29 +000019649
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650fi
19651
19652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19653{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19654echo "${ECHO_T}$was_it_defined" >&6; }
19655
19656{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19657echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019658if test "${ac_cv_struct_addrinfo+set}" = set; then
19659 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019660else
Martin v. Löwis11437992002-04-12 09:54:03 +000019661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019662/* confdefs.h. */
19663_ACEOF
19664cat confdefs.h >>conftest.$ac_ext
19665cat >>conftest.$ac_ext <<_ACEOF
19666/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019667
19668# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019669int
19670main ()
19671{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019672struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019673 ;
19674 return 0;
19675}
19676_ACEOF
19677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678if { (ac_try="$ac_compile"
19679case "(($ac_try" in
19680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19681 *) ac_try_echo=$ac_try;;
19682esac
19683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019686 grep -v '^ *+' conftest.er1 >conftest.err
19687 rm -f conftest.er1
19688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019690 (exit $ac_status); } && {
19691 test -z "$ac_c_werror_flag" ||
19692 test ! -s conftest.err
19693 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019694 ac_cv_struct_addrinfo=yes
19695else
Martin v. Löwis11437992002-04-12 09:54:03 +000019696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019697sed 's/^/| /' conftest.$ac_ext >&5
19698
Martin v. Löwiseba40652007-08-30 20:10:57 +000019699 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019700fi
19701
Martin v. Löwiseba40652007-08-30 20:10:57 +000019702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19703fi
19704
19705{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19706echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019707if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019708
19709cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019710#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019711_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019712
19713fi
19714
Martin v. Löwiseba40652007-08-30 20:10:57 +000019715{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19716echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019717if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19718 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019719else
Martin v. Löwis11437992002-04-12 09:54:03 +000019720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019721/* confdefs.h. */
19722_ACEOF
19723cat confdefs.h >>conftest.$ac_ext
19724cat >>conftest.$ac_ext <<_ACEOF
19725/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019726
19727# include <sys/types.h>
19728# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019729int
19730main ()
19731{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019732struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019733 ;
19734 return 0;
19735}
19736_ACEOF
19737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019738if { (ac_try="$ac_compile"
19739case "(($ac_try" in
19740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19741 *) ac_try_echo=$ac_try;;
19742esac
19743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019746 grep -v '^ *+' conftest.er1 >conftest.err
19747 rm -f conftest.er1
19748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019750 (exit $ac_status); } && {
19751 test -z "$ac_c_werror_flag" ||
19752 test ! -s conftest.err
19753 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019754 ac_cv_struct_sockaddr_storage=yes
19755else
Martin v. Löwis11437992002-04-12 09:54:03 +000019756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019757sed 's/^/| /' conftest.$ac_ext >&5
19758
Martin v. Löwiseba40652007-08-30 20:10:57 +000019759 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019760fi
19761
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19763fi
19764
19765{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19766echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019767if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019768
19769cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019770#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019771_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019772
19773fi
19774
Guido van Rossum627b2d71993-12-24 10:39:16 +000019775# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019776
Michael W. Hudson54241132001-12-07 15:38:26 +000019777
Martin v. Löwiseba40652007-08-30 20:10:57 +000019778{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19779echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019780if test "${ac_cv_c_char_unsigned+set}" = set; then
19781 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019782else
Martin v. Löwis11437992002-04-12 09:54:03 +000019783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019784/* confdefs.h. */
19785_ACEOF
19786cat confdefs.h >>conftest.$ac_ext
19787cat >>conftest.$ac_ext <<_ACEOF
19788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019789$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019790int
19791main ()
19792{
19793static int test_array [1 - 2 * !(((char) -1) < 0)];
19794test_array [0] = 0
19795
19796 ;
19797 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019798}
Martin v. Löwis11437992002-04-12 09:54:03 +000019799_ACEOF
19800rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801if { (ac_try="$ac_compile"
19802case "(($ac_try" in
19803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19804 *) ac_try_echo=$ac_try;;
19805esac
19806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019809 grep -v '^ *+' conftest.er1 >conftest.err
19810 rm -f conftest.er1
19811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019813 (exit $ac_status); } && {
19814 test -z "$ac_c_werror_flag" ||
19815 test ! -s conftest.err
19816 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019817 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019818else
19819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019820sed 's/^/| /' conftest.$ac_ext >&5
19821
Martin v. Löwiseba40652007-08-30 20:10:57 +000019822 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019824
19825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019827{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19828echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019829if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019830 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019831#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019832_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019833
19834fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019835
Martin v. Löwiseba40652007-08-30 20:10:57 +000019836{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19837echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019838if test "${ac_cv_c_const+set}" = set; then
19839 echo $ECHO_N "(cached) $ECHO_C" >&6
19840else
19841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019842/* confdefs.h. */
19843_ACEOF
19844cat confdefs.h >>conftest.$ac_ext
19845cat >>conftest.$ac_ext <<_ACEOF
19846/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847
Martin v. Löwis11437992002-04-12 09:54:03 +000019848int
19849main ()
19850{
19851/* FIXME: Include the comments suggested by Paul. */
19852#ifndef __cplusplus
19853 /* Ultrix mips cc rejects this. */
19854 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019855 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019856 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019857 char const *const *pcpcc;
19858 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019859 /* NEC SVR4.0.2 mips cc rejects this. */
19860 struct point {int x, y;};
19861 static struct point const zero = {0,0};
19862 /* AIX XL C 1.02.0.0 rejects this.
19863 It does not let you subtract one const X* pointer from another in
19864 an arm of an if-expression whose if-part is not a constant
19865 expression */
19866 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019867 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019868 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869 ++pcpcc;
19870 ppc = (char**) pcpcc;
19871 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019872 { /* SCO 3.2v4 cc rejects this. */
19873 char *t;
19874 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019875
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 }
19879 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19880 int x[] = {25, 17};
19881 const int *foo = &x[0];
19882 ++foo;
19883 }
19884 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19885 typedef const int *iptr;
19886 iptr p = 0;
19887 ++p;
19888 }
19889 { /* AIX XL C 1.02.0.0 rejects this saying
19890 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19891 struct s { int j; const int *ap[3]; };
19892 struct s *b; b->j = 5;
19893 }
19894 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19895 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019896 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019899#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019900
Martin v. Löwis11437992002-04-12 09:54:03 +000019901 ;
19902 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019903}
Martin v. Löwis11437992002-04-12 09:54:03 +000019904_ACEOF
19905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019906if { (ac_try="$ac_compile"
19907case "(($ac_try" in
19908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19909 *) ac_try_echo=$ac_try;;
19910esac
19911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019914 grep -v '^ *+' conftest.er1 >conftest.err
19915 rm -f conftest.er1
19916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019918 (exit $ac_status); } && {
19919 test -z "$ac_c_werror_flag" ||
19920 test ! -s conftest.err
19921 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019922 ac_cv_c_const=yes
19923else
Martin v. Löwis11437992002-04-12 09:54:03 +000019924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019925sed 's/^/| /' conftest.$ac_ext >&5
19926
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929
19930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19933echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019934if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019935
19936cat >>confdefs.h <<\_ACEOF
19937#define const
19938_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019939
19940fi
19941
Michael W. Hudson54241132001-12-07 15:38:26 +000019942
Guido van Rossumda88dad1995-01-26 00:46:29 +000019943works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944{ echo "$as_me:$LINENO: checking for working volatile" >&5
19945echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019946cat >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. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019952
Martin v. Löwis11437992002-04-12 09:54:03 +000019953int
19954main ()
19955{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019956volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019957 ;
19958 return 0;
19959}
19960_ACEOF
19961rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019962if { (ac_try="$ac_compile"
19963case "(($ac_try" in
19964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19965 *) ac_try_echo=$ac_try;;
19966esac
19967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019970 grep -v '^ *+' conftest.er1 >conftest.err
19971 rm -f conftest.er1
19972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019974 (exit $ac_status); } && {
19975 test -z "$ac_c_werror_flag" ||
19976 test ! -s conftest.err
19977 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019978 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019979else
Martin v. Löwis11437992002-04-12 09:54:03 +000019980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019981sed 's/^/| /' conftest.$ac_ext >&5
19982
Martin v. Löwis11437992002-04-12 09:54:03 +000019983
19984cat >>confdefs.h <<\_ACEOF
19985#define volatile
19986_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019987
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019988
Guido van Rossum627b2d71993-12-24 10:39:16 +000019989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019990
19991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19992{ echo "$as_me:$LINENO: result: $works" >&5
19993echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019994
Guido van Rossumda88dad1995-01-26 00:46:29 +000019995works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019996{ echo "$as_me:$LINENO: checking for working signed char" >&5
19997echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019998cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019999/* confdefs.h. */
20000_ACEOF
20001cat confdefs.h >>conftest.$ac_ext
20002cat >>conftest.$ac_ext <<_ACEOF
20003/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020004
Martin v. Löwis11437992002-04-12 09:54:03 +000020005int
20006main ()
20007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020008signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 ;
20010 return 0;
20011}
20012_ACEOF
20013rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020014if { (ac_try="$ac_compile"
20015case "(($ac_try" in
20016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20017 *) ac_try_echo=$ac_try;;
20018esac
20019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020022 grep -v '^ *+' conftest.er1 >conftest.err
20023 rm -f conftest.er1
20024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026 (exit $ac_status); } && {
20027 test -z "$ac_c_werror_flag" ||
20028 test ! -s conftest.err
20029 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020030 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020031else
Martin v. Löwis11437992002-04-12 09:54:03 +000020032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020033sed 's/^/| /' conftest.$ac_ext >&5
20034
Martin v. Löwis11437992002-04-12 09:54:03 +000020035
20036cat >>confdefs.h <<\_ACEOF
20037#define signed
20038_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020039
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020040
Guido van Rossum7f43da71994-08-01 12:15:30 +000020041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020042
20043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20044{ echo "$as_me:$LINENO: result: $works" >&5
20045echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020046
Guido van Rossumda88dad1995-01-26 00:46:29 +000020047have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020048{ echo "$as_me:$LINENO: checking for prototypes" >&5
20049echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020051/* confdefs.h. */
20052_ACEOF
20053cat confdefs.h >>conftest.$ac_ext
20054cat >>conftest.$ac_ext <<_ACEOF
20055/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020056int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020057int
20058main ()
20059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020060return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020061 ;
20062 return 0;
20063}
20064_ACEOF
20065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066if { (ac_try="$ac_compile"
20067case "(($ac_try" in
20068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20069 *) ac_try_echo=$ac_try;;
20070esac
20071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20072 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020074 grep -v '^ *+' conftest.er1 >conftest.err
20075 rm -f conftest.er1
20076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020078 (exit $ac_status); } && {
20079 test -z "$ac_c_werror_flag" ||
20080 test ! -s conftest.err
20081 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020082
20083
20084cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020085#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020086_ACEOF
20087
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020088 have_prototypes=yes
20089
Guido van Rossumf78abae1997-01-21 22:02:36 +000020090else
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020092sed 's/^/| /' conftest.$ac_ext >&5
20093
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094
Guido van Rossum7f43da71994-08-01 12:15:30 +000020095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020096
20097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20098{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20099echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020100
Guido van Rossumda88dad1995-01-26 00:46:29 +000020101works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20103echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020105/* confdefs.h. */
20106_ACEOF
20107cat confdefs.h >>conftest.$ac_ext
20108cat >>conftest.$ac_ext <<_ACEOF
20109/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020110
20111#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020112int foo(int x, ...) {
20113 va_list va;
20114 va_start(va, x);
20115 va_arg(va, int);
20116 va_arg(va, char *);
20117 va_arg(va, double);
20118 return 0;
20119}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020120
Martin v. Löwis11437992002-04-12 09:54:03 +000020121int
20122main ()
20123{
Guido van Rossum90eea071996-08-30 20:58:57 +000020124return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ;
20126 return 0;
20127}
20128_ACEOF
20129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130if { (ac_try="$ac_compile"
20131case "(($ac_try" in
20132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20133 *) ac_try_echo=$ac_try;;
20134esac
20135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020138 grep -v '^ *+' conftest.er1 >conftest.err
20139 rm -f conftest.er1
20140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020142 (exit $ac_status); } && {
20143 test -z "$ac_c_werror_flag" ||
20144 test ! -s conftest.err
20145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020146
20147
20148cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020149#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020150_ACEOF
20151
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020152 works=yes
20153
Guido van Rossumf78abae1997-01-21 22:02:36 +000020154else
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020156sed 's/^/| /' conftest.$ac_ext >&5
20157
Martin v. Löwiseba40652007-08-30 20:10:57 +000020158
Guido van Rossum627b2d71993-12-24 10:39:16 +000020159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160
20161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20162{ echo "$as_me:$LINENO: result: $works" >&5
20163echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020164
Martin v. Löwisd6320502004-08-12 13:45:08 +000020165# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166{ echo "$as_me:$LINENO: checking for socketpair" >&5
20167echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020168cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020169/* confdefs.h. */
20170_ACEOF
20171cat confdefs.h >>conftest.$ac_ext
20172cat >>conftest.$ac_ext <<_ACEOF
20173/* end confdefs.h. */
20174
20175#include <sys/types.h>
20176#include <sys/socket.h>
20177
20178int
20179main ()
20180{
20181void *x=socketpair
20182 ;
20183 return 0;
20184}
20185_ACEOF
20186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020187if { (ac_try="$ac_compile"
20188case "(($ac_try" in
20189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20190 *) ac_try_echo=$ac_try;;
20191esac
20192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020195 grep -v '^ *+' conftest.er1 >conftest.err
20196 rm -f conftest.er1
20197 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020199 (exit $ac_status); } && {
20200 test -z "$ac_c_werror_flag" ||
20201 test ! -s conftest.err
20202 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020203
20204cat >>confdefs.h <<\_ACEOF
20205#define HAVE_SOCKETPAIR 1
20206_ACEOF
20207
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208 { echo "$as_me:$LINENO: result: yes" >&5
20209echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020210else
20211 echo "$as_me: failed program was:" >&5
20212sed 's/^/| /' conftest.$ac_ext >&5
20213
Martin v. Löwiseba40652007-08-30 20:10:57 +000020214 { echo "$as_me:$LINENO: result: no" >&5
20215echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020216
20217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020218
20219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020220
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020221# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20223echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020224cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020225/* confdefs.h. */
20226_ACEOF
20227cat confdefs.h >>conftest.$ac_ext
20228cat >>conftest.$ac_ext <<_ACEOF
20229/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020230#include <sys/types.h>
20231#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020232int
20233main ()
20234{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020235struct sockaddr x;
20236x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020237 ;
20238 return 0;
20239}
20240_ACEOF
20241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242if { (ac_try="$ac_compile"
20243case "(($ac_try" in
20244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245 *) ac_try_echo=$ac_try;;
20246esac
20247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020250 grep -v '^ *+' conftest.er1 >conftest.err
20251 rm -f conftest.er1
20252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254 (exit $ac_status); } && {
20255 test -z "$ac_c_werror_flag" ||
20256 test ! -s conftest.err
20257 } && test -s conftest.$ac_objext; then
20258 { echo "$as_me:$LINENO: result: yes" >&5
20259echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020260
20261cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020262#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020263_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020264
20265else
Martin v. Löwis11437992002-04-12 09:54:03 +000020266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020267sed 's/^/| /' conftest.$ac_ext >&5
20268
Martin v. Löwiseba40652007-08-30 20:10:57 +000020269 { echo "$as_me:$LINENO: result: no" >&5
20270echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020272
20273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020274
Guido van Rossumda88dad1995-01-26 00:46:29 +000020275va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20277echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020279/* confdefs.h. */
20280_ACEOF
20281cat confdefs.h >>conftest.$ac_ext
20282cat >>conftest.$ac_ext <<_ACEOF
20283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020284
20285#ifdef HAVE_STDARG_PROTOTYPES
20286#include <stdarg.h>
20287#else
20288#include <varargs.h>
20289#endif
20290
Martin v. Löwis11437992002-04-12 09:54:03 +000020291int
20292main ()
20293{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020294va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020295 ;
20296 return 0;
20297}
20298_ACEOF
20299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020300if { (ac_try="$ac_compile"
20301case "(($ac_try" in
20302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20303 *) ac_try_echo=$ac_try;;
20304esac
20305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020308 grep -v '^ *+' conftest.er1 >conftest.err
20309 rm -f conftest.er1
20310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020312 (exit $ac_status); } && {
20313 test -z "$ac_c_werror_flag" ||
20314 test ! -s conftest.err
20315 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020316 :
20317else
Martin v. Löwis11437992002-04-12 09:54:03 +000020318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020319sed 's/^/| /' conftest.$ac_ext >&5
20320
Martin v. Löwis11437992002-04-12 09:54:03 +000020321
20322
20323cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020324#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020325_ACEOF
20326
Guido van Rossumda88dad1995-01-26 00:46:29 +000020327 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020330
20331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20332{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20333echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020334
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020335# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020336
20337
20338
Martin v. Löwiseba40652007-08-30 20:10:57 +000020339{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20340echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020341if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020343else
Martin v. Löwis11437992002-04-12 09:54:03 +000020344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020345/* confdefs.h. */
20346_ACEOF
20347cat confdefs.h >>conftest.$ac_ext
20348cat >>conftest.$ac_ext <<_ACEOF
20349/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020350/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20352#define gethostbyname_r innocuous_gethostbyname_r
20353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020354/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020355 which can conflict with char gethostbyname_r (); below.
20356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020357 <limits.h> exists even on freestanding compilers. */
20358
20359#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020360# include <limits.h>
20361#else
20362# include <assert.h>
20363#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020364
20365#undef gethostbyname_r
20366
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367/* Override any GCC internal prototype to avoid an error.
20368 Use char because int might match the return type of a GCC
20369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020370#ifdef __cplusplus
20371extern "C"
20372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020373char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020374/* The GNU C library defines this for functions which it implements
20375 to always fail with ENOSYS. Some functions are actually named
20376 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020377#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020378choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020379#endif
20380
Skip Montanaro6dead952003-09-25 14:50:04 +000020381int
20382main ()
20383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020384return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020385 ;
20386 return 0;
20387}
20388_ACEOF
20389rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020390if { (ac_try="$ac_link"
20391case "(($ac_try" in
20392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20393 *) ac_try_echo=$ac_try;;
20394esac
20395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020398 grep -v '^ *+' conftest.er1 >conftest.err
20399 rm -f conftest.er1
20400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020402 (exit $ac_status); } && {
20403 test -z "$ac_c_werror_flag" ||
20404 test ! -s conftest.err
20405 } && test -s conftest$ac_exeext &&
20406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020407 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020408else
Martin v. Löwis11437992002-04-12 09:54:03 +000020409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020410sed 's/^/| /' conftest.$ac_ext >&5
20411
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020414
20415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020416 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20419echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020420if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020421
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020423#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020424_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020425
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20427echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020428 OLD_CFLAGS=$CFLAGS
20429 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020431/* confdefs.h. */
20432_ACEOF
20433cat confdefs.h >>conftest.$ac_ext
20434cat >>conftest.$ac_ext <<_ACEOF
20435/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020436
20437# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020438
Martin v. Löwis11437992002-04-12 09:54:03 +000020439int
20440main ()
20441{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020442
20443 char *name;
20444 struct hostent *he, *res;
20445 char buffer[2048];
20446 int buflen = 2048;
20447 int h_errnop;
20448
20449 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020450
20451 ;
20452 return 0;
20453}
20454_ACEOF
20455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456if { (ac_try="$ac_compile"
20457case "(($ac_try" in
20458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20459 *) ac_try_echo=$ac_try;;
20460esac
20461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020464 grep -v '^ *+' conftest.er1 >conftest.err
20465 rm -f conftest.er1
20466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020468 (exit $ac_status); } && {
20469 test -z "$ac_c_werror_flag" ||
20470 test ! -s conftest.err
20471 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020472
20473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020474#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020475_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020476
Martin v. Löwis11437992002-04-12 09:54:03 +000020477
20478cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020479#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020480_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020481
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482 { echo "$as_me:$LINENO: result: yes" >&5
20483echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020485else
Martin v. Löwis11437992002-04-12 09:54:03 +000020486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020487sed 's/^/| /' conftest.$ac_ext >&5
20488
Martin v. Löwis11437992002-04-12 09:54:03 +000020489
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490 { echo "$as_me:$LINENO: result: no" >&5
20491echo "${ECHO_T}no" >&6; }
20492 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20493echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020495/* confdefs.h. */
20496_ACEOF
20497cat confdefs.h >>conftest.$ac_ext
20498cat >>conftest.$ac_ext <<_ACEOF
20499/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020500
20501# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020502
Martin v. Löwis11437992002-04-12 09:54:03 +000020503int
20504main ()
20505{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020506
20507 char *name;
20508 struct hostent *he;
20509 char buffer[2048];
20510 int buflen = 2048;
20511 int h_errnop;
20512
20513 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020514
20515 ;
20516 return 0;
20517}
20518_ACEOF
20519rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020520if { (ac_try="$ac_compile"
20521case "(($ac_try" in
20522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20523 *) ac_try_echo=$ac_try;;
20524esac
20525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020528 grep -v '^ *+' conftest.er1 >conftest.err
20529 rm -f conftest.er1
20530 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532 (exit $ac_status); } && {
20533 test -z "$ac_c_werror_flag" ||
20534 test ! -s conftest.err
20535 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020536
20537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020538#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020539_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020540
Martin v. Löwis11437992002-04-12 09:54:03 +000020541
20542cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020543#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020544_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020545
Martin v. Löwiseba40652007-08-30 20:10:57 +000020546 { echo "$as_me:$LINENO: result: yes" >&5
20547echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020549else
Martin v. Löwis11437992002-04-12 09:54:03 +000020550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020551sed 's/^/| /' conftest.$ac_ext >&5
20552
Martin v. Löwis11437992002-04-12 09:54:03 +000020553
Martin v. Löwiseba40652007-08-30 20:10:57 +000020554 { echo "$as_me:$LINENO: result: no" >&5
20555echo "${ECHO_T}no" >&6; }
20556 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20557echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020559/* confdefs.h. */
20560_ACEOF
20561cat confdefs.h >>conftest.$ac_ext
20562cat >>conftest.$ac_ext <<_ACEOF
20563/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020564
20565# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020566
Martin v. Löwis11437992002-04-12 09:54:03 +000020567int
20568main ()
20569{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020570
20571 char *name;
20572 struct hostent *he;
20573 struct hostent_data data;
20574
20575 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020576
20577 ;
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 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020600#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020601_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020602
Martin v. Löwis11437992002-04-12 09:54:03 +000020603
20604cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020605#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020606_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020607
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608 { echo "$as_me:$LINENO: result: yes" >&5
20609echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020611else
Martin v. Löwis11437992002-04-12 09:54:03 +000020612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020613sed 's/^/| /' conftest.$ac_ext >&5
20614
Martin v. Löwis11437992002-04-12 09:54:03 +000020615
Martin v. Löwiseba40652007-08-30 20:10:57 +000020616 { echo "$as_me:$LINENO: result: no" >&5
20617echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020620
20621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624
20625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020628
20629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020630 CFLAGS=$OLD_CFLAGS
20631
20632else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020633
Martin v. Löwis11437992002-04-12 09:54:03 +000020634
20635for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020636do
Martin v. Löwis11437992002-04-12 09:54:03 +000020637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020638{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20640if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020642else
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020644/* confdefs.h. */
20645_ACEOF
20646cat confdefs.h >>conftest.$ac_ext
20647cat >>conftest.$ac_ext <<_ACEOF
20648/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020649/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20650 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20651#define $ac_func innocuous_$ac_func
20652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020653/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020654 which can conflict with char $ac_func (); below.
20655 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020656 <limits.h> exists even on freestanding compilers. */
20657
20658#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020659# include <limits.h>
20660#else
20661# include <assert.h>
20662#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020663
20664#undef $ac_func
20665
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666/* Override any GCC internal prototype to avoid an error.
20667 Use char because int might match the return type of a GCC
20668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020669#ifdef __cplusplus
20670extern "C"
20671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020672char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020673/* The GNU C library defines this for functions which it implements
20674 to always fail with ENOSYS. Some functions are actually named
20675 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020677choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020678#endif
20679
Skip Montanaro6dead952003-09-25 14:50:04 +000020680int
20681main ()
20682{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020683return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020684 ;
20685 return 0;
20686}
20687_ACEOF
20688rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020689if { (ac_try="$ac_link"
20690case "(($ac_try" in
20691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20692 *) ac_try_echo=$ac_try;;
20693esac
20694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020697 grep -v '^ *+' conftest.er1 >conftest.err
20698 rm -f conftest.er1
20699 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020701 (exit $ac_status); } && {
20702 test -z "$ac_c_werror_flag" ||
20703 test ! -s conftest.err
20704 } && test -s conftest$ac_exeext &&
20705 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020707else
Martin v. Löwis11437992002-04-12 09:54:03 +000020708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020709sed 's/^/| /' conftest.$ac_ext >&5
20710
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020713
20714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020715 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717ac_res=`eval echo '${'$as_ac_var'}'`
20718 { echo "$as_me:$LINENO: result: $ac_res" >&5
20719echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020720if test `eval echo '${'$as_ac_var'}'` = yes; then
20721 cat >>confdefs.h <<_ACEOF
20722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20723_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020724
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020725fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020726done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020727
Michael W. Hudson54241132001-12-07 15:38:26 +000020728
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020729fi
20730
Michael W. Hudson54241132001-12-07 15:38:26 +000020731
20732
20733
20734
20735
20736
Guido van Rossum627b2d71993-12-24 10:39:16 +000020737# checks for system services
20738# (none yet)
20739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020740# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20742echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020743if test "${ac_cv_func___fpu_control+set}" = set; then
20744 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020745else
Martin v. Löwis11437992002-04-12 09:54:03 +000020746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020747/* confdefs.h. */
20748_ACEOF
20749cat confdefs.h >>conftest.$ac_ext
20750cat >>conftest.$ac_ext <<_ACEOF
20751/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020752/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20753 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20754#define __fpu_control innocuous___fpu_control
20755
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020756/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020757 which can conflict with char __fpu_control (); below.
20758 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020759 <limits.h> exists even on freestanding compilers. */
20760
20761#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020762# include <limits.h>
20763#else
20764# include <assert.h>
20765#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020766
20767#undef __fpu_control
20768
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769/* Override any GCC internal prototype to avoid an error.
20770 Use char because int might match the return type of a GCC
20771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020772#ifdef __cplusplus
20773extern "C"
20774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020775char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020776/* The GNU C library defines this for functions which it implements
20777 to always fail with ENOSYS. Some functions are actually named
20778 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020780choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020781#endif
20782
Skip Montanaro6dead952003-09-25 14:50:04 +000020783int
20784main ()
20785{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 ;
20788 return 0;
20789}
20790_ACEOF
20791rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792if { (ac_try="$ac_link"
20793case "(($ac_try" in
20794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20795 *) ac_try_echo=$ac_try;;
20796esac
20797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20798 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020800 grep -v '^ *+' conftest.er1 >conftest.err
20801 rm -f conftest.er1
20802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804 (exit $ac_status); } && {
20805 test -z "$ac_c_werror_flag" ||
20806 test ! -s conftest.err
20807 } && test -s conftest$ac_exeext &&
20808 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020810else
Martin v. Löwis11437992002-04-12 09:54:03 +000020811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020812sed 's/^/| /' conftest.$ac_ext >&5
20813
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816
20817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20821echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020822if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020823 :
20824else
Martin v. Löwis11437992002-04-12 09:54:03 +000020825
Martin v. Löwiseba40652007-08-30 20:10:57 +000020826{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20827echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020828if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20829 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020830else
Martin v. Löwis11437992002-04-12 09:54:03 +000020831 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020832LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020834/* confdefs.h. */
20835_ACEOF
20836cat confdefs.h >>conftest.$ac_ext
20837cat >>conftest.$ac_ext <<_ACEOF
20838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020839
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840/* Override any GCC internal prototype to avoid an error.
20841 Use char because int might match the return type of a GCC
20842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020843#ifdef __cplusplus
20844extern "C"
20845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020846char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020847int
20848main ()
20849{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020850return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 ;
20852 return 0;
20853}
20854_ACEOF
20855rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856if { (ac_try="$ac_link"
20857case "(($ac_try" in
20858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20859 *) ac_try_echo=$ac_try;;
20860esac
20861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20862 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020864 grep -v '^ *+' conftest.er1 >conftest.err
20865 rm -f conftest.er1
20866 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868 (exit $ac_status); } && {
20869 test -z "$ac_c_werror_flag" ||
20870 test ! -s conftest.err
20871 } && test -s conftest$ac_exeext &&
20872 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020873 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020874else
Martin v. Löwis11437992002-04-12 09:54:03 +000020875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020876sed 's/^/| /' conftest.$ac_ext >&5
20877
Martin v. Löwiseba40652007-08-30 20:10:57 +000020878 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020880
20881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020883LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20886echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020887if test $ac_cv_lib_ieee___fpu_control = yes; then
20888 cat >>confdefs.h <<_ACEOF
20889#define HAVE_LIBIEEE 1
20890_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020892 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893
Guido van Rossum627b2d71993-12-24 10:39:16 +000020894fi
20895
Michael W. Hudson54241132001-12-07 15:38:26 +000020896
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020897fi
20898
Michael W. Hudson54241132001-12-07 15:38:26 +000020899
Guido van Rossum7f253911997-05-09 02:42:48 +000020900# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020901{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20902echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020903
Martin v. Löwiseba40652007-08-30 20:10:57 +000020904# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020905if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020907if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020908then
20909
20910cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020911#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020912_ACEOF
20913
Martin v. Löwiseba40652007-08-30 20:10:57 +000020914 { echo "$as_me:$LINENO: result: yes" >&5
20915echo "${ECHO_T}yes" >&6; }
20916else { echo "$as_me:$LINENO: result: no" >&5
20917echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020918fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020919else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020920 { echo "$as_me:$LINENO: result: no" >&5
20921echo "${ECHO_T}no" >&6; }
20922fi
20923
Guido van Rossum7f253911997-05-09 02:42:48 +000020924
Guido van Rossum7f43da71994-08-01 12:15:30 +000020925# check for --with-libm=...
20926
Guido van Rossum563e7081996-09-10 18:20:48 +000020927case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020928Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020929BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020930*) LIBM=-lm
20931esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20933echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020934
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020936if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020937 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020938if test "$withval" = no
20939then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020940 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20941echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020942elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020943then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20945echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020946else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20947echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20948 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020949fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020950else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020951 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20952echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20953fi
20954
Guido van Rossum7f43da71994-08-01 12:15:30 +000020955
20956# check for --with-libc=...
20957
Martin v. Löwiseba40652007-08-30 20:10:57 +000020958{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20959echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020960
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020962if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020963 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020964if test "$withval" = no
20965then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020966 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20967echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020968elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020969then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020970 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20971echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020972else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20973echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20974 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020975fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020976else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020977 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20978echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20979fi
20980
Guido van Rossum7f43da71994-08-01 12:15:30 +000020981
Christian Heimes0a8143f2007-12-18 23:22:54 +000020982# ************************************
20983# * Check for mathematical functions *
20984# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020985
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020986LIBS_SAVE=$LIBS
20987LIBS="$LIBS $LIBM"
20988
Mark Dickinson265d7382008-04-21 22:32:24 +000020989# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20990# -0. on some architectures.
20991{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20992echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20993if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20994 echo $ECHO_N "(cached) $ECHO_C" >&6
20995else
20996
20997if test "$cross_compiling" = yes; then
20998 ac_cv_tanh_preserves_zero_sign=no
20999else
21000 cat >conftest.$ac_ext <<_ACEOF
21001/* confdefs.h. */
21002_ACEOF
21003cat confdefs.h >>conftest.$ac_ext
21004cat >>conftest.$ac_ext <<_ACEOF
21005/* end confdefs.h. */
21006
21007#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021008#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021009int main() {
21010 /* return 0 if either negative zeros don't exist
21011 on this platform or if negative zeros exist
21012 and tanh(-0.) == -0. */
21013 if (atan2(0., -1.) == atan2(-0., -1.) ||
21014 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21015 else exit(1);
21016}
21017
21018_ACEOF
21019rm -f conftest$ac_exeext
21020if { (ac_try="$ac_link"
21021case "(($ac_try" in
21022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21023 *) ac_try_echo=$ac_try;;
21024esac
21025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21026 (eval "$ac_link") 2>&5
21027 ac_status=$?
21028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21030 { (case "(($ac_try" in
21031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21032 *) ac_try_echo=$ac_try;;
21033esac
21034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21035 (eval "$ac_try") 2>&5
21036 ac_status=$?
21037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21038 (exit $ac_status); }; }; then
21039 ac_cv_tanh_preserves_zero_sign=yes
21040else
21041 echo "$as_me: program exited with status $ac_status" >&5
21042echo "$as_me: failed program was:" >&5
21043sed 's/^/| /' conftest.$ac_ext >&5
21044
21045( exit $ac_status )
21046ac_cv_tanh_preserves_zero_sign=no
21047fi
21048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21049fi
21050
21051
21052fi
21053
21054{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21055echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21056if test "$ac_cv_tanh_preserves_zero_sign" = yes
21057then
21058
21059cat >>confdefs.h <<\_ACEOF
21060#define TANH_PRESERVES_ZERO_SIGN 1
21061_ACEOF
21062
21063fi
21064
Martin v. Löwis11437992002-04-12 09:54:03 +000021065
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021066for ac_func in hypot
21067do
Martin v. Löwis11437992002-04-12 09:54:03 +000021068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021069{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21071if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021073else
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. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021080/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21081 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21082#define $ac_func innocuous_$ac_func
21083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021084/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021085 which can conflict with char $ac_func (); below.
21086 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021087 <limits.h> exists even on freestanding compilers. */
21088
21089#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021090# include <limits.h>
21091#else
21092# include <assert.h>
21093#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021094
21095#undef $ac_func
21096
Martin v. Löwiseba40652007-08-30 20:10:57 +000021097/* Override any GCC internal prototype to avoid an error.
21098 Use char because int might match the return type of a GCC
21099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021100#ifdef __cplusplus
21101extern "C"
21102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021103char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021104/* The GNU C library defines this for functions which it implements
21105 to always fail with ENOSYS. Some functions are actually named
21106 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021107#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021108choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021109#endif
21110
Skip Montanaro6dead952003-09-25 14:50:04 +000021111int
21112main ()
21113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021114return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021115 ;
21116 return 0;
21117}
21118_ACEOF
21119rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120if { (ac_try="$ac_link"
21121case "(($ac_try" in
21122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21123 *) ac_try_echo=$ac_try;;
21124esac
21125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21126 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021128 grep -v '^ *+' conftest.er1 >conftest.err
21129 rm -f conftest.er1
21130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021132 (exit $ac_status); } && {
21133 test -z "$ac_c_werror_flag" ||
21134 test ! -s conftest.err
21135 } && test -s conftest$ac_exeext &&
21136 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021137 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021138else
Martin v. Löwis11437992002-04-12 09:54:03 +000021139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021140sed 's/^/| /' conftest.$ac_ext >&5
21141
Martin v. Löwiseba40652007-08-30 20:10:57 +000021142 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144
21145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021146 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021148ac_res=`eval echo '${'$as_ac_var'}'`
21149 { echo "$as_me:$LINENO: result: $ac_res" >&5
21150echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021151if test `eval echo '${'$as_ac_var'}'` = yes; then
21152 cat >>confdefs.h <<_ACEOF
21153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21154_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021155
Michael W. Hudson54241132001-12-07 15:38:26 +000021156else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021157 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021158 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021159 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21160 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021161esac
21162
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021163fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021164done
21165
Michael W. Hudson54241132001-12-07 15:38:26 +000021166
Christian Heimes0a8143f2007-12-18 23:22:54 +000021167
21168
21169
21170
21171
Christian Heimes48723512008-01-20 14:28:28 +000021172
21173
21174
21175
21176
21177for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021178do
21179as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21180{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21181echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21182if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21183 echo $ECHO_N "(cached) $ECHO_C" >&6
21184else
21185 cat >conftest.$ac_ext <<_ACEOF
21186/* confdefs.h. */
21187_ACEOF
21188cat confdefs.h >>conftest.$ac_ext
21189cat >>conftest.$ac_ext <<_ACEOF
21190/* end confdefs.h. */
21191/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21193#define $ac_func innocuous_$ac_func
21194
21195/* System header to define __stub macros and hopefully few prototypes,
21196 which can conflict with char $ac_func (); below.
21197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21198 <limits.h> exists even on freestanding compilers. */
21199
21200#ifdef __STDC__
21201# include <limits.h>
21202#else
21203# include <assert.h>
21204#endif
21205
21206#undef $ac_func
21207
21208/* Override any GCC internal prototype to avoid an error.
21209 Use char because int might match the return type of a GCC
21210 builtin and then its argument prototype would still apply. */
21211#ifdef __cplusplus
21212extern "C"
21213#endif
21214char $ac_func ();
21215/* The GNU C library defines this for functions which it implements
21216 to always fail with ENOSYS. Some functions are actually named
21217 something starting with __ and the normal name is an alias. */
21218#if defined __stub_$ac_func || defined __stub___$ac_func
21219choke me
21220#endif
21221
21222int
21223main ()
21224{
21225return $ac_func ();
21226 ;
21227 return 0;
21228}
21229_ACEOF
21230rm -f conftest.$ac_objext conftest$ac_exeext
21231if { (ac_try="$ac_link"
21232case "(($ac_try" in
21233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21234 *) ac_try_echo=$ac_try;;
21235esac
21236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21237 (eval "$ac_link") 2>conftest.er1
21238 ac_status=$?
21239 grep -v '^ *+' conftest.er1 >conftest.err
21240 rm -f conftest.er1
21241 cat conftest.err >&5
21242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21243 (exit $ac_status); } && {
21244 test -z "$ac_c_werror_flag" ||
21245 test ! -s conftest.err
21246 } && test -s conftest$ac_exeext &&
21247 $as_test_x conftest$ac_exeext; then
21248 eval "$as_ac_var=yes"
21249else
21250 echo "$as_me: failed program was:" >&5
21251sed 's/^/| /' conftest.$ac_ext >&5
21252
21253 eval "$as_ac_var=no"
21254fi
21255
21256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21257 conftest$ac_exeext conftest.$ac_ext
21258fi
21259ac_res=`eval echo '${'$as_ac_var'}'`
21260 { echo "$as_me:$LINENO: result: $ac_res" >&5
21261echo "${ECHO_T}$ac_res" >&6; }
21262if test `eval echo '${'$as_ac_var'}'` = yes; then
21263 cat >>confdefs.h <<_ACEOF
21264#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21265_ACEOF
21266
21267fi
21268done
21269
21270
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021271LIBS=$LIBS_SAVE
21272
Guido van Rossumef2255b2000-03-10 22:30:29 +000021273# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021274if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021275 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21276echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021277if test "${ac_cv_header_wchar_h+set}" = set; then
21278 echo $ECHO_N "(cached) $ECHO_C" >&6
21279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021280{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21281echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021282else
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021284{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21285echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021287/* confdefs.h. */
21288_ACEOF
21289cat confdefs.h >>conftest.$ac_ext
21290cat >>conftest.$ac_ext <<_ACEOF
21291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021292$ac_includes_default
21293#include <wchar.h>
21294_ACEOF
21295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021296if { (ac_try="$ac_compile"
21297case "(($ac_try" in
21298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21299 *) ac_try_echo=$ac_try;;
21300esac
21301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021304 grep -v '^ *+' conftest.er1 >conftest.err
21305 rm -f conftest.er1
21306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308 (exit $ac_status); } && {
21309 test -z "$ac_c_werror_flag" ||
21310 test ! -s conftest.err
21311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 ac_header_compiler=yes
21313else
21314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021315sed 's/^/| /' conftest.$ac_ext >&5
21316
Martin v. Löwiseba40652007-08-30 20:10:57 +000021317 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319
21320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21321{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21322echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021323
21324# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21326echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021328/* confdefs.h. */
21329_ACEOF
21330cat confdefs.h >>conftest.$ac_ext
21331cat >>conftest.$ac_ext <<_ACEOF
21332/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021333#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021334_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021335if { (ac_try="$ac_cpp conftest.$ac_ext"
21336case "(($ac_try" in
21337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21338 *) ac_try_echo=$ac_try;;
21339esac
21340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21341 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021343 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021344 rm -f conftest.er1
21345 cat conftest.err >&5
21346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021347 (exit $ac_status); } >/dev/null && {
21348 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21349 test ! -s conftest.err
21350 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021351 ac_header_preproc=yes
21352else
21353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021354sed 's/^/| /' conftest.$ac_ext >&5
21355
Martin v. Löwis11437992002-04-12 09:54:03 +000021356 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021358
Martin v. Löwis11437992002-04-12 09:54:03 +000021359rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021360{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21361echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021362
21363# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021364case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21365 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021366 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21367echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021368 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21369echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21370 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021371 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021372 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021373 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21374echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021375 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21376echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21377 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21378echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21379 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21380echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021381 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21382echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021383 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21384echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021386## ------------------------------------------------ ##
21387## Report this to http://www.python.org/python-bugs ##
21388## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021389_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021391 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021392esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21394echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021395if test "${ac_cv_header_wchar_h+set}" = set; then
21396 echo $ECHO_N "(cached) $ECHO_C" >&6
21397else
21398 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21401echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021402
21403fi
21404if test $ac_cv_header_wchar_h = yes; then
21405
21406
21407cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021408#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021409_ACEOF
21410
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021411 wchar_h="yes"
21412
Guido van Rossumef2255b2000-03-10 22:30:29 +000021413else
Martin v. Löwis11437992002-04-12 09:54:03 +000021414 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021415
21416fi
21417
Michael W. Hudson54241132001-12-07 15:38:26 +000021418
Martin v. Löwis11437992002-04-12 09:54:03 +000021419
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021420# determine wchar_t size
21421if test "$wchar_h" = yes
21422then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021423 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21424echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021425if test "${ac_cv_type_wchar_t+set}" = set; then
21426 echo $ECHO_N "(cached) $ECHO_C" >&6
21427else
21428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021429/* confdefs.h. */
21430_ACEOF
21431cat confdefs.h >>conftest.$ac_ext
21432cat >>conftest.$ac_ext <<_ACEOF
21433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021434#include <wchar.h>
21435
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021437int
21438main ()
21439{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021441 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021442if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 return 0;
21444 ;
21445 return 0;
21446}
21447_ACEOF
21448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449if { (ac_try="$ac_compile"
21450case "(($ac_try" in
21451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21452 *) ac_try_echo=$ac_try;;
21453esac
21454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021457 grep -v '^ *+' conftest.er1 >conftest.err
21458 rm -f conftest.er1
21459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461 (exit $ac_status); } && {
21462 test -z "$ac_c_werror_flag" ||
21463 test ! -s conftest.err
21464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021465 ac_cv_type_wchar_t=yes
21466else
21467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021468sed 's/^/| /' conftest.$ac_ext >&5
21469
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021471fi
Brett Cannon19fab762007-06-02 03:02:29 +000021472
Martin v. Löwiseba40652007-08-30 20:10:57 +000021473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21474fi
21475{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21476echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21477
21478# The cast to long int works around a bug in the HP C Compiler
21479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21481# This bug is HP SR number 8606223364.
21482{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21483echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021484if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21485 echo $ECHO_N "(cached) $ECHO_C" >&6
21486else
Martin v. Löwis11437992002-04-12 09:54:03 +000021487 if test "$cross_compiling" = yes; then
21488 # Depending upon the size, compute the lo and hi bounds.
21489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021490/* confdefs.h. */
21491_ACEOF
21492cat confdefs.h >>conftest.$ac_ext
21493cat >>conftest.$ac_ext <<_ACEOF
21494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021495#include <wchar.h>
21496
Martin v. Löwiseba40652007-08-30 20:10:57 +000021497 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021498int
21499main ()
21500{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021502test_array [0] = 0
21503
21504 ;
21505 return 0;
21506}
21507_ACEOF
21508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509if { (ac_try="$ac_compile"
21510case "(($ac_try" in
21511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21512 *) ac_try_echo=$ac_try;;
21513esac
21514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021517 grep -v '^ *+' conftest.er1 >conftest.err
21518 rm -f conftest.er1
21519 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021521 (exit $ac_status); } && {
21522 test -z "$ac_c_werror_flag" ||
21523 test ! -s conftest.err
21524 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021525 ac_lo=0 ac_mid=0
21526 while :; do
21527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021528/* confdefs.h. */
21529_ACEOF
21530cat confdefs.h >>conftest.$ac_ext
21531cat >>conftest.$ac_ext <<_ACEOF
21532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021533#include <wchar.h>
21534
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021536int
21537main ()
21538{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021540test_array [0] = 0
21541
21542 ;
21543 return 0;
21544}
21545_ACEOF
21546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547if { (ac_try="$ac_compile"
21548case "(($ac_try" in
21549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21550 *) ac_try_echo=$ac_try;;
21551esac
21552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021555 grep -v '^ *+' conftest.er1 >conftest.err
21556 rm -f conftest.er1
21557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559 (exit $ac_status); } && {
21560 test -z "$ac_c_werror_flag" ||
21561 test ! -s conftest.err
21562 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021563 ac_hi=$ac_mid; break
21564else
21565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021566sed 's/^/| /' conftest.$ac_ext >&5
21567
Martin v. Löwiseba40652007-08-30 20:10:57 +000021568 ac_lo=`expr $ac_mid + 1`
21569 if test $ac_lo -le $ac_mid; then
21570 ac_lo= ac_hi=
21571 break
21572 fi
21573 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021575
21576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021577 done
21578else
21579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021580sed 's/^/| /' conftest.$ac_ext >&5
21581
Martin v. Löwiseba40652007-08-30 20:10:57 +000021582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021588#include <wchar.h>
21589
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021591int
21592main ()
21593{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021594static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021595test_array [0] = 0
21596
21597 ;
21598 return 0;
21599}
21600_ACEOF
21601rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602if { (ac_try="$ac_compile"
21603case "(($ac_try" in
21604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21605 *) ac_try_echo=$ac_try;;
21606esac
21607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021610 grep -v '^ *+' conftest.er1 >conftest.err
21611 rm -f conftest.er1
21612 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021614 (exit $ac_status); } && {
21615 test -z "$ac_c_werror_flag" ||
21616 test ! -s conftest.err
21617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021618 ac_hi=-1 ac_mid=-1
21619 while :; do
21620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021621/* confdefs.h. */
21622_ACEOF
21623cat confdefs.h >>conftest.$ac_ext
21624cat >>conftest.$ac_ext <<_ACEOF
21625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021626#include <wchar.h>
21627
Martin v. Löwiseba40652007-08-30 20:10:57 +000021628 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021629int
21630main ()
21631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021633test_array [0] = 0
21634
21635 ;
21636 return 0;
21637}
21638_ACEOF
21639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021640if { (ac_try="$ac_compile"
21641case "(($ac_try" in
21642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21643 *) ac_try_echo=$ac_try;;
21644esac
21645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021648 grep -v '^ *+' conftest.er1 >conftest.err
21649 rm -f conftest.er1
21650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652 (exit $ac_status); } && {
21653 test -z "$ac_c_werror_flag" ||
21654 test ! -s conftest.err
21655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021656 ac_lo=$ac_mid; break
21657else
21658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021659sed 's/^/| /' conftest.$ac_ext >&5
21660
Martin v. Löwiseba40652007-08-30 20:10:57 +000021661 ac_hi=`expr '(' $ac_mid ')' - 1`
21662 if test $ac_mid -le $ac_hi; then
21663 ac_lo= ac_hi=
21664 break
21665 fi
21666 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021668
21669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 done
21671else
21672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021673sed 's/^/| /' conftest.$ac_ext >&5
21674
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021677
21678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021680
21681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021682# Binary search between lo and hi bounds.
21683while test "x$ac_lo" != "x$ac_hi"; do
21684 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021686/* confdefs.h. */
21687_ACEOF
21688cat confdefs.h >>conftest.$ac_ext
21689cat >>conftest.$ac_ext <<_ACEOF
21690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021691#include <wchar.h>
21692
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021694int
21695main ()
21696{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021698test_array [0] = 0
21699
21700 ;
21701 return 0;
21702}
21703_ACEOF
21704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705if { (ac_try="$ac_compile"
21706case "(($ac_try" in
21707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21708 *) ac_try_echo=$ac_try;;
21709esac
21710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021713 grep -v '^ *+' conftest.er1 >conftest.err
21714 rm -f conftest.er1
21715 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021717 (exit $ac_status); } && {
21718 test -z "$ac_c_werror_flag" ||
21719 test ! -s conftest.err
21720 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021721 ac_hi=$ac_mid
21722else
21723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021724sed 's/^/| /' conftest.$ac_ext >&5
21725
Martin v. Löwiseba40652007-08-30 20:10:57 +000021726 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021728
21729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021730done
21731case $ac_lo in
21732?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733'') if test "$ac_cv_type_wchar_t" = yes; then
21734 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021735See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021736echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021737See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738 { (exit 77); exit 77; }; }
21739 else
21740 ac_cv_sizeof_wchar_t=0
21741 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021742esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021743else
Martin v. Löwis11437992002-04-12 09:54:03 +000021744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021745/* confdefs.h. */
21746_ACEOF
21747cat confdefs.h >>conftest.$ac_ext
21748cat >>conftest.$ac_ext <<_ACEOF
21749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021750#include <wchar.h>
21751
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752 typedef wchar_t ac__type_sizeof_;
21753static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21754static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021755#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021756#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021757int
21758main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021759{
Martin v. Löwis11437992002-04-12 09:54:03 +000021760
21761 FILE *f = fopen ("conftest.val", "w");
21762 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021763 return 1;
21764 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021766 long int i = longval ();
21767 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21768 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021769 fprintf (f, "%ld\n", i);
21770 }
21771 else
21772 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021773 unsigned long int i = ulongval ();
21774 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21775 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021776 fprintf (f, "%lu\n", i);
21777 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021778 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021779
21780 ;
21781 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021782}
Martin v. Löwis11437992002-04-12 09:54:03 +000021783_ACEOF
21784rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021785if { (ac_try="$ac_link"
21786case "(($ac_try" in
21787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21788 *) ac_try_echo=$ac_try;;
21789esac
21790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21791 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021792 ac_status=$?
21793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795 { (case "(($ac_try" in
21796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21797 *) ac_try_echo=$ac_try;;
21798esac
21799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21800 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 ac_status=$?
21802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21803 (exit $ac_status); }; }; then
21804 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021805else
Martin v. Löwis11437992002-04-12 09:54:03 +000021806 echo "$as_me: program exited with status $ac_status" >&5
21807echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021808sed 's/^/| /' conftest.$ac_ext >&5
21809
Martin v. Löwis11437992002-04-12 09:54:03 +000021810( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021811if test "$ac_cv_type_wchar_t" = yes; then
21812 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021813See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021815See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816 { (exit 77); exit 77; }; }
21817 else
21818 ac_cv_sizeof_wchar_t=0
21819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021821rm -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 +000021822fi
21823rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21826echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21827
21828
21829
Martin v. Löwis11437992002-04-12 09:54:03 +000021830cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021831#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021832_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021833
Michael W. Hudson54241132001-12-07 15:38:26 +000021834
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021835fi
21836
Martin v. Löwiseba40652007-08-30 20:10:57 +000021837{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21838echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021839have_ucs4_tcl=no
21840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021841/* confdefs.h. */
21842_ACEOF
21843cat confdefs.h >>conftest.$ac_ext
21844cat >>conftest.$ac_ext <<_ACEOF
21845/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021846
21847#include <tcl.h>
21848#if TCL_UTF_MAX != 6
21849# error "NOT UCS4_TCL"
21850#endif
21851int
21852main ()
21853{
21854
21855 ;
21856 return 0;
21857}
21858_ACEOF
21859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860if { (ac_try="$ac_compile"
21861case "(($ac_try" in
21862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21863 *) ac_try_echo=$ac_try;;
21864esac
21865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021868 grep -v '^ *+' conftest.er1 >conftest.err
21869 rm -f conftest.er1
21870 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 (exit $ac_status); } && {
21873 test -z "$ac_c_werror_flag" ||
21874 test ! -s conftest.err
21875 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021876
21877
21878cat >>confdefs.h <<\_ACEOF
21879#define HAVE_UCS4_TCL 1
21880_ACEOF
21881
21882 have_ucs4_tcl=yes
21883
21884else
21885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021886sed 's/^/| /' conftest.$ac_ext >&5
21887
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890
21891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21892{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21893echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021894
Skip Montanaro6dead952003-09-25 14:50:04 +000021895# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021896if test "$wchar_h" = yes
21897then
21898 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021899 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21900echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021901 if test "${ac_cv_wchar_t_signed+set}" = set; then
21902 echo $ECHO_N "(cached) $ECHO_C" >&6
21903else
21904
21905 if test "$cross_compiling" = yes; then
21906 ac_cv_wchar_t_signed=yes
21907else
21908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021909/* confdefs.h. */
21910_ACEOF
21911cat confdefs.h >>conftest.$ac_ext
21912cat >>conftest.$ac_ext <<_ACEOF
21913/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021914
21915 #include <wchar.h>
21916 int main()
21917 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021918 /* Success: exit code 0 */
21919 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021920 }
21921
21922_ACEOF
21923rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021924if { (ac_try="$ac_link"
21925case "(($ac_try" in
21926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21927 *) ac_try_echo=$ac_try;;
21928esac
21929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21930 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021931 ac_status=$?
21932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021934 { (case "(($ac_try" in
21935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21936 *) ac_try_echo=$ac_try;;
21937esac
21938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21939 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021940 ac_status=$?
21941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21942 (exit $ac_status); }; }; then
21943 ac_cv_wchar_t_signed=yes
21944else
21945 echo "$as_me: program exited with status $ac_status" >&5
21946echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021947sed 's/^/| /' conftest.$ac_ext >&5
21948
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021949( exit $ac_status )
21950ac_cv_wchar_t_signed=no
21951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021952rm -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 +000021953fi
21954
Martin v. Löwiseba40652007-08-30 20:10:57 +000021955
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021956fi
21957
Martin v. Löwiseba40652007-08-30 20:10:57 +000021958 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21959echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21960fi
21961
21962{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21963echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21964# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021965if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021967else
21968 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021969fi
21970
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021971
21972if test $enable_unicode = yes
21973then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021974 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021975 case "$have_ucs4_tcl" in
21976 yes) enable_unicode="ucs4"
21977 ;;
21978 *) enable_unicode="ucs2"
21979 ;;
21980 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021981fi
21982
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021983
21984
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021985case "$enable_unicode" in
21986ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021987 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021988#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021989_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021990
21991 ;;
21992ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021993 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021994#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021995_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021996
21997 ;;
21998esac
21999
Michael W. Hudson54241132001-12-07 15:38:26 +000022000
Martin v. Löwis11437992002-04-12 09:54:03 +000022001
22002
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022003
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022004if test "$enable_unicode" = "no"
22005then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022006 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007 { echo "$as_me:$LINENO: result: not used" >&5
22008echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022009else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022010 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022011
22012cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022013#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022014_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022015
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022016
22017 # wchar_t is only usable if it maps to an unsigned type
22018 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022019 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022020 then
22021 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022022
Martin v. Löwis11437992002-04-12 09:54:03 +000022023cat >>confdefs.h <<\_ACEOF
22024#define HAVE_USABLE_WCHAR_T 1
22025_ACEOF
22026
22027 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022028#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022029_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022030
22031 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22032 then
22033 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022034 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022035#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022036_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022037
22038 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22039 then
22040 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022042#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022043_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022044
22045 else
22046 PY_UNICODE_TYPE="no type found"
22047 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022048 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22049echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022050fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022051
22052# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022053{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22054echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022055if test "${ac_cv_c_bigendian+set}" = set; then
22056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022057else
Martin v. Löwis11437992002-04-12 09:54:03 +000022058 # See if sys/param.h defines the BYTE_ORDER macro.
22059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022060/* confdefs.h. */
22061_ACEOF
22062cat confdefs.h >>conftest.$ac_ext
22063cat >>conftest.$ac_ext <<_ACEOF
22064/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022065#include <sys/types.h>
22066#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022067
Martin v. Löwis11437992002-04-12 09:54:03 +000022068int
22069main ()
22070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22072 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022073 bogus endian macros
22074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022075
22076 ;
22077 return 0;
22078}
22079_ACEOF
22080rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081if { (ac_try="$ac_compile"
22082case "(($ac_try" in
22083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22084 *) ac_try_echo=$ac_try;;
22085esac
22086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022089 grep -v '^ *+' conftest.er1 >conftest.err
22090 rm -f conftest.er1
22091 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022093 (exit $ac_status); } && {
22094 test -z "$ac_c_werror_flag" ||
22095 test ! -s conftest.err
22096 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022097 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022098cat >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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022104#include <sys/types.h>
22105#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022106
Martin v. Löwis11437992002-04-12 09:54:03 +000022107int
22108main ()
22109{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022110#if BYTE_ORDER != BIG_ENDIAN
22111 not big endian
22112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022113
22114 ;
22115 return 0;
22116}
22117_ACEOF
22118rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022119if { (ac_try="$ac_compile"
22120case "(($ac_try" in
22121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22122 *) ac_try_echo=$ac_try;;
22123esac
22124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022127 grep -v '^ *+' conftest.er1 >conftest.err
22128 rm -f conftest.er1
22129 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131 (exit $ac_status); } && {
22132 test -z "$ac_c_werror_flag" ||
22133 test ! -s conftest.err
22134 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022135 ac_cv_c_bigendian=yes
22136else
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022138sed 's/^/| /' conftest.$ac_ext >&5
22139
Martin v. Löwiseba40652007-08-30 20:10:57 +000022140 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142
22143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022144else
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022146sed 's/^/| /' conftest.$ac_ext >&5
22147
Martin v. Löwiseba40652007-08-30 20:10:57 +000022148 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022149if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022150 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 ac_cv_c_bigendian=unknown
22152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022153/* confdefs.h. */
22154_ACEOF
22155cat confdefs.h >>conftest.$ac_ext
22156cat >>conftest.$ac_ext <<_ACEOF
22157/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22159short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022160void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022161short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22162short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022163void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022164int
22165main ()
22166{
22167 _ascii (); _ebcdic ();
22168 ;
22169 return 0;
22170}
22171_ACEOF
22172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022173if { (ac_try="$ac_compile"
22174case "(($ac_try" in
22175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22176 *) ac_try_echo=$ac_try;;
22177esac
22178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022181 grep -v '^ *+' conftest.er1 >conftest.err
22182 rm -f conftest.er1
22183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022185 (exit $ac_status); } && {
22186 test -z "$ac_c_werror_flag" ||
22187 test ! -s conftest.err
22188 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022189 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022190 ac_cv_c_bigendian=yes
22191fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022192if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022193 if test "$ac_cv_c_bigendian" = unknown; then
22194 ac_cv_c_bigendian=no
22195 else
22196 # finding both strings is unlikely to happen, but who knows?
22197 ac_cv_c_bigendian=unknown
22198 fi
22199fi
22200else
22201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022202sed 's/^/| /' conftest.$ac_ext >&5
22203
Martin v. Löwiseba40652007-08-30 20:10:57 +000022204
Martin v. Löwis11437992002-04-12 09:54:03 +000022205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022206
22207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022208else
22209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022210/* confdefs.h. */
22211_ACEOF
22212cat confdefs.h >>conftest.$ac_ext
22213cat >>conftest.$ac_ext <<_ACEOF
22214/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022216int
22217main ()
22218{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022219
Guido van Rossumef2255b2000-03-10 22:30:29 +000022220 /* Are we little or big endian? From Harbison&Steele. */
22221 union
22222 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223 long int l;
22224 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022225 } u;
22226 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022227 return u.c[sizeof (long int) - 1] == 1;
22228
22229 ;
22230 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022231}
Martin v. Löwis11437992002-04-12 09:54:03 +000022232_ACEOF
22233rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022234if { (ac_try="$ac_link"
22235case "(($ac_try" in
22236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22237 *) ac_try_echo=$ac_try;;
22238esac
22239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22240 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022241 ac_status=$?
22242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22243 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022244 { (case "(($ac_try" in
22245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22246 *) ac_try_echo=$ac_try;;
22247esac
22248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22249 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022250 ac_status=$?
22251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22252 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022253 ac_cv_c_bigendian=no
22254else
Martin v. Löwis11437992002-04-12 09:54:03 +000022255 echo "$as_me: program exited with status $ac_status" >&5
22256echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022257sed 's/^/| /' conftest.$ac_ext >&5
22258
Martin v. Löwis11437992002-04-12 09:54:03 +000022259( exit $ac_status )
22260ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022262rm -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 +000022263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022264
22265
Martin v. Löwis11437992002-04-12 09:54:03 +000022266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022267
22268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22271echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022272case $ac_cv_c_bigendian in
22273 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022274
Martin v. Löwis11437992002-04-12 09:54:03 +000022275cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022276#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022277_ACEOF
22278 ;;
22279 no)
22280 ;;
22281 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022282 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022283presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022284echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022285presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22286 { (exit 1); exit 1; }; } ;;
22287esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022288
Michael W. Hudson54241132001-12-07 15:38:26 +000022289
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022290# Check whether right shifting a negative integer extends the sign bit
22291# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022292{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22293echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022294if test "${ac_cv_rshift_extends_sign+set}" = set; then
22295 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022296else
Martin v. Löwis11437992002-04-12 09:54:03 +000022297
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022298if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022299 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022300else
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022302/* confdefs.h. */
22303_ACEOF
22304cat confdefs.h >>conftest.$ac_ext
22305cat >>conftest.$ac_ext <<_ACEOF
22306/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022307
22308int main()
22309{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022310 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022311}
22312
Martin v. Löwis11437992002-04-12 09:54:03 +000022313_ACEOF
22314rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315if { (ac_try="$ac_link"
22316case "(($ac_try" in
22317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22318 *) ac_try_echo=$ac_try;;
22319esac
22320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22321 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 ac_status=$?
22323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325 { (case "(($ac_try" in
22326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22327 *) ac_try_echo=$ac_try;;
22328esac
22329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22330 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 ac_status=$?
22332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22333 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022334 ac_cv_rshift_extends_sign=yes
22335else
Martin v. Löwis11437992002-04-12 09:54:03 +000022336 echo "$as_me: program exited with status $ac_status" >&5
22337echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022338sed 's/^/| /' conftest.$ac_ext >&5
22339
Martin v. Löwis11437992002-04-12 09:54:03 +000022340( exit $ac_status )
22341ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343rm -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 +000022344fi
22345
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346
22347fi
22348
22349{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22350echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022351if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022352then
Martin v. Löwis11437992002-04-12 09:54:03 +000022353
22354cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022355#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022356_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022357
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022358fi
22359
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022360# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022361{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22362echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022363if test "${ac_cv_have_getc_unlocked+set}" = set; then
22364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022365else
Martin v. Löwis11437992002-04-12 09:54:03 +000022366
22367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022368/* confdefs.h. */
22369_ACEOF
22370cat confdefs.h >>conftest.$ac_ext
22371cat >>conftest.$ac_ext <<_ACEOF
22372/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022373#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022374int
22375main ()
22376{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022377
22378 FILE *f = fopen("/dev/null", "r");
22379 flockfile(f);
22380 getc_unlocked(f);
22381 funlockfile(f);
22382
Martin v. Löwis11437992002-04-12 09:54:03 +000022383 ;
22384 return 0;
22385}
22386_ACEOF
22387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022388if { (ac_try="$ac_link"
22389case "(($ac_try" in
22390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22391 *) ac_try_echo=$ac_try;;
22392esac
22393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022396 grep -v '^ *+' conftest.er1 >conftest.err
22397 rm -f conftest.er1
22398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400 (exit $ac_status); } && {
22401 test -z "$ac_c_werror_flag" ||
22402 test ! -s conftest.err
22403 } && test -s conftest$ac_exeext &&
22404 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022405 ac_cv_have_getc_unlocked=yes
22406else
Martin v. Löwis11437992002-04-12 09:54:03 +000022407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022408sed 's/^/| /' conftest.$ac_ext >&5
22409
Martin v. Löwiseba40652007-08-30 20:10:57 +000022410 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412
22413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022414 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022415fi
22416
Martin v. Löwiseba40652007-08-30 20:10:57 +000022417{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22418echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022419if test "$ac_cv_have_getc_unlocked" = yes
22420then
Martin v. Löwis11437992002-04-12 09:54:03 +000022421
22422cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022423#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022424_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022425
22426fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022427
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022428# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022429# save the value of LIBS so we don't actually link Python with readline
22430LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022431
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22433echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022434if test "${ac_cv_lib_readline_readline+set}" = set; then
22435 echo $ECHO_N "(cached) $ECHO_C" >&6
22436else
22437 ac_check_lib_save_LIBS=$LIBS
22438LIBS="-lreadline $LIBS"
22439cat >conftest.$ac_ext <<_ACEOF
22440/* confdefs.h. */
22441_ACEOF
22442cat confdefs.h >>conftest.$ac_ext
22443cat >>conftest.$ac_ext <<_ACEOF
22444/* end confdefs.h. */
22445
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446/* Override any GCC internal prototype to avoid an error.
22447 Use char because int might match the return type of a GCC
22448 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022449#ifdef __cplusplus
22450extern "C"
22451#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022452char readline ();
22453int
22454main ()
22455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022457 ;
22458 return 0;
22459}
22460_ACEOF
22461rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462if { (ac_try="$ac_link"
22463case "(($ac_try" in
22464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22465 *) ac_try_echo=$ac_try;;
22466esac
22467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22468 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022469 ac_status=$?
22470 grep -v '^ *+' conftest.er1 >conftest.err
22471 rm -f conftest.er1
22472 cat conftest.err >&5
22473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474 (exit $ac_status); } && {
22475 test -z "$ac_c_werror_flag" ||
22476 test ! -s conftest.err
22477 } && test -s conftest$ac_exeext &&
22478 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022479 ac_cv_lib_readline_readline=yes
22480else
22481 echo "$as_me: failed program was:" >&5
22482sed 's/^/| /' conftest.$ac_ext >&5
22483
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022486
22487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022488 conftest$ac_exeext conftest.$ac_ext
22489LIBS=$ac_check_lib_save_LIBS
22490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22492echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022493if test $ac_cv_lib_readline_readline = yes; then
22494 cat >>confdefs.h <<_ACEOF
22495#define HAVE_LIBREADLINE 1
22496_ACEOF
22497
22498 LIBS="-lreadline $LIBS"
22499
22500fi
22501
22502if test "$ac_cv_have_readline_readline" = no
22503then
22504
Martin v. Löwiseba40652007-08-30 20:10:57 +000022505{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22506echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022507if test "${ac_cv_lib_termcap_readline+set}" = set; then
22508 echo $ECHO_N "(cached) $ECHO_C" >&6
22509else
22510 ac_check_lib_save_LIBS=$LIBS
22511LIBS="-ltermcap $LIBS"
22512cat >conftest.$ac_ext <<_ACEOF
22513/* confdefs.h. */
22514_ACEOF
22515cat confdefs.h >>conftest.$ac_ext
22516cat >>conftest.$ac_ext <<_ACEOF
22517/* end confdefs.h. */
22518
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519/* Override any GCC internal prototype to avoid an error.
22520 Use char because int might match the return type of a GCC
22521 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022522#ifdef __cplusplus
22523extern "C"
22524#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022525char readline ();
22526int
22527main ()
22528{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022530 ;
22531 return 0;
22532}
22533_ACEOF
22534rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022535if { (ac_try="$ac_link"
22536case "(($ac_try" in
22537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22538 *) ac_try_echo=$ac_try;;
22539esac
22540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22541 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022542 ac_status=$?
22543 grep -v '^ *+' conftest.er1 >conftest.err
22544 rm -f conftest.er1
22545 cat conftest.err >&5
22546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547 (exit $ac_status); } && {
22548 test -z "$ac_c_werror_flag" ||
22549 test ! -s conftest.err
22550 } && test -s conftest$ac_exeext &&
22551 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022552 ac_cv_lib_termcap_readline=yes
22553else
22554 echo "$as_me: failed program was:" >&5
22555sed 's/^/| /' conftest.$ac_ext >&5
22556
Martin v. Löwiseba40652007-08-30 20:10:57 +000022557 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559
22560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022561 conftest$ac_exeext conftest.$ac_ext
22562LIBS=$ac_check_lib_save_LIBS
22563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22565echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022566if test $ac_cv_lib_termcap_readline = yes; then
22567 cat >>confdefs.h <<_ACEOF
22568#define HAVE_LIBTERMCAP 1
22569_ACEOF
22570
22571 LIBS="-ltermcap $LIBS"
22572
22573fi
22574
22575fi
22576
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022577# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022578{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22579echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022580if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22581 echo $ECHO_N "(cached) $ECHO_C" >&6
22582else
22583 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022584LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022585cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022586/* confdefs.h. */
22587_ACEOF
22588cat confdefs.h >>conftest.$ac_ext
22589cat >>conftest.$ac_ext <<_ACEOF
22590/* end confdefs.h. */
22591
Martin v. Löwiseba40652007-08-30 20:10:57 +000022592/* Override any GCC internal prototype to avoid an error.
22593 Use char because int might match the return type of a GCC
22594 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022595#ifdef __cplusplus
22596extern "C"
22597#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022598char rl_callback_handler_install ();
22599int
22600main ()
22601{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022602return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022603 ;
22604 return 0;
22605}
22606_ACEOF
22607rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022608if { (ac_try="$ac_link"
22609case "(($ac_try" in
22610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22611 *) ac_try_echo=$ac_try;;
22612esac
22613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22614 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022616 grep -v '^ *+' conftest.er1 >conftest.err
22617 rm -f conftest.er1
22618 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022620 (exit $ac_status); } && {
22621 test -z "$ac_c_werror_flag" ||
22622 test ! -s conftest.err
22623 } && test -s conftest$ac_exeext &&
22624 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022625 ac_cv_lib_readline_rl_callback_handler_install=yes
22626else
22627 echo "$as_me: failed program was:" >&5
22628sed 's/^/| /' conftest.$ac_ext >&5
22629
Martin v. Löwiseba40652007-08-30 20:10:57 +000022630 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022632
22633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022634 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022635LIBS=$ac_check_lib_save_LIBS
22636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022637{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22638echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022639if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22640
22641cat >>confdefs.h <<\_ACEOF
22642#define HAVE_RL_CALLBACK 1
22643_ACEOF
22644
22645fi
22646
22647
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022648# check for readline 2.2
22649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022650/* confdefs.h. */
22651_ACEOF
22652cat confdefs.h >>conftest.$ac_ext
22653cat >>conftest.$ac_ext <<_ACEOF
22654/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022655#include <readline/readline.h>
22656_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657if { (ac_try="$ac_cpp conftest.$ac_ext"
22658case "(($ac_try" in
22659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22660 *) ac_try_echo=$ac_try;;
22661esac
22662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22663 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022664 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022665 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022666 rm -f conftest.er1
22667 cat conftest.err >&5
22668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669 (exit $ac_status); } >/dev/null && {
22670 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22671 test ! -s conftest.err
22672 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022673 have_readline=yes
22674else
22675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022676sed 's/^/| /' conftest.$ac_ext >&5
22677
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022678 have_readline=no
22679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022680
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022681rm -f conftest.err conftest.$ac_ext
22682if test $have_readline = yes
22683then
22684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022685/* confdefs.h. */
22686_ACEOF
22687cat confdefs.h >>conftest.$ac_ext
22688cat >>conftest.$ac_ext <<_ACEOF
22689/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022690#include <readline/readline.h>
22691
22692_ACEOF
22693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022694 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022695
22696cat >>confdefs.h <<\_ACEOF
22697#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22698_ACEOF
22699
22700fi
22701rm -f conftest*
22702
22703fi
22704
Martin v. Löwis0daad592001-09-30 21:09:59 +000022705# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022706{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22707echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022708if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022710else
Martin v. Löwis11437992002-04-12 09:54:03 +000022711 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022712LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022714/* confdefs.h. */
22715_ACEOF
22716cat confdefs.h >>conftest.$ac_ext
22717cat >>conftest.$ac_ext <<_ACEOF
22718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022719
Martin v. Löwiseba40652007-08-30 20:10:57 +000022720/* Override any GCC internal prototype to avoid an error.
22721 Use char because int might match the return type of a GCC
22722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022723#ifdef __cplusplus
22724extern "C"
22725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022726char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022727int
22728main ()
22729{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022730return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022731 ;
22732 return 0;
22733}
22734_ACEOF
22735rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736if { (ac_try="$ac_link"
22737case "(($ac_try" in
22738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22739 *) ac_try_echo=$ac_try;;
22740esac
22741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22742 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022744 grep -v '^ *+' conftest.er1 >conftest.err
22745 rm -f conftest.er1
22746 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022748 (exit $ac_status); } && {
22749 test -z "$ac_c_werror_flag" ||
22750 test ! -s conftest.err
22751 } && test -s conftest$ac_exeext &&
22752 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022753 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022754else
Martin v. Löwis11437992002-04-12 09:54:03 +000022755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022756sed 's/^/| /' conftest.$ac_ext >&5
22757
Martin v. Löwiseba40652007-08-30 20:10:57 +000022758 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022760
22761rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022762 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022763LIBS=$ac_check_lib_save_LIBS
22764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22766echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022767if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022768
Martin v. Löwis11437992002-04-12 09:54:03 +000022769cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022770#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022771_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022772
Martin v. Löwis0daad592001-09-30 21:09:59 +000022773fi
22774
Michael W. Hudson54241132001-12-07 15:38:26 +000022775
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022776# also in 4.0
22777{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22778echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22779if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22780 echo $ECHO_N "(cached) $ECHO_C" >&6
22781else
22782 ac_check_lib_save_LIBS=$LIBS
22783LIBS="-lreadline $LIBS"
22784cat >conftest.$ac_ext <<_ACEOF
22785/* confdefs.h. */
22786_ACEOF
22787cat confdefs.h >>conftest.$ac_ext
22788cat >>conftest.$ac_ext <<_ACEOF
22789/* end confdefs.h. */
22790
22791/* Override any GCC internal prototype to avoid an error.
22792 Use char because int might match the return type of a GCC
22793 builtin and then its argument prototype would still apply. */
22794#ifdef __cplusplus
22795extern "C"
22796#endif
22797char rl_completion_display_matches_hook ();
22798int
22799main ()
22800{
22801return rl_completion_display_matches_hook ();
22802 ;
22803 return 0;
22804}
22805_ACEOF
22806rm -f conftest.$ac_objext conftest$ac_exeext
22807if { (ac_try="$ac_link"
22808case "(($ac_try" in
22809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22810 *) ac_try_echo=$ac_try;;
22811esac
22812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22813 (eval "$ac_link") 2>conftest.er1
22814 ac_status=$?
22815 grep -v '^ *+' conftest.er1 >conftest.err
22816 rm -f conftest.er1
22817 cat conftest.err >&5
22818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22819 (exit $ac_status); } && {
22820 test -z "$ac_c_werror_flag" ||
22821 test ! -s conftest.err
22822 } && test -s conftest$ac_exeext &&
22823 $as_test_x conftest$ac_exeext; then
22824 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22825else
22826 echo "$as_me: failed program was:" >&5
22827sed 's/^/| /' conftest.$ac_ext >&5
22828
22829 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22830fi
22831
22832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22833 conftest$ac_exeext conftest.$ac_ext
22834LIBS=$ac_check_lib_save_LIBS
22835fi
22836{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22837echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22838if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22839
22840cat >>confdefs.h <<\_ACEOF
22841#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22842_ACEOF
22843
22844fi
22845
22846
Martin v. Löwis0daad592001-09-30 21:09:59 +000022847# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022848{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22849echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022850if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22851 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022852else
Martin v. Löwis11437992002-04-12 09:54:03 +000022853 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022854LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022856/* confdefs.h. */
22857_ACEOF
22858cat confdefs.h >>conftest.$ac_ext
22859cat >>conftest.$ac_ext <<_ACEOF
22860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022861
Martin v. Löwiseba40652007-08-30 20:10:57 +000022862/* Override any GCC internal prototype to avoid an error.
22863 Use char because int might match the return type of a GCC
22864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022865#ifdef __cplusplus
22866extern "C"
22867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022868char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022869int
22870main ()
22871{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022872return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022873 ;
22874 return 0;
22875}
22876_ACEOF
22877rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022878if { (ac_try="$ac_link"
22879case "(($ac_try" in
22880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22881 *) ac_try_echo=$ac_try;;
22882esac
22883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22884 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022886 grep -v '^ *+' conftest.er1 >conftest.err
22887 rm -f conftest.er1
22888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890 (exit $ac_status); } && {
22891 test -z "$ac_c_werror_flag" ||
22892 test ! -s conftest.err
22893 } && test -s conftest$ac_exeext &&
22894 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022895 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022896else
Martin v. Löwis11437992002-04-12 09:54:03 +000022897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022898sed 's/^/| /' conftest.$ac_ext >&5
22899
Martin v. Löwiseba40652007-08-30 20:10:57 +000022900 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022902
22903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022905LIBS=$ac_check_lib_save_LIBS
22906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022907{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22908echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022909if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022910
Martin v. Löwis11437992002-04-12 09:54:03 +000022911cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022912#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022913_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022914
Guido van Rossum353ae582001-07-10 16:45:32 +000022915fi
22916
Jack Jansendd19cf82001-12-06 22:36:17 +000022917
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022918# also in readline 4.2
22919cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022920/* confdefs.h. */
22921_ACEOF
22922cat confdefs.h >>conftest.$ac_ext
22923cat >>conftest.$ac_ext <<_ACEOF
22924/* end confdefs.h. */
22925#include <readline/readline.h>
22926_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022927if { (ac_try="$ac_cpp conftest.$ac_ext"
22928case "(($ac_try" in
22929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22930 *) ac_try_echo=$ac_try;;
22931esac
22932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22933 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022934 ac_status=$?
22935 grep -v '^ *+' conftest.er1 >conftest.err
22936 rm -f conftest.er1
22937 cat conftest.err >&5
22938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939 (exit $ac_status); } >/dev/null && {
22940 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22941 test ! -s conftest.err
22942 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022943 have_readline=yes
22944else
22945 echo "$as_me: failed program was:" >&5
22946sed 's/^/| /' conftest.$ac_ext >&5
22947
22948 have_readline=no
22949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022950
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022951rm -f conftest.err conftest.$ac_ext
22952if test $have_readline = yes
22953then
22954 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022955/* confdefs.h. */
22956_ACEOF
22957cat confdefs.h >>conftest.$ac_ext
22958cat >>conftest.$ac_ext <<_ACEOF
22959/* end confdefs.h. */
22960#include <readline/readline.h>
22961
22962_ACEOF
22963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22964 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22965
22966cat >>confdefs.h <<\_ACEOF
22967#define HAVE_RL_CATCH_SIGNAL 1
22968_ACEOF
22969
22970fi
22971rm -f conftest*
22972
22973fi
22974
Martin v. Löwis82bca632006-02-10 20:49:30 +000022975# End of readline checks: restore LIBS
22976LIBS=$LIBS_no_readline
22977
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22979echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022980if test "${ac_cv_broken_nice+set}" = set; then
22981 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022982else
Martin v. Löwis11437992002-04-12 09:54:03 +000022983
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022984if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022985 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022986else
Martin v. Löwis11437992002-04-12 09:54:03 +000022987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022988/* confdefs.h. */
22989_ACEOF
22990cat confdefs.h >>conftest.$ac_ext
22991cat >>conftest.$ac_ext <<_ACEOF
22992/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022993
22994int main()
22995{
22996 int val1 = nice(1);
22997 if (val1 != -1 && val1 == nice(2))
22998 exit(0);
22999 exit(1);
23000}
23001
Martin v. Löwis11437992002-04-12 09:54:03 +000023002_ACEOF
23003rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004if { (ac_try="$ac_link"
23005case "(($ac_try" in
23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23007 *) ac_try_echo=$ac_try;;
23008esac
23009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023011 ac_status=$?
23012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023014 { (case "(($ac_try" in
23015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23016 *) ac_try_echo=$ac_try;;
23017esac
23018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23019 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023020 ac_status=$?
23021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23022 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023023 ac_cv_broken_nice=yes
23024else
Martin v. Löwis11437992002-04-12 09:54:03 +000023025 echo "$as_me: program exited with status $ac_status" >&5
23026echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023027sed 's/^/| /' conftest.$ac_ext >&5
23028
Martin v. Löwis11437992002-04-12 09:54:03 +000023029( exit $ac_status )
23030ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023032rm -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 +000023033fi
23034
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035
23036fi
23037
23038{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23039echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023040if test "$ac_cv_broken_nice" = yes
23041then
Martin v. Löwis11437992002-04-12 09:54:03 +000023042
23043cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023044#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023045_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023046
23047fi
23048
Martin v. Löwiseba40652007-08-30 20:10:57 +000023049{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23050echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023051if test "$cross_compiling" = yes; then
23052 ac_cv_broken_poll=no
23053else
23054 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023055/* confdefs.h. */
23056_ACEOF
23057cat confdefs.h >>conftest.$ac_ext
23058cat >>conftest.$ac_ext <<_ACEOF
23059/* end confdefs.h. */
23060
23061#include <poll.h>
23062
23063int main (void)
23064 {
23065 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23066
23067 close (42);
23068
23069 int poll_test = poll (&poll_struct, 1, 0);
23070
23071 if (poll_test < 0)
23072 {
23073 exit(0);
23074 }
23075 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23076 {
23077 exit(0);
23078 }
23079 else
23080 {
23081 exit(1);
23082 }
23083 }
23084
23085_ACEOF
23086rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023087if { (ac_try="$ac_link"
23088case "(($ac_try" in
23089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23090 *) ac_try_echo=$ac_try;;
23091esac
23092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23093 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023094 ac_status=$?
23095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023097 { (case "(($ac_try" in
23098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23099 *) ac_try_echo=$ac_try;;
23100esac
23101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23102 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023103 ac_status=$?
23104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23105 (exit $ac_status); }; }; then
23106 ac_cv_broken_poll=yes
23107else
23108 echo "$as_me: program exited with status $ac_status" >&5
23109echo "$as_me: failed program was:" >&5
23110sed 's/^/| /' conftest.$ac_ext >&5
23111
23112( exit $ac_status )
23113ac_cv_broken_poll=no
23114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023115rm -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 +000023116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117
23118
23119{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23120echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023121if test "$ac_cv_broken_poll" = yes
23122then
23123
23124cat >>confdefs.h <<\_ACEOF
23125#define HAVE_BROKEN_POLL 1
23126_ACEOF
23127
23128fi
23129
Brett Cannon43802422005-02-10 20:48:03 +000023130# 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 +000023131# (which is not required by ISO C or UNIX spec) and/or if we support
23132# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023133{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23134echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023135if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23136 echo $ECHO_N "(cached) $ECHO_C" >&6
23137else
23138 cat >conftest.$ac_ext <<_ACEOF
23139/* confdefs.h. */
23140_ACEOF
23141cat confdefs.h >>conftest.$ac_ext
23142cat >>conftest.$ac_ext <<_ACEOF
23143/* end confdefs.h. */
23144#include <sys/types.h>
23145#include <$ac_cv_struct_tm>
23146
23147
23148int
23149main ()
23150{
23151static struct tm ac_aggr;
23152if (ac_aggr.tm_zone)
23153return 0;
23154 ;
23155 return 0;
23156}
23157_ACEOF
23158rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023159if { (ac_try="$ac_compile"
23160case "(($ac_try" in
23161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23162 *) ac_try_echo=$ac_try;;
23163esac
23164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23165 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023166 ac_status=$?
23167 grep -v '^ *+' conftest.er1 >conftest.err
23168 rm -f conftest.er1
23169 cat conftest.err >&5
23170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023171 (exit $ac_status); } && {
23172 test -z "$ac_c_werror_flag" ||
23173 test ! -s conftest.err
23174 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023175 ac_cv_member_struct_tm_tm_zone=yes
23176else
23177 echo "$as_me: failed program was:" >&5
23178sed 's/^/| /' conftest.$ac_ext >&5
23179
Martin v. Löwiseba40652007-08-30 20:10:57 +000023180 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
23186#include <sys/types.h>
23187#include <$ac_cv_struct_tm>
23188
23189
23190int
23191main ()
23192{
23193static struct tm ac_aggr;
23194if (sizeof ac_aggr.tm_zone)
23195return 0;
23196 ;
23197 return 0;
23198}
23199_ACEOF
23200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201if { (ac_try="$ac_compile"
23202case "(($ac_try" in
23203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23204 *) ac_try_echo=$ac_try;;
23205esac
23206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23207 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023208 ac_status=$?
23209 grep -v '^ *+' conftest.er1 >conftest.err
23210 rm -f conftest.er1
23211 cat conftest.err >&5
23212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213 (exit $ac_status); } && {
23214 test -z "$ac_c_werror_flag" ||
23215 test ! -s conftest.err
23216 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023217 ac_cv_member_struct_tm_tm_zone=yes
23218else
23219 echo "$as_me: failed program was:" >&5
23220sed 's/^/| /' conftest.$ac_ext >&5
23221
Martin v. Löwiseba40652007-08-30 20:10:57 +000023222 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023224
23225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227
23228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023230{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23231echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023232if test $ac_cv_member_struct_tm_tm_zone = yes; then
23233
23234cat >>confdefs.h <<_ACEOF
23235#define HAVE_STRUCT_TM_TM_ZONE 1
23236_ACEOF
23237
23238
23239fi
23240
23241if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23242
23243cat >>confdefs.h <<\_ACEOF
23244#define HAVE_TM_ZONE 1
23245_ACEOF
23246
23247else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023248 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23249echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23250if test "${ac_cv_have_decl_tzname+set}" = set; then
23251 echo $ECHO_N "(cached) $ECHO_C" >&6
23252else
23253 cat >conftest.$ac_ext <<_ACEOF
23254/* confdefs.h. */
23255_ACEOF
23256cat confdefs.h >>conftest.$ac_ext
23257cat >>conftest.$ac_ext <<_ACEOF
23258/* end confdefs.h. */
23259#include <time.h>
23260
23261int
23262main ()
23263{
23264#ifndef tzname
23265 (void) tzname;
23266#endif
23267
23268 ;
23269 return 0;
23270}
23271_ACEOF
23272rm -f conftest.$ac_objext
23273if { (ac_try="$ac_compile"
23274case "(($ac_try" in
23275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23276 *) ac_try_echo=$ac_try;;
23277esac
23278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23279 (eval "$ac_compile") 2>conftest.er1
23280 ac_status=$?
23281 grep -v '^ *+' conftest.er1 >conftest.err
23282 rm -f conftest.er1
23283 cat conftest.err >&5
23284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23285 (exit $ac_status); } && {
23286 test -z "$ac_c_werror_flag" ||
23287 test ! -s conftest.err
23288 } && test -s conftest.$ac_objext; then
23289 ac_cv_have_decl_tzname=yes
23290else
23291 echo "$as_me: failed program was:" >&5
23292sed 's/^/| /' conftest.$ac_ext >&5
23293
23294 ac_cv_have_decl_tzname=no
23295fi
23296
23297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23298fi
23299{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23300echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23301if test $ac_cv_have_decl_tzname = yes; then
23302
23303cat >>confdefs.h <<_ACEOF
23304#define HAVE_DECL_TZNAME 1
23305_ACEOF
23306
23307
23308else
23309 cat >>confdefs.h <<_ACEOF
23310#define HAVE_DECL_TZNAME 0
23311_ACEOF
23312
23313
23314fi
23315
23316
23317 { echo "$as_me:$LINENO: checking for tzname" >&5
23318echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023319if test "${ac_cv_var_tzname+set}" = set; then
23320 echo $ECHO_N "(cached) $ECHO_C" >&6
23321else
23322 cat >conftest.$ac_ext <<_ACEOF
23323/* confdefs.h. */
23324_ACEOF
23325cat confdefs.h >>conftest.$ac_ext
23326cat >>conftest.$ac_ext <<_ACEOF
23327/* end confdefs.h. */
23328#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023329#if !HAVE_DECL_TZNAME
23330extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023331#endif
23332
23333int
23334main ()
23335{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023336return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023337 ;
23338 return 0;
23339}
23340_ACEOF
23341rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023342if { (ac_try="$ac_link"
23343case "(($ac_try" in
23344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23345 *) ac_try_echo=$ac_try;;
23346esac
23347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23348 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023349 ac_status=$?
23350 grep -v '^ *+' conftest.er1 >conftest.err
23351 rm -f conftest.er1
23352 cat conftest.err >&5
23353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023354 (exit $ac_status); } && {
23355 test -z "$ac_c_werror_flag" ||
23356 test ! -s conftest.err
23357 } && test -s conftest$ac_exeext &&
23358 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023359 ac_cv_var_tzname=yes
23360else
23361 echo "$as_me: failed program was:" >&5
23362sed 's/^/| /' conftest.$ac_ext >&5
23363
Martin v. Löwiseba40652007-08-30 20:10:57 +000023364 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023366
23367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023368 conftest$ac_exeext conftest.$ac_ext
23369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023370{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23371echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023372 if test $ac_cv_var_tzname = yes; then
23373
23374cat >>confdefs.h <<\_ACEOF
23375#define HAVE_TZNAME 1
23376_ACEOF
23377
23378 fi
23379fi
23380
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023381
Martin v. Löwis1d459062005-03-14 21:23:33 +000023382# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023383{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23384echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023385if test "${ac_cv_working_tzset+set}" = set; then
23386 echo $ECHO_N "(cached) $ECHO_C" >&6
23387else
23388
23389if test "$cross_compiling" = yes; then
23390 ac_cv_working_tzset=no
23391else
23392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023393/* confdefs.h. */
23394_ACEOF
23395cat confdefs.h >>conftest.$ac_ext
23396cat >>conftest.$ac_ext <<_ACEOF
23397/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023398
23399#include <stdlib.h>
23400#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023401#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023402
23403#if HAVE_TZNAME
23404extern char *tzname[];
23405#endif
23406
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023407int main()
23408{
Brett Cannon18367812003-09-19 00:59:16 +000023409 /* Note that we need to ensure that not only does tzset(3)
23410 do 'something' with localtime, but it works as documented
23411 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023412 This includes making sure that tzname is set properly if
23413 tm->tm_zone does not exist since it is the alternative way
23414 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023415
23416 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023417 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023418 */
23419
Martin v. Löwis1d459062005-03-14 21:23:33 +000023420 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023421 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23422
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023423 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023424 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023425 if (localtime(&groundhogday)->tm_hour != 0)
23426 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023427#if HAVE_TZNAME
23428 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23429 if (strcmp(tzname[0], "UTC") ||
23430 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23431 exit(1);
23432#endif
Brett Cannon18367812003-09-19 00:59:16 +000023433
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023434 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023435 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023436 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023437 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023438#if HAVE_TZNAME
23439 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23440 exit(1);
23441#endif
Brett Cannon18367812003-09-19 00:59:16 +000023442
23443 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23444 tzset();
23445 if (localtime(&groundhogday)->tm_hour != 11)
23446 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023447#if HAVE_TZNAME
23448 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23449 exit(1);
23450#endif
23451
23452#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023453 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23454 exit(1);
23455 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23456 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023457#endif
Brett Cannon18367812003-09-19 00:59:16 +000023458
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023459 exit(0);
23460}
23461
23462_ACEOF
23463rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023464if { (ac_try="$ac_link"
23465case "(($ac_try" in
23466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23467 *) ac_try_echo=$ac_try;;
23468esac
23469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23470 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023471 ac_status=$?
23472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023474 { (case "(($ac_try" in
23475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23476 *) ac_try_echo=$ac_try;;
23477esac
23478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23479 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023480 ac_status=$?
23481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23482 (exit $ac_status); }; }; then
23483 ac_cv_working_tzset=yes
23484else
23485 echo "$as_me: program exited with status $ac_status" >&5
23486echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023487sed 's/^/| /' conftest.$ac_ext >&5
23488
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023489( exit $ac_status )
23490ac_cv_working_tzset=no
23491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023492rm -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 +000023493fi
23494
Martin v. Löwiseba40652007-08-30 20:10:57 +000023495
23496fi
23497
23498{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23499echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023500if test "$ac_cv_working_tzset" = yes
23501then
23502
23503cat >>confdefs.h <<\_ACEOF
23504#define HAVE_WORKING_TZSET 1
23505_ACEOF
23506
23507fi
23508
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023509# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023510{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23511echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023512if test "${ac_cv_stat_tv_nsec+set}" = set; then
23513 echo $ECHO_N "(cached) $ECHO_C" >&6
23514else
23515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023516/* confdefs.h. */
23517_ACEOF
23518cat confdefs.h >>conftest.$ac_ext
23519cat >>conftest.$ac_ext <<_ACEOF
23520/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023521#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023522int
23523main ()
23524{
23525
23526struct stat st;
23527st.st_mtim.tv_nsec = 1;
23528
23529 ;
23530 return 0;
23531}
23532_ACEOF
23533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023534if { (ac_try="$ac_compile"
23535case "(($ac_try" in
23536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23537 *) ac_try_echo=$ac_try;;
23538esac
23539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023542 grep -v '^ *+' conftest.er1 >conftest.err
23543 rm -f conftest.er1
23544 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023546 (exit $ac_status); } && {
23547 test -z "$ac_c_werror_flag" ||
23548 test ! -s conftest.err
23549 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023550 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023551else
23552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023553sed 's/^/| /' conftest.$ac_ext >&5
23554
Martin v. Löwiseba40652007-08-30 20:10:57 +000023555 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023556fi
23557
Martin v. Löwiseba40652007-08-30 20:10:57 +000023558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23559fi
23560
23561{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23562echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023563if test "$ac_cv_stat_tv_nsec" = yes
23564then
23565
23566cat >>confdefs.h <<\_ACEOF
23567#define HAVE_STAT_TV_NSEC 1
23568_ACEOF
23569
23570fi
23571
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023572# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023573{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23574echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023575if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23576 echo $ECHO_N "(cached) $ECHO_C" >&6
23577else
23578 cat >conftest.$ac_ext <<_ACEOF
23579/* confdefs.h. */
23580_ACEOF
23581cat confdefs.h >>conftest.$ac_ext
23582cat >>conftest.$ac_ext <<_ACEOF
23583/* end confdefs.h. */
23584#include <sys/stat.h>
23585int
23586main ()
23587{
23588
23589struct stat st;
23590st.st_mtimespec.tv_nsec = 1;
23591
23592 ;
23593 return 0;
23594}
23595_ACEOF
23596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023597if { (ac_try="$ac_compile"
23598case "(($ac_try" in
23599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23600 *) ac_try_echo=$ac_try;;
23601esac
23602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023604 ac_status=$?
23605 grep -v '^ *+' conftest.er1 >conftest.err
23606 rm -f conftest.er1
23607 cat conftest.err >&5
23608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023609 (exit $ac_status); } && {
23610 test -z "$ac_c_werror_flag" ||
23611 test ! -s conftest.err
23612 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023613 ac_cv_stat_tv_nsec2=yes
23614else
23615 echo "$as_me: failed program was:" >&5
23616sed 's/^/| /' conftest.$ac_ext >&5
23617
Martin v. Löwiseba40652007-08-30 20:10:57 +000023618 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023619fi
23620
Martin v. Löwiseba40652007-08-30 20:10:57 +000023621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23622fi
23623
23624{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23625echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023626if test "$ac_cv_stat_tv_nsec2" = yes
23627then
23628
23629cat >>confdefs.h <<\_ACEOF
23630#define HAVE_STAT_TV_NSEC2 1
23631_ACEOF
23632
23633fi
23634
Jack Jansen666b1e72001-10-31 12:11:48 +000023635# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023636{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23637echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023638if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23639 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023640else
Martin v. Löwis11437992002-04-12 09:54:03 +000023641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023642/* confdefs.h. */
23643_ACEOF
23644cat confdefs.h >>conftest.$ac_ext
23645cat >>conftest.$ac_ext <<_ACEOF
23646/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023647#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023648int
23649main ()
23650{
Jack Jansen666b1e72001-10-31 12:11:48 +000023651
23652 int rtn;
23653 rtn = mvwdelch(0,0,0);
23654
Martin v. Löwis11437992002-04-12 09:54:03 +000023655 ;
23656 return 0;
23657}
23658_ACEOF
23659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023660if { (ac_try="$ac_compile"
23661case "(($ac_try" in
23662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23663 *) ac_try_echo=$ac_try;;
23664esac
23665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023668 grep -v '^ *+' conftest.er1 >conftest.err
23669 rm -f conftest.er1
23670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023672 (exit $ac_status); } && {
23673 test -z "$ac_c_werror_flag" ||
23674 test ! -s conftest.err
23675 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023676 ac_cv_mvwdelch_is_expression=yes
23677else
Martin v. Löwis11437992002-04-12 09:54:03 +000023678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023679sed 's/^/| /' conftest.$ac_ext >&5
23680
Martin v. Löwiseba40652007-08-30 20:10:57 +000023681 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023682fi
23683
Martin v. Löwiseba40652007-08-30 20:10:57 +000023684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23685fi
23686
23687{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23688echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023689
23690if test "$ac_cv_mvwdelch_is_expression" = yes
23691then
Martin v. Löwis11437992002-04-12 09:54:03 +000023692
23693cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023694#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023695_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023696
23697fi
23698
Martin v. Löwiseba40652007-08-30 20:10:57 +000023699{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23700echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023701if test "${ac_cv_window_has_flags+set}" = set; then
23702 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023703else
Martin v. Löwis11437992002-04-12 09:54:03 +000023704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023705/* confdefs.h. */
23706_ACEOF
23707cat confdefs.h >>conftest.$ac_ext
23708cat >>conftest.$ac_ext <<_ACEOF
23709/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023710#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023711int
23712main ()
23713{
Jack Jansen666b1e72001-10-31 12:11:48 +000023714
23715 WINDOW *w;
23716 w->_flags = 0;
23717
Martin v. Löwis11437992002-04-12 09:54:03 +000023718 ;
23719 return 0;
23720}
23721_ACEOF
23722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723if { (ac_try="$ac_compile"
23724case "(($ac_try" in
23725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23726 *) ac_try_echo=$ac_try;;
23727esac
23728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023731 grep -v '^ *+' conftest.er1 >conftest.err
23732 rm -f conftest.er1
23733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023735 (exit $ac_status); } && {
23736 test -z "$ac_c_werror_flag" ||
23737 test ! -s conftest.err
23738 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023739 ac_cv_window_has_flags=yes
23740else
Martin v. Löwis11437992002-04-12 09:54:03 +000023741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023742sed 's/^/| /' conftest.$ac_ext >&5
23743
Martin v. Löwiseba40652007-08-30 20:10:57 +000023744 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023745fi
23746
Martin v. Löwiseba40652007-08-30 20:10:57 +000023747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23748fi
23749
23750{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23751echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023752
Jack Jansen666b1e72001-10-31 12:11:48 +000023753
23754if test "$ac_cv_window_has_flags" = yes
23755then
Martin v. Löwis11437992002-04-12 09:54:03 +000023756
23757cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023758#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023759_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023760
23761fi
23762
Martin v. Löwiseba40652007-08-30 20:10:57 +000023763{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23764echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023765cat >conftest.$ac_ext <<_ACEOF
23766/* confdefs.h. */
23767_ACEOF
23768cat confdefs.h >>conftest.$ac_ext
23769cat >>conftest.$ac_ext <<_ACEOF
23770/* end confdefs.h. */
23771#include <curses.h>
23772int
23773main ()
23774{
23775void *x=is_term_resized
23776 ;
23777 return 0;
23778}
23779_ACEOF
23780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781if { (ac_try="$ac_compile"
23782case "(($ac_try" in
23783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23784 *) ac_try_echo=$ac_try;;
23785esac
23786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23787 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023788 ac_status=$?
23789 grep -v '^ *+' conftest.er1 >conftest.err
23790 rm -f conftest.er1
23791 cat conftest.err >&5
23792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023793 (exit $ac_status); } && {
23794 test -z "$ac_c_werror_flag" ||
23795 test ! -s conftest.err
23796 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023797
23798cat >>confdefs.h <<\_ACEOF
23799#define HAVE_CURSES_IS_TERM_RESIZED 1
23800_ACEOF
23801
Martin v. Löwiseba40652007-08-30 20:10:57 +000023802 { echo "$as_me:$LINENO: result: yes" >&5
23803echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023804else
23805 echo "$as_me: failed program was:" >&5
23806sed 's/^/| /' conftest.$ac_ext >&5
23807
Martin v. Löwiseba40652007-08-30 20:10:57 +000023808 { echo "$as_me:$LINENO: result: no" >&5
23809echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023810
23811fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023812
Martin v. Löwiseba40652007-08-30 20:10:57 +000023813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23814
23815{ echo "$as_me:$LINENO: checking for resize_term" >&5
23816echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023817cat >conftest.$ac_ext <<_ACEOF
23818/* confdefs.h. */
23819_ACEOF
23820cat confdefs.h >>conftest.$ac_ext
23821cat >>conftest.$ac_ext <<_ACEOF
23822/* end confdefs.h. */
23823#include <curses.h>
23824int
23825main ()
23826{
23827void *x=resize_term
23828 ;
23829 return 0;
23830}
23831_ACEOF
23832rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023833if { (ac_try="$ac_compile"
23834case "(($ac_try" in
23835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23836 *) ac_try_echo=$ac_try;;
23837esac
23838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23839 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023840 ac_status=$?
23841 grep -v '^ *+' conftest.er1 >conftest.err
23842 rm -f conftest.er1
23843 cat conftest.err >&5
23844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023845 (exit $ac_status); } && {
23846 test -z "$ac_c_werror_flag" ||
23847 test ! -s conftest.err
23848 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023849
23850cat >>confdefs.h <<\_ACEOF
23851#define HAVE_CURSES_RESIZE_TERM 1
23852_ACEOF
23853
Martin v. Löwiseba40652007-08-30 20:10:57 +000023854 { echo "$as_me:$LINENO: result: yes" >&5
23855echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023856else
23857 echo "$as_me: failed program was:" >&5
23858sed 's/^/| /' conftest.$ac_ext >&5
23859
Martin v. Löwiseba40652007-08-30 20:10:57 +000023860 { echo "$as_me:$LINENO: result: no" >&5
23861echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023862
23863fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023864
Martin v. Löwiseba40652007-08-30 20:10:57 +000023865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23866
23867{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23868echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023869cat >conftest.$ac_ext <<_ACEOF
23870/* confdefs.h. */
23871_ACEOF
23872cat confdefs.h >>conftest.$ac_ext
23873cat >>conftest.$ac_ext <<_ACEOF
23874/* end confdefs.h. */
23875#include <curses.h>
23876int
23877main ()
23878{
23879void *x=resizeterm
23880 ;
23881 return 0;
23882}
23883_ACEOF
23884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023885if { (ac_try="$ac_compile"
23886case "(($ac_try" in
23887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23888 *) ac_try_echo=$ac_try;;
23889esac
23890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23891 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023892 ac_status=$?
23893 grep -v '^ *+' conftest.er1 >conftest.err
23894 rm -f conftest.er1
23895 cat conftest.err >&5
23896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023897 (exit $ac_status); } && {
23898 test -z "$ac_c_werror_flag" ||
23899 test ! -s conftest.err
23900 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023901
23902cat >>confdefs.h <<\_ACEOF
23903#define HAVE_CURSES_RESIZETERM 1
23904_ACEOF
23905
Martin v. Löwiseba40652007-08-30 20:10:57 +000023906 { echo "$as_me:$LINENO: result: yes" >&5
23907echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023908else
23909 echo "$as_me: failed program was:" >&5
23910sed 's/^/| /' conftest.$ac_ext >&5
23911
Martin v. Löwiseba40652007-08-30 20:10:57 +000023912 { echo "$as_me:$LINENO: result: no" >&5
23913echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023914
23915fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023916
Martin v. Löwiseba40652007-08-30 20:10:57 +000023917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23918
23919{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23920echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023921
23922if test -r /dev/ptmx
23923then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023924 { echo "$as_me:$LINENO: result: yes" >&5
23925echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023926
23927cat >>confdefs.h <<\_ACEOF
23928#define HAVE_DEV_PTMX 1
23929_ACEOF
23930
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023931else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023932 { echo "$as_me:$LINENO: result: no" >&5
23933echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023934fi
23935
Martin v. Löwiseba40652007-08-30 20:10:57 +000023936{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23937echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023938
23939if test -r /dev/ptc
23940then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941 { echo "$as_me:$LINENO: result: yes" >&5
23942echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023943
23944cat >>confdefs.h <<\_ACEOF
23945#define HAVE_DEV_PTC 1
23946_ACEOF
23947
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023948else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023949 { echo "$as_me:$LINENO: result: no" >&5
23950echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023951fi
23952
Martin v. Löwiseba40652007-08-30 20:10:57 +000023953{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23954echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023955if test "$cross_compiling" = yes; then
23956 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23957See \`config.log' for more details." >&5
23958echo "$as_me: error: cannot run test program while cross compiling
23959See \`config.log' for more details." >&2;}
23960 { (exit 1); exit 1; }; }
23961else
23962 cat >conftest.$ac_ext <<_ACEOF
23963/* confdefs.h. */
23964_ACEOF
23965cat confdefs.h >>conftest.$ac_ext
23966cat >>conftest.$ac_ext <<_ACEOF
23967/* end confdefs.h. */
23968#include <stdio.h>
23969#include <stddef.h>
23970#include <string.h>
23971
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023972#ifdef HAVE_SYS_TYPES_H
23973#include <sys/types.h>
23974#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023975
23976#ifdef HAVE_SSIZE_T
23977typedef ssize_t Py_ssize_t;
23978#elif SIZEOF_VOID_P == SIZEOF_LONG
23979typedef long Py_ssize_t;
23980#else
23981typedef int Py_ssize_t;
23982#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023983
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023984int main()
23985{
23986 char buffer[256];
23987
Brett Cannon09d12362006-05-11 05:11:33 +000023988 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23989 return 1;
23990
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023991 if (strcmp(buffer, "123"))
23992 return 1;
23993
23994 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23995 return 1;
23996
23997 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023998 return 1;
23999
24000 return 0;
24001}
24002_ACEOF
24003rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024004if { (ac_try="$ac_link"
24005case "(($ac_try" in
24006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24007 *) ac_try_echo=$ac_try;;
24008esac
24009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24010 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024011 ac_status=$?
24012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024014 { (case "(($ac_try" in
24015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24016 *) ac_try_echo=$ac_try;;
24017esac
24018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24019 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024020 ac_status=$?
24021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24022 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024023 { echo "$as_me:$LINENO: result: yes" >&5
24024echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024025
24026cat >>confdefs.h <<\_ACEOF
24027#define PY_FORMAT_SIZE_T "z"
24028_ACEOF
24029
24030else
24031 echo "$as_me: program exited with status $ac_status" >&5
24032echo "$as_me: failed program was:" >&5
24033sed 's/^/| /' conftest.$ac_ext >&5
24034
24035( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024036{ echo "$as_me:$LINENO: result: no" >&5
24037echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024039rm -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 +000024040fi
24041
Martin v. Löwiseba40652007-08-30 20:10:57 +000024042
24043
24044{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24045echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024046if test "${ac_cv_type_socklen_t+set}" = set; then
24047 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024048else
Martin v. Löwis11437992002-04-12 09:54:03 +000024049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024050/* confdefs.h. */
24051_ACEOF
24052cat confdefs.h >>conftest.$ac_ext
24053cat >>conftest.$ac_ext <<_ACEOF
24054/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024055
24056#ifdef HAVE_SYS_TYPES_H
24057#include <sys/types.h>
24058#endif
24059#ifdef HAVE_SYS_SOCKET_H
24060#include <sys/socket.h>
24061#endif
24062
24063
Martin v. Löwiseba40652007-08-30 20:10:57 +000024064typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024065int
24066main ()
24067{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024068if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024069 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024070if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024071 return 0;
24072 ;
24073 return 0;
24074}
24075_ACEOF
24076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024077if { (ac_try="$ac_compile"
24078case "(($ac_try" in
24079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24080 *) ac_try_echo=$ac_try;;
24081esac
24082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024085 grep -v '^ *+' conftest.er1 >conftest.err
24086 rm -f conftest.er1
24087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024089 (exit $ac_status); } && {
24090 test -z "$ac_c_werror_flag" ||
24091 test ! -s conftest.err
24092 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024093 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024094else
Martin v. Löwis11437992002-04-12 09:54:03 +000024095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024096sed 's/^/| /' conftest.$ac_ext >&5
24097
Martin v. Löwiseba40652007-08-30 20:10:57 +000024098 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024100
24101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024103{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24104echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024105if test $ac_cv_type_socklen_t = yes; then
24106 :
24107else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024108
Martin v. Löwis01c04012002-11-11 14:58:44 +000024109cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024110#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024111_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024112
24113fi
24114
Michael W. Hudson54241132001-12-07 15:38:26 +000024115
Michael W. Hudson54241132001-12-07 15:38:26 +000024116
24117
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024118for h in `(cd $srcdir;echo Python/thread_*.h)`
24119do
24120 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24121done
24122
Michael W. Hudson54241132001-12-07 15:38:26 +000024123
Neal Norwitzd24499d2005-12-18 21:36:39 +000024124SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024125{ echo "$as_me:$LINENO: checking for build directories" >&5
24126echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024127for dir in $SRCDIRS; do
24128 if test ! -d $dir; then
24129 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024130 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024131done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024132{ echo "$as_me:$LINENO: result: done" >&5
24133echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024134
Guido van Rossum627b2d71993-12-24 10:39:16 +000024135# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024136ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024137
Martin v. Löwis11437992002-04-12 09:54:03 +000024138cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024139# This file is a shell script that caches the results of configure
24140# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024141# scripts and configure runs, see configure's option --config-cache.
24142# It is not useful on other systems. If it contains results you don't
24143# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024144#
Martin v. Löwis11437992002-04-12 09:54:03 +000024145# config.status only pays attention to the cache file if you give it
24146# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024147#
Skip Montanaro6dead952003-09-25 14:50:04 +000024148# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024149# loading this file, other *unset* `ac_cv_foo' will be assigned the
24150# following values.
24151
24152_ACEOF
24153
Guido van Rossumf78abae1997-01-21 22:02:36 +000024154# The following way of writing the cache mishandles newlines in values,
24155# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024156# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024157# Ultrix sh set writes to stderr and can't be redirected directly,
24158# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024159(
24160 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24161 eval ac_val=\$$ac_var
24162 case $ac_val in #(
24163 *${as_nl}*)
24164 case $ac_var in #(
24165 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24166echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24167 esac
24168 case $ac_var in #(
24169 _ | IFS | as_nl) ;; #(
24170 *) $as_unset $ac_var ;;
24171 esac ;;
24172 esac
24173 done
24174
Martin v. Löwis11437992002-04-12 09:54:03 +000024175 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024176 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24177 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024178 # `set' does not quote correctly, so add quotes (double-quote
24179 # substitution turns \\\\ into \\, and sed turns \\ into \).
24180 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024181 "s/'/'\\\\''/g;
24182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024183 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024184 *)
24185 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024186 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024187 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024188 esac |
24189 sort
24190) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024191 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024192 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024194 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024195 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24196 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024197 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24198 :end' >>confcache
24199if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24200 if test -w "$cache_file"; then
24201 test "x$cache_file" != "x/dev/null" &&
24202 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24203echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024204 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024205 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024206 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24207echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024208 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024209fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024210rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024211
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024212test "x$prefix" = xNONE && prefix=$ac_default_prefix
24213# Let make expand exec_prefix.
24214test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024216DEFS=-DHAVE_CONFIG_H
24217
Skip Montanaro6dead952003-09-25 14:50:04 +000024218ac_libobjs=
24219ac_ltlibobjs=
24220for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24221 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024222 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24223 ac_i=`echo "$ac_i" | sed "$ac_script"`
24224 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24225 # will be set to the directory where LIBOBJS objects are built.
24226 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24227 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024228done
24229LIBOBJS=$ac_libobjs
24230
24231LTLIBOBJS=$ac_ltlibobjs
24232
24233
Martin v. Löwis11437992002-04-12 09:54:03 +000024234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024235: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024236ac_clean_files_save=$ac_clean_files
24237ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24238{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24239echo "$as_me: creating $CONFIG_STATUS" >&6;}
24240cat >$CONFIG_STATUS <<_ACEOF
24241#! $SHELL
24242# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024243# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024244# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024245# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024246
Martin v. Löwis11437992002-04-12 09:54:03 +000024247debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024248ac_cs_recheck=false
24249ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024250SHELL=\${CONFIG_SHELL-$SHELL}
24251_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024252
Martin v. Löwis11437992002-04-12 09:54:03 +000024253cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024254## --------------------- ##
24255## M4sh Initialization. ##
24256## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024257
Martin v. Löwiseba40652007-08-30 20:10:57 +000024258# Be more Bourne compatible
24259DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024260if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24261 emulate sh
24262 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024263 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24264 # is contrary to our usage. Disable this feature.
24265 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024266 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024267else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024268 case `(set -o) 2>/dev/null` in
24269 *posix*) set -o posix ;;
24270esac
24271
Martin v. Löwis11437992002-04-12 09:54:03 +000024272fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024273
Skip Montanaro6dead952003-09-25 14:50:04 +000024274
Martin v. Löwis11437992002-04-12 09:54:03 +000024275
24276
Martin v. Löwiseba40652007-08-30 20:10:57 +000024277# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024278# Avoid depending upon Character Ranges.
24279as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24280as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24281as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24282as_cr_digits='0123456789'
24283as_cr_alnum=$as_cr_Letters$as_cr_digits
24284
24285# The user is always right.
24286if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024287 echo "#! /bin/sh" >conf$$.sh
24288 echo "exit 0" >>conf$$.sh
24289 chmod +x conf$$.sh
24290 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024291 PATH_SEPARATOR=';'
24292 else
24293 PATH_SEPARATOR=:
24294 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024295 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024296fi
24297
Martin v. Löwiseba40652007-08-30 20:10:57 +000024298# Support unset when possible.
24299if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24300 as_unset=unset
24301else
24302 as_unset=false
24303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024304
Martin v. Löwiseba40652007-08-30 20:10:57 +000024305
24306# IFS
24307# We need space, tab and new line, in precisely that order. Quoting is
24308# there to prevent editors from complaining about space-tab.
24309# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24310# splitting by setting IFS to empty value.)
24311as_nl='
24312'
24313IFS=" "" $as_nl"
24314
24315# Find who we are. Look in the path if we contain no directory separator.
24316case $0 in
24317 *[\\/]* ) as_myself=$0 ;;
24318 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024319for as_dir in $PATH
24320do
24321 IFS=$as_save_IFS
24322 test -z "$as_dir" && as_dir=.
24323 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24324done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024325IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024326
Martin v. Löwiseba40652007-08-30 20:10:57 +000024327 ;;
24328esac
24329# We did not find ourselves, most probably we were run as `sh COMMAND'
24330# in which case we are not to be found in the path.
24331if test "x$as_myself" = x; then
24332 as_myself=$0
24333fi
24334if test ! -f "$as_myself"; then
24335 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24336 { (exit 1); exit 1; }
24337fi
24338
24339# Work around bugs in pre-3.0 UWIN ksh.
24340for as_var in ENV MAIL MAILPATH
24341do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24342done
24343PS1='$ '
24344PS2='> '
24345PS4='+ '
24346
24347# NLS nuisances.
24348for as_var in \
24349 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24350 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24351 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024352do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024353 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24354 eval $as_var=C; export $as_var
24355 else
24356 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24357 fi
24358done
24359
24360# Required to use basename.
24361if expr a : '\(a\)' >/dev/null 2>&1 &&
24362 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24363 as_expr=expr
24364else
24365 as_expr=false
24366fi
24367
24368if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24369 as_basename=basename
24370else
24371 as_basename=false
24372fi
24373
24374
24375# Name of the executable.
24376as_me=`$as_basename -- "$0" ||
24377$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24378 X"$0" : 'X\(//\)$' \| \
24379 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24380echo X/"$0" |
24381 sed '/^.*\/\([^/][^/]*\)\/*$/{
24382 s//\1/
24383 q
24384 }
24385 /^X\/\(\/\/\)$/{
24386 s//\1/
24387 q
24388 }
24389 /^X\/\(\/\).*/{
24390 s//\1/
24391 q
24392 }
24393 s/.*/./; q'`
24394
24395# CDPATH.
24396$as_unset CDPATH
24397
24398
24399
Martin v. Löwis11437992002-04-12 09:54:03 +000024400 as_lineno_1=$LINENO
24401 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024403 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024404
Martin v. Löwis11437992002-04-12 09:54:03 +000024405 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24406 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407 # line-number line after each line using $LINENO; the second 'sed'
24408 # does the real work. The second script uses 'N' to pair each
24409 # line-number line with the line containing $LINENO, and appends
24410 # trailing '-' during substitution so that $LINENO is not a special
24411 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024412 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024413 # scripts with optimization help from Paolo Bonzini. Blame Lee
24414 # E. McMahon (1931-1989) for sed's syntax. :-)
24415 sed -n '
24416 p
24417 /[$]LINENO/=
24418 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024419 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024420 s/[$]LINENO.*/&-/
24421 t lineno
24422 b
24423 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024424 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024425 :loop
24426 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024427 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024429 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430 chmod +x "$as_me.lineno" ||
24431 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024432 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024433
Martin v. Löwis11437992002-04-12 09:54:03 +000024434 # Don't try to exec as it changes $[0], causing all sort of problems
24435 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024436 # original and so on. Autoconf is especially sensitive to this).
24437 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024438 # Exit status is that of the last command.
24439 exit
24440}
24441
24442
Martin v. Löwiseba40652007-08-30 20:10:57 +000024443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24444 as_dirname=dirname
24445else
24446 as_dirname=false
24447fi
24448
24449ECHO_C= ECHO_N= ECHO_T=
24450case `echo -n x` in
24451-n*)
24452 case `echo 'x\c'` in
24453 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24454 *) ECHO_C='\c';;
24455 esac;;
24456*)
24457 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024458esac
24459
Martin v. Löwiseba40652007-08-30 20:10:57 +000024460if expr a : '\(a\)' >/dev/null 2>&1 &&
24461 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024462 as_expr=expr
24463else
24464 as_expr=false
24465fi
24466
24467rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024468if test -d conf$$.dir; then
24469 rm -f conf$$.dir/conf$$.file
24470else
24471 rm -f conf$$.dir
24472 mkdir conf$$.dir
24473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024474echo >conf$$.file
24475if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024476 as_ln_s='ln -s'
24477 # ... but there are two gotchas:
24478 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24479 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24480 # In both cases, we have to default to `cp -p'.
24481 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024482 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024483elif ln conf$$.file conf$$ 2>/dev/null; then
24484 as_ln_s=ln
24485else
24486 as_ln_s='cp -p'
24487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024488rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24489rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024490
Skip Montanaro6dead952003-09-25 14:50:04 +000024491if mkdir -p . 2>/dev/null; then
24492 as_mkdir_p=:
24493else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024494 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024495 as_mkdir_p=false
24496fi
24497
Martin v. Löwiseba40652007-08-30 20:10:57 +000024498if test -x / >/dev/null 2>&1; then
24499 as_test_x='test -x'
24500else
24501 if ls -dL / >/dev/null 2>&1; then
24502 as_ls_L_option=L
24503 else
24504 as_ls_L_option=
24505 fi
24506 as_test_x='
24507 eval sh -c '\''
24508 if test -d "$1"; then
24509 test -d "$1/.";
24510 else
24511 case $1 in
24512 -*)set "./$1";;
24513 esac;
24514 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24515 ???[sx]*):;;*)false;;esac;fi
24516 '\'' sh
24517 '
24518fi
24519as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024520
24521# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024522as_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 +000024523
24524# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024525as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024526
24527
Martin v. Löwis11437992002-04-12 09:54:03 +000024528exec 6>&1
24529
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024531# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024532# values after options handling.
24533ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024534This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024535generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024536
24537 CONFIG_FILES = $CONFIG_FILES
24538 CONFIG_HEADERS = $CONFIG_HEADERS
24539 CONFIG_LINKS = $CONFIG_LINKS
24540 CONFIG_COMMANDS = $CONFIG_COMMANDS
24541 $ $0 $@
24542
Martin v. Löwiseba40652007-08-30 20:10:57 +000024543on `(hostname || uname -n) 2>/dev/null | sed 1q`
24544"
24545
Martin v. Löwis11437992002-04-12 09:54:03 +000024546_ACEOF
24547
Martin v. Löwiseba40652007-08-30 20:10:57 +000024548cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024549# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024550config_files="$ac_config_files"
24551config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024552
Martin v. Löwiseba40652007-08-30 20:10:57 +000024553_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024554
24555cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024556ac_cs_usage="\
24557\`$as_me' instantiates files from templates according to the
24558current configuration.
24559
24560Usage: $0 [OPTIONS] [FILE]...
24561
24562 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024563 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024564 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024565 -d, --debug don't remove temporary files
24566 --recheck update $as_me by reconfiguring in the same conditions
24567 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024568 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024569 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024570 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024571
24572Configuration files:
24573$config_files
24574
24575Configuration headers:
24576$config_headers
24577
24578Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024579
Martin v. Löwiseba40652007-08-30 20:10:57 +000024580_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024581cat >>$CONFIG_STATUS <<_ACEOF
24582ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024583python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024584configured by $0, generated by GNU Autoconf 2.61,
24585 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024586
Martin v. Löwiseba40652007-08-30 20:10:57 +000024587Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024588This config.status script is free software; the Free Software Foundation
24589gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024590
24591ac_pwd='$ac_pwd'
24592srcdir='$srcdir'
24593INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024594_ACEOF
24595
24596cat >>$CONFIG_STATUS <<\_ACEOF
24597# If no file are specified by the user, then we need to provide default
24598# value. By we need to know if files were specified by the user.
24599ac_need_defaults=:
24600while test $# != 0
24601do
24602 case $1 in
24603 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24605 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024606 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024607 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024608 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024609 ac_option=$1
24610 ac_optarg=$2
24611 ac_shift=shift
24612 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024613 esac
24614
Skip Montanaro6dead952003-09-25 14:50:04 +000024615 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024616 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024617 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24618 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024619 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24620 echo "$ac_cs_version"; exit ;;
24621 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024622 debug=: ;;
24623 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024624 $ac_shift
24625 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024626 ac_need_defaults=false;;
24627 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024628 $ac_shift
24629 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024630 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631 --he | --h)
24632 # Conflict between --help and --header
24633 { echo "$as_me: error: ambiguous option: $1
24634Try \`$0 --help' for more information." >&2
24635 { (exit 1); exit 1; }; };;
24636 --help | --hel | -h )
24637 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024638 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24639 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24640 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024641
24642 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024643 -*) { echo "$as_me: error: unrecognized option: $1
24644Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024645 { (exit 1); exit 1; }; } ;;
24646
Martin v. Löwiseba40652007-08-30 20:10:57 +000024647 *) ac_config_targets="$ac_config_targets $1"
24648 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024649
24650 esac
24651 shift
24652done
24653
Skip Montanaro6dead952003-09-25 14:50:04 +000024654ac_configure_extra_args=
24655
24656if $ac_cs_silent; then
24657 exec 6>/dev/null
24658 ac_configure_extra_args="$ac_configure_extra_args --silent"
24659fi
24660
24661_ACEOF
24662cat >>$CONFIG_STATUS <<_ACEOF
24663if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024664 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24665 CONFIG_SHELL=$SHELL
24666 export CONFIG_SHELL
24667 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024668fi
24669
Martin v. Löwis11437992002-04-12 09:54:03 +000024670_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024671cat >>$CONFIG_STATUS <<\_ACEOF
24672exec 5>>config.log
24673{
24674 echo
24675 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24676## Running $as_me. ##
24677_ASBOX
24678 echo "$ac_log"
24679} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024680
Martin v. Löwiseba40652007-08-30 20:10:57 +000024681_ACEOF
24682cat >>$CONFIG_STATUS <<_ACEOF
24683_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024684
24685cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024686
24687# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024688for ac_config_target in $ac_config_targets
24689do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024690 case $ac_config_target in
24691 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24692 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24693 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24694 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024695 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
24696 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024697 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24698 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24699
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24701echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24702 { (exit 1); exit 1; }; };;
24703 esac
24704done
24705
Martin v. Löwiseba40652007-08-30 20:10:57 +000024706
Martin v. Löwis11437992002-04-12 09:54:03 +000024707# If the user did not use the arguments to specify the items to instantiate,
24708# then the envvar interface is used. Set only those that are not.
24709# We use the long form for the default assignment because of an extremely
24710# bizarre bug on SunOS 4.1.3.
24711if $ac_need_defaults; then
24712 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24713 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24714fi
24715
Skip Montanaro6dead952003-09-25 14:50:04 +000024716# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024717# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024718# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024719# Hook for its removal unless debugging.
24720# Note that there is a small window in which the directory will not be cleaned:
24721# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024722$debug ||
24723{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724 tmp=
24725 trap 'exit_status=$?
24726 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24727' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024728 trap '{ (exit 1); exit 1; }' 1 2 13 15
24729}
Martin v. Löwis11437992002-04-12 09:54:03 +000024730# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024731
Martin v. Löwis11437992002-04-12 09:54:03 +000024732{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024733 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024734 test -n "$tmp" && test -d "$tmp"
24735} ||
24736{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024737 tmp=./conf$$-$RANDOM
24738 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024739} ||
24740{
Skip Montanaro6dead952003-09-25 14:50:04 +000024741 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024742 { (exit 1); exit 1; }
24743}
24744
Martin v. Löwis11437992002-04-12 09:54:03 +000024745#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024746# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024747#
24748
24749# No need to generate the scripts if there are no CONFIG_FILES.
24750# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024751if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024752
24753_ACEOF
24754
Martin v. Löwiseba40652007-08-30 20:10:57 +000024755
24756
24757ac_delim='%!_!# '
24758for ac_last_try in false false false false false :; do
24759 cat >conf$$subs.sed <<_ACEOF
24760SHELL!$SHELL$ac_delim
24761PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24762PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24763PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24764PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24765PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24766PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24767exec_prefix!$exec_prefix$ac_delim
24768prefix!$prefix$ac_delim
24769program_transform_name!$program_transform_name$ac_delim
24770bindir!$bindir$ac_delim
24771sbindir!$sbindir$ac_delim
24772libexecdir!$libexecdir$ac_delim
24773datarootdir!$datarootdir$ac_delim
24774datadir!$datadir$ac_delim
24775sysconfdir!$sysconfdir$ac_delim
24776sharedstatedir!$sharedstatedir$ac_delim
24777localstatedir!$localstatedir$ac_delim
24778includedir!$includedir$ac_delim
24779oldincludedir!$oldincludedir$ac_delim
24780docdir!$docdir$ac_delim
24781infodir!$infodir$ac_delim
24782htmldir!$htmldir$ac_delim
24783dvidir!$dvidir$ac_delim
24784pdfdir!$pdfdir$ac_delim
24785psdir!$psdir$ac_delim
24786libdir!$libdir$ac_delim
24787localedir!$localedir$ac_delim
24788mandir!$mandir$ac_delim
24789DEFS!$DEFS$ac_delim
24790ECHO_C!$ECHO_C$ac_delim
24791ECHO_N!$ECHO_N$ac_delim
24792ECHO_T!$ECHO_T$ac_delim
24793LIBS!$LIBS$ac_delim
24794build_alias!$build_alias$ac_delim
24795host_alias!$host_alias$ac_delim
24796target_alias!$target_alias$ac_delim
24797VERSION!$VERSION$ac_delim
24798SOVERSION!$SOVERSION$ac_delim
24799CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24800UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24801PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024802PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024803PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24804PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24805PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24806FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24807FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24808FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24809FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24810FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24811MACHDEP!$MACHDEP$ac_delim
24812SGI_ABI!$SGI_ABI$ac_delim
24813EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24814EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24815CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24816EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24817CC!$CC$ac_delim
24818CFLAGS!$CFLAGS$ac_delim
24819LDFLAGS!$LDFLAGS$ac_delim
24820CPPFLAGS!$CPPFLAGS$ac_delim
24821ac_ct_CC!$ac_ct_CC$ac_delim
24822EXEEXT!$EXEEXT$ac_delim
24823OBJEXT!$OBJEXT$ac_delim
24824CXX!$CXX$ac_delim
24825MAINCC!$MAINCC$ac_delim
24826CPP!$CPP$ac_delim
24827GREP!$GREP$ac_delim
24828EGREP!$EGREP$ac_delim
24829BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24830LIBRARY!$LIBRARY$ac_delim
24831LDLIBRARY!$LDLIBRARY$ac_delim
24832DLLLIBRARY!$DLLLIBRARY$ac_delim
24833BLDLIBRARY!$BLDLIBRARY$ac_delim
24834LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24835INSTSONAME!$INSTSONAME$ac_delim
24836RUNSHARED!$RUNSHARED$ac_delim
24837LINKCC!$LINKCC$ac_delim
24838RANLIB!$RANLIB$ac_delim
24839AR!$AR$ac_delim
24840SVNVERSION!$SVNVERSION$ac_delim
24841INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24842INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24843INSTALL_DATA!$INSTALL_DATA$ac_delim
24844LN!$LN$ac_delim
24845OPT!$OPT$ac_delim
24846BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000024847UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024848OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24849LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24850SO!$SO$ac_delim
24851LDSHARED!$LDSHARED$ac_delim
24852BLDSHARED!$BLDSHARED$ac_delim
24853CCSHARED!$CCSHARED$ac_delim
24854LINKFORSHARED!$LINKFORSHARED$ac_delim
24855CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24856SHLIBS!$SHLIBS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857_ACEOF
24858
24859 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24860 break
24861 elif $ac_last_try; then
24862 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24863echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24864 { (exit 1); exit 1; }; }
24865 else
24866 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024867 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024868done
24869
24870ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24871if test -n "$ac_eof"; then
24872 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24873 ac_eof=`expr $ac_eof + 1`
24874fi
24875
24876cat >>$CONFIG_STATUS <<_ACEOF
24877cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24878/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24879_ACEOF
24880sed '
24881s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24882s/^/s,@/; s/!/@,|#_!!_#|/
24883:n
24884t n
24885s/'"$ac_delim"'$/,g/; t
24886s/$/\\/; p
24887N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24888' >>$CONFIG_STATUS <conf$$subs.sed
24889rm -f conf$$subs.sed
24890cat >>$CONFIG_STATUS <<_ACEOF
24891CEOF$ac_eof
24892_ACEOF
24893
24894
24895ac_delim='%!_!# '
24896for ac_last_try in false false false false false :; do
24897 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren5640ce22008-06-05 12:58:24 +000024898USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024899SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024900USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24901LDLAST!$LDLAST$ac_delim
24902THREADOBJ!$THREADOBJ$ac_delim
24903DLINCLDIR!$DLINCLDIR$ac_delim
24904DYNLOADFILE!$DYNLOADFILE$ac_delim
24905MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24906TRUE!$TRUE$ac_delim
24907LIBOBJS!$LIBOBJS$ac_delim
24908HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24909HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24910HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24911HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24912HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24913LIBM!$LIBM$ac_delim
24914LIBC!$LIBC$ac_delim
24915UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24916THREADHEADERS!$THREADHEADERS$ac_delim
24917SRCDIRS!$SRCDIRS$ac_delim
24918LTLIBOBJS!$LTLIBOBJS$ac_delim
24919_ACEOF
24920
Ronald Oussoren5640ce22008-06-05 12:58:24 +000024921 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 +000024922 break
24923 elif $ac_last_try; then
24924 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24925echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24926 { (exit 1); exit 1; }; }
24927 else
24928 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24929 fi
24930done
24931
24932ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24933if test -n "$ac_eof"; then
24934 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24935 ac_eof=`expr $ac_eof + 1`
24936fi
24937
24938cat >>$CONFIG_STATUS <<_ACEOF
24939cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24940/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24941_ACEOF
24942sed '
24943s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24944s/^/s,@/; s/!/@,|#_!!_#|/
24945:n
24946t n
24947s/'"$ac_delim"'$/,g/; t
24948s/$/\\/; p
24949N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24950' >>$CONFIG_STATUS <conf$$subs.sed
24951rm -f conf$$subs.sed
24952cat >>$CONFIG_STATUS <<_ACEOF
24953:end
24954s/|#_!!_#|//g
24955CEOF$ac_eof
24956_ACEOF
24957
24958
24959# VPATH may cause trouble with some makes, so we remove $(srcdir),
24960# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24961# trailing colons and then remove the whole line if VPATH becomes empty
24962# (actually we leave an empty line to preserve line numbers).
24963if test "x$srcdir" = x.; then
24964 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24965s/:*\$(srcdir):*/:/
24966s/:*\${srcdir}:*/:/
24967s/:*@srcdir@:*/:/
24968s/^\([^=]*=[ ]*\):*/\1/
24969s/:*$//
24970s/^[^=]*=[ ]*$//
24971}'
24972fi
24973
24974cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024975fi # test -n "$CONFIG_FILES"
24976
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977
24978for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24979do
24980 case $ac_tag in
24981 :[FHLC]) ac_mode=$ac_tag; continue;;
24982 esac
24983 case $ac_mode$ac_tag in
24984 :[FHL]*:*);;
24985 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24986echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24987 { (exit 1); exit 1; }; };;
24988 :[FH]-) ac_tag=-:-;;
24989 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24990 esac
24991 ac_save_IFS=$IFS
24992 IFS=:
24993 set x $ac_tag
24994 IFS=$ac_save_IFS
24995 shift
24996 ac_file=$1
24997 shift
24998
24999 case $ac_mode in
25000 :L) ac_source=$1;;
25001 :[FH])
25002 ac_file_inputs=
25003 for ac_f
25004 do
25005 case $ac_f in
25006 -) ac_f="$tmp/stdin";;
25007 *) # Look for the file first in the build tree, then in the source tree
25008 # (if the path is not absolute). The absolute path cannot be DOS-style,
25009 # because $ac_f cannot contain `:'.
25010 test -f "$ac_f" ||
25011 case $ac_f in
25012 [\\/$]*) false;;
25013 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25014 esac ||
25015 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25016echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25017 { (exit 1); exit 1; }; };;
25018 esac
25019 ac_file_inputs="$ac_file_inputs $ac_f"
25020 done
25021
25022 # Let's still pretend it is `configure' which instantiates (i.e., don't
25023 # use $as_me), people would be surprised to read:
25024 # /* config.h. Generated by config.status. */
25025 configure_input="Generated from "`IFS=:
25026 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25027 if test x"$ac_file" != x-; then
25028 configure_input="$ac_file. $configure_input"
25029 { echo "$as_me:$LINENO: creating $ac_file" >&5
25030echo "$as_me: creating $ac_file" >&6;}
25031 fi
25032
25033 case $ac_tag in
25034 *:-:* | *:-) cat >"$tmp/stdin";;
25035 esac
25036 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025037 esac
25038
Martin v. Löwiseba40652007-08-30 20:10:57 +000025039 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025040$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025041 X"$ac_file" : 'X\(//\)[^/]' \| \
25042 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025043 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025044echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025045 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25046 s//\1/
25047 q
25048 }
25049 /^X\(\/\/\)[^/].*/{
25050 s//\1/
25051 q
25052 }
25053 /^X\(\/\/\)$/{
25054 s//\1/
25055 q
25056 }
25057 /^X\(\/\).*/{
25058 s//\1/
25059 q
25060 }
25061 s/.*/./; q'`
25062 { as_dir="$ac_dir"
25063 case $as_dir in #(
25064 -*) as_dir=./$as_dir;;
25065 esac
25066 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025067 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025068 while :; do
25069 case $as_dir in #(
25070 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25071 *) as_qdir=$as_dir;;
25072 esac
25073 as_dirs="'$as_qdir' $as_dirs"
25074 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025075$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025076 X"$as_dir" : 'X\(//\)[^/]' \| \
25077 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025078 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025079echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025080 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25081 s//\1/
25082 q
25083 }
25084 /^X\(\/\/\)[^/].*/{
25085 s//\1/
25086 q
25087 }
25088 /^X\(\/\/\)$/{
25089 s//\1/
25090 q
25091 }
25092 /^X\(\/\).*/{
25093 s//\1/
25094 q
25095 }
25096 s/.*/./; q'`
25097 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025098 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099 test -z "$as_dirs" || eval "mkdir $as_dirs"
25100 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25101echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025102 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025103 ac_builddir=.
25104
Martin v. Löwiseba40652007-08-30 20:10:57 +000025105case "$ac_dir" in
25106.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25107*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025108 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109 # A ".." for each directory in $ac_dir_suffix.
25110 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25111 case $ac_top_builddir_sub in
25112 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25113 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25114 esac ;;
25115esac
25116ac_abs_top_builddir=$ac_pwd
25117ac_abs_builddir=$ac_pwd$ac_dir_suffix
25118# for backward compatibility:
25119ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025120
25121case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025123 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025124 ac_top_srcdir=$ac_top_builddir_sub
25125 ac_abs_top_srcdir=$ac_pwd ;;
25126 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025127 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025128 ac_top_srcdir=$srcdir
25129 ac_abs_top_srcdir=$srcdir ;;
25130 *) # Relative name.
25131 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25132 ac_top_srcdir=$ac_top_build_prefix$srcdir
25133 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025134esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025135ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025136
Martin v. Löwis11437992002-04-12 09:54:03 +000025137
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138 case $ac_mode in
25139 :F)
25140 #
25141 # CONFIG_FILE
25142 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025143
25144 case $INSTALL in
25145 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025147 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025148_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025149
25150cat >>$CONFIG_STATUS <<\_ACEOF
25151# If the template does not know about datarootdir, expand it.
25152# FIXME: This hack should be removed a few years after 2.60.
25153ac_datarootdir_hack=; ac_datarootdir_seen=
25154
25155case `sed -n '/datarootdir/ {
25156 p
25157 q
25158}
25159/@datadir@/p
25160/@docdir@/p
25161/@infodir@/p
25162/@localedir@/p
25163/@mandir@/p
25164' $ac_file_inputs` in
25165*datarootdir*) ac_datarootdir_seen=yes;;
25166*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25167 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25168echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25169_ACEOF
25170cat >>$CONFIG_STATUS <<_ACEOF
25171 ac_datarootdir_hack='
25172 s&@datadir@&$datadir&g
25173 s&@docdir@&$docdir&g
25174 s&@infodir@&$infodir&g
25175 s&@localedir@&$localedir&g
25176 s&@mandir@&$mandir&g
25177 s&\\\${datarootdir}&$datarootdir&g' ;;
25178esac
25179_ACEOF
25180
25181# Neutralize VPATH when `$srcdir' = `.'.
25182# Shell code in configure.ac might set extrasub.
25183# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025184cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025185 sed "$ac_vpsub
25186$extrasub
25187_ACEOF
25188cat >>$CONFIG_STATUS <<\_ACEOF
25189:t
25190/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191s&@configure_input@&$configure_input&;t t
25192s&@top_builddir@&$ac_top_builddir_sub&;t t
25193s&@srcdir@&$ac_srcdir&;t t
25194s&@abs_srcdir@&$ac_abs_srcdir&;t t
25195s&@top_srcdir@&$ac_top_srcdir&;t t
25196s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25197s&@builddir@&$ac_builddir&;t t
25198s&@abs_builddir@&$ac_abs_builddir&;t t
25199s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25200s&@INSTALL@&$ac_INSTALL&;t t
25201$ac_datarootdir_hack
25202" $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 +000025203
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25205 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25206 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25207 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25208which seems to be undefined. Please make sure it is defined." >&5
25209echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25210which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025211
Martin v. Löwiseba40652007-08-30 20:10:57 +000025212 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025213 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025214 -) cat "$tmp/out"; rm -f "$tmp/out";;
25215 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025216 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025217 ;;
25218 :H)
25219 #
25220 # CONFIG_HEADER
25221 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025222_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025223
Martin v. Löwiseba40652007-08-30 20:10:57 +000025224# Transform confdefs.h into a sed script `conftest.defines', that
25225# substitutes the proper values into config.h.in to produce config.h.
25226rm -f conftest.defines conftest.tail
25227# First, append a space to every undef/define line, to ease matching.
25228echo 's/$/ /' >conftest.defines
25229# Then, protect against being on the right side of a sed subst, or in
25230# an unquoted here document, in config.status. If some macros were
25231# called several times there might be several #defines for the same
25232# symbol, which is useless. But do not sort them, since the last
25233# AC_DEFINE must be honored.
25234ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25235# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25236# NAME is the cpp macro being defined, VALUE is the value it is being given.
25237# PARAMS is the parameter list in the macro definition--in most cases, it's
25238# just an empty string.
25239ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25240ac_dB='\\)[ (].*,\\1define\\2'
25241ac_dC=' '
25242ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025243
Martin v. Löwiseba40652007-08-30 20:10:57 +000025244uniq confdefs.h |
25245 sed -n '
25246 t rset
25247 :rset
25248 s/^[ ]*#[ ]*define[ ][ ]*//
25249 t ok
25250 d
25251 :ok
25252 s/[\\&,]/\\&/g
25253 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25254 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25255 ' >>conftest.defines
25256
25257# Remove the space that was appended to ease matching.
25258# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025259# example, in the case of _POSIX_SOURCE, which is predefined and required
25260# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025261# (The regexp can be short, since the line contains either #define or #undef.)
25262echo 's/ $//
25263s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025264
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265# Break up conftest.defines:
25266ac_max_sed_lines=50
25267
25268# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25269# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25270# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25271# et cetera.
25272ac_in='$ac_file_inputs'
25273ac_out='"$tmp/out1"'
25274ac_nxt='"$tmp/out2"'
25275
25276while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025277do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025278 # Write a here document:
25279 cat >>$CONFIG_STATUS <<_ACEOF
25280 # First, check the format of the line:
25281 cat >"\$tmp/defines.sed" <<\\CEOF
25282/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25283/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25284b
25285:def
25286_ACEOF
25287 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025288 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025289 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25290 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25291 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25292 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025293 rm -f conftest.defines
25294 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025295done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025297
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025299cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025300 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301 echo "/* $configure_input */" >"$tmp/config.h"
25302 cat "$ac_result" >>"$tmp/config.h"
25303 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025304 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25305echo "$as_me: $ac_file is unchanged" >&6;}
25306 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025307 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025308 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025309 fi
25310 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025311 echo "/* $configure_input */"
25312 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025313 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025314 rm -f "$tmp/out12"
25315 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025316
Martin v. Löwiseba40652007-08-30 20:10:57 +000025317
25318 esac
25319
25320done # for ac_tag
25321
Guido van Rossum627b2d71993-12-24 10:39:16 +000025322
Martin v. Löwis11437992002-04-12 09:54:03 +000025323{ (exit 0); exit 0; }
25324_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025325chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025326ac_clean_files=$ac_clean_files_save
25327
25328
25329# configure is writing to config.log, and then calls config.status.
25330# config.status does its own redirection, appending to config.log.
25331# Unfortunately, on DOS this fails, as config.log is still kept open
25332# by configure, so config.status won't be able to write to it; its
25333# output is simply discarded. So we exec the FD to /dev/null,
25334# effectively closing config.log, so it can be properly (re)opened and
25335# appended to by config.status. When coming back to configure, we
25336# need to make the FD available again.
25337if test "$no_create" != yes; then
25338 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025339 ac_config_status_args=
25340 test "$silent" = yes &&
25341 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025342 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025343 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025344 exec 5>>config.log
25345 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25346 # would make configure fail if this is the last instruction.
25347 $ac_cs_success || { (exit 1); exit 1; }
25348fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025349
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025350
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025351echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025352if test ! -f Modules/Setup
25353then
25354 cp $srcdir/Modules/Setup.dist Modules/Setup
25355fi
25356
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025357echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025358if test ! -f Modules/Setup.local
25359then
25360 echo "# Edit this file for local setup changes" >Modules/Setup.local
25361fi
25362
25363echo "creating Makefile"
25364$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25365 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025366 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025367
25368case $ac_sys_system in
25369BeOS)
25370 { echo "$as_me:$LINENO: WARNING:
25371
25372 Support for BeOS is deprecated as of Python 2.6.
25373 See PEP 11 for the gory details.
25374 " >&5
25375echo "$as_me: WARNING:
25376
25377 Support for BeOS is deprecated as of Python 2.6.
25378 See PEP 11 for the gory details.
25379 " >&2;}
25380 ;;
25381*) ;;
25382esac
25383
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025384mv config.c Modules