blob: 2ab958847704228175044978b612130d7fc8a81a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002# From configure.in Revision: 64567 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001250\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001311 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
1327 --enable-unicode[=ucs[24]]
1328 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
1335 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-signal-module disable/enable signal module
1348 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1349 --with(out)-threads[=DIRECTORY]
1350 disable/enable thread support
1351 --with(out)-thread[=DIRECTORY]
1352 deprecated; use --with(out)-threads
1353 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001355 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-pymalloc disable/enable specialized mallocs
1357 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-fpectl enable SIGFPE catching
1359 --with-libm=STRING math library
1360 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Some influential environment variables:
1363 CC C compiler command
1364 CFLAGS C compiler flags
1365 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1366 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001367 LIBS libraries to pass to the linker, e.g. -l<library>
1368 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1369 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 CPP C preprocessor
1371
1372Use these variables to override the choices made by `configure' or to help
1373it to find libraries and programs with nonstandard names/locations.
1374
Martin v. Löwis1d459062005-03-14 21:23:33 +00001375Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001378fi
1379
1380if test "$ac_init_help" = "recursive"; then
1381 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_builddir=.
1385
Martin v. Löwiseba40652007-08-30 20:10:57 +00001386case "$ac_dir" in
1387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1388*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001390 # A ".." for each directory in $ac_dir_suffix.
1391 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1392 case $ac_top_builddir_sub in
1393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1395 esac ;;
1396esac
1397ac_abs_top_builddir=$ac_pwd
1398ac_abs_builddir=$ac_pwd$ac_dir_suffix
1399# for backward compatibility:
1400ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001403 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 ac_top_srcdir=$ac_top_builddir_sub
1406 ac_abs_top_srcdir=$ac_pwd ;;
1407 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 ac_top_srcdir=$srcdir
1410 ac_abs_top_srcdir=$srcdir ;;
1411 *) # Relative name.
1412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1413 ac_top_srcdir=$ac_top_build_prefix$srcdir
1414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001415esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001417
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 cd "$ac_dir" || { ac_status=$?; continue; }
1419 # Check for guested configure.
1420 if test -f "$ac_srcdir/configure.gnu"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1423 elif test -f "$ac_srcdir/configure"; then
1424 echo &&
1425 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 else
1427 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428 fi || ac_status=$?
1429 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 done
1431fi
1432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001434if $ac_init_version; then
1435 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001436python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001438
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14402002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441This configure script is free software; the Free Software Foundation
1442gives unlimited permission to copy, distribute and modify it.
1443_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This file contains any messages produced by compilers while
1448running configure, to aid debugging if configure makes a mistake.
1449
Neal Norwitz9be57322006-08-18 05:39:20 +00001450It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453 $ $0 $@
1454
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001457{
1458cat <<_ASUNAME
1459## --------- ##
1460## Platform. ##
1461## --------- ##
1462
1463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1464uname -m = `(uname -m) 2>/dev/null || echo unknown`
1465uname -r = `(uname -r) 2>/dev/null || echo unknown`
1466uname -s = `(uname -s) 2>/dev/null || echo unknown`
1467uname -v = `(uname -v) 2>/dev/null || echo unknown`
1468
1469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1471
1472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1479
1480_ASUNAME
1481
1482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483for as_dir in $PATH
1484do
1485 IFS=$as_save_IFS
1486 test -z "$as_dir" && as_dir=.
1487 echo "PATH: $as_dir"
1488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491} >&5
1492
1493cat >&5 <<_ACEOF
1494
1495
1496## ----------- ##
1497## Core tests. ##
1498## ----------- ##
1499
1500_ACEOF
1501
1502
1503# Keep a trace of the command line.
1504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001509ac_configure_args0=
1510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_must_keep_next=false
1512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001513do
Skip Montanaro6dead952003-09-25 14:50:04 +00001514 for ac_arg
1515 do
1516 case $ac_arg in
1517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1519 | -silent | --silent | --silen | --sile | --sil)
1520 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1523 esac
1524 case $ac_pass in
1525 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1526 2)
1527 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 case $ac_arg in
1532 *=* | --config-cache | -C | -disable-* | --disable-* \
1533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1535 | -with-* | --with-* | -without-* | --without-* | --x)
1536 case "$ac_configure_args0 " in
1537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1538 esac
1539 ;;
1540 -* ) ac_must_keep_next=true ;;
1541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001543 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 ;;
1545 esac
1546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001547done
Skip Montanaro6dead952003-09-25 14:50:04 +00001548$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1549$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551# When interrupted or exit'd, cleanup temporary files, and complete
1552# config.log. We remove comments because anyway the quotes in there
1553# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554# WARNING: Use '\'' to represent an apostrophe within the trap.
1555# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556trap 'exit_status=$?
1557 # Save into config.log some information that might help in debugging.
1558 {
1559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001560
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 cat <<\_ASBOX
1562## ---------------- ##
1563## Cache variables. ##
1564## ---------------- ##
1565_ASBOX
1566 echo
1567 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568(
1569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1570 eval ac_val=\$$ac_var
1571 case $ac_val in #(
1572 *${as_nl}*)
1573 case $ac_var in #(
1574 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1575echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1576 esac
1577 case $ac_var in #(
1578 _ | IFS | as_nl) ;; #(
1579 *) $as_unset $ac_var ;;
1580 esac ;;
1581 esac
1582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001587 "s/'\''/'\''\\\\'\'''\''/g;
1588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1589 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001590 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 esac |
1594 sort
1595)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001597
1598 cat <<\_ASBOX
1599## ----------------- ##
1600## Output variables. ##
1601## ----------------- ##
1602_ASBOX
1603 echo
1604 for ac_var in $ac_subst_vars
1605 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 eval ac_val=\$$ac_var
1607 case $ac_val in
1608 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1609 esac
1610 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001611 done | sort
1612 echo
1613
1614 if test -n "$ac_subst_files"; then
1615 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616## ------------------- ##
1617## File substitutions. ##
1618## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001619_ASBOX
1620 echo
1621 for ac_var in $ac_subst_files
1622 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 eval ac_val=\$$ac_var
1624 case $ac_val in
1625 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1626 esac
1627 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001628 done | sort
1629 echo
1630 fi
1631
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 if test -s confdefs.h; then
1633 cat <<\_ASBOX
1634## ----------- ##
1635## confdefs.h. ##
1636## ----------- ##
1637_ASBOX
1638 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001639 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 echo
1641 fi
1642 test "$ac_signal" != 0 &&
1643 echo "$as_me: caught signal $ac_signal"
1644 echo "$as_me: exit $exit_status"
1645 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001646 rm -f core *.core core.conftest.* &&
1647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001649' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001650for ac_signal in 1 2 13 15; do
1651 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1652done
1653ac_signal=0
1654
1655# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
1658# Predefined preprocessor variables.
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_NAME "$PACKAGE_NAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_VERSION "$PACKAGE_VERSION"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_STRING "$PACKAGE_STRING"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1682_ACEOF
1683
1684
1685# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001687if test -n "$CONFIG_SITE"; then
1688 set x "$CONFIG_SITE"
1689elif test "x$prefix" != xNONE; then
1690 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1691else
1692 set x "$ac_default_prefix/share/config.site" \
1693 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695shift
1696for ac_site_file
1697do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1700echo "$as_me: loading site script $ac_site_file" >&6;}
1701 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 . "$ac_site_file"
1703 fi
1704done
1705
1706if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001707 # Some versions of bash will fail to source /dev/null (special
1708 # files actually), so we avoid doing that.
1709 if test -f "$cache_file"; then
1710 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1711echo "$as_me: loading cache $cache_file" >&6;}
1712 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1714 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 esac
1716 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717else
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1719echo "$as_me: creating cache $cache_file" >&6;}
1720 >$cache_file
1721fi
1722
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001726for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 case $ac_old_set,$ac_new_set in
1732 set,)
1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 fi;;
1751 esac
1752 # Pass precious variables to config.status.
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
1771
Martin v. Löwiseba40652007-08-30 20:10:57 +00001772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
Guido van Rossum7f43da71994-08-01 12:15:30 +00001796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802
Michael W. Hudson54241132001-12-07 15:38:26 +00001803
Martin v. Löwiseba40652007-08-30 20:10:57 +00001804ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001805
1806
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
1809
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001810
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001811
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001812# We don't use PACKAGE_ variables, and they cause conflicts
1813# with other autoconf-based packages that include Python.h
1814grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1815rm confdefs.h
1816mv confdefs.h.new confdefs.h
1817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Neal Norwitz9be57322006-08-18 05:39:20 +00001819VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwis1142de32002-03-29 16:28:31 +00001821
1822SOVERSION=1.0
1823
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001824# The later defininition of _XOPEN_SOURCE disables certain features
1825# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _GNU_SOURCE 1
1829_ACEOF
1830
1831
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _NETBSD_SOURCE 1
1838_ACEOF
1839
1840
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define __BSD_VISIBLE 1
1847_ACEOF
1848
1849
Martin v. Löwisd6320502004-08-12 13:45:08 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _BSD_TYPES 1
1855_ACEOF
1856
1857
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _DARWIN_C_SOURCE 1
1864_ACEOF
1865
1866
1867
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001868define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001869
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001870# Arguments passed to configure.
1871
1872CONFIG_ARGS="$ac_configure_args"
1873
Martin v. Löwiseba40652007-08-30 20:10:57 +00001874# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001875if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001876 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001877 case $enableval in
1878 yes)
1879 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1880 ;;
1881 esac
1882 case $enableval in
1883 no)
1884 UNIVERSALSDK=
1885 enable_universalsdk=
1886 ;;
1887 *)
1888 UNIVERSALSDK=$enableval
1889 ;;
1890 esac
1891
1892else
1893
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898
1899
Martin v. Löwiseba40652007-08-30 20:10:57 +00001900
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001901ARCH_RUN_32BIT=
1902
1903
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001904UNIVERSAL_ARCHS="32-bit"
1905{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1906echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1907
1908# Check whether --with-universal-archs was given.
1909if test "${with_universal_archs+set}" = set; then
1910 withval=$with_universal_archs;
1911 { echo "$as_me:$LINENO: result: $withval" >&5
1912echo "${ECHO_T}$withval" >&6; }
1913 UNIVERSAL_ARCHS="$withval"
1914
1915else
1916
1917 { echo "$as_me:$LINENO: result: 32-bit" >&5
1918echo "${ECHO_T}32-bit" >&6; }
1919
1920fi
1921
1922
1923
1924
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001925
1926# Check whether --with-framework-name was given.
1927if test "${with_framework_name+set}" = set; then
1928 withval=$with_framework_name;
1929 PYTHONFRAMEWORK=${withval}
1930 PYTHONFRAMEWORKDIR=${withval}.framework
1931 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1932
1933else
1934
1935 PYTHONFRAMEWORK=Python
1936 PYTHONFRAMEWORKDIR=Python.framework
1937 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1938
1939fi
1940
Martin v. Löwiseba40652007-08-30 20:10:57 +00001941# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001942if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001943 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001944 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001945 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001946 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001947 esac
1948 case $enableval in
1949 no)
1950 PYTHONFRAMEWORK=
1951 PYTHONFRAMEWORKDIR=no-framework
1952 PYTHONFRAMEWORKPREFIX=
1953 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001954 FRAMEWORKINSTALLFIRST=
1955 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001956 FRAMEWORKALTINSTALLFIRST=
1957 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001958 if test "x${prefix}" = "xNONE"; then
1959 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1960 else
1961 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1962 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001963 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001964 ;;
1965 *)
1966 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001967 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001968 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001969 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1970 if test "$UNIVERSAL_ARCHS" = "all"
1971 then
1972 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
1973 else
1974 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1975 fi
1976
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001977 if test "x${prefix}" = "xNONE" ; then
1978 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1979 else
1980 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1981 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001982 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001983
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001984 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001985 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001986 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001987
Martin v. Löwiseba40652007-08-30 20:10:57 +00001988 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001991
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001992 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1993
1994 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1995
Jack Jansene578a632001-08-15 01:27:14 +00001996 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001997
Guido van Rossum563e7081996-09-10 18:20:48 +00001998else
Martin v. Löwis11437992002-04-12 09:54:03 +00001999
Jack Jansene578a632001-08-15 01:27:14 +00002000 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002002 PYTHONFRAMEWORKPREFIX=
2003 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002004 FRAMEWORKINSTALLFIRST=
2005 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002006 FRAMEWORKALTINSTALLFIRST=
2007 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002008 if test "x${prefix}" = "xNONE" ; then
2009 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2010 else
2011 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2012 fi
Jack Jansene578a632001-08-15 01:27:14 +00002013 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002014
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002015 if test "$UNIVERSAL_ARCHS" = "all"
2016 then
2017 FRAMEWORKINSTALLLAST=update4wayuniversal
2018 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2019 fi
2020
Martin v. Löwiseba40652007-08-30 20:10:57 +00002021fi
2022
Michael W. Hudson54241132001-12-07 15:38:26 +00002023
2024
2025
2026
Jack Jansene578a632001-08-15 01:27:14 +00002027
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002028
2029
Ronald Oussoren5b787322006-06-06 19:50:24 +00002030
2031
2032
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002033
Jack Jansene578a632001-08-15 01:27:14 +00002034##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002035## AC_HELP_STRING(--with-dyld,
2036## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002037##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002038# Set name for machine-dependent library files
2039
Martin v. Löwiseba40652007-08-30 20:10:57 +00002040{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2041echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042if test -z "$MACHDEP"
2043then
Guido van Rossum563e7081996-09-10 18:20:48 +00002044 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002045 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2046 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002047 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002048 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_md_system=`echo $ac_sys_system |
2052 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2053 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002054 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002055 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002056
Guido van Rossum07397971997-04-29 21:49:50 +00002057 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002058 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002059 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002060 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002061 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002062 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 esac
2064fi
Guido van Rossum91922671997-10-09 20:24:13 +00002065
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002066# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2067# disable features if it is defined, without any means to access these
2068# features as extensions. For these systems, we skip the definition of
2069# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2070# some feature, make sure there is no alternative way to access this
2071# feature. Also, when using wildcards, make sure you have verified the
2072# need for not defining _XOPEN_SOURCE on all systems matching the
2073# wildcard, and that the wildcard does not include future systems
2074# (which may remove their limitations).
2075case $ac_sys_system/$ac_sys_release in
2076 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2077 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002078 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz2a3e3d02008-06-06 04:47:01 +00002079 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002080 define_xopen_source=no
2081 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2082 # also defined. This can be overridden by defining _BSD_SOURCE
2083 # As this has a different meaning on Linux, only define it on OpenBSD
2084
2085cat >>confdefs.h <<\_ACEOF
2086#define _BSD_SOURCE 1
2087_ACEOF
2088
2089 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002090 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2091 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2092 # Marc Recht
2093 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2094 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002095 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2096 # of union __?sigval. Reported by Stuart Bishop.
2097 SunOS/5.6)
2098 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002099 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2100 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002101 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002102 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002103 define_xopen_source=no;;
2104 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002105 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002106 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002107 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002108 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2109 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2110 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2111 # This should hopefully be fixed in FreeBSD 4.9
2112 FreeBSD/4.8* | Darwin/6* )
2113 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002114 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2115 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2116 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002117 AIX/4)
2118 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002119 AIX/5)
2120 if test `uname -r` -eq 1; then
2121 define_xopen_source=no
2122 fi
2123 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002127 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002128 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002129 define_xopen_source=no
2130 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002131 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2132 # defining NI_NUMERICHOST.
2133 QNX/6.3.2)
2134 define_xopen_source=no
2135 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002136
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002137esac
2138
2139if test $define_xopen_source = yes
2140then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002141 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2142 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002143 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2144 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002145 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002146 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002147
2148cat >>confdefs.h <<\_ACEOF
2149#define _XOPEN_SOURCE 500
2150_ACEOF
2151
2152 ;;
2153 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002154
2155cat >>confdefs.h <<\_ACEOF
2156#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002157_ACEOF
2158
Skip Montanarof0d5f792004-08-15 14:08:23 +00002159 ;;
2160 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002161
2162 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2163 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2164 # several APIs are not declared. Since this is also needed in some
2165 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002166 # except for Solaris 10, where it must not be defined,
2167 # as it implies XPG4.2
2168 case $ac_sys_system/$ac_sys_release in
2169 SunOS/5.10)
2170 ;;
2171 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002172
2173cat >>confdefs.h <<\_ACEOF
2174#define _XOPEN_SOURCE_EXTENDED 1
2175_ACEOF
2176
Martin v. Löwis7dece662005-11-26 11:38:24 +00002177 ;;
2178 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002179
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002180
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181cat >>confdefs.h <<\_ACEOF
2182#define _POSIX_C_SOURCE 200112L
2183_ACEOF
2184
2185
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002186fi
2187
Guido van Rossum91922671997-10-09 20:24:13 +00002188#
2189# SGI compilers allow the specification of the both the ABI and the
2190# ISA on the command line. Depending on the values of these switches,
2191# different and often incompatable code will be generated.
2192#
2193# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2194# thus supply support for various ABI/ISA combinations. The MACHDEP
2195# variable is also adjusted.
2196#
2197
2198if test ! -z "$SGI_ABI"
2199then
2200 CC="cc $SGI_ABI"
2201 LDFLAGS="$SGI_ABI $LDFLAGS"
2202 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002204{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2205echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002206
Jack Jansen83f898c2002-12-30 22:23:40 +00002207# And add extra plat-mac for darwin
2208
Jack Jansen7b59b422003-03-17 15:44:10 +00002209
Martin v. Löwiseba40652007-08-30 20:10:57 +00002210{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2211echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002212if test -z "$EXTRAPLATDIR"
2213then
2214 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002215 darwin)
2216 EXTRAPLATDIR="\$(PLATMACDIRS)"
2217 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2218 ;;
2219 *)
2220 EXTRAPLATDIR=""
2221 EXTRAMACHDEPPATH=""
2222 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002223 esac
2224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002225{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2226echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002227
Jack Jansen6b08a402004-06-03 12:41:45 +00002228# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2229# it may influence the way we can build extensions, so distutils
2230# needs to check it
2231
Ronald Oussoren988117f2006-04-29 11:31:35 +00002232
Jack Jansen6b08a402004-06-03 12:41:45 +00002233CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002234EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002235
Mark Dickinson65134662008-04-25 16:11:04 +00002236{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2237echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2238ac_sys_machine=`uname -m`
2239{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2240echo "${ECHO_T}$ac_sys_machine" >&6; }
2241
Guido van Rossum627b2d71993-12-24 10:39:16 +00002242# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002243
2244# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2245# for debug/optimization stuff. BASECFLAGS is for flags that are required
2246# just to get things to compile and link. Users are free to override OPT
2247# when running configure or make. The build should not break if they do.
2248# BASECFLAGS should generally not be messed with, however.
2249
2250# XXX shouldn't some/most/all of this code be merged with the stuff later
2251# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2253echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002254
Martin v. Löwiseba40652007-08-30 20:10:57 +00002255# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002256if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002257 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002258 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002259 no) CC=cc
2260 without_gcc=yes;;
2261 yes) CC=gcc
2262 without_gcc=no;;
2263 *) CC=$withval
2264 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002265 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002266else
Martin v. Löwis11437992002-04-12 09:54:03 +00002267
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002268 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002269 AIX*) CC=cc_r
2270 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002271 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002272 case $BE_HOST_CPU in
2273 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002274 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002275 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002276 BASECFLAGS="$BASECFLAGS -export pragma"
2277 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002278 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002279 ;;
2280 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002281 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002282 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002283 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 ;;
2285 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002286 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2287echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2288 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 ;;
2290 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002291 AR="\$(srcdir)/Modules/ar_beos"
2292 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002294 Monterey*)
2295 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002296 without_gcc=;;
2297 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002298 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299fi
2300
2301{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2302echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002303
Guido van Rossum8b131c51995-03-09 14:10:13 +00002304# If the user switches compilers, we can't believe the cache
2305if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2306then
Martin v. Löwis11437992002-04-12 09:54:03 +00002307 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2308(it is also a good idea to do 'make clean' before compiling)" >&5
2309echo "$as_me: error: cached CC is different -- throw away $cache_file
2310(it is also a good idea to do 'make clean' before compiling)" >&2;}
2311 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002312fi
2313
Martin v. Löwis11437992002-04-12 09:54:03 +00002314ac_ext=c
2315ac_cpp='$CPP $CPPFLAGS'
2316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2318ac_compiler_gnu=$ac_cv_c_compiler_gnu
2319if test -n "$ac_tool_prefix"; then
2320 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2321set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002324if test "${ac_cv_prog_CC+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002326else
2327 if test -n "$CC"; then
2328 ac_cv_prog_CC="$CC" # Let the user override the test.
2329else
Martin v. Löwis11437992002-04-12 09:54:03 +00002330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002336 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 +00002337 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2339 break 2
2340 fi
2341done
2342done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
Jack Jansendd19cf82001-12-06 22:36:17 +00002345fi
2346fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002347CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002348if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 { echo "$as_me:$LINENO: result: $CC" >&5
2350echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002351else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002352 { echo "$as_me:$LINENO: result: no" >&5
2353echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002354fi
2355
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356
Martin v. Löwis11437992002-04-12 09:54:03 +00002357fi
2358if test -z "$ac_cv_prog_CC"; then
2359 ac_ct_CC=$CC
2360 # Extract the first word of "gcc", so it can be a program name with args.
2361set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2365 echo $ECHO_N "(cached) $ECHO_C" >&6
2366else
2367 if test -n "$ac_ct_CC"; then
2368 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2369else
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
2375 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002376 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 +00002377 ac_cv_prog_ac_ct_CC="gcc"
2378 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2379 break 2
2380 fi
2381done
2382done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385fi
2386fi
2387ac_ct_CC=$ac_cv_prog_ac_ct_CC
2388if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002389 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2390echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002391else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392 { echo "$as_me:$LINENO: result: no" >&5
2393echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002394fi
2395
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396 if test "x$ac_ct_CC" = x; then
2397 CC=""
2398 else
2399 case $cross_compiling:$ac_tool_warned in
2400yes:)
2401{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2402whose name does not start with the host triplet. If you think this
2403configuration is useful to you, please write to autoconf@gnu.org." >&5
2404echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2405whose name does not start with the host triplet. If you think this
2406configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2407ac_tool_warned=yes ;;
2408esac
2409 CC=$ac_ct_CC
2410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002411else
2412 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002413fi
2414
Jack Jansendd19cf82001-12-06 22:36:17 +00002415if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002416 if test -n "$ac_tool_prefix"; then
2417 # 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 +00002418set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002421if test "${ac_cv_prog_CC+set}" = set; then
2422 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002423else
2424 if test -n "$CC"; then
2425 ac_cv_prog_CC="$CC" # Let the user override the test.
2426else
Martin v. Löwis11437992002-04-12 09:54:03 +00002427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2428for as_dir in $PATH
2429do
2430 IFS=$as_save_IFS
2431 test -z "$as_dir" && as_dir=.
2432 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433 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 +00002434 ac_cv_prog_CC="${ac_tool_prefix}cc"
2435 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2436 break 2
2437 fi
2438done
2439done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442fi
2443fi
2444CC=$ac_cv_prog_CC
2445if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002446 { echo "$as_me:$LINENO: result: $CC" >&5
2447echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002449 { echo "$as_me:$LINENO: result: no" >&5
2450echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002451fi
2452
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002455fi
2456if test -z "$CC"; then
2457 # Extract the first word of "cc", so it can be a program name with args.
2458set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2460echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002461if test "${ac_cv_prog_CC+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2463else
2464 if test -n "$CC"; then
2465 ac_cv_prog_CC="$CC" # Let the user override the test.
2466else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2469for as_dir in $PATH
2470do
2471 IFS=$as_save_IFS
2472 test -z "$as_dir" && as_dir=.
2473 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 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 +00002475 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2476 ac_prog_rejected=yes
2477 continue
2478 fi
2479 ac_cv_prog_CC="cc"
2480 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2481 break 2
2482 fi
2483done
2484done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002486
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002487if test $ac_prog_rejected = yes; then
2488 # We found a bogon in the path, so make sure we never use it.
2489 set dummy $ac_cv_prog_CC
2490 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 # We chose a different compiler from the bogus one.
2493 # However, it has the same basename, so the bogon will be chosen
2494 # first if we set CC to just the basename; use the full file name.
2495 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497 fi
2498fi
2499fi
2500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002501CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002503 { echo "$as_me:$LINENO: result: $CC" >&5
2504echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506 { echo "$as_me:$LINENO: result: no" >&5
2507echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508fi
2509
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510
Martin v. Löwis11437992002-04-12 09:54:03 +00002511fi
2512if test -z "$CC"; then
2513 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 do
2516 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002520if test "${ac_cv_prog_CC+set}" = set; then
2521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002522else
2523 if test -n "$CC"; then
2524 ac_cv_prog_CC="$CC" # Let the user override the test.
2525else
Martin v. Löwis11437992002-04-12 09:54:03 +00002526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 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 +00002533 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2535 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
2541fi
2542fi
2543CC=$ac_cv_prog_CC
2544if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 { echo "$as_me:$LINENO: result: $CC" >&5
2546echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002548 { echo "$as_me:$LINENO: result: no" >&5
2549echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002550fi
2551
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 test -n "$CC" && break
2554 done
2555fi
2556if test -z "$CC"; then
2557 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002559do
2560 # Extract the first word of "$ac_prog", so it can be a program name with args.
2561set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002562{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2563echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002564if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2565 echo $ECHO_N "(cached) $ECHO_C" >&6
2566else
2567 if test -n "$ac_ct_CC"; then
2568 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2569else
2570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2571for as_dir in $PATH
2572do
2573 IFS=$as_save_IFS
2574 test -z "$as_dir" && as_dir=.
2575 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 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 +00002577 ac_cv_prog_ac_ct_CC="$ac_prog"
2578 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2579 break 2
2580 fi
2581done
2582done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002584
Martin v. Löwis11437992002-04-12 09:54:03 +00002585fi
2586fi
2587ac_ct_CC=$ac_cv_prog_ac_ct_CC
2588if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2590echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002592 { echo "$as_me:$LINENO: result: no" >&5
2593echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002594fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002595
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 test -n "$ac_ct_CC" && break
2598done
Michael W. Hudson54241132001-12-07 15:38:26 +00002599
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 if test "x$ac_ct_CC" = x; then
2601 CC=""
2602 else
2603 case $cross_compiling:$ac_tool_warned in
2604yes:)
2605{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2606whose name does not start with the host triplet. If you think this
2607configuration is useful to you, please write to autoconf@gnu.org." >&5
2608echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2609whose name does not start with the host triplet. If you think this
2610configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2611ac_tool_warned=yes ;;
2612esac
2613 CC=$ac_ct_CC
2614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002615fi
2616
2617fi
2618
2619
Skip Montanaro6dead952003-09-25 14:50:04 +00002620test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2621See \`config.log' for more details." >&5
2622echo "$as_me: error: no acceptable C compiler found in \$PATH
2623See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 { (exit 1); exit 1; }; }
2625
2626# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002628ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629{ (ac_try="$ac_compiler --version >&5"
2630case "(($ac_try" in
2631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2632 *) ac_try_echo=$ac_try;;
2633esac
2634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2635 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_status=$?
2637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639{ (ac_try="$ac_compiler -v >&5"
2640case "(($ac_try" in
2641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2642 *) ac_try_echo=$ac_try;;
2643esac
2644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2645 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 ac_status=$?
2647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649{ (ac_try="$ac_compiler -V >&5"
2650case "(($ac_try" in
2651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2652 *) ac_try_echo=$ac_try;;
2653esac
2654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2655 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }
2659
2660cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002661/* confdefs.h. */
2662_ACEOF
2663cat confdefs.h >>conftest.$ac_ext
2664cat >>conftest.$ac_ext <<_ACEOF
2665/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667int
2668main ()
2669{
2670
2671 ;
2672 return 0;
2673}
2674_ACEOF
2675ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002676ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002677# Try to create an executable without -o first, disregard a.out.
2678# It will help us diagnose broken compilers, and finding out an intuition
2679# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2681echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683#
2684# List of possible output files, starting from the most likely.
2685# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2686# only as a last resort. b.out is created by i960 compilers.
2687ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2688#
2689# The IRIX 6 linker writes into existing files which may not be
2690# executable, retaining their permissions. Remove them first so a
2691# subsequent execution test works.
2692ac_rmfiles=
2693for ac_file in $ac_files
2694do
2695 case $ac_file in
2696 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2697 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2698 esac
2699done
2700rm -f $ac_rmfiles
2701
2702if { (ac_try="$ac_link_default"
2703case "(($ac_try" in
2704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2705 *) ac_try_echo=$ac_try;;
2706esac
2707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2708 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 ac_status=$?
2710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002712 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2713# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2714# in a Makefile. We should not override ac_cv_exeext if it was cached,
2715# so that the user can short-circuit this test for compilers unknown to
2716# Autoconf.
2717for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002718do
2719 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002722 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002723 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002724 # We found the default executable, but exeext='' is most
2725 # certainly right.
2726 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002727 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002728 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2729 then :; else
2730 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2731 fi
2732 # We set ac_cv_exeext here because the later test for it is not
2733 # safe: cross compilers may not add the suffix if given an `-o'
2734 # argument, so we may need to know it at that point already.
2735 # Even if this section looks crufty: it has the advantage of
2736 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002737 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 esac
2741done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742test "$ac_cv_exeext" = no && ac_cv_exeext=
2743
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002744else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745 ac_file=''
2746fi
2747
2748{ echo "$as_me:$LINENO: result: $ac_file" >&5
2749echo "${ECHO_T}$ac_file" >&6; }
2750if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002752sed 's/^/| /' conftest.$ac_ext >&5
2753
2754{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2755See \`config.log' for more details." >&5
2756echo "$as_me: error: C compiler cannot create executables
2757See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002759fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002760
Martin v. Löwis11437992002-04-12 09:54:03 +00002761ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002764# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2766echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002767# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2768# If not cross compiling, check that we can run a simple program.
2769if test "$cross_compiling" != yes; then
2770 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771 { (case "(($ac_try" in
2772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773 *) ac_try_echo=$ac_try;;
2774esac
2775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2776 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 ac_status=$?
2778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2779 (exit $ac_status); }; }; then
2780 cross_compiling=no
2781 else
2782 if test "$cross_compiling" = maybe; then
2783 cross_compiling=yes
2784 else
2785 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002786If you meant to cross compile, use \`--host'.
2787See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002788echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002789If you meant to cross compile, use \`--host'.
2790See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 { (exit 1); exit 1; }; }
2792 fi
2793 fi
2794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002795{ echo "$as_me:$LINENO: result: yes" >&5
2796echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
Skip Montanaro6dead952003-09-25 14:50:04 +00002798rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002799ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002801# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002802{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2803echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2804{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2805echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002806
Martin v. Löwiseba40652007-08-30 20:10:57 +00002807{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2808echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2809if { (ac_try="$ac_link"
2810case "(($ac_try" in
2811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2812 *) ac_try_echo=$ac_try;;
2813esac
2814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002816 ac_status=$?
2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 (exit $ac_status); }; then
2819 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2820# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2821# work properly (i.e., refer to `conftest.exe'), while it won't with
2822# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002823for ac_file in conftest.exe conftest conftest.*; do
2824 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002828 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 * ) break;;
2830 esac
2831done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002832else
Skip Montanaro6dead952003-09-25 14:50:04 +00002833 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2834See \`config.log' for more details." >&5
2835echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2836See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002838fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002839
Martin v. Löwis11437992002-04-12 09:54:03 +00002840rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002841{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2842echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002843
2844rm -f conftest.$ac_ext
2845EXEEXT=$ac_cv_exeext
2846ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002847{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2848echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002849if test "${ac_cv_objext+set}" = set; then
2850 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002851else
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002853/* confdefs.h. */
2854_ACEOF
2855cat confdefs.h >>conftest.$ac_ext
2856cat >>conftest.$ac_ext <<_ACEOF
2857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002858
Martin v. Löwis11437992002-04-12 09:54:03 +00002859int
2860main ()
2861{
2862
2863 ;
2864 return 0;
2865}
2866_ACEOF
2867rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002868if { (ac_try="$ac_compile"
2869case "(($ac_try" in
2870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2871 *) ac_try_echo=$ac_try;;
2872esac
2873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2874 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 ac_status=$?
2876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2877 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002878 for ac_file in conftest.o conftest.obj conftest.*; do
2879 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2883 break;;
2884 esac
2885done
2886else
2887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002888sed 's/^/| /' conftest.$ac_ext >&5
2889
2890{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2891See \`config.log' for more details." >&5
2892echo "$as_me: error: cannot compute suffix of object files: cannot compile
2893See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 { (exit 1); exit 1; }; }
2895fi
2896
2897rm -f conftest.$ac_cv_objext conftest.$ac_ext
2898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2900echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901OBJEXT=$ac_cv_objext
2902ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2904echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002905if test "${ac_cv_c_compiler_gnu+set}" = set; then
2906 echo $ECHO_N "(cached) $ECHO_C" >&6
2907else
2908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002909/* confdefs.h. */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
Martin v. Löwis11437992002-04-12 09:54:03 +00002915int
2916main ()
2917{
2918#ifndef __GNUC__
2919 choke me
2920#endif
2921
2922 ;
2923 return 0;
2924}
2925_ACEOF
2926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002927if { (ac_try="$ac_compile"
2928case "(($ac_try" in
2929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2930 *) ac_try_echo=$ac_try;;
2931esac
2932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002935 grep -v '^ *+' conftest.er1 >conftest.err
2936 rm -f conftest.er1
2937 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002939 (exit $ac_status); } && {
2940 test -z "$ac_c_werror_flag" ||
2941 test ! -s conftest.err
2942 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002943 ac_compiler_gnu=yes
2944else
2945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002946sed 's/^/| /' conftest.$ac_ext >&5
2947
Martin v. Löwiseba40652007-08-30 20:10:57 +00002948 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950
2951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002952ac_cv_c_compiler_gnu=$ac_compiler_gnu
2953
2954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002955{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2956echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002957GCC=`test $ac_compiler_gnu = yes && echo yes`
2958ac_test_CFLAGS=${CFLAGS+set}
2959ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002960{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2961echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002962if test "${ac_cv_prog_cc_g+set}" = set; then
2963 echo $ECHO_N "(cached) $ECHO_C" >&6
2964else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965 ac_save_c_werror_flag=$ac_c_werror_flag
2966 ac_c_werror_flag=yes
2967 ac_cv_prog_cc_g=no
2968 CFLAGS="-g"
2969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002970/* confdefs.h. */
2971_ACEOF
2972cat confdefs.h >>conftest.$ac_ext
2973cat >>conftest.$ac_ext <<_ACEOF
2974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976int
2977main ()
2978{
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
2990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003001 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003002else
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 CFLAGS=""
3007 cat >conftest.$ac_ext <<_ACEOF
3008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
3013
3014int
3015main ()
3016{
3017
3018 ;
3019 return 0;
3020}
3021_ACEOF
3022rm -f conftest.$ac_objext
3023if { (ac_try="$ac_compile"
3024case "(($ac_try" in
3025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3026 *) ac_try_echo=$ac_try;;
3027esac
3028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3029 (eval "$ac_compile") 2>conftest.er1
3030 ac_status=$?
3031 grep -v '^ *+' conftest.er1 >conftest.err
3032 rm -f conftest.er1
3033 cat conftest.err >&5
3034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3035 (exit $ac_status); } && {
3036 test -z "$ac_c_werror_flag" ||
3037 test ! -s conftest.err
3038 } && test -s conftest.$ac_objext; then
3039 :
3040else
3041 echo "$as_me: failed program was:" >&5
3042sed 's/^/| /' conftest.$ac_ext >&5
3043
3044 ac_c_werror_flag=$ac_save_c_werror_flag
3045 CFLAGS="-g"
3046 cat >conftest.$ac_ext <<_ACEOF
3047/* confdefs.h. */
3048_ACEOF
3049cat confdefs.h >>conftest.$ac_ext
3050cat >>conftest.$ac_ext <<_ACEOF
3051/* end confdefs.h. */
3052
3053int
3054main ()
3055{
3056
3057 ;
3058 return 0;
3059}
3060_ACEOF
3061rm -f conftest.$ac_objext
3062if { (ac_try="$ac_compile"
3063case "(($ac_try" in
3064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3065 *) ac_try_echo=$ac_try;;
3066esac
3067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3068 (eval "$ac_compile") 2>conftest.er1
3069 ac_status=$?
3070 grep -v '^ *+' conftest.er1 >conftest.err
3071 rm -f conftest.er1
3072 cat conftest.err >&5
3073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3074 (exit $ac_status); } && {
3075 test -z "$ac_c_werror_flag" ||
3076 test ! -s conftest.err
3077 } && test -s conftest.$ac_objext; then
3078 ac_cv_prog_cc_g=yes
3079else
3080 echo "$as_me: failed program was:" >&5
3081sed 's/^/| /' conftest.$ac_ext >&5
3082
3083
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085
3086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003088
3089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3090fi
3091
3092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093 ac_c_werror_flag=$ac_save_c_werror_flag
3094fi
3095{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3096echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003097if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003098 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003099elif test $ac_cv_prog_cc_g = yes; then
3100 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003101 CFLAGS="-g -O2"
3102 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003103 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003104 fi
3105else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003106 if test "$GCC" = yes; then
3107 CFLAGS="-O2"
3108 else
3109 CFLAGS=
3110 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003112{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3113echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3114if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003115 echo $ECHO_N "(cached) $ECHO_C" >&6
3116else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003117 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003118ac_save_CC=$CC
3119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003120/* confdefs.h. */
3121_ACEOF
3122cat confdefs.h >>conftest.$ac_ext
3123cat >>conftest.$ac_ext <<_ACEOF
3124/* end confdefs.h. */
3125#include <stdarg.h>
3126#include <stdio.h>
3127#include <sys/types.h>
3128#include <sys/stat.h>
3129/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3130struct buf { int x; };
3131FILE * (*rcsopen) (struct buf *, struct stat *, int);
3132static char *e (p, i)
3133 char **p;
3134 int i;
3135{
3136 return p[i];
3137}
3138static char *f (char * (*g) (char **, int), char **p, ...)
3139{
3140 char *s;
3141 va_list v;
3142 va_start (v,p);
3143 s = g (p, va_arg (v,int));
3144 va_end (v);
3145 return s;
3146}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003147
3148/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3149 function prototypes and stuff, but not '\xHH' hex character constants.
3150 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003151 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003152 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3153 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003154 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003155int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3156
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3158 inside strings and character constants. */
3159#define FOO(x) 'x'
3160int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3161
Skip Montanaro6dead952003-09-25 14:50:04 +00003162int test (int i, double x);
3163struct s1 {int (*f) (int a);};
3164struct s2 {int (*f) (double a);};
3165int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3166int argc;
3167char **argv;
3168int
3169main ()
3170{
3171return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3172 ;
3173 return 0;
3174}
3175_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3177 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003178do
3179 CC="$ac_save_CC $ac_arg"
3180 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003181if { (ac_try="$ac_compile"
3182case "(($ac_try" in
3183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3184 *) ac_try_echo=$ac_try;;
3185esac
3186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3187 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003189 grep -v '^ *+' conftest.er1 >conftest.err
3190 rm -f conftest.er1
3191 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193 (exit $ac_status); } && {
3194 test -z "$ac_c_werror_flag" ||
3195 test ! -s conftest.err
3196 } && test -s conftest.$ac_objext; then
3197 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003198else
3199 echo "$as_me: failed program was:" >&5
3200sed 's/^/| /' conftest.$ac_ext >&5
3201
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202
Skip Montanaro6dead952003-09-25 14:50:04 +00003203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204
3205rm -f core conftest.err conftest.$ac_objext
3206 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003207done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003209CC=$ac_save_CC
3210
3211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212# AC_CACHE_VAL
3213case "x$ac_cv_prog_cc_c89" in
3214 x)
3215 { echo "$as_me:$LINENO: result: none needed" >&5
3216echo "${ECHO_T}none needed" >&6; } ;;
3217 xno)
3218 { echo "$as_me:$LINENO: result: unsupported" >&5
3219echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003220 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 CC="$CC $ac_cv_prog_cc_c89"
3222 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3223echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003224esac
3225
Skip Montanaro6dead952003-09-25 14:50:04 +00003226
Martin v. Löwis11437992002-04-12 09:54:03 +00003227ac_ext=c
3228ac_cpp='$CPP $CPPFLAGS'
3229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3231ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003232
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003233
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003234
3235
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3237echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003238
Martin v. Löwiseba40652007-08-30 20:10:57 +00003239# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003240if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003241 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003242
3243 case $withval in
3244 no) with_cxx_main=no
3245 MAINCC='$(CC)';;
3246 yes) with_cxx_main=yes
3247 MAINCC='$(CXX)';;
3248 *) with_cxx_main=yes
3249 MAINCC=$withval
3250 if test -z "$CXX"
3251 then
3252 CXX=$withval
3253 fi;;
3254 esac
3255else
3256
3257 with_cxx_main=no
3258 MAINCC='$(CC)'
3259
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260fi
3261
3262{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3263echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003264
3265preset_cxx="$CXX"
3266if test -z "$CXX"
3267then
3268 case "$CC" in
3269 gcc) # Extract the first word of "g++", so it can be a program name with args.
3270set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3272echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003273if test "${ac_cv_path_CXX+set}" = set; then
3274 echo $ECHO_N "(cached) $ECHO_C" >&6
3275else
3276 case $CXX in
3277 [\\/]* | ?:[\\/]*)
3278 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3279 ;;
3280 *)
3281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3282for as_dir in notfound
3283do
3284 IFS=$as_save_IFS
3285 test -z "$as_dir" && as_dir=.
3286 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003287 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 +00003288 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3289 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3290 break 2
3291 fi
3292done
3293done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003294IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003295
3296 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3297 ;;
3298esac
3299fi
3300CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003301if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003302 { echo "$as_me:$LINENO: result: $CXX" >&5
3303echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003304else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305 { echo "$as_me:$LINENO: result: no" >&5
3306echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003309 ;;
3310 cc) # Extract the first word of "c++", so it can be a program name with args.
3311set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314if test "${ac_cv_path_CXX+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316else
3317 case $CXX in
3318 [\\/]* | ?:[\\/]*)
3319 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3320 ;;
3321 *)
3322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3323for as_dir in notfound
3324do
3325 IFS=$as_save_IFS
3326 test -z "$as_dir" && as_dir=.
3327 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003328 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 +00003329 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3331 break 2
3332 fi
3333done
3334done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003335IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003336
3337 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3338 ;;
3339esac
3340fi
3341CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003342if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 { echo "$as_me:$LINENO: result: $CXX" >&5
3344echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003345else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346 { echo "$as_me:$LINENO: result: no" >&5
3347echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003349
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003350 ;;
3351 esac
3352 if test "$CXX" = "notfound"
3353 then
3354 CXX=""
3355 fi
3356fi
3357if test -z "$CXX"
3358then
3359 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3360do
3361 # Extract the first word of "$ac_prog", so it can be a program name with args.
3362set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003363{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3364echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003365if test "${ac_cv_prog_CXX+set}" = set; then
3366 echo $ECHO_N "(cached) $ECHO_C" >&6
3367else
3368 if test -n "$CXX"; then
3369 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3370else
3371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3372for as_dir in $PATH
3373do
3374 IFS=$as_save_IFS
3375 test -z "$as_dir" && as_dir=.
3376 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003377 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 +00003378 ac_cv_prog_CXX="$ac_prog"
3379 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3380 break 2
3381 fi
3382done
3383done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003384IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003385
3386fi
3387fi
3388CXX=$ac_cv_prog_CXX
3389if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390 { echo "$as_me:$LINENO: result: $CXX" >&5
3391echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003393 { echo "$as_me:$LINENO: result: no" >&5
3394echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003395fi
3396
Martin v. Löwiseba40652007-08-30 20:10:57 +00003397
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003398 test -n "$CXX" && break
3399done
3400test -n "$CXX" || CXX="notfound"
3401
3402 if test "$CXX" = "notfound"
3403 then
3404 CXX=""
3405 fi
3406fi
3407if test "$preset_cxx" != "$CXX"
3408then
3409 { echo "$as_me:$LINENO: WARNING:
3410
3411 By default, distutils will build C++ extension modules with \"$CXX\".
3412 If this is not intended, then set CXX on the configure command line.
3413 " >&5
3414echo "$as_me: WARNING:
3415
3416 By default, distutils will build C++ extension modules with \"$CXX\".
3417 If this is not intended, then set CXX on the configure command line.
3418 " >&2;}
3419fi
3420
3421
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003422# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003423
3424ac_ext=c
3425ac_cpp='$CPP $CPPFLAGS'
3426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3428ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3430echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431# On Suns, sometimes $CPP names a directory.
3432if test -n "$CPP" && test -d "$CPP"; then
3433 CPP=
3434fi
3435if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003436 if test "${ac_cv_prog_CPP+set}" = set; then
3437 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003438else
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Double quotes because CPP needs to be expanded
3440 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3441 do
3442 ac_preproc_ok=false
3443for ac_c_preproc_warn_flag in '' yes
3444do
3445 # Use a header file that comes with gcc, so configuring glibc
3446 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003447 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3448 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003449 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # not just through cpp. "Syntax error" is here to catch this case.
3451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003452/* confdefs.h. */
3453_ACEOF
3454cat confdefs.h >>conftest.$ac_ext
3455cat >>conftest.$ac_ext <<_ACEOF
3456/* end confdefs.h. */
3457#ifdef __STDC__
3458# include <limits.h>
3459#else
3460# include <assert.h>
3461#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003462 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464if { (ac_try="$ac_cpp conftest.$ac_ext"
3465case "(($ac_try" in
3466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3467 *) ac_try_echo=$ac_try;;
3468esac
3469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3470 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003472 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 rm -f conftest.er1
3474 cat conftest.err >&5
3475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003476 (exit $ac_status); } >/dev/null && {
3477 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3478 test ! -s conftest.err
3479 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003480 :
3481else
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003483sed 's/^/| /' conftest.$ac_ext >&5
3484
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # Broken: fails on valid input.
3486continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003490
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 # can be detected and how.
3493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003494/* confdefs.h. */
3495_ACEOF
3496cat confdefs.h >>conftest.$ac_ext
3497cat >>conftest.$ac_ext <<_ACEOF
3498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003499#include <ac_nonexistent.h>
3500_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501if { (ac_try="$ac_cpp conftest.$ac_ext"
3502case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505esac
3506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3507 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003509 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 rm -f conftest.er1
3511 cat conftest.err >&5
3512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513 (exit $ac_status); } >/dev/null && {
3514 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3515 test ! -s conftest.err
3516 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # Broken: success on invalid input.
3518continue
3519else
3520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003521sed 's/^/| /' conftest.$ac_ext >&5
3522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 # Passes both tests.
3524ac_preproc_ok=:
3525break
3526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528rm -f conftest.err conftest.$ac_ext
3529
3530done
3531# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3532rm -f conftest.err conftest.$ac_ext
3533if $ac_preproc_ok; then
3534 break
3535fi
3536
3537 done
3538 ac_cv_prog_CPP=$CPP
3539
3540fi
3541 CPP=$ac_cv_prog_CPP
3542else
3543 ac_cv_prog_CPP=$CPP
3544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003545{ echo "$as_me:$LINENO: result: $CPP" >&5
3546echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003547ac_preproc_ok=false
3548for ac_c_preproc_warn_flag in '' yes
3549do
3550 # Use a header file that comes with gcc, so configuring glibc
3551 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003552 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3553 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 # On the NeXT, cc -E runs the code through the compiler's parser,
3555 # not just through cpp. "Syntax error" is here to catch this case.
3556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003557/* confdefs.h. */
3558_ACEOF
3559cat confdefs.h >>conftest.$ac_ext
3560cat >>conftest.$ac_ext <<_ACEOF
3561/* end confdefs.h. */
3562#ifdef __STDC__
3563# include <limits.h>
3564#else
3565# include <assert.h>
3566#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003567 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003568_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003569if { (ac_try="$ac_cpp conftest.$ac_ext"
3570case "(($ac_try" in
3571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3572 *) ac_try_echo=$ac_try;;
3573esac
3574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003577 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 rm -f conftest.er1
3579 cat conftest.err >&5
3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581 (exit $ac_status); } >/dev/null && {
3582 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3583 test ! -s conftest.err
3584 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 :
3586else
3587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003588sed 's/^/| /' conftest.$ac_ext >&5
3589
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # Broken: fails on valid input.
3591continue
3592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594rm -f conftest.err conftest.$ac_ext
3595
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 # can be detected and how.
3598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003599/* confdefs.h. */
3600_ACEOF
3601cat confdefs.h >>conftest.$ac_ext
3602cat >>conftest.$ac_ext <<_ACEOF
3603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003604#include <ac_nonexistent.h>
3605_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606if { (ac_try="$ac_cpp conftest.$ac_ext"
3607case "(($ac_try" in
3608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609 *) ac_try_echo=$ac_try;;
3610esac
3611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3612 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 rm -f conftest.er1
3616 cat conftest.err >&5
3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618 (exit $ac_status); } >/dev/null && {
3619 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3620 test ! -s conftest.err
3621 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # Broken: success on invalid input.
3623continue
3624else
3625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003626sed 's/^/| /' conftest.$ac_ext >&5
3627
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 # Passes both tests.
3629ac_preproc_ok=:
3630break
3631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633rm -f conftest.err conftest.$ac_ext
3634
3635done
3636# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3637rm -f conftest.err conftest.$ac_ext
3638if $ac_preproc_ok; then
3639 :
3640else
Skip Montanaro6dead952003-09-25 14:50:04 +00003641 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3642See \`config.log' for more details." >&5
3643echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3644See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 { (exit 1); exit 1; }; }
3646fi
3647
3648ac_ext=c
3649ac_cpp='$CPP $CPPFLAGS'
3650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3652ac_compiler_gnu=$ac_cv_c_compiler_gnu
3653
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3656echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3657if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003658 echo $ECHO_N "(cached) $ECHO_C" >&6
3659else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003660 # Extract the first word of "grep ggrep" to use in msg output
3661if test -z "$GREP"; then
3662set dummy grep ggrep; ac_prog_name=$2
3663if test "${ac_cv_path_GREP+set}" = set; then
3664 echo $ECHO_N "(cached) $ECHO_C" >&6
3665else
3666 ac_path_GREP_found=false
3667# Loop through the user's path and test for each of PROGNAME-LIST
3668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3669for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3670do
3671 IFS=$as_save_IFS
3672 test -z "$as_dir" && as_dir=.
3673 for ac_prog in grep ggrep; do
3674 for ac_exec_ext in '' $ac_executable_extensions; do
3675 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3676 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3677 # Check for GNU ac_path_GREP and select it if it is found.
3678 # Check for GNU $ac_path_GREP
3679case `"$ac_path_GREP" --version 2>&1` in
3680*GNU*)
3681 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3682*)
3683 ac_count=0
3684 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3685 while :
3686 do
3687 cat "conftest.in" "conftest.in" >"conftest.tmp"
3688 mv "conftest.tmp" "conftest.in"
3689 cp "conftest.in" "conftest.nl"
3690 echo 'GREP' >> "conftest.nl"
3691 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3692 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3693 ac_count=`expr $ac_count + 1`
3694 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3695 # Best one so far, save it but keep looking for a better one
3696 ac_cv_path_GREP="$ac_path_GREP"
3697 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003698 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699 # 10*(2^10) chars as input seems more than enough
3700 test $ac_count -gt 10 && break
3701 done
3702 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3703esac
3704
3705
3706 $ac_path_GREP_found && break 3
3707 done
3708done
3709
3710done
3711IFS=$as_save_IFS
3712
3713
Skip Montanaro6dead952003-09-25 14:50:04 +00003714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003715
3716GREP="$ac_cv_path_GREP"
3717if test -z "$GREP"; then
3718 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3719echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3720 { (exit 1); exit 1; }; }
3721fi
3722
3723else
3724 ac_cv_path_GREP=$GREP
3725fi
3726
3727
3728fi
3729{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3730echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3731 GREP="$ac_cv_path_GREP"
3732
3733
3734{ echo "$as_me:$LINENO: checking for egrep" >&5
3735echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3736if test "${ac_cv_path_EGREP+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3738else
3739 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3740 then ac_cv_path_EGREP="$GREP -E"
3741 else
3742 # Extract the first word of "egrep" to use in msg output
3743if test -z "$EGREP"; then
3744set dummy egrep; ac_prog_name=$2
3745if test "${ac_cv_path_EGREP+set}" = set; then
3746 echo $ECHO_N "(cached) $ECHO_C" >&6
3747else
3748 ac_path_EGREP_found=false
3749# Loop through the user's path and test for each of PROGNAME-LIST
3750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3752do
3753 IFS=$as_save_IFS
3754 test -z "$as_dir" && as_dir=.
3755 for ac_prog in egrep; do
3756 for ac_exec_ext in '' $ac_executable_extensions; do
3757 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3758 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3759 # Check for GNU ac_path_EGREP and select it if it is found.
3760 # Check for GNU $ac_path_EGREP
3761case `"$ac_path_EGREP" --version 2>&1` in
3762*GNU*)
3763 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3764*)
3765 ac_count=0
3766 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3767 while :
3768 do
3769 cat "conftest.in" "conftest.in" >"conftest.tmp"
3770 mv "conftest.tmp" "conftest.in"
3771 cp "conftest.in" "conftest.nl"
3772 echo 'EGREP' >> "conftest.nl"
3773 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3774 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3775 ac_count=`expr $ac_count + 1`
3776 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3777 # Best one so far, save it but keep looking for a better one
3778 ac_cv_path_EGREP="$ac_path_EGREP"
3779 ac_path_EGREP_max=$ac_count
3780 fi
3781 # 10*(2^10) chars as input seems more than enough
3782 test $ac_count -gt 10 && break
3783 done
3784 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3785esac
3786
3787
3788 $ac_path_EGREP_found && break 3
3789 done
3790done
3791
3792done
3793IFS=$as_save_IFS
3794
3795
3796fi
3797
3798EGREP="$ac_cv_path_EGREP"
3799if test -z "$EGREP"; then
3800 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3801echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3802 { (exit 1); exit 1; }; }
3803fi
3804
3805else
3806 ac_cv_path_EGREP=$EGREP
3807fi
3808
3809
3810 fi
3811fi
3812{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3813echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3814 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003815
3816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818{ echo "$as_me:$LINENO: checking for AIX" >&5
3819echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003821/* confdefs.h. */
3822_ACEOF
3823cat confdefs.h >>conftest.$ac_ext
3824cat >>conftest.$ac_ext <<_ACEOF
3825/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003826#ifdef _AIX
3827 yes
3828#endif
3829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003832 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 { echo "$as_me:$LINENO: result: yes" >&5
3834echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003836#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003837_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003838
3839else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003840 { echo "$as_me:$LINENO: result: no" >&5
3841echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003842fi
3843rm -f conftest*
3844
Michael W. Hudson54241132001-12-07 15:38:26 +00003845
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003846
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003847# Check for unsupported systems
3848case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003849atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003850 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3851 echo See README for details.
3852 exit 1;;
3853esac
3854
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Martin v. Löwiseba40652007-08-30 20:10:57 +00003856{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3857echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003858
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003860if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003862 case $withval in
3863 no) EXEEXT=;;
3864 yes) EXEEXT=.exe;;
3865 *) EXEEXT=$withval;;
3866 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003867fi
3868
3869{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3870echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003871
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003872# Test whether we're running on a non-case-sensitive system, in which
3873# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003874
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3876echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003877if test ! -d CaseSensitiveTestDir; then
3878mkdir CaseSensitiveTestDir
3879fi
3880
3881if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003882then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883 { echo "$as_me:$LINENO: result: yes" >&5
3884echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003885 BUILDEXEEXT=.exe
3886else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003887 { echo "$as_me:$LINENO: result: no" >&5
3888echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003889 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003890fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003891rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003892
Guido van Rossumdd997f71998-10-07 19:58:26 +00003893case $MACHDEP in
3894bsdos*)
3895 case $CC in
3896 gcc) CC="$CC -D_HAVE_BSDI";;
3897 esac;;
3898esac
3899
Guido van Rossum24b1e751997-08-21 02:29:16 +00003900case $ac_sys_system in
3901hp*|HP*)
3902 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003903 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003904 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003905Monterey*)
3906 case $CC in
3907 cc) CC="$CC -Wl,-Bexport";;
3908 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003909SunOS*)
3910 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003911
3912cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003913#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003914_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003915
3916 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003917esac
3918
Michael W. Hudson54241132001-12-07 15:38:26 +00003919
3920
Martin v. Löwiseba40652007-08-30 20:10:57 +00003921{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3922echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003923if test -z "$LIBRARY"
3924then
3925 LIBRARY='libpython$(VERSION).a'
3926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003927{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3928echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003929
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003930# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003931# name of the library into which to insert object files). BLDLIBRARY is also
3932# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3933# is blank as the main program is not linked directly against LDLIBRARY.
3934# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3935# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3936# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3937# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003938#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003939# RUNSHARED is used to run shared python without installed libraries
3940#
3941# INSTSONAME is the name of the shared library that will be use to install
3942# on the system - some systems like version suffix, others don't
3943
3944
Michael W. Hudson54241132001-12-07 15:38:26 +00003945
3946
3947
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003948
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003949LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003950BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003951INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003952DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003953LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003954RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003955
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003956# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003957# If CXX is set, and if it is needed to link a main function that was
3958# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3959# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003960# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003961# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003962
Martin v. Löwiseba40652007-08-30 20:10:57 +00003963{ echo "$as_me:$LINENO: checking LINKCC" >&5
3964echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003965if test -z "$LINKCC"
3966then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003967 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003968 case $ac_sys_system in
3969 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003970 exp_extra="\"\""
3971 if test $ac_sys_release -ge 5 -o \
3972 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3973 exp_extra="."
3974 fi
3975 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003976 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003977 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003978 QNX*)
3979 # qcc must be used because the other compilers do not
3980 # support -N.
3981 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003982 esac
3983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003984{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3985echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003986
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3988echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3989# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003990if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003991 enableval=$enable_shared;
3992fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003993
Martin v. Löwis1142de32002-03-29 16:28:31 +00003994
3995if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003996then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003997 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003998 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003999 enable_shared="yes";;
4000 *)
4001 enable_shared="no";;
4002 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4005echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004006
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4008echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4009# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004010if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004011 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004012 CC="$CC -pg"
4013 if test "$cross_compiling" = yes; then
4014 ac_enable_profiling="no"
4015else
4016 cat >conftest.$ac_ext <<_ACEOF
4017/* confdefs.h. */
4018_ACEOF
4019cat confdefs.h >>conftest.$ac_ext
4020cat >>conftest.$ac_ext <<_ACEOF
4021/* end confdefs.h. */
4022int main() { return 0; }
4023_ACEOF
4024rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004025if { (ac_try="$ac_link"
4026case "(($ac_try" in
4027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4028 *) ac_try_echo=$ac_try;;
4029esac
4030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4031 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004032 ac_status=$?
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004035 { (case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
4039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4040 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004041 ac_status=$?
4042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4043 (exit $ac_status); }; }; then
4044 ac_enable_profiling="yes"
4045else
4046 echo "$as_me: program exited with status $ac_status" >&5
4047echo "$as_me: failed program was:" >&5
4048sed 's/^/| /' conftest.$ac_ext >&5
4049
4050( exit $ac_status )
4051ac_enable_profiling="no"
4052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004053rm -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 +00004054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004055
4056
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004057 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004058fi
4059
4060{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4061echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004062
4063case "$ac_enable_profiling" in
4064 "yes")
4065 BASECFLAGS="-pg $BASECFLAGS"
4066 LDFLAGS="-pg $LDFLAGS"
4067 ;;
4068esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004069
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4071echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004072
Guido van Rossumb8552162001-09-05 14:58:11 +00004073# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4074# library that we build, but we do not want to link against it (we
4075# will find it with a -framework option). For this reason there is an
4076# extra variable BLDLIBRARY against which Python and the extension
4077# modules are linked, BLDLIBRARY. This is normally the same as
4078# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004079if test "$enable_framework"
4080then
4081 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004082 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004083 BLDLIBRARY=''
4084else
4085 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004086fi
Jack Jansene578a632001-08-15 01:27:14 +00004087
Martin v. Löwis1142de32002-03-29 16:28:31 +00004088# Other platforms follow
4089if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004090
4091cat >>confdefs.h <<\_ACEOF
4092#define Py_ENABLE_SHARED 1
4093_ACEOF
4094
Martin v. Löwis1142de32002-03-29 16:28:31 +00004095 case $ac_sys_system in
4096 BeOS*)
4097 LDLIBRARY='libpython$(VERSION).so'
4098 ;;
4099 CYGWIN*)
4100 LDLIBRARY='libpython$(VERSION).dll.a'
4101 DLLLIBRARY='libpython$(VERSION).dll'
4102 ;;
4103 SunOS*)
4104 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004105 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004106 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004107 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004108 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004109 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004110 LDLIBRARY='libpython$(VERSION).so'
4111 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004112 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004113 case $ac_sys_system in
4114 FreeBSD*)
4115 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4116 ;;
4117 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004118 INSTSONAME="$LDLIBRARY".$SOVERSION
4119 ;;
4120 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004121 case `uname -m` in
4122 ia64)
4123 LDLIBRARY='libpython$(VERSION).so'
4124 ;;
4125 *)
4126 LDLIBRARY='libpython$(VERSION).sl'
4127 ;;
4128 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004129 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004130 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004131 ;;
4132 OSF*)
4133 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004134 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004135 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004136 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004137 atheos*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-L. -lpython$(VERSION)'
4140 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4141 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004142 esac
Jason Tishler30765592003-09-04 11:04:06 +00004143else # shared is disabled
4144 case $ac_sys_system in
4145 CYGWIN*)
4146 BLDLIBRARY='$(LIBRARY)'
4147 LDLIBRARY='libpython$(VERSION).dll.a'
4148 ;;
4149 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004150fi
4151
Martin v. Löwiseba40652007-08-30 20:10:57 +00004152{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4153echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155if test -n "$ac_tool_prefix"; then
4156 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4157set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004158{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004160if test "${ac_cv_prog_RANLIB+set}" = set; then
4161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162else
4163 if test -n "$RANLIB"; then
4164 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
4171 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172 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 +00004173 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4174 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4175 break 2
4176 fi
4177done
4178done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Guido van Rossum627b2d71993-12-24 10:39:16 +00004181fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004183RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4186echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188 { echo "$as_me:$LINENO: result: no" >&5
4189echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
4191
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192
Martin v. Löwis11437992002-04-12 09:54:03 +00004193fi
4194if test -z "$ac_cv_prog_RANLIB"; then
4195 ac_ct_RANLIB=$RANLIB
4196 # Extract the first word of "ranlib", so it can be a program name with args.
4197set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004200if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4201 echo $ECHO_N "(cached) $ECHO_C" >&6
4202else
4203 if test -n "$ac_ct_RANLIB"; then
4204 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4205else
4206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4207for as_dir in $PATH
4208do
4209 IFS=$as_save_IFS
4210 test -z "$as_dir" && as_dir=.
4211 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212 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 +00004213 ac_cv_prog_ac_ct_RANLIB="ranlib"
4214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4215 break 2
4216 fi
4217done
4218done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004220
Martin v. Löwis11437992002-04-12 09:54:03 +00004221fi
4222fi
4223ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4224if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4226echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004227else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004228 { echo "$as_me:$LINENO: result: no" >&5
4229echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004230fi
4231
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232 if test "x$ac_ct_RANLIB" = x; then
4233 RANLIB=":"
4234 else
4235 case $cross_compiling:$ac_tool_warned in
4236yes:)
4237{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4238whose name does not start with the host triplet. If you think this
4239configuration is useful to you, please write to autoconf@gnu.org." >&5
4240echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4241whose name does not start with the host triplet. If you think this
4242configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4243ac_tool_warned=yes ;;
4244esac
4245 RANLIB=$ac_ct_RANLIB
4246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004247else
4248 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250
4251
Guido van Rossum7f43da71994-08-01 12:15:30 +00004252for ac_prog in ar aal
4253do
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004258if test "${ac_cv_prog_AR+set}" = set; then
4259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260else
4261 if test -n "$AR"; then
4262 ac_cv_prog_AR="$AR" # Let the user override the test.
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4265for as_dir in $PATH
4266do
4267 IFS=$as_save_IFS
4268 test -z "$as_dir" && as_dir=.
4269 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004270 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 +00004271 ac_cv_prog_AR="$ac_prog"
4272 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4273 break 2
4274 fi
4275done
4276done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
Guido van Rossum7f43da71994-08-01 12:15:30 +00004279fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004281AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283 { echo "$as_me:$LINENO: result: $AR" >&5
4284echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004286 { echo "$as_me:$LINENO: result: no" >&5
4287echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004289
Martin v. Löwiseba40652007-08-30 20:10:57 +00004290
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004292done
4293test -n "$AR" || AR="ar"
4294
Michael W. Hudson54241132001-12-07 15:38:26 +00004295
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004296
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004297# Extract the first word of "svnversion", so it can be a program name with args.
4298set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004301if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4302 echo $ECHO_N "(cached) $ECHO_C" >&6
4303else
4304 if test -n "$SVNVERSION"; then
4305 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4306else
4307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4308for as_dir in $PATH
4309do
4310 IFS=$as_save_IFS
4311 test -z "$as_dir" && as_dir=.
4312 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 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 +00004314 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004315 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4316 break 2
4317 fi
4318done
4319done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004320IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004321
Martin v. Löwisff600232006-04-03 19:12:32 +00004322 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004323fi
4324fi
4325SVNVERSION=$ac_cv_prog_SVNVERSION
4326if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4328echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004329else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330 { echo "$as_me:$LINENO: result: no" >&5
4331echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004332fi
4333
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004335if test $SVNVERSION = found
4336then
4337 SVNVERSION="svnversion \$(srcdir)"
4338else
4339 SVNVERSION="echo exported"
4340fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004341
Neil Schemenauera42c8272001-03-31 00:01:55 +00004342case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004343bsdos*|hp*|HP*)
4344 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004345 if test -z "$INSTALL"
4346 then
4347 INSTALL="${srcdir}/install-sh -c"
4348 fi
4349esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004351for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4352 if 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/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/install.sh -c"
4359 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004360 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004361 ac_aux_dir=$ac_dir
4362 ac_install_sh="$ac_aux_dir/shtool install -c"
4363 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364 fi
4365done
4366if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4368echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004369 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371
4372# These three variables are undocumented and unsupported,
4373# and are intended to be withdrawn in a future Autoconf release.
4374# They can cause serious problems if a builder's source tree is in a directory
4375# whose full name contains unusual characters.
4376ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4377ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4378ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4379
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004380
4381# Find a good install program. We prefer a C program (faster),
4382# so one script is as good as another. But avoid the broken or
4383# incompatible versions:
4384# SysV /etc/install, /usr/sbin/install
4385# SunOS /usr/etc/install
4386# IRIX /sbin/install
4387# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004388# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4390# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4391# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004393# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004394{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4395echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004396if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004397if test "${ac_cv_path_install+set}" = set; then
4398 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004399else
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403 IFS=$as_save_IFS
4404 test -z "$as_dir" && as_dir=.
4405 # Account for people who put trailing slashes in PATH elements.
4406case $as_dir/ in
4407 ./ | .// | /cC/* | \
4408 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004409 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004410 /usr/ucb/* ) ;;
4411 *)
4412 # OSF1 and SCO ODT 3.0 have their own names for install.
4413 # Don't use installbsd from OSF since it installs stuff as root
4414 # by default.
4415 for ac_prog in ginstall scoinst install; do
4416 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417 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 +00004418 if test $ac_prog = install &&
4419 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4420 # AIX install. It has an incompatible calling convention.
4421 :
4422 elif test $ac_prog = install &&
4423 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4424 # program-specific install script used by HP pwplus--don't use.
4425 :
4426 else
4427 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4428 break 3
4429 fi
4430 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004431 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004432 done
4433 ;;
4434esac
4435done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004436IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004437
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004438
4439fi
4440 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004441 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004442 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004443 # As a last resort, use the slow shell script. Don't cache a
4444 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004445 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004446 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004448 fi
4449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4451echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004452
4453# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4454# It thinks the first close brace ends the variable substitution.
4455test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4456
Martin v. Löwis11437992002-04-12 09:54:03 +00004457test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004458
4459test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4460
Michael W. Hudson54241132001-12-07 15:38:26 +00004461
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004462# Not every filesystem supports hard links
4463
4464if test -z "$LN" ; then
4465 case $ac_sys_system in
4466 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004467 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004468 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004469 *) LN=ln;;
4470 esac
4471fi
4472
Fred Drake109d9862001-07-11 06:27:56 +00004473# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004474{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4475echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004476
Martin v. Löwiseba40652007-08-30 20:10:57 +00004477# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004478if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004480if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004481then
4482
4483cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004484#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004485_ACEOF
4486
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487 { echo "$as_me:$LINENO: result: yes" >&5
4488echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004489 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004490else { echo "$as_me:$LINENO: result: no" >&5
4491echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004492fi
4493else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494 { echo "$as_me:$LINENO: result: no" >&5
4495echo "${ECHO_T}no" >&6; }
4496fi
4497
Fred Drake109d9862001-07-11 06:27:56 +00004498
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4500# merged with this chunk of code?
4501
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004502# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004503# ------------------------
4504# (The following bit of code is complicated enough - please keep things
4505# indented properly. Just pretend you're editing Python code. ;-)
4506
4507# There are two parallel sets of case statements below, one that checks to
4508# see if OPT was set and one that does BASECFLAGS setting based upon
4509# compiler and platform. BASECFLAGS tweaks need to be made even if the
4510# user set OPT.
4511
4512# tweak OPT based on compiler and platform, only if the user didn't set
4513# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004514
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004515if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004516then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004517 case $GCC in
4518 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004519 if test "$CC" != 'g++' ; then
4520 STRICT_PROTO="-Wstrict-prototypes"
4521 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004522 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4523 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4524 WRAP="-fwrapv"
4525 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004526 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004527 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004528 if test "$Py_DEBUG" = 'true' ; then
4529 # Optimization messes up debuggers, so turn it off for
4530 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004531 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004532 else
Thomas Hellere5529592007-12-13 21:20:29 +00004533 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004534 fi
4535 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004536 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004537 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004538 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004539 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004540 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4542 ;;
4543 esac
Fred Drake109d9862001-07-11 06:27:56 +00004544 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004545
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004546 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547 OPT="-O"
4548 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004549 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550
4551 # The current (beta) Monterey compiler dies with optimizations
4552 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004553 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004554 Monterey*)
4555 OPT=""
4556 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004557 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004558
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004559fi
4560
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004562
4563# The -arch flags for universal builds on OSX
4564UNIVERSAL_ARCH_FLAGS=
4565
4566
Skip Montanarodecc6a42003-01-01 20:07:49 +00004567# tweak BASECFLAGS based on compiler and platform
4568case $GCC in
4569yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004570 # Python violates C99 rules, by casting between incompatible
4571 # pointer types. GCC may generate bad code as a result of that,
4572 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004573 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4574echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004575 ac_save_cc="$CC"
4576 CC="$CC -fno-strict-aliasing"
4577 if test "$cross_compiling" = yes; then
4578 ac_cv_no_strict_aliasing_ok=no
4579else
4580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004581/* confdefs.h. */
4582_ACEOF
4583cat confdefs.h >>conftest.$ac_ext
4584cat >>conftest.$ac_ext <<_ACEOF
4585/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004586int main() { return 0; }
4587_ACEOF
4588rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004589if { (ac_try="$ac_link"
4590case "(($ac_try" in
4591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4592 *) ac_try_echo=$ac_try;;
4593esac
4594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4595 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004596 ac_status=$?
4597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4598 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004599 { (case "(($ac_try" in
4600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4601 *) ac_try_echo=$ac_try;;
4602esac
4603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4604 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004605 ac_status=$?
4606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607 (exit $ac_status); }; }; then
4608 ac_cv_no_strict_aliasing_ok=yes
4609else
4610 echo "$as_me: program exited with status $ac_status" >&5
4611echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004612sed 's/^/| /' conftest.$ac_ext >&5
4613
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004614( exit $ac_status )
4615ac_cv_no_strict_aliasing_ok=no
4616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004617rm -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 +00004618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004619
4620
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004621 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004622 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004624 if test $ac_cv_no_strict_aliasing_ok = yes
4625 then
4626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4627 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004628
4629 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4630 # support. Without this, treatment of subnormals doesn't follow
4631 # the standard.
4632 case $ac_sys_machine in
4633 alpha*)
4634 BASECFLAGS="$BASECFLAGS -mieee"
4635 ;;
4636 esac
4637
Skip Montanarodecc6a42003-01-01 20:07:49 +00004638 case $ac_sys_system in
4639 SCO_SV*)
4640 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4641 ;;
4642 # is there any other compiler on Darwin besides gcc?
4643 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004644 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4645 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004646 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004647 UNIVERSAL_ARCH_FLAGS=""
4648 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4649 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004650 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004651
4652 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4653 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4654
4655 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4656 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004657 ARCH_RUN_32BIT="arch -386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004658
4659 else
4660 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4661echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4662 { (exit 1); exit 1; }; }
4663
4664 fi
4665
4666
4667 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00004668 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004669 fi
4670
Skip Montanarodecc6a42003-01-01 20:07:49 +00004671 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004672 OSF*)
4673 BASECFLAGS="$BASECFLAGS -mieee"
4674 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004675 esac
4676 ;;
4677
4678*)
4679 case $ac_sys_system in
4680 OpenUNIX*|UnixWare*)
4681 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4682 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004683 OSF*)
4684 BASECFLAGS="$BASECFLAGS -ieee -std"
4685 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004686 SCO_SV*)
4687 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4688 ;;
4689 esac
4690 ;;
4691esac
4692
Fred Drakee1ceaa02001-12-04 20:55:47 +00004693if test "$Py_DEBUG" = 'true'; then
4694 :
4695else
4696 OPT="-DNDEBUG $OPT"
4697fi
4698
Guido van Rossum563e7081996-09-10 18:20:48 +00004699if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004700then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004701 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004702fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004703
Neal Norwitz020c46a2006-01-07 21:39:28 +00004704# disable check for icc since it seems to pass, but generates a warning
4705if test "$CC" = icc
4706then
4707 ac_cv_opt_olimit_ok=no
4708fi
4709
Martin v. Löwiseba40652007-08-30 20:10:57 +00004710{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4711echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004712if test "${ac_cv_opt_olimit_ok+set}" = set; then
4713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004714else
4715 ac_save_cc="$CC"
4716CC="$CC -OPT:Olimit=0"
4717if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004718 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004719else
Martin v. Löwis11437992002-04-12 09:54:03 +00004720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004721/* confdefs.h. */
4722_ACEOF
4723cat confdefs.h >>conftest.$ac_ext
4724cat >>conftest.$ac_ext <<_ACEOF
4725/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004726int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004727_ACEOF
4728rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004729if { (ac_try="$ac_link"
4730case "(($ac_try" in
4731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4732 *) ac_try_echo=$ac_try;;
4733esac
4734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4735 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004736 ac_status=$?
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004739 { (case "(($ac_try" in
4740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4741 *) ac_try_echo=$ac_try;;
4742esac
4743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4744 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004745 ac_status=$?
4746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4747 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004748 ac_cv_opt_olimit_ok=yes
4749else
Martin v. Löwis11437992002-04-12 09:54:03 +00004750 echo "$as_me: program exited with status $ac_status" >&5
4751echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004752sed 's/^/| /' conftest.$ac_ext >&5
4753
Martin v. Löwis11437992002-04-12 09:54:03 +00004754( exit $ac_status )
4755ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004757rm -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 +00004758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004759
4760
Guido van Rossum91922671997-10-09 20:24:13 +00004761CC="$ac_save_cc"
4762fi
4763
Martin v. Löwiseba40652007-08-30 20:10:57 +00004764{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4765echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004766if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004767 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004768 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4769 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4770 # environment?
4771 Darwin*)
4772 ;;
4773 *)
4774 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4775 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004776 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004777else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004778 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4779echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 if test "${ac_cv_olimit_ok+set}" = set; then
4781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004782else
4783 ac_save_cc="$CC"
4784 CC="$CC -Olimit 1500"
4785 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004786 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004787else
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004789/* confdefs.h. */
4790_ACEOF
4791cat confdefs.h >>conftest.$ac_ext
4792cat >>conftest.$ac_ext <<_ACEOF
4793/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004794int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004795_ACEOF
4796rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004797if { (ac_try="$ac_link"
4798case "(($ac_try" in
4799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800 *) ac_try_echo=$ac_try;;
4801esac
4802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4803 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 ac_status=$?
4805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004807 { (case "(($ac_try" in
4808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4809 *) ac_try_echo=$ac_try;;
4810esac
4811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4812 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004816 ac_cv_olimit_ok=yes
4817else
Martin v. Löwis11437992002-04-12 09:54:03 +00004818 echo "$as_me: program exited with status $ac_status" >&5
4819echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004820sed 's/^/| /' conftest.$ac_ext >&5
4821
Martin v. Löwis11437992002-04-12 09:54:03 +00004822( exit $ac_status )
4823ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004825rm -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 +00004826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004827
4828
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004829 CC="$ac_save_cc"
4830fi
4831
Martin v. Löwiseba40652007-08-30 20:10:57 +00004832 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4833echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004834 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004835 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004836 fi
4837fi
4838
Martin v. Löwisaac13162006-10-19 10:58:46 +00004839# Check whether GCC supports PyArg_ParseTuple format
4840if test "$GCC" = "yes"
4841then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4843echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004844 save_CFLAGS=$CFLAGS
4845 CFLAGS="$CFLAGS -Werror"
4846 cat >conftest.$ac_ext <<_ACEOF
4847/* confdefs.h. */
4848_ACEOF
4849cat confdefs.h >>conftest.$ac_ext
4850cat >>conftest.$ac_ext <<_ACEOF
4851/* end confdefs.h. */
4852
4853 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4854
4855int
4856main ()
4857{
4858
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004864if { (ac_try="$ac_compile"
4865case "(($ac_try" in
4866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4867 *) ac_try_echo=$ac_try;;
4868esac
4869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004871 ac_status=$?
4872 grep -v '^ *+' conftest.er1 >conftest.err
4873 rm -f conftest.er1
4874 cat conftest.err >&5
4875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004876 (exit $ac_status); } && {
4877 test -z "$ac_c_werror_flag" ||
4878 test ! -s conftest.err
4879 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004880
4881cat >>confdefs.h <<\_ACEOF
4882#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4883_ACEOF
4884
Martin v. Löwiseba40652007-08-30 20:10:57 +00004885 { echo "$as_me:$LINENO: result: yes" >&5
4886echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004887else
4888 echo "$as_me: failed program was:" >&5
4889sed 's/^/| /' conftest.$ac_ext >&5
4890
Martin v. Löwiseba40652007-08-30 20:10:57 +00004891 { echo "$as_me:$LINENO: result: no" >&5
4892echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004893
4894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004895
4896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004897 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004898fi
4899
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004900# On some compilers, pthreads are available without further options
4901# (e.g. MacOS X). On some of these systems, the compiler will not
4902# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4903# So we have to see first whether pthreads are available without
4904# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4906echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004907if test "${ac_cv_pthread_is_default+set}" = set; then
4908 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004909else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004910 if test "$cross_compiling" = yes; then
4911 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004912else
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004914/* confdefs.h. */
4915_ACEOF
4916cat confdefs.h >>conftest.$ac_ext
4917cat >>conftest.$ac_ext <<_ACEOF
4918/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004919
Martin v. Löwis130fb172001-07-19 11:00:41 +00004920#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004921
4922void* routine(void* p){return NULL;}
4923
4924int main(){
4925 pthread_t p;
4926 if(pthread_create(&p,NULL,routine,NULL)!=0)
4927 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004928 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004929 return 0;
4930}
4931
Martin v. Löwis11437992002-04-12 09:54:03 +00004932_ACEOF
4933rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004934if { (ac_try="$ac_link"
4935case "(($ac_try" in
4936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4937 *) ac_try_echo=$ac_try;;
4938esac
4939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4940 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 ac_status=$?
4942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004944 { (case "(($ac_try" in
4945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4946 *) ac_try_echo=$ac_try;;
4947esac
4948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4949 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 ac_status=$?
4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4952 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004953
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004954 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004955 ac_cv_kthread=no
4956 ac_cv_pthread=no
4957
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004958else
Martin v. Löwis11437992002-04-12 09:54:03 +00004959 echo "$as_me: program exited with status $ac_status" >&5
4960echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004961sed 's/^/| /' conftest.$ac_ext >&5
4962
Martin v. Löwis11437992002-04-12 09:54:03 +00004963( exit $ac_status )
4964ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966rm -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 +00004967fi
4968
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969
4970
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004971fi
4972
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4974echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004975
Michael W. Hudson54241132001-12-07 15:38:26 +00004976
Martin v. Löwis11437992002-04-12 09:54:03 +00004977if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004978then
4979 ac_cv_kpthread=no
4980else
4981# -Kpthread, if available, provides the right #defines
4982# and linker options to make pthread_create available
4983# Some compilers won't report that they do not support -Kpthread,
4984# so we need to run a program to see whether it really made the
4985# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004986{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4987echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004988if test "${ac_cv_kpthread+set}" = set; then
4989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004990else
4991 ac_save_cc="$CC"
4992CC="$CC -Kpthread"
4993if test "$cross_compiling" = yes; then
4994 ac_cv_kpthread=no
4995else
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004997/* confdefs.h. */
4998_ACEOF
4999cat confdefs.h >>conftest.$ac_ext
5000cat >>conftest.$ac_ext <<_ACEOF
5001/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005002
5003#include <pthread.h>
5004
5005void* routine(void* p){return NULL;}
5006
5007int main(){
5008 pthread_t p;
5009 if(pthread_create(&p,NULL,routine,NULL)!=0)
5010 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005011 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005012 return 0;
5013}
5014
Martin v. Löwis11437992002-04-12 09:54:03 +00005015_ACEOF
5016rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005017if { (ac_try="$ac_link"
5018case "(($ac_try" in
5019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5020 *) ac_try_echo=$ac_try;;
5021esac
5022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5023 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005024 ac_status=$?
5025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5026 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005027 { (case "(($ac_try" in
5028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5029 *) ac_try_echo=$ac_try;;
5030esac
5031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5032 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005033 ac_status=$?
5034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005036 ac_cv_kpthread=yes
5037else
Martin v. Löwis11437992002-04-12 09:54:03 +00005038 echo "$as_me: program exited with status $ac_status" >&5
5039echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005040sed 's/^/| /' conftest.$ac_ext >&5
5041
Martin v. Löwis11437992002-04-12 09:54:03 +00005042( exit $ac_status )
5043ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005045rm -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 +00005046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047
5048
Martin v. Löwis130fb172001-07-19 11:00:41 +00005049CC="$ac_save_cc"
5050fi
5051
Martin v. Löwiseba40652007-08-30 20:10:57 +00005052{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5053echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005054fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005055
Skip Montanarod8d39a02003-07-10 20:44:10 +00005056if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005057then
5058# -Kthread, if available, provides the right #defines
5059# and linker options to make pthread_create available
5060# Some compilers won't report that they do not support -Kthread,
5061# so we need to run a program to see whether it really made the
5062# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005063{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5064echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005065if test "${ac_cv_kthread+set}" = set; then
5066 echo $ECHO_N "(cached) $ECHO_C" >&6
5067else
5068 ac_save_cc="$CC"
5069CC="$CC -Kthread"
5070if test "$cross_compiling" = yes; then
5071 ac_cv_kthread=no
5072else
5073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005074/* confdefs.h. */
5075_ACEOF
5076cat confdefs.h >>conftest.$ac_ext
5077cat >>conftest.$ac_ext <<_ACEOF
5078/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005079
5080#include <pthread.h>
5081
5082void* routine(void* p){return NULL;}
5083
5084int main(){
5085 pthread_t p;
5086 if(pthread_create(&p,NULL,routine,NULL)!=0)
5087 return 1;
5088 (void)pthread_detach(p);
5089 return 0;
5090}
5091
5092_ACEOF
5093rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005094if { (ac_try="$ac_link"
5095case "(($ac_try" in
5096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5097 *) ac_try_echo=$ac_try;;
5098esac
5099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5100 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005104 { (case "(($ac_try" in
5105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5106 *) ac_try_echo=$ac_try;;
5107esac
5108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5109 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005110 ac_status=$?
5111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112 (exit $ac_status); }; }; then
5113 ac_cv_kthread=yes
5114else
5115 echo "$as_me: program exited with status $ac_status" >&5
5116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005117sed 's/^/| /' conftest.$ac_ext >&5
5118
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005119( exit $ac_status )
5120ac_cv_kthread=no
5121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005122rm -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 +00005123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005124
5125
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005126CC="$ac_save_cc"
5127fi
5128
Martin v. Löwiseba40652007-08-30 20:10:57 +00005129{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5130echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005131fi
5132
Skip Montanarod8d39a02003-07-10 20:44:10 +00005133if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005134then
5135# -pthread, if available, provides the right #defines
5136# and linker options to make pthread_create available
5137# Some compilers won't report that they do not support -pthread,
5138# so we need to run a program to see whether it really made the
5139# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005140{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5141echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005142if test "${ac_cv_thread+set}" = set; then
5143 echo $ECHO_N "(cached) $ECHO_C" >&6
5144else
5145 ac_save_cc="$CC"
5146CC="$CC -pthread"
5147if test "$cross_compiling" = yes; then
5148 ac_cv_pthread=no
5149else
5150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005151/* confdefs.h. */
5152_ACEOF
5153cat confdefs.h >>conftest.$ac_ext
5154cat >>conftest.$ac_ext <<_ACEOF
5155/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005156
5157#include <pthread.h>
5158
5159void* routine(void* p){return NULL;}
5160
5161int main(){
5162 pthread_t p;
5163 if(pthread_create(&p,NULL,routine,NULL)!=0)
5164 return 1;
5165 (void)pthread_detach(p);
5166 return 0;
5167}
5168
5169_ACEOF
5170rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005171if { (ac_try="$ac_link"
5172case "(($ac_try" in
5173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5174 *) ac_try_echo=$ac_try;;
5175esac
5176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5177 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005178 ac_status=$?
5179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005181 { (case "(($ac_try" in
5182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5183 *) ac_try_echo=$ac_try;;
5184esac
5185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5186 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005187 ac_status=$?
5188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189 (exit $ac_status); }; }; then
5190 ac_cv_pthread=yes
5191else
5192 echo "$as_me: program exited with status $ac_status" >&5
5193echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005194sed 's/^/| /' conftest.$ac_ext >&5
5195
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005196( exit $ac_status )
5197ac_cv_pthread=no
5198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005199rm -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 +00005200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005201
5202
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005203CC="$ac_save_cc"
5204fi
5205
Martin v. Löwiseba40652007-08-30 20:10:57 +00005206{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5207echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005208fi
5209
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005210# If we have set a CC compiler flag for thread support then
5211# check if it works for CXX, too.
5212ac_cv_cxx_thread=no
5213if test ! -z "$CXX"
5214then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005215{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5216echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005217ac_save_cxx="$CXX"
5218
5219if test "$ac_cv_kpthread" = "yes"
5220then
5221 CXX="$CXX -Kpthread"
5222 ac_cv_cxx_thread=yes
5223elif test "$ac_cv_kthread" = "yes"
5224then
5225 CXX="$CXX -Kthread"
5226 ac_cv_cxx_thread=yes
5227elif test "$ac_cv_pthread" = "yes"
5228then
5229 CXX="$CXX -pthread"
5230 ac_cv_cxx_thread=yes
5231fi
5232
5233if test $ac_cv_cxx_thread = yes
5234then
5235 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5236 $CXX -c conftest.$ac_ext 2>&5
5237 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5238 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5239 then
5240 ac_cv_cxx_thread=yes
5241 else
5242 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005243 fi
5244 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005246{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5247echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005248fi
5249CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005250
Michael W. Hudson54241132001-12-07 15:38:26 +00005251
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005252# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005253{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5254echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005255if test "${ac_cv_header_stdc+set}" = set; then
5256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005257else
Martin v. Löwis11437992002-04-12 09:54:03 +00005258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005259/* confdefs.h. */
5260_ACEOF
5261cat confdefs.h >>conftest.$ac_ext
5262cat >>conftest.$ac_ext <<_ACEOF
5263/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005264#include <stdlib.h>
5265#include <stdarg.h>
5266#include <string.h>
5267#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005268
Skip Montanaro6dead952003-09-25 14:50:04 +00005269int
5270main ()
5271{
5272
5273 ;
5274 return 0;
5275}
Martin v. Löwis11437992002-04-12 09:54:03 +00005276_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005277rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005278if { (ac_try="$ac_compile"
5279case "(($ac_try" in
5280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5281 *) ac_try_echo=$ac_try;;
5282esac
5283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005286 grep -v '^ *+' conftest.er1 >conftest.err
5287 rm -f conftest.er1
5288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005290 (exit $ac_status); } && {
5291 test -z "$ac_c_werror_flag" ||
5292 test ! -s conftest.err
5293 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294 ac_cv_header_stdc=yes
5295else
Martin v. Löwis11437992002-04-12 09:54:03 +00005296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005297sed 's/^/| /' conftest.$ac_ext >&5
5298
Martin v. Löwiseba40652007-08-30 20:10:57 +00005299 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005301
5302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303
5304if test $ac_cv_header_stdc = yes; then
5305 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005307/* confdefs.h. */
5308_ACEOF
5309cat confdefs.h >>conftest.$ac_ext
5310cat >>conftest.$ac_ext <<_ACEOF
5311/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005312#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005313
5314_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005316 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005317 :
5318else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319 ac_cv_header_stdc=no
5320fi
5321rm -f conftest*
5322
5323fi
5324
5325if test $ac_cv_header_stdc = yes; then
5326 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005328/* confdefs.h. */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005334
5335_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005337 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005338 :
5339else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005340 ac_cv_header_stdc=no
5341fi
5342rm -f conftest*
5343
5344fi
5345
5346if test $ac_cv_header_stdc = yes; then
5347 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005348 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005349 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005350else
Martin v. Löwis11437992002-04-12 09:54:03 +00005351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005352/* confdefs.h. */
5353_ACEOF
5354cat confdefs.h >>conftest.$ac_ext
5355cat >>conftest.$ac_ext <<_ACEOF
5356/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005357#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005358#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005359#if ((' ' & 0x0FF) == 0x020)
5360# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5361# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5362#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005363# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005364 (('a' <= (c) && (c) <= 'i') \
5365 || ('j' <= (c) && (c) <= 'r') \
5366 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005367# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5368#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005369
Martin v. Löwis11437992002-04-12 09:54:03 +00005370#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5371int
5372main ()
5373{
5374 int i;
5375 for (i = 0; i < 256; i++)
5376 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005377 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005378 return 2;
5379 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005380}
5381_ACEOF
5382rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005383if { (ac_try="$ac_link"
5384case "(($ac_try" in
5385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5386 *) ac_try_echo=$ac_try;;
5387esac
5388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5389 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005390 ac_status=$?
5391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5392 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005393 { (case "(($ac_try" in
5394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5395 *) ac_try_echo=$ac_try;;
5396esac
5397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5398 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005399 ac_status=$?
5400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5401 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005402 :
5403else
Martin v. Löwis11437992002-04-12 09:54:03 +00005404 echo "$as_me: program exited with status $ac_status" >&5
5405echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005406sed 's/^/| /' conftest.$ac_ext >&5
5407
Martin v. Löwis11437992002-04-12 09:54:03 +00005408( exit $ac_status )
5409ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5412fi
5413
5414
Michael W. Hudson54241132001-12-07 15:38:26 +00005415fi
5416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005417{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5418echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005419if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005420
5421cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005422#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005423_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005424
5425fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005426
Skip Montanarob9820a32004-01-17 00:16:12 +00005427# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005438 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005439do
5440as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005441{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5443if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005444 echo $ECHO_N "(cached) $ECHO_C" >&6
5445else
5446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
5452$ac_includes_default
5453
5454#include <$ac_header>
5455_ACEOF
5456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005457if { (ac_try="$ac_compile"
5458case "(($ac_try" in
5459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5460 *) ac_try_echo=$ac_try;;
5461esac
5462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5463 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005465 grep -v '^ *+' conftest.er1 >conftest.err
5466 rm -f conftest.er1
5467 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005469 (exit $ac_status); } && {
5470 test -z "$ac_c_werror_flag" ||
5471 test ! -s conftest.err
5472 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005473 eval "$as_ac_Header=yes"
5474else
5475 echo "$as_me: failed program was:" >&5
5476sed 's/^/| /' conftest.$ac_ext >&5
5477
Martin v. Löwiseba40652007-08-30 20:10:57 +00005478 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005480
5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005483ac_res=`eval echo '${'$as_ac_Header'}'`
5484 { echo "$as_me:$LINENO: result: $ac_res" >&5
5485echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005486if test `eval echo '${'$as_ac_Header'}'` = yes; then
5487 cat >>confdefs.h <<_ACEOF
5488#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5489_ACEOF
5490
5491fi
5492
5493done
5494
5495
Martin v. Löwis11437992002-04-12 09:54:03 +00005496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
Anthony Baxter8a560de2004-10-13 15:30:56 +00005532
Martin v. Löwisc3001752005-01-23 09:27:24 +00005533
Martin v. Löwis11017b12006-01-14 18:12:57 +00005534
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005535
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005536
5537
5538
5539
5540
5541
5542
5543
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005544
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005545
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005546
5547
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005548
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005549
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005550for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5551fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005552ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005553shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005554unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005555sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5556sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005557sys/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 +00005558sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005559sys/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 +00005560sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005561bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005562do
Martin v. Löwis11437992002-04-12 09:54:03 +00005563as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005564if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5565 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5566echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5567if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005568 echo $ECHO_N "(cached) $ECHO_C" >&6
5569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005570ac_res=`eval echo '${'$as_ac_Header'}'`
5571 { echo "$as_me:$LINENO: result: $ac_res" >&5
5572echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005573else
Martin v. Löwis11437992002-04-12 09:54:03 +00005574 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005575{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5576echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005578/* confdefs.h. */
5579_ACEOF
5580cat confdefs.h >>conftest.$ac_ext
5581cat >>conftest.$ac_ext <<_ACEOF
5582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005583$ac_includes_default
5584#include <$ac_header>
5585_ACEOF
5586rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005587if { (ac_try="$ac_compile"
5588case "(($ac_try" in
5589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5590 *) ac_try_echo=$ac_try;;
5591esac
5592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005595 grep -v '^ *+' conftest.er1 >conftest.err
5596 rm -f conftest.er1
5597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005599 (exit $ac_status); } && {
5600 test -z "$ac_c_werror_flag" ||
5601 test ! -s conftest.err
5602 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005603 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005604else
Martin v. Löwis11437992002-04-12 09:54:03 +00005605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005606sed 's/^/| /' conftest.$ac_ext >&5
5607
Martin v. Löwiseba40652007-08-30 20:10:57 +00005608 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005610
5611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5612{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5613echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005614
5615# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005616{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5617echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005619/* confdefs.h. */
5620_ACEOF
5621cat confdefs.h >>conftest.$ac_ext
5622cat >>conftest.$ac_ext <<_ACEOF
5623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005624#include <$ac_header>
5625_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005626if { (ac_try="$ac_cpp conftest.$ac_ext"
5627case "(($ac_try" in
5628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5629 *) ac_try_echo=$ac_try;;
5630esac
5631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005633 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005634 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 rm -f conftest.er1
5636 cat conftest.err >&5
5637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005638 (exit $ac_status); } >/dev/null && {
5639 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5640 test ! -s conftest.err
5641 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005642 ac_header_preproc=yes
5643else
5644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005645sed 's/^/| /' conftest.$ac_ext >&5
5646
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005649
Martin v. Löwis11437992002-04-12 09:54:03 +00005650rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5652echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653
5654# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005655case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5656 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5658echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005659 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5660echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5661 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005662 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005663 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005664 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5665echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005666 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5667echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5668 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5669echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5670 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5671echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005672 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5673echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005674 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5675echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005676 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005677## ------------------------------------------------ ##
5678## Report this to http://www.python.org/python-bugs ##
5679## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005680_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005681 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005683esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5685echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5686if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005687 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005688else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005689 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691ac_res=`eval echo '${'$as_ac_Header'}'`
5692 { echo "$as_me:$LINENO: result: $ac_res" >&5
5693echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005694
5695fi
5696if test `eval echo '${'$as_ac_Header'}'` = yes; then
5697 cat >>confdefs.h <<_ACEOF
5698#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5699_ACEOF
5700
5701fi
5702
Guido van Rossum627b2d71993-12-24 10:39:16 +00005703done
5704
Martin v. Löwis11437992002-04-12 09:54:03 +00005705
5706
5707
5708
5709
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005710ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005711for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5712 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005713{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5714echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5715if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005717else
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005719/* confdefs.h. */
5720_ACEOF
5721cat confdefs.h >>conftest.$ac_ext
5722cat >>conftest.$ac_ext <<_ACEOF
5723/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005724#include <sys/types.h>
5725#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005726
Martin v. Löwis11437992002-04-12 09:54:03 +00005727int
5728main ()
5729{
5730if ((DIR *) 0)
5731return 0;
5732 ;
5733 return 0;
5734}
5735_ACEOF
5736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005737if { (ac_try="$ac_compile"
5738case "(($ac_try" in
5739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5740 *) ac_try_echo=$ac_try;;
5741esac
5742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005745 grep -v '^ *+' conftest.er1 >conftest.err
5746 rm -f conftest.er1
5747 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749 (exit $ac_status); } && {
5750 test -z "$ac_c_werror_flag" ||
5751 test ! -s conftest.err
5752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005753 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005754else
Martin v. Löwis11437992002-04-12 09:54:03 +00005755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005756sed 's/^/| /' conftest.$ac_ext >&5
5757
Martin v. Löwiseba40652007-08-30 20:10:57 +00005758 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005759fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760
5761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005763ac_res=`eval echo '${'$as_ac_Header'}'`
5764 { echo "$as_me:$LINENO: result: $ac_res" >&5
5765echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005766if test `eval echo '${'$as_ac_Header'}'` = yes; then
5767 cat >>confdefs.h <<_ACEOF
5768#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5769_ACEOF
5770
5771ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005773
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005774done
5775# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5776if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005777 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5778echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005779if test "${ac_cv_search_opendir+set}" = set; then
5780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005781else
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005784/* confdefs.h. */
5785_ACEOF
5786cat confdefs.h >>conftest.$ac_ext
5787cat >>conftest.$ac_ext <<_ACEOF
5788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005789
Martin v. Löwiseba40652007-08-30 20:10:57 +00005790/* Override any GCC internal prototype to avoid an error.
5791 Use char because int might match the return type of a GCC
5792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005793#ifdef __cplusplus
5794extern "C"
5795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005796char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005797int
5798main ()
5799{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 ;
5802 return 0;
5803}
5804_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805for ac_lib in '' dir; do
5806 if test -z "$ac_lib"; then
5807 ac_res="none required"
5808 else
5809 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005810 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005811 fi
5812 rm -f conftest.$ac_objext conftest$ac_exeext
5813if { (ac_try="$ac_link"
5814case "(($ac_try" in
5815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5816 *) ac_try_echo=$ac_try;;
5817esac
5818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5819 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005820 ac_status=$?
5821 grep -v '^ *+' conftest.er1 >conftest.err
5822 rm -f conftest.er1
5823 cat conftest.err >&5
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005825 (exit $ac_status); } && {
5826 test -z "$ac_c_werror_flag" ||
5827 test ! -s conftest.err
5828 } && test -s conftest$ac_exeext &&
5829 $as_test_x conftest$ac_exeext; then
5830 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005831else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005832 echo "$as_me: failed program was:" >&5
5833sed 's/^/| /' conftest.$ac_ext >&5
5834
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835
Brett Cannon19fab762007-06-02 03:02:29 +00005836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837
5838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5839 conftest$ac_exeext
5840 if test "${ac_cv_search_opendir+set}" = set; then
5841 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005843done
5844if test "${ac_cv_search_opendir+set}" = set; then
5845 :
5846else
5847 ac_cv_search_opendir=no
5848fi
5849rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005850LIBS=$ac_func_search_save_LIBS
5851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5853echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5854ac_res=$ac_cv_search_opendir
5855if test "$ac_res" != no; then
5856 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005857
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005859
Michael W. Hudson54241132001-12-07 15:38:26 +00005860else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005861 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5862echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005863if test "${ac_cv_search_opendir+set}" = set; then
5864 echo $ECHO_N "(cached) $ECHO_C" >&6
5865else
5866 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005868/* confdefs.h. */
5869_ACEOF
5870cat confdefs.h >>conftest.$ac_ext
5871cat >>conftest.$ac_ext <<_ACEOF
5872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005873
Martin v. Löwiseba40652007-08-30 20:10:57 +00005874/* Override any GCC internal prototype to avoid an error.
5875 Use char because int might match the return type of a GCC
5876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005877#ifdef __cplusplus
5878extern "C"
5879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005880char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005881int
5882main ()
5883{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005884return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005885 ;
5886 return 0;
5887}
5888_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005889for ac_lib in '' x; do
5890 if test -z "$ac_lib"; then
5891 ac_res="none required"
5892 else
5893 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005894 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005895 fi
5896 rm -f conftest.$ac_objext conftest$ac_exeext
5897if { (ac_try="$ac_link"
5898case "(($ac_try" in
5899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5900 *) ac_try_echo=$ac_try;;
5901esac
5902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5903 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005904 ac_status=$?
5905 grep -v '^ *+' conftest.er1 >conftest.err
5906 rm -f conftest.er1
5907 cat conftest.err >&5
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909 (exit $ac_status); } && {
5910 test -z "$ac_c_werror_flag" ||
5911 test ! -s conftest.err
5912 } && test -s conftest$ac_exeext &&
5913 $as_test_x conftest$ac_exeext; then
5914 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005915else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005916 echo "$as_me: failed program was:" >&5
5917sed 's/^/| /' conftest.$ac_ext >&5
5918
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919
Brett Cannon19fab762007-06-02 03:02:29 +00005920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921
5922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5923 conftest$ac_exeext
5924 if test "${ac_cv_search_opendir+set}" = set; then
5925 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005927done
5928if test "${ac_cv_search_opendir+set}" = set; then
5929 :
5930else
5931 ac_cv_search_opendir=no
5932fi
5933rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005934LIBS=$ac_func_search_save_LIBS
5935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5937echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5938ac_res=$ac_cv_search_opendir
5939if test "$ac_res" != no; then
5940 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005941
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005942fi
5943
5944fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005945
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5947echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005948if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5949 echo $ECHO_N "(cached) $ECHO_C" >&6
5950else
5951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005952/* confdefs.h. */
5953_ACEOF
5954cat confdefs.h >>conftest.$ac_ext
5955cat >>conftest.$ac_ext <<_ACEOF
5956/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005957#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005958int
5959main ()
5960{
5961return makedev(0, 0);
5962 ;
5963 return 0;
5964}
5965_ACEOF
5966rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005967if { (ac_try="$ac_link"
5968case "(($ac_try" in
5969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5970 *) ac_try_echo=$ac_try;;
5971esac
5972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5973 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005975 grep -v '^ *+' conftest.er1 >conftest.err
5976 rm -f conftest.er1
5977 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979 (exit $ac_status); } && {
5980 test -z "$ac_c_werror_flag" ||
5981 test ! -s conftest.err
5982 } && test -s conftest$ac_exeext &&
5983 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984 ac_cv_header_sys_types_h_makedev=yes
5985else
5986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005987sed 's/^/| /' conftest.$ac_ext >&5
5988
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991
5992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994
5995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005996{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5997echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005998
5999if test $ac_cv_header_sys_types_h_makedev = no; then
6000if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006001 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6002echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6004 echo $ECHO_N "(cached) $ECHO_C" >&6
6005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006006{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6007echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006008else
6009 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006010{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6011echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006013/* confdefs.h. */
6014_ACEOF
6015cat confdefs.h >>conftest.$ac_ext
6016cat >>conftest.$ac_ext <<_ACEOF
6017/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018$ac_includes_default
6019#include <sys/mkdev.h>
6020_ACEOF
6021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022if { (ac_try="$ac_compile"
6023case "(($ac_try" in
6024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6025 *) ac_try_echo=$ac_try;;
6026esac
6027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006030 grep -v '^ *+' conftest.er1 >conftest.err
6031 rm -f conftest.er1
6032 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034 (exit $ac_status); } && {
6035 test -z "$ac_c_werror_flag" ||
6036 test ! -s conftest.err
6037 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038 ac_header_compiler=yes
6039else
6040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006041sed 's/^/| /' conftest.$ac_ext >&5
6042
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045
6046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6047{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6048echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049
6050# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006051{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6052echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006054/* confdefs.h. */
6055_ACEOF
6056cat confdefs.h >>conftest.$ac_ext
6057cat >>conftest.$ac_ext <<_ACEOF
6058/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059#include <sys/mkdev.h>
6060_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061if { (ac_try="$ac_cpp conftest.$ac_ext"
6062case "(($ac_try" in
6063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6064 *) ac_try_echo=$ac_try;;
6065esac
6066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6067 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006069 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 rm -f conftest.er1
6071 cat conftest.err >&5
6072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073 (exit $ac_status); } >/dev/null && {
6074 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6075 test ! -s conftest.err
6076 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006077 ac_header_preproc=yes
6078else
6079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006080sed 's/^/| /' conftest.$ac_ext >&5
6081
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082 ac_header_preproc=no
6083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006084
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6087echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006090case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6091 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6093echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006094 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6095echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6096 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006097 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006098 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006099 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6100echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006101 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6102echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6103 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6104echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6105 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6106echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006107 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6108echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6110echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006111 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006112## ------------------------------------------------ ##
6113## Report this to http://www.python.org/python-bugs ##
6114## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006115_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006117 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006118esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6120echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6122 echo $ECHO_N "(cached) $ECHO_C" >&6
6123else
6124 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6127echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128
6129fi
6130if test $ac_cv_header_sys_mkdev_h = yes; then
6131
6132cat >>confdefs.h <<\_ACEOF
6133#define MAJOR_IN_MKDEV 1
6134_ACEOF
6135
6136fi
6137
6138
6139
6140 if test $ac_cv_header_sys_mkdev_h = no; then
6141 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006142 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6143echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6145 echo $ECHO_N "(cached) $ECHO_C" >&6
6146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006147{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6148echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149else
6150 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6152echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006154/* confdefs.h. */
6155_ACEOF
6156cat confdefs.h >>conftest.$ac_ext
6157cat >>conftest.$ac_ext <<_ACEOF
6158/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159$ac_includes_default
6160#include <sys/sysmacros.h>
6161_ACEOF
6162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163if { (ac_try="$ac_compile"
6164case "(($ac_try" in
6165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6166 *) ac_try_echo=$ac_try;;
6167esac
6168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006171 grep -v '^ *+' conftest.er1 >conftest.err
6172 rm -f conftest.er1
6173 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006175 (exit $ac_status); } && {
6176 test -z "$ac_c_werror_flag" ||
6177 test ! -s conftest.err
6178 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179 ac_header_compiler=yes
6180else
6181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006182sed 's/^/| /' conftest.$ac_ext >&5
6183
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006186
6187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6188{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6189echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190
6191# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6193echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006195/* confdefs.h. */
6196_ACEOF
6197cat confdefs.h >>conftest.$ac_ext
6198cat >>conftest.$ac_ext <<_ACEOF
6199/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006200#include <sys/sysmacros.h>
6201_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202if { (ac_try="$ac_cpp conftest.$ac_ext"
6203case "(($ac_try" in
6204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6205 *) ac_try_echo=$ac_try;;
6206esac
6207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6208 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006210 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 rm -f conftest.er1
6212 cat conftest.err >&5
6213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006214 (exit $ac_status); } >/dev/null && {
6215 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6216 test ! -s conftest.err
6217 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218 ac_header_preproc=yes
6219else
6220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006221sed 's/^/| /' conftest.$ac_ext >&5
6222
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223 ac_header_preproc=no
6224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6228echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229
6230# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006231case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6232 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6234echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006235 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6236echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6237 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006238 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006239 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006240 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6241echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006242 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6243echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6244 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6245echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6246 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6247echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006248 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6249echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6251echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006252 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006253## ------------------------------------------------ ##
6254## Report this to http://www.python.org/python-bugs ##
6255## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006256_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006257 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006258 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006259esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6261echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6263 echo $ECHO_N "(cached) $ECHO_C" >&6
6264else
6265 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6268echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269
6270fi
6271if test $ac_cv_header_sys_sysmacros_h = yes; then
6272
6273cat >>confdefs.h <<\_ACEOF
6274#define MAJOR_IN_SYSMACROS 1
6275_ACEOF
6276
6277fi
6278
6279
6280 fi
6281fi
6282
Michael W. Hudson54241132001-12-07 15:38:26 +00006283
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006284# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006285
6286for ac_header in term.h
6287do
6288as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6290echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6291if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006292 echo $ECHO_N "(cached) $ECHO_C" >&6
6293else
6294 cat >conftest.$ac_ext <<_ACEOF
6295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006300
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006301#ifdef HAVE_CURSES_H
6302#include <curses.h>
6303#endif
6304
6305
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006306#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006307_ACEOF
6308rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006309if { (ac_try="$ac_compile"
6310case "(($ac_try" in
6311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6312 *) ac_try_echo=$ac_try;;
6313esac
6314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006316 ac_status=$?
6317 grep -v '^ *+' conftest.er1 >conftest.err
6318 rm -f conftest.er1
6319 cat conftest.err >&5
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321 (exit $ac_status); } && {
6322 test -z "$ac_c_werror_flag" ||
6323 test ! -s conftest.err
6324 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006325 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006326else
6327 echo "$as_me: failed program was:" >&5
6328sed 's/^/| /' conftest.$ac_ext >&5
6329
Martin v. Löwiseba40652007-08-30 20:10:57 +00006330 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006332
6333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335ac_res=`eval echo '${'$as_ac_Header'}'`
6336 { echo "$as_me:$LINENO: result: $ac_res" >&5
6337echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006338if test `eval echo '${'$as_ac_Header'}'` = yes; then
6339 cat >>confdefs.h <<_ACEOF
6340#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6341_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006342
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006343fi
6344
6345done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346
6347
Martin v. Löwis11017b12006-01-14 18:12:57 +00006348# On Linux, netlink.h requires asm/types.h
6349
6350for ac_header in linux/netlink.h
6351do
6352as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006353{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6355if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006356 echo $ECHO_N "(cached) $ECHO_C" >&6
6357else
6358 cat >conftest.$ac_ext <<_ACEOF
6359/* confdefs.h. */
6360_ACEOF
6361cat confdefs.h >>conftest.$ac_ext
6362cat >>conftest.$ac_ext <<_ACEOF
6363/* end confdefs.h. */
6364
6365#ifdef HAVE_ASM_TYPES_H
6366#include <asm/types.h>
6367#endif
6368#ifdef HAVE_SYS_SOCKET_H
6369#include <sys/socket.h>
6370#endif
6371
6372
6373#include <$ac_header>
6374_ACEOF
6375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006376if { (ac_try="$ac_compile"
6377case "(($ac_try" in
6378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6379 *) ac_try_echo=$ac_try;;
6380esac
6381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006383 ac_status=$?
6384 grep -v '^ *+' conftest.er1 >conftest.err
6385 rm -f conftest.er1
6386 cat conftest.err >&5
6387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006388 (exit $ac_status); } && {
6389 test -z "$ac_c_werror_flag" ||
6390 test ! -s conftest.err
6391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006392 eval "$as_ac_Header=yes"
6393else
6394 echo "$as_me: failed program was:" >&5
6395sed 's/^/| /' conftest.$ac_ext >&5
6396
Martin v. Löwiseba40652007-08-30 20:10:57 +00006397 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399
6400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006402ac_res=`eval echo '${'$as_ac_Header'}'`
6403 { echo "$as_me:$LINENO: result: $ac_res" >&5
6404echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006405if test `eval echo '${'$as_ac_Header'}'` = yes; then
6406 cat >>confdefs.h <<_ACEOF
6407#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6408_ACEOF
6409
6410fi
6411
6412done
6413
6414
Guido van Rossum627b2d71993-12-24 10:39:16 +00006415# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006416was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006417{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6418echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006420/* confdefs.h. */
6421_ACEOF
6422cat confdefs.h >>conftest.$ac_ext
6423cat >>conftest.$ac_ext <<_ACEOF
6424/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006425#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006426
6427_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006429 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006430 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431else
Martin v. Löwis11437992002-04-12 09:54:03 +00006432
6433
6434cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006436_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006437
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006438
Guido van Rossum627b2d71993-12-24 10:39:16 +00006439fi
6440rm -f conftest*
6441
Martin v. Löwiseba40652007-08-30 20:10:57 +00006442{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6443echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006444
Neal Norwitz11690112002-07-30 01:08:28 +00006445# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006446{ echo "$as_me:$LINENO: checking for makedev" >&5
6447echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006454#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006455int
6456main ()
6457{
6458 makedev(0, 0)
6459 ;
6460 return 0;
6461}
6462_ACEOF
6463rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006464if { (ac_try="$ac_link"
6465case "(($ac_try" in
6466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6467 *) ac_try_echo=$ac_try;;
6468esac
6469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6470 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006472 grep -v '^ *+' conftest.er1 >conftest.err
6473 rm -f conftest.er1
6474 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006476 (exit $ac_status); } && {
6477 test -z "$ac_c_werror_flag" ||
6478 test ! -s conftest.err
6479 } && test -s conftest$ac_exeext &&
6480 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006481 ac_cv_has_makedev=yes
6482else
6483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006484sed 's/^/| /' conftest.$ac_ext >&5
6485
Martin v. Löwiseba40652007-08-30 20:10:57 +00006486 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006488
6489rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006490 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006491if test "$ac_cv_has_makedev" = "no"; then
6492 # we didn't link, try if _OSF_SOURCE will allow us to link
6493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006494/* confdefs.h. */
6495_ACEOF
6496cat confdefs.h >>conftest.$ac_ext
6497cat >>conftest.$ac_ext <<_ACEOF
6498/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006499
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006500#define _OSF_SOURCE 1
6501#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006502
Neal Norwitz11690112002-07-30 01:08:28 +00006503int
6504main ()
6505{
6506 makedev(0, 0)
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512if { (ac_try="$ac_link"
6513case "(($ac_try" in
6514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6515 *) ac_try_echo=$ac_try;;
6516esac
6517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6518 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006520 grep -v '^ *+' conftest.er1 >conftest.err
6521 rm -f conftest.er1
6522 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524 (exit $ac_status); } && {
6525 test -z "$ac_c_werror_flag" ||
6526 test ! -s conftest.err
6527 } && test -s conftest$ac_exeext &&
6528 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006529 ac_cv_has_makedev=yes
6530else
6531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006532sed 's/^/| /' conftest.$ac_ext >&5
6533
Martin v. Löwiseba40652007-08-30 20:10:57 +00006534 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006536
6537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006538 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006539 if test "$ac_cv_has_makedev" = "yes"; then
6540
6541cat >>confdefs.h <<\_ACEOF
6542#define _OSF_SOURCE 1
6543_ACEOF
6544
6545 fi
6546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006547{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6548echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006549if test "$ac_cv_has_makedev" = "yes"; then
6550
6551cat >>confdefs.h <<\_ACEOF
6552#define HAVE_MAKEDEV 1
6553_ACEOF
6554
6555fi
6556
Martin v. Löwis399a6892002-10-04 10:22:02 +00006557# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6558# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6559# defined, but the compiler does not support pragma redefine_extname,
6560# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6561# structures (such as rlimit64) without declaring them. As a
6562# work-around, disable LFS on such configurations
6563
6564use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006565{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6566echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006568/* confdefs.h. */
6569_ACEOF
6570cat confdefs.h >>conftest.$ac_ext
6571cat >>conftest.$ac_ext <<_ACEOF
6572/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006573
6574#define _LARGEFILE_SOURCE 1
6575#define _FILE_OFFSET_BITS 64
6576#include <sys/resource.h>
6577
Martin v. Löwis399a6892002-10-04 10:22:02 +00006578int
6579main ()
6580{
6581struct rlimit foo;
6582 ;
6583 return 0;
6584}
6585_ACEOF
6586rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587if { (ac_try="$ac_compile"
6588case "(($ac_try" in
6589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6590 *) ac_try_echo=$ac_try;;
6591esac
6592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006595 grep -v '^ *+' conftest.er1 >conftest.err
6596 rm -f conftest.er1
6597 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006599 (exit $ac_status); } && {
6600 test -z "$ac_c_werror_flag" ||
6601 test ! -s conftest.err
6602 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603 sol_lfs_bug=no
6604else
6605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006606sed 's/^/| /' conftest.$ac_ext >&5
6607
Martin v. Löwiseba40652007-08-30 20:10:57 +00006608 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006610
6611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6612{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6613echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006614if test "$sol_lfs_bug" = "yes"; then
6615 use_lfs=no
6616fi
6617
6618if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006619# Two defines needed to enable largefile support on various platforms
6620# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006621
Martin v. Löwis11437992002-04-12 09:54:03 +00006622cat >>confdefs.h <<\_ACEOF
6623#define _LARGEFILE_SOURCE 1
6624_ACEOF
6625
6626
6627cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006628#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006629_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006630
Martin v. Löwis399a6892002-10-04 10:22:02 +00006631fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006632
Guido van Rossum84e7b241996-08-19 21:59:00 +00006633# Add some code to confdefs.h so that the test for off_t works on SCO
6634cat >> confdefs.h <<\EOF
6635#if defined(SCO_DS)
6636#undef _OFF_T
6637#endif
6638EOF
6639
Guido van Rossumef2255b2000-03-10 22:30:29 +00006640# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641{ echo "$as_me:$LINENO: checking for mode_t" >&5
6642echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006643if test "${ac_cv_type_mode_t+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006645else
Martin v. Löwis11437992002-04-12 09:54:03 +00006646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006647/* confdefs.h. */
6648_ACEOF
6649cat confdefs.h >>conftest.$ac_ext
6650cat >>conftest.$ac_ext <<_ACEOF
6651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006654int
6655main ()
6656{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006657if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006658 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006659if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006660 return 0;
6661 ;
6662 return 0;
6663}
6664_ACEOF
6665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666if { (ac_try="$ac_compile"
6667case "(($ac_try" in
6668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6669 *) ac_try_echo=$ac_try;;
6670esac
6671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 grep -v '^ *+' conftest.er1 >conftest.err
6675 rm -f conftest.er1
6676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678 (exit $ac_status); } && {
6679 test -z "$ac_c_werror_flag" ||
6680 test ! -s conftest.err
6681 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006682 ac_cv_type_mode_t=yes
6683else
Martin v. Löwis11437992002-04-12 09:54:03 +00006684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006685sed 's/^/| /' conftest.$ac_ext >&5
6686
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689
6690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6693echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006694if test $ac_cv_type_mode_t = yes; then
6695 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006696else
Martin v. Löwis11437992002-04-12 09:54:03 +00006697
6698cat >>confdefs.h <<_ACEOF
6699#define mode_t int
6700_ACEOF
6701
6702fi
6703
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704{ echo "$as_me:$LINENO: checking for off_t" >&5
6705echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006706if test "${ac_cv_type_off_t+set}" = set; then
6707 echo $ECHO_N "(cached) $ECHO_C" >&6
6708else
6709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006710/* confdefs.h. */
6711_ACEOF
6712cat confdefs.h >>conftest.$ac_ext
6713cat >>conftest.$ac_ext <<_ACEOF
6714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006715$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006717int
6718main ()
6719{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006721 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006723 return 0;
6724 ;
6725 return 0;
6726}
6727_ACEOF
6728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729if { (ac_try="$ac_compile"
6730case "(($ac_try" in
6731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6732 *) ac_try_echo=$ac_try;;
6733esac
6734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006737 grep -v '^ *+' conftest.er1 >conftest.err
6738 rm -f conftest.er1
6739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741 (exit $ac_status); } && {
6742 test -z "$ac_c_werror_flag" ||
6743 test ! -s conftest.err
6744 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006745 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006746else
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006748sed 's/^/| /' conftest.$ac_ext >&5
6749
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752
6753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6756echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006757if test $ac_cv_type_off_t = yes; then
6758 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006759else
Martin v. Löwis11437992002-04-12 09:54:03 +00006760
6761cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006763_ACEOF
6764
6765fi
6766
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767{ echo "$as_me:$LINENO: checking for pid_t" >&5
6768echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006769if test "${ac_cv_type_pid_t+set}" = set; then
6770 echo $ECHO_N "(cached) $ECHO_C" >&6
6771else
6772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006773/* confdefs.h. */
6774_ACEOF
6775cat confdefs.h >>conftest.$ac_ext
6776cat >>conftest.$ac_ext <<_ACEOF
6777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006778$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006780int
6781main ()
6782{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006784 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 return 0;
6787 ;
6788 return 0;
6789}
6790_ACEOF
6791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792if { (ac_try="$ac_compile"
6793case "(($ac_try" in
6794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795 *) ac_try_echo=$ac_try;;
6796esac
6797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006800 grep -v '^ *+' conftest.er1 >conftest.err
6801 rm -f conftest.er1
6802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804 (exit $ac_status); } && {
6805 test -z "$ac_c_werror_flag" ||
6806 test ! -s conftest.err
6807 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006808 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006809else
Martin v. Löwis11437992002-04-12 09:54:03 +00006810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006811sed 's/^/| /' conftest.$ac_ext >&5
6812
Martin v. Löwiseba40652007-08-30 20:10:57 +00006813 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815
6816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6819echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006820if test $ac_cv_type_pid_t = yes; then
6821 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006822else
Martin v. Löwis11437992002-04-12 09:54:03 +00006823
6824cat >>confdefs.h <<_ACEOF
6825#define pid_t int
6826_ACEOF
6827
6828fi
6829
Martin v. Löwiseba40652007-08-30 20:10:57 +00006830{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6831echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006832if test "${ac_cv_type_signal+set}" = set; then
6833 echo $ECHO_N "(cached) $ECHO_C" >&6
6834else
6835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006836/* confdefs.h. */
6837_ACEOF
6838cat confdefs.h >>conftest.$ac_ext
6839cat >>conftest.$ac_ext <<_ACEOF
6840/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841#include <sys/types.h>
6842#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844int
6845main ()
6846{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 ;
6849 return 0;
6850}
6851_ACEOF
6852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006853if { (ac_try="$ac_compile"
6854case "(($ac_try" in
6855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6856 *) ac_try_echo=$ac_try;;
6857esac
6858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006861 grep -v '^ *+' conftest.er1 >conftest.err
6862 rm -f conftest.er1
6863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865 (exit $ac_status); } && {
6866 test -z "$ac_c_werror_flag" ||
6867 test ! -s conftest.err
6868 } && test -s conftest.$ac_objext; then
6869 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006870else
Martin v. Löwis11437992002-04-12 09:54:03 +00006871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006872sed 's/^/| /' conftest.$ac_ext >&5
6873
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006876
6877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006879{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6880echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006883#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006884_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006885
Michael W. Hudson54241132001-12-07 15:38:26 +00006886
Martin v. Löwiseba40652007-08-30 20:10:57 +00006887{ echo "$as_me:$LINENO: checking for size_t" >&5
6888echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006889if test "${ac_cv_type_size_t+set}" = set; then
6890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006891else
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006893/* confdefs.h. */
6894_ACEOF
6895cat confdefs.h >>conftest.$ac_ext
6896cat >>conftest.$ac_ext <<_ACEOF
6897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006900int
6901main ()
6902{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006903if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006904 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 return 0;
6907 ;
6908 return 0;
6909}
6910_ACEOF
6911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006912if { (ac_try="$ac_compile"
6913case "(($ac_try" in
6914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6915 *) ac_try_echo=$ac_try;;
6916esac
6917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006920 grep -v '^ *+' conftest.er1 >conftest.err
6921 rm -f conftest.er1
6922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924 (exit $ac_status); } && {
6925 test -z "$ac_c_werror_flag" ||
6926 test ! -s conftest.err
6927 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006928 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006929else
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006931sed 's/^/| /' conftest.$ac_ext >&5
6932
Martin v. Löwiseba40652007-08-30 20:10:57 +00006933 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935
6936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6939echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006940if test $ac_cv_type_size_t = yes; then
6941 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006942else
Martin v. Löwis11437992002-04-12 09:54:03 +00006943
6944cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006946_ACEOF
6947
6948fi
6949
Martin v. Löwiseba40652007-08-30 20:10:57 +00006950{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6951echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006952if test "${ac_cv_type_uid_t+set}" = set; then
6953 echo $ECHO_N "(cached) $ECHO_C" >&6
6954else
6955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006956/* confdefs.h. */
6957_ACEOF
6958cat confdefs.h >>conftest.$ac_ext
6959cat >>conftest.$ac_ext <<_ACEOF
6960/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006961#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
6963_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006965 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006966 ac_cv_type_uid_t=yes
6967else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968 ac_cv_type_uid_t=no
6969fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006970rm -f conftest*
6971
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6974echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006975if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006976
Martin v. Löwis11437992002-04-12 09:54:03 +00006977cat >>confdefs.h <<\_ACEOF
6978#define uid_t int
6979_ACEOF
6980
6981
6982cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985
6986fi
6987
Martin v. Löwiseba40652007-08-30 20:10:57 +00006988{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6989echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006990if test "${ac_cv_type_ssize_t+set}" = set; then
6991 echo $ECHO_N "(cached) $ECHO_C" >&6
6992else
6993 cat >conftest.$ac_ext <<_ACEOF
6994/* confdefs.h. */
6995_ACEOF
6996cat confdefs.h >>conftest.$ac_ext
6997cat >>conftest.$ac_ext <<_ACEOF
6998/* end confdefs.h. */
6999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007001int
7002main ()
7003{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007004if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007005 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007006if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007007 return 0;
7008 ;
7009 return 0;
7010}
7011_ACEOF
7012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013if { (ac_try="$ac_compile"
7014case "(($ac_try" in
7015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7016 *) ac_try_echo=$ac_try;;
7017esac
7018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007020 ac_status=$?
7021 grep -v '^ *+' conftest.er1 >conftest.err
7022 rm -f conftest.er1
7023 cat conftest.err >&5
7024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025 (exit $ac_status); } && {
7026 test -z "$ac_c_werror_flag" ||
7027 test ! -s conftest.err
7028 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007029 ac_cv_type_ssize_t=yes
7030else
7031 echo "$as_me: failed program was:" >&5
7032sed 's/^/| /' conftest.$ac_ext >&5
7033
Martin v. Löwiseba40652007-08-30 20:10:57 +00007034 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036
7037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7040echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007041if test $ac_cv_type_ssize_t = yes; then
7042
7043cat >>confdefs.h <<\_ACEOF
7044#define HAVE_SSIZE_T 1
7045_ACEOF
7046
7047fi
7048
Jack Jansendd19cf82001-12-06 22:36:17 +00007049
Michael W. Hudson54241132001-12-07 15:38:26 +00007050# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007051# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052{ echo "$as_me:$LINENO: checking for int" >&5
7053echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007054if test "${ac_cv_type_int+set}" = set; then
7055 echo $ECHO_N "(cached) $ECHO_C" >&6
7056else
7057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007058/* confdefs.h. */
7059_ACEOF
7060cat confdefs.h >>conftest.$ac_ext
7061cat >>conftest.$ac_ext <<_ACEOF
7062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007063$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007064typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007065int
7066main ()
7067{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007068if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007070if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007071 return 0;
7072 ;
7073 return 0;
7074}
7075_ACEOF
7076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007077if { (ac_try="$ac_compile"
7078case "(($ac_try" in
7079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7080 *) ac_try_echo=$ac_try;;
7081esac
7082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007085 grep -v '^ *+' conftest.er1 >conftest.err
7086 rm -f conftest.er1
7087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089 (exit $ac_status); } && {
7090 test -z "$ac_c_werror_flag" ||
7091 test ! -s conftest.err
7092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 ac_cv_type_int=yes
7094else
7095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007096sed 's/^/| /' conftest.$ac_ext >&5
7097
Martin v. Löwiseba40652007-08-30 20:10:57 +00007098 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007099fi
Brett Cannon19fab762007-06-02 03:02:29 +00007100
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102fi
7103{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7104echo "${ECHO_T}$ac_cv_type_int" >&6; }
7105
7106# The cast to long int works around a bug in the HP C Compiler
7107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7109# This bug is HP SR number 8606223364.
7110{ echo "$as_me:$LINENO: checking size of int" >&5
7111echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007112if test "${ac_cv_sizeof_int+set}" = set; then
7113 echo $ECHO_N "(cached) $ECHO_C" >&6
7114else
Martin v. Löwis11437992002-04-12 09:54:03 +00007115 if test "$cross_compiling" = yes; then
7116 # Depending upon the size, compute the lo and hi bounds.
7117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007118/* confdefs.h. */
7119_ACEOF
7120cat confdefs.h >>conftest.$ac_ext
7121cat >>conftest.$ac_ext <<_ACEOF
7122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007123$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007125int
7126main ()
7127{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007128static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007129test_array [0] = 0
7130
7131 ;
7132 return 0;
7133}
7134_ACEOF
7135rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136if { (ac_try="$ac_compile"
7137case "(($ac_try" in
7138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7139 *) ac_try_echo=$ac_try;;
7140esac
7141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007144 grep -v '^ *+' conftest.er1 >conftest.err
7145 rm -f conftest.er1
7146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007148 (exit $ac_status); } && {
7149 test -z "$ac_c_werror_flag" ||
7150 test ! -s conftest.err
7151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 ac_lo=0 ac_mid=0
7153 while :; do
7154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007160$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007161 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007162int
7163main ()
7164{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007165static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007166test_array [0] = 0
7167
7168 ;
7169 return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173if { (ac_try="$ac_compile"
7174case "(($ac_try" in
7175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7176 *) ac_try_echo=$ac_try;;
7177esac
7178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007181 grep -v '^ *+' conftest.er1 >conftest.err
7182 rm -f conftest.er1
7183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185 (exit $ac_status); } && {
7186 test -z "$ac_c_werror_flag" ||
7187 test ! -s conftest.err
7188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007189 ac_hi=$ac_mid; break
7190else
7191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007192sed 's/^/| /' conftest.$ac_ext >&5
7193
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194 ac_lo=`expr $ac_mid + 1`
7195 if test $ac_lo -le $ac_mid; then
7196 ac_lo= ac_hi=
7197 break
7198 fi
7199 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007201
7202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007203 done
7204else
7205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007206sed 's/^/| /' conftest.$ac_ext >&5
7207
Martin v. Löwiseba40652007-08-30 20:10:57 +00007208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007209/* confdefs.h. */
7210_ACEOF
7211cat confdefs.h >>conftest.$ac_ext
7212cat >>conftest.$ac_ext <<_ACEOF
7213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007214$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007215 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007216int
7217main ()
7218{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007220test_array [0] = 0
7221
7222 ;
7223 return 0;
7224}
7225_ACEOF
7226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227if { (ac_try="$ac_compile"
7228case "(($ac_try" in
7229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7230 *) ac_try_echo=$ac_try;;
7231esac
7232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007235 grep -v '^ *+' conftest.er1 >conftest.err
7236 rm -f conftest.er1
7237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007239 (exit $ac_status); } && {
7240 test -z "$ac_c_werror_flag" ||
7241 test ! -s conftest.err
7242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007243 ac_hi=-1 ac_mid=-1
7244 while :; do
7245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007246/* confdefs.h. */
7247_ACEOF
7248cat confdefs.h >>conftest.$ac_ext
7249cat >>conftest.$ac_ext <<_ACEOF
7250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007251$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007252 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007253int
7254main ()
7255{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007257test_array [0] = 0
7258
7259 ;
7260 return 0;
7261}
7262_ACEOF
7263rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264if { (ac_try="$ac_compile"
7265case "(($ac_try" in
7266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7267 *) ac_try_echo=$ac_try;;
7268esac
7269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007272 grep -v '^ *+' conftest.er1 >conftest.err
7273 rm -f conftest.er1
7274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007276 (exit $ac_status); } && {
7277 test -z "$ac_c_werror_flag" ||
7278 test ! -s conftest.err
7279 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007280 ac_lo=$ac_mid; break
7281else
7282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007283sed 's/^/| /' conftest.$ac_ext >&5
7284
Martin v. Löwiseba40652007-08-30 20:10:57 +00007285 ac_hi=`expr '(' $ac_mid ')' - 1`
7286 if test $ac_mid -le $ac_hi; then
7287 ac_lo= ac_hi=
7288 break
7289 fi
7290 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007292
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007294 done
7295else
7296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007297sed 's/^/| /' conftest.$ac_ext >&5
7298
Martin v. Löwiseba40652007-08-30 20:10:57 +00007299 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301
7302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007304
7305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007306# Binary search between lo and hi bounds.
7307while test "x$ac_lo" != "x$ac_hi"; do
7308 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007310/* confdefs.h. */
7311_ACEOF
7312cat confdefs.h >>conftest.$ac_ext
7313cat >>conftest.$ac_ext <<_ACEOF
7314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007315$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007316 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007317int
7318main ()
7319{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007321test_array [0] = 0
7322
7323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328if { (ac_try="$ac_compile"
7329case "(($ac_try" in
7330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7331 *) ac_try_echo=$ac_try;;
7332esac
7333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007336 grep -v '^ *+' conftest.er1 >conftest.err
7337 rm -f conftest.er1
7338 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007340 (exit $ac_status); } && {
7341 test -z "$ac_c_werror_flag" ||
7342 test ! -s conftest.err
7343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 ac_hi=$ac_mid
7345else
7346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007347sed 's/^/| /' conftest.$ac_ext >&5
7348
Martin v. Löwiseba40652007-08-30 20:10:57 +00007349 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007351
7352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007353done
7354case $ac_lo in
7355?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007356'') if test "$ac_cv_type_int" = yes; then
7357 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007358See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007359echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007360See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007361 { (exit 77); exit 77; }; }
7362 else
7363 ac_cv_sizeof_int=0
7364 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007365esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007366else
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007368/* confdefs.h. */
7369_ACEOF
7370cat confdefs.h >>conftest.$ac_ext
7371cat >>conftest.$ac_ext <<_ACEOF
7372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007373$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007374 typedef int ac__type_sizeof_;
7375static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7376static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007377#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007378#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007379int
7380main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007381{
Martin v. Löwis11437992002-04-12 09:54:03 +00007382
7383 FILE *f = fopen ("conftest.val", "w");
7384 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007385 return 1;
7386 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007387 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007388 long int i = longval ();
7389 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7390 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 fprintf (f, "%ld\n", i);
7392 }
7393 else
7394 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007395 unsigned long int i = ulongval ();
7396 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7397 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007398 fprintf (f, "%lu\n", i);
7399 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
7402 ;
7403 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007404}
Martin v. Löwis11437992002-04-12 09:54:03 +00007405_ACEOF
7406rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007407if { (ac_try="$ac_link"
7408case "(($ac_try" in
7409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7410 *) ac_try_echo=$ac_try;;
7411esac
7412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7413 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007414 ac_status=$?
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007417 { (case "(($ac_try" in
7418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7419 *) ac_try_echo=$ac_try;;
7420esac
7421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7422 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007423 ac_status=$?
7424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425 (exit $ac_status); }; }; then
7426 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007427else
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 echo "$as_me: program exited with status $ac_status" >&5
7429echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007430sed 's/^/| /' conftest.$ac_ext >&5
7431
Martin v. Löwis11437992002-04-12 09:54:03 +00007432( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007433if test "$ac_cv_type_int" = yes; then
7434 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007435See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007437See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007438 { (exit 77); exit 77; }; }
7439 else
7440 ac_cv_sizeof_int=0
7441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007443rm -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 +00007444fi
7445rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7448echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7449
7450
7451
Martin v. Löwis11437992002-04-12 09:54:03 +00007452cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007453#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007454_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007455
7456
Martin v. Löwiseba40652007-08-30 20:10:57 +00007457{ echo "$as_me:$LINENO: checking for long" >&5
7458echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007459if test "${ac_cv_type_long+set}" = set; then
7460 echo $ECHO_N "(cached) $ECHO_C" >&6
7461else
7462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007463/* confdefs.h. */
7464_ACEOF
7465cat confdefs.h >>conftest.$ac_ext
7466cat >>conftest.$ac_ext <<_ACEOF
7467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007468$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007470int
7471main ()
7472{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007473if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007474 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007475if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007476 return 0;
7477 ;
7478 return 0;
7479}
7480_ACEOF
7481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007482if { (ac_try="$ac_compile"
7483case "(($ac_try" in
7484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7485 *) ac_try_echo=$ac_try;;
7486esac
7487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007490 grep -v '^ *+' conftest.er1 >conftest.err
7491 rm -f conftest.er1
7492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494 (exit $ac_status); } && {
7495 test -z "$ac_c_werror_flag" ||
7496 test ! -s conftest.err
7497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007498 ac_cv_type_long=yes
7499else
7500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007501sed 's/^/| /' conftest.$ac_ext >&5
7502
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007504fi
Brett Cannon19fab762007-06-02 03:02:29 +00007505
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7507fi
7508{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7509echo "${ECHO_T}$ac_cv_type_long" >&6; }
7510
7511# The cast to long int works around a bug in the HP C Compiler
7512# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7513# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7514# This bug is HP SR number 8606223364.
7515{ echo "$as_me:$LINENO: checking size of long" >&5
7516echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007517if test "${ac_cv_sizeof_long+set}" = set; then
7518 echo $ECHO_N "(cached) $ECHO_C" >&6
7519else
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 if test "$cross_compiling" = yes; then
7521 # Depending upon the size, compute the lo and hi bounds.
7522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007523/* confdefs.h. */
7524_ACEOF
7525cat confdefs.h >>conftest.$ac_ext
7526cat >>conftest.$ac_ext <<_ACEOF
7527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007528$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007529 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007530int
7531main ()
7532{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007533static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007534test_array [0] = 0
7535
7536 ;
7537 return 0;
7538}
7539_ACEOF
7540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007541if { (ac_try="$ac_compile"
7542case "(($ac_try" in
7543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7544 *) ac_try_echo=$ac_try;;
7545esac
7546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007549 grep -v '^ *+' conftest.er1 >conftest.err
7550 rm -f conftest.er1
7551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007553 (exit $ac_status); } && {
7554 test -z "$ac_c_werror_flag" ||
7555 test ! -s conftest.err
7556 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007557 ac_lo=0 ac_mid=0
7558 while :; do
7559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007560/* confdefs.h. */
7561_ACEOF
7562cat confdefs.h >>conftest.$ac_ext
7563cat >>conftest.$ac_ext <<_ACEOF
7564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007565$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007566 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007567int
7568main ()
7569{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007571test_array [0] = 0
7572
7573 ;
7574 return 0;
7575}
7576_ACEOF
7577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578if { (ac_try="$ac_compile"
7579case "(($ac_try" in
7580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7581 *) ac_try_echo=$ac_try;;
7582esac
7583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007586 grep -v '^ *+' conftest.er1 >conftest.err
7587 rm -f conftest.er1
7588 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007590 (exit $ac_status); } && {
7591 test -z "$ac_c_werror_flag" ||
7592 test ! -s conftest.err
7593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 ac_hi=$ac_mid; break
7595else
7596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007597sed 's/^/| /' conftest.$ac_ext >&5
7598
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599 ac_lo=`expr $ac_mid + 1`
7600 if test $ac_lo -le $ac_mid; then
7601 ac_lo= ac_hi=
7602 break
7603 fi
7604 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007606
7607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007608 done
7609else
7610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007611sed 's/^/| /' conftest.$ac_ext >&5
7612
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007614/* confdefs.h. */
7615_ACEOF
7616cat confdefs.h >>conftest.$ac_ext
7617cat >>conftest.$ac_ext <<_ACEOF
7618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007619$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007621int
7622main ()
7623{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007625test_array [0] = 0
7626
7627 ;
7628 return 0;
7629}
7630_ACEOF
7631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632if { (ac_try="$ac_compile"
7633case "(($ac_try" in
7634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7635 *) ac_try_echo=$ac_try;;
7636esac
7637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007640 grep -v '^ *+' conftest.er1 >conftest.err
7641 rm -f conftest.er1
7642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644 (exit $ac_status); } && {
7645 test -z "$ac_c_werror_flag" ||
7646 test ! -s conftest.err
7647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007648 ac_hi=-1 ac_mid=-1
7649 while :; do
7650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007651/* confdefs.h. */
7652_ACEOF
7653cat confdefs.h >>conftest.$ac_ext
7654cat >>conftest.$ac_ext <<_ACEOF
7655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007656$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
7660{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007662test_array [0] = 0
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669if { (ac_try="$ac_compile"
7670case "(($ac_try" in
7671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7672 *) ac_try_echo=$ac_try;;
7673esac
7674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007677 grep -v '^ *+' conftest.er1 >conftest.err
7678 rm -f conftest.er1
7679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007681 (exit $ac_status); } && {
7682 test -z "$ac_c_werror_flag" ||
7683 test ! -s conftest.err
7684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007685 ac_lo=$ac_mid; break
7686else
7687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007688sed 's/^/| /' conftest.$ac_ext >&5
7689
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690 ac_hi=`expr '(' $ac_mid ')' - 1`
7691 if test $ac_mid -le $ac_hi; then
7692 ac_lo= ac_hi=
7693 break
7694 fi
7695 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697
7698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 done
7700else
7701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007702sed 's/^/| /' conftest.$ac_ext >&5
7703
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706
7707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709
7710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711# Binary search between lo and hi bounds.
7712while test "x$ac_lo" != "x$ac_hi"; do
7713 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007715/* confdefs.h. */
7716_ACEOF
7717cat confdefs.h >>conftest.$ac_ext
7718cat >>conftest.$ac_ext <<_ACEOF
7719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007720$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007722int
7723main ()
7724{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007726test_array [0] = 0
7727
7728 ;
7729 return 0;
7730}
7731_ACEOF
7732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733if { (ac_try="$ac_compile"
7734case "(($ac_try" in
7735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7736 *) ac_try_echo=$ac_try;;
7737esac
7738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007741 grep -v '^ *+' conftest.er1 >conftest.err
7742 rm -f conftest.er1
7743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745 (exit $ac_status); } && {
7746 test -z "$ac_c_werror_flag" ||
7747 test ! -s conftest.err
7748 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007749 ac_hi=$ac_mid
7750else
7751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007752sed 's/^/| /' conftest.$ac_ext >&5
7753
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007756
7757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007758done
7759case $ac_lo in
7760?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761'') if test "$ac_cv_type_long" = yes; then
7762 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007763See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007764echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007765See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766 { (exit 77); exit 77; }; }
7767 else
7768 ac_cv_sizeof_long=0
7769 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007770esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007771else
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007773/* confdefs.h. */
7774_ACEOF
7775cat confdefs.h >>conftest.$ac_ext
7776cat >>conftest.$ac_ext <<_ACEOF
7777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007778$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779 typedef long ac__type_sizeof_;
7780static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7781static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007782#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007783#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007784int
7785main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007786{
Martin v. Löwis11437992002-04-12 09:54:03 +00007787
7788 FILE *f = fopen ("conftest.val", "w");
7789 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007790 return 1;
7791 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007793 long int i = longval ();
7794 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7795 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 fprintf (f, "%ld\n", i);
7797 }
7798 else
7799 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007800 unsigned long int i = ulongval ();
7801 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7802 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 fprintf (f, "%lu\n", i);
7804 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007806
7807 ;
7808 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007809}
Martin v. Löwis11437992002-04-12 09:54:03 +00007810_ACEOF
7811rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812if { (ac_try="$ac_link"
7813case "(($ac_try" in
7814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7815 *) ac_try_echo=$ac_try;;
7816esac
7817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7818 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_status=$?
7820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 { (case "(($ac_try" in
7823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7824 *) ac_try_echo=$ac_try;;
7825esac
7826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7827 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 ac_status=$?
7829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7830 (exit $ac_status); }; }; then
7831 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007832else
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 echo "$as_me: program exited with status $ac_status" >&5
7834echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007835sed 's/^/| /' conftest.$ac_ext >&5
7836
Martin v. Löwis11437992002-04-12 09:54:03 +00007837( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838if test "$ac_cv_type_long" = yes; then
7839 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007840See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007842See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843 { (exit 77); exit 77; }; }
7844 else
7845 ac_cv_sizeof_long=0
7846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007848rm -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 +00007849fi
7850rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007852{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7853echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7854
7855
7856
Martin v. Löwis11437992002-04-12 09:54:03 +00007857cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007858#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007859_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007860
7861
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862{ echo "$as_me:$LINENO: checking for void *" >&5
7863echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007864if test "${ac_cv_type_void_p+set}" = set; then
7865 echo $ECHO_N "(cached) $ECHO_C" >&6
7866else
7867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007868/* confdefs.h. */
7869_ACEOF
7870cat confdefs.h >>conftest.$ac_ext
7871cat >>conftest.$ac_ext <<_ACEOF
7872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007875int
7876main ()
7877{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 return 0;
7882 ;
7883 return 0;
7884}
7885_ACEOF
7886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887if { (ac_try="$ac_compile"
7888case "(($ac_try" in
7889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7890 *) ac_try_echo=$ac_try;;
7891esac
7892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007895 grep -v '^ *+' conftest.er1 >conftest.err
7896 rm -f conftest.er1
7897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899 (exit $ac_status); } && {
7900 test -z "$ac_c_werror_flag" ||
7901 test ! -s conftest.err
7902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 ac_cv_type_void_p=yes
7904else
7905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007906sed 's/^/| /' conftest.$ac_ext >&5
7907
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007909fi
Brett Cannon19fab762007-06-02 03:02:29 +00007910
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7912fi
7913{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7914echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7915
7916# The cast to long int works around a bug in the HP C Compiler
7917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7919# This bug is HP SR number 8606223364.
7920{ echo "$as_me:$LINENO: checking size of void *" >&5
7921echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007922if test "${ac_cv_sizeof_void_p+set}" = set; then
7923 echo $ECHO_N "(cached) $ECHO_C" >&6
7924else
Martin v. Löwis11437992002-04-12 09:54:03 +00007925 if test "$cross_compiling" = yes; then
7926 # Depending upon the size, compute the lo and hi bounds.
7927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* confdefs.h. */
7929_ACEOF
7930cat confdefs.h >>conftest.$ac_ext
7931cat >>conftest.$ac_ext <<_ACEOF
7932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007934 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007939test_array [0] = 0
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
7945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007946if { (ac_try="$ac_compile"
7947case "(($ac_try" in
7948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7949 *) ac_try_echo=$ac_try;;
7950esac
7951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007954 grep -v '^ *+' conftest.er1 >conftest.err
7955 rm -f conftest.er1
7956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007958 (exit $ac_status); } && {
7959 test -z "$ac_c_werror_flag" ||
7960 test ! -s conftest.err
7961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ac_lo=0 ac_mid=0
7963 while :; do
7964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007965/* confdefs.h. */
7966_ACEOF
7967cat confdefs.h >>conftest.$ac_ext
7968cat >>conftest.$ac_ext <<_ACEOF
7969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007970$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007971 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007972int
7973main ()
7974{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007976test_array [0] = 0
7977
7978 ;
7979 return 0;
7980}
7981_ACEOF
7982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983if { (ac_try="$ac_compile"
7984case "(($ac_try" in
7985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7986 *) ac_try_echo=$ac_try;;
7987esac
7988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007991 grep -v '^ *+' conftest.er1 >conftest.err
7992 rm -f conftest.er1
7993 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995 (exit $ac_status); } && {
7996 test -z "$ac_c_werror_flag" ||
7997 test ! -s conftest.err
7998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ac_hi=$ac_mid; break
8000else
8001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008002sed 's/^/| /' conftest.$ac_ext >&5
8003
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004 ac_lo=`expr $ac_mid + 1`
8005 if test $ac_lo -le $ac_mid; then
8006 ac_lo= ac_hi=
8007 break
8008 fi
8009 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011
8012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 done
8014else
8015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008016sed 's/^/| /' conftest.$ac_ext >&5
8017
Martin v. Löwiseba40652007-08-30 20:10:57 +00008018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* confdefs.h. */
8020_ACEOF
8021cat confdefs.h >>conftest.$ac_ext
8022cat >>conftest.$ac_ext <<_ACEOF
8023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008026int
8027main ()
8028{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008030test_array [0] = 0
8031
8032 ;
8033 return 0;
8034}
8035_ACEOF
8036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037if { (ac_try="$ac_compile"
8038case "(($ac_try" in
8039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8040 *) ac_try_echo=$ac_try;;
8041esac
8042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008045 grep -v '^ *+' conftest.er1 >conftest.err
8046 rm -f conftest.er1
8047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008049 (exit $ac_status); } && {
8050 test -z "$ac_c_werror_flag" ||
8051 test ! -s conftest.err
8052 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008053 ac_hi=-1 ac_mid=-1
8054 while :; do
8055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008056/* confdefs.h. */
8057_ACEOF
8058cat confdefs.h >>conftest.$ac_ext
8059cat >>conftest.$ac_ext <<_ACEOF
8060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008061$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008062 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008063int
8064main ()
8065{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008067test_array [0] = 0
8068
8069 ;
8070 return 0;
8071}
8072_ACEOF
8073rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074if { (ac_try="$ac_compile"
8075case "(($ac_try" in
8076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8077 *) ac_try_echo=$ac_try;;
8078esac
8079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008082 grep -v '^ *+' conftest.er1 >conftest.err
8083 rm -f conftest.er1
8084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008086 (exit $ac_status); } && {
8087 test -z "$ac_c_werror_flag" ||
8088 test ! -s conftest.err
8089 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 ac_lo=$ac_mid; break
8091else
8092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008093sed 's/^/| /' conftest.$ac_ext >&5
8094
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095 ac_hi=`expr '(' $ac_mid ')' - 1`
8096 if test $ac_mid -le $ac_hi; then
8097 ac_lo= ac_hi=
8098 break
8099 fi
8100 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102
8103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008104 done
8105else
8106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008107sed 's/^/| /' conftest.$ac_ext >&5
8108
Martin v. Löwiseba40652007-08-30 20:10:57 +00008109 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008111
8112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114
8115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008116# Binary search between lo and hi bounds.
8117while test "x$ac_lo" != "x$ac_hi"; do
8118 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* confdefs.h. */
8121_ACEOF
8122cat confdefs.h >>conftest.$ac_ext
8123cat >>conftest.$ac_ext <<_ACEOF
8124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008125$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008127int
8128main ()
8129{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008131test_array [0] = 0
8132
8133 ;
8134 return 0;
8135}
8136_ACEOF
8137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138if { (ac_try="$ac_compile"
8139case "(($ac_try" in
8140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8141 *) ac_try_echo=$ac_try;;
8142esac
8143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008146 grep -v '^ *+' conftest.er1 >conftest.err
8147 rm -f conftest.er1
8148 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150 (exit $ac_status); } && {
8151 test -z "$ac_c_werror_flag" ||
8152 test ! -s conftest.err
8153 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008154 ac_hi=$ac_mid
8155else
8156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008157sed 's/^/| /' conftest.$ac_ext >&5
8158
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008161
8162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008163done
8164case $ac_lo in
8165?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166'') if test "$ac_cv_type_void_p" = yes; then
8167 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008168See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008169echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008170See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 { (exit 77); exit 77; }; }
8172 else
8173 ac_cv_sizeof_void_p=0
8174 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008175esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008176else
Martin v. Löwis11437992002-04-12 09:54:03 +00008177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008178/* confdefs.h. */
8179_ACEOF
8180cat confdefs.h >>conftest.$ac_ext
8181cat >>conftest.$ac_ext <<_ACEOF
8182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008183$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184 typedef void * ac__type_sizeof_;
8185static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8186static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008187#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008188#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008189int
8190main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008191{
Martin v. Löwis11437992002-04-12 09:54:03 +00008192
8193 FILE *f = fopen ("conftest.val", "w");
8194 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008195 return 1;
8196 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008197 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008198 long int i = longval ();
8199 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8200 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 fprintf (f, "%ld\n", i);
8202 }
8203 else
8204 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205 unsigned long int i = ulongval ();
8206 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8207 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 fprintf (f, "%lu\n", i);
8209 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008211
8212 ;
8213 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008214}
Martin v. Löwis11437992002-04-12 09:54:03 +00008215_ACEOF
8216rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217if { (ac_try="$ac_link"
8218case "(($ac_try" in
8219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8220 *) ac_try_echo=$ac_try;;
8221esac
8222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8223 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_status=$?
8225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 { (case "(($ac_try" in
8228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8229 *) ac_try_echo=$ac_try;;
8230esac
8231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8232 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_status=$?
8234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8235 (exit $ac_status); }; }; then
8236 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008237else
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 echo "$as_me: program exited with status $ac_status" >&5
8239echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008240sed 's/^/| /' conftest.$ac_ext >&5
8241
Martin v. Löwis11437992002-04-12 09:54:03 +00008242( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008243if test "$ac_cv_type_void_p" = yes; then
8244 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008245See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008247See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248 { (exit 77); exit 77; }; }
8249 else
8250 ac_cv_sizeof_void_p=0
8251 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008253rm -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 +00008254fi
8255rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008257{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8258echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8259
8260
8261
Martin v. Löwis11437992002-04-12 09:54:03 +00008262cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008263#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008264_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008265
8266
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267{ echo "$as_me:$LINENO: checking for short" >&5
8268echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008269if test "${ac_cv_type_short+set}" = set; then
8270 echo $ECHO_N "(cached) $ECHO_C" >&6
8271else
8272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008273/* confdefs.h. */
8274_ACEOF
8275cat confdefs.h >>conftest.$ac_ext
8276cat >>conftest.$ac_ext <<_ACEOF
8277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008278$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008280int
8281main ()
8282{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 return 0;
8287 ;
8288 return 0;
8289}
8290_ACEOF
8291rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292if { (ac_try="$ac_compile"
8293case "(($ac_try" in
8294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8295 *) ac_try_echo=$ac_try;;
8296esac
8297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008300 grep -v '^ *+' conftest.er1 >conftest.err
8301 rm -f conftest.er1
8302 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304 (exit $ac_status); } && {
8305 test -z "$ac_c_werror_flag" ||
8306 test ! -s conftest.err
8307 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008308 ac_cv_type_short=yes
8309else
8310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008311sed 's/^/| /' conftest.$ac_ext >&5
8312
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Brett Cannon19fab762007-06-02 03:02:29 +00008315
Martin v. Löwiseba40652007-08-30 20:10:57 +00008316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8317fi
8318{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8319echo "${ECHO_T}$ac_cv_type_short" >&6; }
8320
8321# The cast to long int works around a bug in the HP C Compiler
8322# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8323# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8324# This bug is HP SR number 8606223364.
8325{ echo "$as_me:$LINENO: checking size of short" >&5
8326echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008327if test "${ac_cv_sizeof_short+set}" = set; then
8328 echo $ECHO_N "(cached) $ECHO_C" >&6
8329else
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 if test "$cross_compiling" = yes; then
8331 # Depending upon the size, compute the lo and hi bounds.
8332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008333/* confdefs.h. */
8334_ACEOF
8335cat confdefs.h >>conftest.$ac_ext
8336cat >>conftest.$ac_ext <<_ACEOF
8337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008338$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008339 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008340int
8341main ()
8342{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008344test_array [0] = 0
8345
8346 ;
8347 return 0;
8348}
8349_ACEOF
8350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008351if { (ac_try="$ac_compile"
8352case "(($ac_try" in
8353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8354 *) ac_try_echo=$ac_try;;
8355esac
8356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008359 grep -v '^ *+' conftest.er1 >conftest.err
8360 rm -f conftest.er1
8361 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008363 (exit $ac_status); } && {
8364 test -z "$ac_c_werror_flag" ||
8365 test ! -s conftest.err
8366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008367 ac_lo=0 ac_mid=0
8368 while :; do
8369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008370/* confdefs.h. */
8371_ACEOF
8372cat confdefs.h >>conftest.$ac_ext
8373cat >>conftest.$ac_ext <<_ACEOF
8374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008375$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008376 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008377int
8378main ()
8379{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008381test_array [0] = 0
8382
8383 ;
8384 return 0;
8385}
8386_ACEOF
8387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388if { (ac_try="$ac_compile"
8389case "(($ac_try" in
8390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8391 *) ac_try_echo=$ac_try;;
8392esac
8393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008396 grep -v '^ *+' conftest.er1 >conftest.err
8397 rm -f conftest.er1
8398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400 (exit $ac_status); } && {
8401 test -z "$ac_c_werror_flag" ||
8402 test ! -s conftest.err
8403 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008404 ac_hi=$ac_mid; break
8405else
8406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008407sed 's/^/| /' conftest.$ac_ext >&5
8408
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409 ac_lo=`expr $ac_mid + 1`
8410 if test $ac_lo -le $ac_mid; then
8411 ac_lo= ac_hi=
8412 break
8413 fi
8414 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416
8417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008418 done
8419else
8420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008421sed 's/^/| /' conftest.$ac_ext >&5
8422
Martin v. Löwiseba40652007-08-30 20:10:57 +00008423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* confdefs.h. */
8425_ACEOF
8426cat confdefs.h >>conftest.$ac_ext
8427cat >>conftest.$ac_ext <<_ACEOF
8428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008429$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008431int
8432main ()
8433{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008435test_array [0] = 0
8436
8437 ;
8438 return 0;
8439}
8440_ACEOF
8441rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442if { (ac_try="$ac_compile"
8443case "(($ac_try" in
8444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8445 *) ac_try_echo=$ac_try;;
8446esac
8447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008450 grep -v '^ *+' conftest.er1 >conftest.err
8451 rm -f conftest.er1
8452 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454 (exit $ac_status); } && {
8455 test -z "$ac_c_werror_flag" ||
8456 test ! -s conftest.err
8457 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ac_hi=-1 ac_mid=-1
8459 while :; do
8460 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008461/* confdefs.h. */
8462_ACEOF
8463cat confdefs.h >>conftest.$ac_ext
8464cat >>conftest.$ac_ext <<_ACEOF
8465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008466$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008467 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
8470{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008472test_array [0] = 0
8473
8474 ;
8475 return 0;
8476}
8477_ACEOF
8478rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479if { (ac_try="$ac_compile"
8480case "(($ac_try" in
8481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8482 *) ac_try_echo=$ac_try;;
8483esac
8484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008487 grep -v '^ *+' conftest.er1 >conftest.err
8488 rm -f conftest.er1
8489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008491 (exit $ac_status); } && {
8492 test -z "$ac_c_werror_flag" ||
8493 test ! -s conftest.err
8494 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_lo=$ac_mid; break
8496else
8497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008498sed 's/^/| /' conftest.$ac_ext >&5
8499
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500 ac_hi=`expr '(' $ac_mid ')' - 1`
8501 if test $ac_mid -le $ac_hi; then
8502 ac_lo= ac_hi=
8503 break
8504 fi
8505 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008507
8508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 done
8510else
8511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008512sed 's/^/| /' conftest.$ac_ext >&5
8513
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008516
8517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519
8520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521# Binary search between lo and hi bounds.
8522while test "x$ac_lo" != "x$ac_hi"; do
8523 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008525/* confdefs.h. */
8526_ACEOF
8527cat confdefs.h >>conftest.$ac_ext
8528cat >>conftest.$ac_ext <<_ACEOF
8529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008530$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008532int
8533main ()
8534{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008536test_array [0] = 0
8537
8538 ;
8539 return 0;
8540}
8541_ACEOF
8542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543if { (ac_try="$ac_compile"
8544case "(($ac_try" in
8545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8546 *) ac_try_echo=$ac_try;;
8547esac
8548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008551 grep -v '^ *+' conftest.er1 >conftest.err
8552 rm -f conftest.er1
8553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555 (exit $ac_status); } && {
8556 test -z "$ac_c_werror_flag" ||
8557 test ! -s conftest.err
8558 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_hi=$ac_mid
8560else
8561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008562sed 's/^/| /' conftest.$ac_ext >&5
8563
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566
8567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008568done
8569case $ac_lo in
8570?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571'') if test "$ac_cv_type_short" = yes; then
8572 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008573See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008575See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 { (exit 77); exit 77; }; }
8577 else
8578 ac_cv_sizeof_short=0
8579 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008580esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008581else
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008583/* confdefs.h. */
8584_ACEOF
8585cat confdefs.h >>conftest.$ac_ext
8586cat >>conftest.$ac_ext <<_ACEOF
8587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008588$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589 typedef short ac__type_sizeof_;
8590static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8591static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008592#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008593#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008594int
8595main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008596{
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
8598 FILE *f = fopen ("conftest.val", "w");
8599 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008600 return 1;
8601 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603 long int i = longval ();
8604 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8605 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 fprintf (f, "%ld\n", i);
8607 }
8608 else
8609 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008610 unsigned long int i = ulongval ();
8611 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8612 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 fprintf (f, "%lu\n", i);
8614 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008616
8617 ;
8618 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008619}
Martin v. Löwis11437992002-04-12 09:54:03 +00008620_ACEOF
8621rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622if { (ac_try="$ac_link"
8623case "(($ac_try" in
8624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8625 *) ac_try_echo=$ac_try;;
8626esac
8627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8628 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_status=$?
8630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 { (case "(($ac_try" in
8633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8634 *) ac_try_echo=$ac_try;;
8635esac
8636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8637 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_status=$?
8639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8640 (exit $ac_status); }; }; then
8641 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 echo "$as_me: program exited with status $ac_status" >&5
8644echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008645sed 's/^/| /' conftest.$ac_ext >&5
8646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008648if test "$ac_cv_type_short" = yes; then
8649 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008650See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008652See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653 { (exit 77); exit 77; }; }
8654 else
8655 ac_cv_sizeof_short=0
8656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008658rm -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 +00008659fi
8660rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008662{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8663echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8664
8665
8666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008668#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008669_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008670
8671
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672{ echo "$as_me:$LINENO: checking for float" >&5
8673echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008674if test "${ac_cv_type_float+set}" = set; then
8675 echo $ECHO_N "(cached) $ECHO_C" >&6
8676else
8677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008678/* confdefs.h. */
8679_ACEOF
8680cat confdefs.h >>conftest.$ac_ext
8681cat >>conftest.$ac_ext <<_ACEOF
8682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008683$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008685int
8686main ()
8687{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008690if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 return 0;
8692 ;
8693 return 0;
8694}
8695_ACEOF
8696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697if { (ac_try="$ac_compile"
8698case "(($ac_try" in
8699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8700 *) ac_try_echo=$ac_try;;
8701esac
8702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008705 grep -v '^ *+' conftest.er1 >conftest.err
8706 rm -f conftest.er1
8707 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709 (exit $ac_status); } && {
8710 test -z "$ac_c_werror_flag" ||
8711 test ! -s conftest.err
8712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_cv_type_float=yes
8714else
8715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008716sed 's/^/| /' conftest.$ac_ext >&5
8717
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Brett Cannon19fab762007-06-02 03:02:29 +00008720
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8722fi
8723{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8724echo "${ECHO_T}$ac_cv_type_float" >&6; }
8725
8726# The cast to long int works around a bug in the HP C Compiler
8727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8729# This bug is HP SR number 8606223364.
8730{ echo "$as_me:$LINENO: checking size of float" >&5
8731echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008732if test "${ac_cv_sizeof_float+set}" = set; then
8733 echo $ECHO_N "(cached) $ECHO_C" >&6
8734else
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 if test "$cross_compiling" = yes; then
8736 # Depending upon the size, compute the lo and hi bounds.
8737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008738/* confdefs.h. */
8739_ACEOF
8740cat confdefs.h >>conftest.$ac_ext
8741cat >>conftest.$ac_ext <<_ACEOF
8742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008743$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008745int
8746main ()
8747{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008749test_array [0] = 0
8750
8751 ;
8752 return 0;
8753}
8754_ACEOF
8755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008756if { (ac_try="$ac_compile"
8757case "(($ac_try" in
8758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8759 *) ac_try_echo=$ac_try;;
8760esac
8761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008764 grep -v '^ *+' conftest.er1 >conftest.err
8765 rm -f conftest.er1
8766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008768 (exit $ac_status); } && {
8769 test -z "$ac_c_werror_flag" ||
8770 test ! -s conftest.err
8771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_lo=0 ac_mid=0
8773 while :; do
8774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008775/* confdefs.h. */
8776_ACEOF
8777cat confdefs.h >>conftest.$ac_ext
8778cat >>conftest.$ac_ext <<_ACEOF
8779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008780$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008781 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008782int
8783main ()
8784{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008786test_array [0] = 0
8787
8788 ;
8789 return 0;
8790}
8791_ACEOF
8792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793if { (ac_try="$ac_compile"
8794case "(($ac_try" in
8795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8796 *) ac_try_echo=$ac_try;;
8797esac
8798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008801 grep -v '^ *+' conftest.er1 >conftest.err
8802 rm -f conftest.er1
8803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805 (exit $ac_status); } && {
8806 test -z "$ac_c_werror_flag" ||
8807 test ! -s conftest.err
8808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 ac_hi=$ac_mid; break
8810else
8811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008812sed 's/^/| /' conftest.$ac_ext >&5
8813
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814 ac_lo=`expr $ac_mid + 1`
8815 if test $ac_lo -le $ac_mid; then
8816 ac_lo= ac_hi=
8817 break
8818 fi
8819 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008821
8822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 done
8824else
8825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008826sed 's/^/| /' conftest.$ac_ext >&5
8827
Martin v. Löwiseba40652007-08-30 20:10:57 +00008828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008829/* confdefs.h. */
8830_ACEOF
8831cat confdefs.h >>conftest.$ac_ext
8832cat >>conftest.$ac_ext <<_ACEOF
8833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008834$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008836int
8837main ()
8838{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008840test_array [0] = 0
8841
8842 ;
8843 return 0;
8844}
8845_ACEOF
8846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847if { (ac_try="$ac_compile"
8848case "(($ac_try" in
8849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8850 *) ac_try_echo=$ac_try;;
8851esac
8852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008855 grep -v '^ *+' conftest.er1 >conftest.err
8856 rm -f conftest.er1
8857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008859 (exit $ac_status); } && {
8860 test -z "$ac_c_werror_flag" ||
8861 test ! -s conftest.err
8862 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_hi=-1 ac_mid=-1
8864 while :; do
8865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* confdefs.h. */
8867_ACEOF
8868cat confdefs.h >>conftest.$ac_ext
8869cat >>conftest.$ac_ext <<_ACEOF
8870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008877test_array [0] = 0
8878
8879 ;
8880 return 0;
8881}
8882_ACEOF
8883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884if { (ac_try="$ac_compile"
8885case "(($ac_try" in
8886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8887 *) ac_try_echo=$ac_try;;
8888esac
8889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008892 grep -v '^ *+' conftest.er1 >conftest.err
8893 rm -f conftest.er1
8894 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008896 (exit $ac_status); } && {
8897 test -z "$ac_c_werror_flag" ||
8898 test ! -s conftest.err
8899 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ac_lo=$ac_mid; break
8901else
8902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008903sed 's/^/| /' conftest.$ac_ext >&5
8904
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905 ac_hi=`expr '(' $ac_mid ')' - 1`
8906 if test $ac_mid -le $ac_hi; then
8907 ac_lo= ac_hi=
8908 break
8909 fi
8910 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008912
8913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 done
8915else
8916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008917sed 's/^/| /' conftest.$ac_ext >&5
8918
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008921
8922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924
8925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008926# Binary search between lo and hi bounds.
8927while test "x$ac_lo" != "x$ac_hi"; do
8928 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008930/* confdefs.h. */
8931_ACEOF
8932cat confdefs.h >>conftest.$ac_ext
8933cat >>conftest.$ac_ext <<_ACEOF
8934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008935$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008937int
8938main ()
8939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008941test_array [0] = 0
8942
8943 ;
8944 return 0;
8945}
8946_ACEOF
8947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948if { (ac_try="$ac_compile"
8949case "(($ac_try" in
8950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8951 *) ac_try_echo=$ac_try;;
8952esac
8953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008956 grep -v '^ *+' conftest.er1 >conftest.err
8957 rm -f conftest.er1
8958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960 (exit $ac_status); } && {
8961 test -z "$ac_c_werror_flag" ||
8962 test ! -s conftest.err
8963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_hi=$ac_mid
8965else
8966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008967sed 's/^/| /' conftest.$ac_ext >&5
8968
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008971
8972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008973done
8974case $ac_lo in
8975?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976'') if test "$ac_cv_type_float" = yes; then
8977 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008978See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008980See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 { (exit 77); exit 77; }; }
8982 else
8983 ac_cv_sizeof_float=0
8984 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008985esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008986else
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* confdefs.h. */
8989_ACEOF
8990cat confdefs.h >>conftest.$ac_ext
8991cat >>conftest.$ac_ext <<_ACEOF
8992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008993$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994 typedef float ac__type_sizeof_;
8995static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8996static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008997#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008998#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008999int
9000main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009001{
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
9003 FILE *f = fopen ("conftest.val", "w");
9004 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009005 return 1;
9006 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008 long int i = longval ();
9009 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9010 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 fprintf (f, "%ld\n", i);
9012 }
9013 else
9014 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015 unsigned long int i = ulongval ();
9016 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9017 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 fprintf (f, "%lu\n", i);
9019 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
9022 ;
9023 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009024}
Martin v. Löwis11437992002-04-12 09:54:03 +00009025_ACEOF
9026rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027if { (ac_try="$ac_link"
9028case "(($ac_try" in
9029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9030 *) ac_try_echo=$ac_try;;
9031esac
9032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9033 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 { (case "(($ac_try" in
9038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9039 *) ac_try_echo=$ac_try;;
9040esac
9041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9042 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_status=$?
9044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045 (exit $ac_status); }; }; then
9046 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009047else
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 echo "$as_me: program exited with status $ac_status" >&5
9049echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009050sed 's/^/| /' conftest.$ac_ext >&5
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009053if test "$ac_cv_type_float" = yes; then
9054 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009055See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009057See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 { (exit 77); exit 77; }; }
9059 else
9060 ac_cv_sizeof_float=0
9061 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063rm -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 +00009064fi
9065rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009067{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9068echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9069
9070
9071
Martin v. Löwis11437992002-04-12 09:54:03 +00009072cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009073#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009074_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009075
9076
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077{ echo "$as_me:$LINENO: checking for double" >&5
9078echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009079if test "${ac_cv_type_double+set}" = set; then
9080 echo $ECHO_N "(cached) $ECHO_C" >&6
9081else
9082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009083/* confdefs.h. */
9084_ACEOF
9085cat confdefs.h >>conftest.$ac_ext
9086cat >>conftest.$ac_ext <<_ACEOF
9087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009088$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009090int
9091main ()
9092{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009095if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009096 return 0;
9097 ;
9098 return 0;
9099}
9100_ACEOF
9101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102if { (ac_try="$ac_compile"
9103case "(($ac_try" in
9104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9105 *) ac_try_echo=$ac_try;;
9106esac
9107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009110 grep -v '^ *+' conftest.er1 >conftest.err
9111 rm -f conftest.er1
9112 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114 (exit $ac_status); } && {
9115 test -z "$ac_c_werror_flag" ||
9116 test ! -s conftest.err
9117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 ac_cv_type_double=yes
9119else
9120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009121sed 's/^/| /' conftest.$ac_ext >&5
9122
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009124fi
Brett Cannon19fab762007-06-02 03:02:29 +00009125
Martin v. Löwiseba40652007-08-30 20:10:57 +00009126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9127fi
9128{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9129echo "${ECHO_T}$ac_cv_type_double" >&6; }
9130
9131# The cast to long int works around a bug in the HP C Compiler
9132# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9133# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9134# This bug is HP SR number 8606223364.
9135{ echo "$as_me:$LINENO: checking size of double" >&5
9136echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009137if test "${ac_cv_sizeof_double+set}" = set; then
9138 echo $ECHO_N "(cached) $ECHO_C" >&6
9139else
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 if test "$cross_compiling" = yes; then
9141 # Depending upon the size, compute the lo and hi bounds.
9142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009143/* confdefs.h. */
9144_ACEOF
9145cat confdefs.h >>conftest.$ac_ext
9146cat >>conftest.$ac_ext <<_ACEOF
9147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009148$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009149 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009150int
9151main ()
9152{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009154test_array [0] = 0
9155
9156 ;
9157 return 0;
9158}
9159_ACEOF
9160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161if { (ac_try="$ac_compile"
9162case "(($ac_try" in
9163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9164 *) ac_try_echo=$ac_try;;
9165esac
9166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009169 grep -v '^ *+' conftest.er1 >conftest.err
9170 rm -f conftest.er1
9171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009173 (exit $ac_status); } && {
9174 test -z "$ac_c_werror_flag" ||
9175 test ! -s conftest.err
9176 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 ac_lo=0 ac_mid=0
9178 while :; do
9179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009180/* confdefs.h. */
9181_ACEOF
9182cat confdefs.h >>conftest.$ac_ext
9183cat >>conftest.$ac_ext <<_ACEOF
9184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009185$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009186 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009187int
9188main ()
9189{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009191test_array [0] = 0
9192
9193 ;
9194 return 0;
9195}
9196_ACEOF
9197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198if { (ac_try="$ac_compile"
9199case "(($ac_try" in
9200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9201 *) ac_try_echo=$ac_try;;
9202esac
9203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009206 grep -v '^ *+' conftest.er1 >conftest.err
9207 rm -f conftest.er1
9208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210 (exit $ac_status); } && {
9211 test -z "$ac_c_werror_flag" ||
9212 test ! -s conftest.err
9213 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ac_hi=$ac_mid; break
9215else
9216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009217sed 's/^/| /' conftest.$ac_ext >&5
9218
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219 ac_lo=`expr $ac_mid + 1`
9220 if test $ac_lo -le $ac_mid; then
9221 ac_lo= ac_hi=
9222 break
9223 fi
9224 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226
9227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 done
9229else
9230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009231sed 's/^/| /' conftest.$ac_ext >&5
9232
Martin v. Löwiseba40652007-08-30 20:10:57 +00009233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009234/* confdefs.h. */
9235_ACEOF
9236cat confdefs.h >>conftest.$ac_ext
9237cat >>conftest.$ac_ext <<_ACEOF
9238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009239$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009241int
9242main ()
9243{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009245test_array [0] = 0
9246
9247 ;
9248 return 0;
9249}
9250_ACEOF
9251rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252if { (ac_try="$ac_compile"
9253case "(($ac_try" in
9254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9255 *) ac_try_echo=$ac_try;;
9256esac
9257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009260 grep -v '^ *+' conftest.er1 >conftest.err
9261 rm -f conftest.er1
9262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009264 (exit $ac_status); } && {
9265 test -z "$ac_c_werror_flag" ||
9266 test ! -s conftest.err
9267 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 ac_hi=-1 ac_mid=-1
9269 while :; do
9270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009271/* confdefs.h. */
9272_ACEOF
9273cat confdefs.h >>conftest.$ac_ext
9274cat >>conftest.$ac_ext <<_ACEOF
9275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009276$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009277 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009278int
9279main ()
9280{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009282test_array [0] = 0
9283
9284 ;
9285 return 0;
9286}
9287_ACEOF
9288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289if { (ac_try="$ac_compile"
9290case "(($ac_try" in
9291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9292 *) ac_try_echo=$ac_try;;
9293esac
9294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009297 grep -v '^ *+' conftest.er1 >conftest.err
9298 rm -f conftest.er1
9299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009301 (exit $ac_status); } && {
9302 test -z "$ac_c_werror_flag" ||
9303 test ! -s conftest.err
9304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 ac_lo=$ac_mid; break
9306else
9307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009308sed 's/^/| /' conftest.$ac_ext >&5
9309
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310 ac_hi=`expr '(' $ac_mid ')' - 1`
9311 if test $ac_mid -le $ac_hi; then
9312 ac_lo= ac_hi=
9313 break
9314 fi
9315 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009317
9318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 done
9320else
9321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009322sed 's/^/| /' conftest.$ac_ext >&5
9323
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009326
9327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329
9330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009331# Binary search between lo and hi bounds.
9332while test "x$ac_lo" != "x$ac_hi"; do
9333 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* confdefs.h. */
9336_ACEOF
9337cat confdefs.h >>conftest.$ac_ext
9338cat >>conftest.$ac_ext <<_ACEOF
9339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009340$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009341 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009342int
9343main ()
9344{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009346test_array [0] = 0
9347
9348 ;
9349 return 0;
9350}
9351_ACEOF
9352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353if { (ac_try="$ac_compile"
9354case "(($ac_try" in
9355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9356 *) ac_try_echo=$ac_try;;
9357esac
9358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009361 grep -v '^ *+' conftest.er1 >conftest.err
9362 rm -f conftest.er1
9363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365 (exit $ac_status); } && {
9366 test -z "$ac_c_werror_flag" ||
9367 test ! -s conftest.err
9368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009369 ac_hi=$ac_mid
9370else
9371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009372sed 's/^/| /' conftest.$ac_ext >&5
9373
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009376
9377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009378done
9379case $ac_lo in
9380?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381'') if test "$ac_cv_type_double" = yes; then
9382 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009383See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009385See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386 { (exit 77); exit 77; }; }
9387 else
9388 ac_cv_sizeof_double=0
9389 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009390esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009391else
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009393/* confdefs.h. */
9394_ACEOF
9395cat confdefs.h >>conftest.$ac_ext
9396cat >>conftest.$ac_ext <<_ACEOF
9397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009398$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399 typedef double ac__type_sizeof_;
9400static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9401static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009402#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009403#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009404int
9405main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009406{
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
9408 FILE *f = fopen ("conftest.val", "w");
9409 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009410 return 1;
9411 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009413 long int i = longval ();
9414 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9415 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 fprintf (f, "%ld\n", i);
9417 }
9418 else
9419 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009420 unsigned long int i = ulongval ();
9421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9422 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 fprintf (f, "%lu\n", i);
9424 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009426
9427 ;
9428 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009429}
Martin v. Löwis11437992002-04-12 09:54:03 +00009430_ACEOF
9431rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432if { (ac_try="$ac_link"
9433case "(($ac_try" in
9434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9435 *) ac_try_echo=$ac_try;;
9436esac
9437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9438 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_status=$?
9440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 { (case "(($ac_try" in
9443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9444 *) ac_try_echo=$ac_try;;
9445esac
9446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9447 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_status=$?
9449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9450 (exit $ac_status); }; }; then
9451 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009452else
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 echo "$as_me: program exited with status $ac_status" >&5
9454echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009455sed 's/^/| /' conftest.$ac_ext >&5
9456
Martin v. Löwis11437992002-04-12 09:54:03 +00009457( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458if test "$ac_cv_type_double" = yes; then
9459 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009460See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009462See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463 { (exit 77); exit 77; }; }
9464 else
9465 ac_cv_sizeof_double=0
9466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468rm -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 +00009469fi
9470rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009472{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9473echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9474
9475
9476
Martin v. Löwis11437992002-04-12 09:54:03 +00009477cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009478#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009479_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009480
9481
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9483echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009484if test "${ac_cv_type_fpos_t+set}" = set; then
9485 echo $ECHO_N "(cached) $ECHO_C" >&6
9486else
9487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009488/* confdefs.h. */
9489_ACEOF
9490cat confdefs.h >>conftest.$ac_ext
9491cat >>conftest.$ac_ext <<_ACEOF
9492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009493$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009495int
9496main ()
9497{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009500if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 return 0;
9502 ;
9503 return 0;
9504}
9505_ACEOF
9506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507if { (ac_try="$ac_compile"
9508case "(($ac_try" in
9509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9510 *) ac_try_echo=$ac_try;;
9511esac
9512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009515 grep -v '^ *+' conftest.er1 >conftest.err
9516 rm -f conftest.er1
9517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519 (exit $ac_status); } && {
9520 test -z "$ac_c_werror_flag" ||
9521 test ! -s conftest.err
9522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ac_cv_type_fpos_t=yes
9524else
9525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009526sed 's/^/| /' conftest.$ac_ext >&5
9527
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009529fi
Brett Cannon19fab762007-06-02 03:02:29 +00009530
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9532fi
9533{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9534echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9535
9536# The cast to long int works around a bug in the HP C Compiler
9537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9539# This bug is HP SR number 8606223364.
9540{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9541echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009542if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9543 echo $ECHO_N "(cached) $ECHO_C" >&6
9544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 if test "$cross_compiling" = yes; then
9546 # Depending upon the size, compute the lo and hi bounds.
9547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* confdefs.h. */
9549_ACEOF
9550cat confdefs.h >>conftest.$ac_ext
9551cat >>conftest.$ac_ext <<_ACEOF
9552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009554 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009559test_array [0] = 0
9560
9561 ;
9562 return 0;
9563}
9564_ACEOF
9565rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009566if { (ac_try="$ac_compile"
9567case "(($ac_try" in
9568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9569 *) ac_try_echo=$ac_try;;
9570esac
9571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009574 grep -v '^ *+' conftest.er1 >conftest.err
9575 rm -f conftest.er1
9576 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009578 (exit $ac_status); } && {
9579 test -z "$ac_c_werror_flag" ||
9580 test ! -s conftest.err
9581 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 ac_lo=0 ac_mid=0
9583 while :; do
9584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009585/* confdefs.h. */
9586_ACEOF
9587cat confdefs.h >>conftest.$ac_ext
9588cat >>conftest.$ac_ext <<_ACEOF
9589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009590$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009596test_array [0] = 0
9597
9598 ;
9599 return 0;
9600}
9601_ACEOF
9602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603if { (ac_try="$ac_compile"
9604case "(($ac_try" in
9605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9606 *) ac_try_echo=$ac_try;;
9607esac
9608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009611 grep -v '^ *+' conftest.er1 >conftest.err
9612 rm -f conftest.er1
9613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615 (exit $ac_status); } && {
9616 test -z "$ac_c_werror_flag" ||
9617 test ! -s conftest.err
9618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ac_hi=$ac_mid; break
9620else
9621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009622sed 's/^/| /' conftest.$ac_ext >&5
9623
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624 ac_lo=`expr $ac_mid + 1`
9625 if test $ac_lo -le $ac_mid; then
9626 ac_lo= ac_hi=
9627 break
9628 fi
9629 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631
9632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 done
9634else
9635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009636sed 's/^/| /' conftest.$ac_ext >&5
9637
Martin v. Löwiseba40652007-08-30 20:10:57 +00009638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009639/* confdefs.h. */
9640_ACEOF
9641cat confdefs.h >>conftest.$ac_ext
9642cat >>conftest.$ac_ext <<_ACEOF
9643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009644$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009646int
9647main ()
9648{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009650test_array [0] = 0
9651
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657if { (ac_try="$ac_compile"
9658case "(($ac_try" in
9659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9660 *) ac_try_echo=$ac_try;;
9661esac
9662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009665 grep -v '^ *+' conftest.er1 >conftest.err
9666 rm -f conftest.er1
9667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009669 (exit $ac_status); } && {
9670 test -z "$ac_c_werror_flag" ||
9671 test ! -s conftest.err
9672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_hi=-1 ac_mid=-1
9674 while :; do
9675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* confdefs.h. */
9677_ACEOF
9678cat confdefs.h >>conftest.$ac_ext
9679cat >>conftest.$ac_ext <<_ACEOF
9680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009681$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009682 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
9685{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009687test_array [0] = 0
9688
9689 ;
9690 return 0;
9691}
9692_ACEOF
9693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694if { (ac_try="$ac_compile"
9695case "(($ac_try" in
9696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9697 *) ac_try_echo=$ac_try;;
9698esac
9699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009702 grep -v '^ *+' conftest.er1 >conftest.err
9703 rm -f conftest.er1
9704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706 (exit $ac_status); } && {
9707 test -z "$ac_c_werror_flag" ||
9708 test ! -s conftest.err
9709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ac_lo=$ac_mid; break
9711else
9712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009713sed 's/^/| /' conftest.$ac_ext >&5
9714
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715 ac_hi=`expr '(' $ac_mid ')' - 1`
9716 if test $ac_mid -le $ac_hi; then
9717 ac_lo= ac_hi=
9718 break
9719 fi
9720 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722
9723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 done
9725else
9726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009727sed 's/^/| /' conftest.$ac_ext >&5
9728
Martin v. Löwiseba40652007-08-30 20:10:57 +00009729 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009731
9732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734
9735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736# Binary search between lo and hi bounds.
9737while test "x$ac_lo" != "x$ac_hi"; do
9738 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009740/* confdefs.h. */
9741_ACEOF
9742cat confdefs.h >>conftest.$ac_ext
9743cat >>conftest.$ac_ext <<_ACEOF
9744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009745$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009746 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009747int
9748main ()
9749{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009751test_array [0] = 0
9752
9753 ;
9754 return 0;
9755}
9756_ACEOF
9757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758if { (ac_try="$ac_compile"
9759case "(($ac_try" in
9760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9761 *) ac_try_echo=$ac_try;;
9762esac
9763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009766 grep -v '^ *+' conftest.er1 >conftest.err
9767 rm -f conftest.er1
9768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770 (exit $ac_status); } && {
9771 test -z "$ac_c_werror_flag" ||
9772 test ! -s conftest.err
9773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ac_hi=$ac_mid
9775else
9776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009777sed 's/^/| /' conftest.$ac_ext >&5
9778
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781
9782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009783done
9784case $ac_lo in
9785?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009786'') if test "$ac_cv_type_fpos_t" = yes; then
9787 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009788See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009789echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009790See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791 { (exit 77); exit 77; }; }
9792 else
9793 ac_cv_sizeof_fpos_t=0
9794 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009795esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009796else
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009798/* confdefs.h. */
9799_ACEOF
9800cat confdefs.h >>conftest.$ac_ext
9801cat >>conftest.$ac_ext <<_ACEOF
9802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009803$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804 typedef fpos_t ac__type_sizeof_;
9805static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9806static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009807#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009808#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009809int
9810main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009811{
Martin v. Löwis11437992002-04-12 09:54:03 +00009812
9813 FILE *f = fopen ("conftest.val", "w");
9814 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009815 return 1;
9816 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009818 long int i = longval ();
9819 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9820 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 fprintf (f, "%ld\n", i);
9822 }
9823 else
9824 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825 unsigned long int i = ulongval ();
9826 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9827 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 fprintf (f, "%lu\n", i);
9829 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009831
9832 ;
9833 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009834}
Martin v. Löwis11437992002-04-12 09:54:03 +00009835_ACEOF
9836rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837if { (ac_try="$ac_link"
9838case "(($ac_try" in
9839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9840 *) ac_try_echo=$ac_try;;
9841esac
9842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9843 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 { (case "(($ac_try" in
9848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9849 *) ac_try_echo=$ac_try;;
9850esac
9851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9852 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 ac_status=$?
9854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855 (exit $ac_status); }; }; then
9856 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009857else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 echo "$as_me: program exited with status $ac_status" >&5
9859echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009860sed 's/^/| /' conftest.$ac_ext >&5
9861
Martin v. Löwis11437992002-04-12 09:54:03 +00009862( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863if test "$ac_cv_type_fpos_t" = yes; then
9864 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009865See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009867See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868 { (exit 77); exit 77; }; }
9869 else
9870 ac_cv_sizeof_fpos_t=0
9871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009873rm -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 +00009874fi
9875rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009877{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9878echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9879
9880
9881
Martin v. Löwis11437992002-04-12 09:54:03 +00009882cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009883#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009884_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009885
Michael W. Hudson54241132001-12-07 15:38:26 +00009886
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887{ echo "$as_me:$LINENO: checking for size_t" >&5
9888echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009889if test "${ac_cv_type_size_t+set}" = set; then
9890 echo $ECHO_N "(cached) $ECHO_C" >&6
9891else
9892 cat >conftest.$ac_ext <<_ACEOF
9893/* confdefs.h. */
9894_ACEOF
9895cat confdefs.h >>conftest.$ac_ext
9896cat >>conftest.$ac_ext <<_ACEOF
9897/* end confdefs.h. */
9898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009900int
9901main ()
9902{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009904 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009905if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009906 return 0;
9907 ;
9908 return 0;
9909}
9910_ACEOF
9911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912if { (ac_try="$ac_compile"
9913case "(($ac_try" in
9914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9915 *) ac_try_echo=$ac_try;;
9916esac
9917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009919 ac_status=$?
9920 grep -v '^ *+' conftest.er1 >conftest.err
9921 rm -f conftest.er1
9922 cat conftest.err >&5
9923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924 (exit $ac_status); } && {
9925 test -z "$ac_c_werror_flag" ||
9926 test ! -s conftest.err
9927 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009928 ac_cv_type_size_t=yes
9929else
9930 echo "$as_me: failed program was:" >&5
9931sed 's/^/| /' conftest.$ac_ext >&5
9932
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009934fi
Brett Cannon19fab762007-06-02 03:02:29 +00009935
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9937fi
9938{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9939echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9940
9941# The cast to long int works around a bug in the HP C Compiler
9942# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9943# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9944# This bug is HP SR number 8606223364.
9945{ echo "$as_me:$LINENO: checking size of size_t" >&5
9946echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009947if test "${ac_cv_sizeof_size_t+set}" = set; then
9948 echo $ECHO_N "(cached) $ECHO_C" >&6
9949else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009950 if test "$cross_compiling" = yes; then
9951 # Depending upon the size, compute the lo and hi bounds.
9952cat >conftest.$ac_ext <<_ACEOF
9953/* confdefs.h. */
9954_ACEOF
9955cat confdefs.h >>conftest.$ac_ext
9956cat >>conftest.$ac_ext <<_ACEOF
9957/* end confdefs.h. */
9958$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009959 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009960int
9961main ()
9962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009963static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009964test_array [0] = 0
9965
9966 ;
9967 return 0;
9968}
9969_ACEOF
9970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009971if { (ac_try="$ac_compile"
9972case "(($ac_try" in
9973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9974 *) ac_try_echo=$ac_try;;
9975esac
9976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009978 ac_status=$?
9979 grep -v '^ *+' conftest.er1 >conftest.err
9980 rm -f conftest.er1
9981 cat conftest.err >&5
9982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009983 (exit $ac_status); } && {
9984 test -z "$ac_c_werror_flag" ||
9985 test ! -s conftest.err
9986 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009987 ac_lo=0 ac_mid=0
9988 while :; do
9989 cat >conftest.$ac_ext <<_ACEOF
9990/* confdefs.h. */
9991_ACEOF
9992cat confdefs.h >>conftest.$ac_ext
9993cat >>conftest.$ac_ext <<_ACEOF
9994/* end confdefs.h. */
9995$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009996 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009997int
9998main ()
9999{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010001test_array [0] = 0
10002
10003 ;
10004 return 0;
10005}
10006_ACEOF
10007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008if { (ac_try="$ac_compile"
10009case "(($ac_try" in
10010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10011 *) ac_try_echo=$ac_try;;
10012esac
10013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010015 ac_status=$?
10016 grep -v '^ *+' conftest.er1 >conftest.err
10017 rm -f conftest.er1
10018 cat conftest.err >&5
10019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020 (exit $ac_status); } && {
10021 test -z "$ac_c_werror_flag" ||
10022 test ! -s conftest.err
10023 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010024 ac_hi=$ac_mid; break
10025else
10026 echo "$as_me: failed program was:" >&5
10027sed 's/^/| /' conftest.$ac_ext >&5
10028
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029 ac_lo=`expr $ac_mid + 1`
10030 if test $ac_lo -le $ac_mid; then
10031 ac_lo= ac_hi=
10032 break
10033 fi
10034 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010036
10037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010038 done
10039else
10040 echo "$as_me: failed program was:" >&5
10041sed 's/^/| /' conftest.$ac_ext >&5
10042
Martin v. Löwiseba40652007-08-30 20:10:57 +000010043 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010044/* confdefs.h. */
10045_ACEOF
10046cat confdefs.h >>conftest.$ac_ext
10047cat >>conftest.$ac_ext <<_ACEOF
10048/* end confdefs.h. */
10049$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010051int
10052main ()
10053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010055test_array [0] = 0
10056
10057 ;
10058 return 0;
10059}
10060_ACEOF
10061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062if { (ac_try="$ac_compile"
10063case "(($ac_try" in
10064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10065 *) ac_try_echo=$ac_try;;
10066esac
10067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010069 ac_status=$?
10070 grep -v '^ *+' conftest.er1 >conftest.err
10071 rm -f conftest.er1
10072 cat conftest.err >&5
10073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010074 (exit $ac_status); } && {
10075 test -z "$ac_c_werror_flag" ||
10076 test ! -s conftest.err
10077 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010078 ac_hi=-1 ac_mid=-1
10079 while :; do
10080 cat >conftest.$ac_ext <<_ACEOF
10081/* confdefs.h. */
10082_ACEOF
10083cat confdefs.h >>conftest.$ac_ext
10084cat >>conftest.$ac_ext <<_ACEOF
10085/* end confdefs.h. */
10086$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010087 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010088int
10089main ()
10090{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010092test_array [0] = 0
10093
10094 ;
10095 return 0;
10096}
10097_ACEOF
10098rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099if { (ac_try="$ac_compile"
10100case "(($ac_try" in
10101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10102 *) ac_try_echo=$ac_try;;
10103esac
10104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10105 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010106 ac_status=$?
10107 grep -v '^ *+' conftest.er1 >conftest.err
10108 rm -f conftest.er1
10109 cat conftest.err >&5
10110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010111 (exit $ac_status); } && {
10112 test -z "$ac_c_werror_flag" ||
10113 test ! -s conftest.err
10114 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010115 ac_lo=$ac_mid; break
10116else
10117 echo "$as_me: failed program was:" >&5
10118sed 's/^/| /' conftest.$ac_ext >&5
10119
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120 ac_hi=`expr '(' $ac_mid ')' - 1`
10121 if test $ac_mid -le $ac_hi; then
10122 ac_lo= ac_hi=
10123 break
10124 fi
10125 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127
10128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010129 done
10130else
10131 echo "$as_me: failed program was:" >&5
10132sed 's/^/| /' conftest.$ac_ext >&5
10133
Martin v. Löwiseba40652007-08-30 20:10:57 +000010134 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136
10137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139
10140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010141# Binary search between lo and hi bounds.
10142while test "x$ac_lo" != "x$ac_hi"; do
10143 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10144 cat >conftest.$ac_ext <<_ACEOF
10145/* confdefs.h. */
10146_ACEOF
10147cat confdefs.h >>conftest.$ac_ext
10148cat >>conftest.$ac_ext <<_ACEOF
10149/* end confdefs.h. */
10150$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010151 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010152int
10153main ()
10154{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010156test_array [0] = 0
10157
10158 ;
10159 return 0;
10160}
10161_ACEOF
10162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163if { (ac_try="$ac_compile"
10164case "(($ac_try" in
10165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10166 *) ac_try_echo=$ac_try;;
10167esac
10168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010170 ac_status=$?
10171 grep -v '^ *+' conftest.er1 >conftest.err
10172 rm -f conftest.er1
10173 cat conftest.err >&5
10174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175 (exit $ac_status); } && {
10176 test -z "$ac_c_werror_flag" ||
10177 test ! -s conftest.err
10178 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010179 ac_hi=$ac_mid
10180else
10181 echo "$as_me: failed program was:" >&5
10182sed 's/^/| /' conftest.$ac_ext >&5
10183
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010186
10187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010188done
10189case $ac_lo in
10190?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010191'') if test "$ac_cv_type_size_t" = yes; then
10192 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010193See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010194echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010195See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196 { (exit 77); exit 77; }; }
10197 else
10198 ac_cv_sizeof_size_t=0
10199 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010200esac
10201else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010202 cat >conftest.$ac_ext <<_ACEOF
10203/* confdefs.h. */
10204_ACEOF
10205cat confdefs.h >>conftest.$ac_ext
10206cat >>conftest.$ac_ext <<_ACEOF
10207/* end confdefs.h. */
10208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010209 typedef size_t ac__type_sizeof_;
10210static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10211static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010212#include <stdio.h>
10213#include <stdlib.h>
10214int
10215main ()
10216{
10217
10218 FILE *f = fopen ("conftest.val", "w");
10219 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010220 return 1;
10221 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010222 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223 long int i = longval ();
10224 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10225 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010226 fprintf (f, "%ld\n", i);
10227 }
10228 else
10229 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230 unsigned long int i = ulongval ();
10231 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10232 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010233 fprintf (f, "%lu\n", i);
10234 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010236
10237 ;
10238 return 0;
10239}
10240_ACEOF
10241rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242if { (ac_try="$ac_link"
10243case "(($ac_try" in
10244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10245 *) ac_try_echo=$ac_try;;
10246esac
10247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10248 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010249 ac_status=$?
10250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010252 { (case "(($ac_try" in
10253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10254 *) ac_try_echo=$ac_try;;
10255esac
10256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10257 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010258 ac_status=$?
10259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10260 (exit $ac_status); }; }; then
10261 ac_cv_sizeof_size_t=`cat conftest.val`
10262else
10263 echo "$as_me: program exited with status $ac_status" >&5
10264echo "$as_me: failed program was:" >&5
10265sed 's/^/| /' conftest.$ac_ext >&5
10266
10267( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268if test "$ac_cv_type_size_t" = yes; then
10269 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010270See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010272See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010273 { (exit 77); exit 77; }; }
10274 else
10275 ac_cv_sizeof_size_t=0
10276 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010278rm -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 +000010279fi
10280rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010282{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10283echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10284
10285
10286
Martin v. Löwis18e16552006-02-15 17:27:45 +000010287cat >>confdefs.h <<_ACEOF
10288#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10289_ACEOF
10290
10291
Christian Heimes951cc0f2008-01-31 23:08:23 +000010292{ echo "$as_me:$LINENO: checking for pid_t" >&5
10293echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10294if test "${ac_cv_type_pid_t+set}" = set; then
10295 echo $ECHO_N "(cached) $ECHO_C" >&6
10296else
10297 cat >conftest.$ac_ext <<_ACEOF
10298/* confdefs.h. */
10299_ACEOF
10300cat confdefs.h >>conftest.$ac_ext
10301cat >>conftest.$ac_ext <<_ACEOF
10302/* end confdefs.h. */
10303$ac_includes_default
10304typedef pid_t ac__type_new_;
10305int
10306main ()
10307{
10308if ((ac__type_new_ *) 0)
10309 return 0;
10310if (sizeof (ac__type_new_))
10311 return 0;
10312 ;
10313 return 0;
10314}
10315_ACEOF
10316rm -f conftest.$ac_objext
10317if { (ac_try="$ac_compile"
10318case "(($ac_try" in
10319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10320 *) ac_try_echo=$ac_try;;
10321esac
10322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10323 (eval "$ac_compile") 2>conftest.er1
10324 ac_status=$?
10325 grep -v '^ *+' conftest.er1 >conftest.err
10326 rm -f conftest.er1
10327 cat conftest.err >&5
10328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10329 (exit $ac_status); } && {
10330 test -z "$ac_c_werror_flag" ||
10331 test ! -s conftest.err
10332 } && test -s conftest.$ac_objext; then
10333 ac_cv_type_pid_t=yes
10334else
10335 echo "$as_me: failed program was:" >&5
10336sed 's/^/| /' conftest.$ac_ext >&5
10337
10338 ac_cv_type_pid_t=no
10339fi
10340
10341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10342fi
10343{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10344echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10345
10346# The cast to long int works around a bug in the HP C Compiler
10347# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10348# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10349# This bug is HP SR number 8606223364.
10350{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10351echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10352if test "${ac_cv_sizeof_pid_t+set}" = set; then
10353 echo $ECHO_N "(cached) $ECHO_C" >&6
10354else
10355 if test "$cross_compiling" = yes; then
10356 # Depending upon the size, compute the lo and hi bounds.
10357cat >conftest.$ac_ext <<_ACEOF
10358/* confdefs.h. */
10359_ACEOF
10360cat confdefs.h >>conftest.$ac_ext
10361cat >>conftest.$ac_ext <<_ACEOF
10362/* end confdefs.h. */
10363$ac_includes_default
10364 typedef pid_t ac__type_sizeof_;
10365int
10366main ()
10367{
10368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10369test_array [0] = 0
10370
10371 ;
10372 return 0;
10373}
10374_ACEOF
10375rm -f conftest.$ac_objext
10376if { (ac_try="$ac_compile"
10377case "(($ac_try" in
10378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10379 *) ac_try_echo=$ac_try;;
10380esac
10381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10382 (eval "$ac_compile") 2>conftest.er1
10383 ac_status=$?
10384 grep -v '^ *+' conftest.er1 >conftest.err
10385 rm -f conftest.er1
10386 cat conftest.err >&5
10387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10388 (exit $ac_status); } && {
10389 test -z "$ac_c_werror_flag" ||
10390 test ! -s conftest.err
10391 } && test -s conftest.$ac_objext; then
10392 ac_lo=0 ac_mid=0
10393 while :; do
10394 cat >conftest.$ac_ext <<_ACEOF
10395/* confdefs.h. */
10396_ACEOF
10397cat confdefs.h >>conftest.$ac_ext
10398cat >>conftest.$ac_ext <<_ACEOF
10399/* end confdefs.h. */
10400$ac_includes_default
10401 typedef pid_t ac__type_sizeof_;
10402int
10403main ()
10404{
10405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10406test_array [0] = 0
10407
10408 ;
10409 return 0;
10410}
10411_ACEOF
10412rm -f conftest.$ac_objext
10413if { (ac_try="$ac_compile"
10414case "(($ac_try" in
10415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10416 *) ac_try_echo=$ac_try;;
10417esac
10418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10419 (eval "$ac_compile") 2>conftest.er1
10420 ac_status=$?
10421 grep -v '^ *+' conftest.er1 >conftest.err
10422 rm -f conftest.er1
10423 cat conftest.err >&5
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); } && {
10426 test -z "$ac_c_werror_flag" ||
10427 test ! -s conftest.err
10428 } && test -s conftest.$ac_objext; then
10429 ac_hi=$ac_mid; break
10430else
10431 echo "$as_me: failed program was:" >&5
10432sed 's/^/| /' conftest.$ac_ext >&5
10433
10434 ac_lo=`expr $ac_mid + 1`
10435 if test $ac_lo -le $ac_mid; then
10436 ac_lo= ac_hi=
10437 break
10438 fi
10439 ac_mid=`expr 2 '*' $ac_mid + 1`
10440fi
10441
10442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10443 done
10444else
10445 echo "$as_me: failed program was:" >&5
10446sed 's/^/| /' conftest.$ac_ext >&5
10447
10448 cat >conftest.$ac_ext <<_ACEOF
10449/* confdefs.h. */
10450_ACEOF
10451cat confdefs.h >>conftest.$ac_ext
10452cat >>conftest.$ac_ext <<_ACEOF
10453/* end confdefs.h. */
10454$ac_includes_default
10455 typedef pid_t ac__type_sizeof_;
10456int
10457main ()
10458{
10459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10460test_array [0] = 0
10461
10462 ;
10463 return 0;
10464}
10465_ACEOF
10466rm -f conftest.$ac_objext
10467if { (ac_try="$ac_compile"
10468case "(($ac_try" in
10469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10470 *) ac_try_echo=$ac_try;;
10471esac
10472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10473 (eval "$ac_compile") 2>conftest.er1
10474 ac_status=$?
10475 grep -v '^ *+' conftest.er1 >conftest.err
10476 rm -f conftest.er1
10477 cat conftest.err >&5
10478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10479 (exit $ac_status); } && {
10480 test -z "$ac_c_werror_flag" ||
10481 test ! -s conftest.err
10482 } && test -s conftest.$ac_objext; then
10483 ac_hi=-1 ac_mid=-1
10484 while :; do
10485 cat >conftest.$ac_ext <<_ACEOF
10486/* confdefs.h. */
10487_ACEOF
10488cat confdefs.h >>conftest.$ac_ext
10489cat >>conftest.$ac_ext <<_ACEOF
10490/* end confdefs.h. */
10491$ac_includes_default
10492 typedef pid_t ac__type_sizeof_;
10493int
10494main ()
10495{
10496static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10497test_array [0] = 0
10498
10499 ;
10500 return 0;
10501}
10502_ACEOF
10503rm -f conftest.$ac_objext
10504if { (ac_try="$ac_compile"
10505case "(($ac_try" in
10506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10507 *) ac_try_echo=$ac_try;;
10508esac
10509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10510 (eval "$ac_compile") 2>conftest.er1
10511 ac_status=$?
10512 grep -v '^ *+' conftest.er1 >conftest.err
10513 rm -f conftest.er1
10514 cat conftest.err >&5
10515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10516 (exit $ac_status); } && {
10517 test -z "$ac_c_werror_flag" ||
10518 test ! -s conftest.err
10519 } && test -s conftest.$ac_objext; then
10520 ac_lo=$ac_mid; break
10521else
10522 echo "$as_me: failed program was:" >&5
10523sed 's/^/| /' conftest.$ac_ext >&5
10524
10525 ac_hi=`expr '(' $ac_mid ')' - 1`
10526 if test $ac_mid -le $ac_hi; then
10527 ac_lo= ac_hi=
10528 break
10529 fi
10530 ac_mid=`expr 2 '*' $ac_mid`
10531fi
10532
10533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10534 done
10535else
10536 echo "$as_me: failed program was:" >&5
10537sed 's/^/| /' conftest.$ac_ext >&5
10538
10539 ac_lo= ac_hi=
10540fi
10541
10542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10543fi
10544
10545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10546# Binary search between lo and hi bounds.
10547while test "x$ac_lo" != "x$ac_hi"; do
10548 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10549 cat >conftest.$ac_ext <<_ACEOF
10550/* confdefs.h. */
10551_ACEOF
10552cat confdefs.h >>conftest.$ac_ext
10553cat >>conftest.$ac_ext <<_ACEOF
10554/* end confdefs.h. */
10555$ac_includes_default
10556 typedef pid_t ac__type_sizeof_;
10557int
10558main ()
10559{
10560static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10561test_array [0] = 0
10562
10563 ;
10564 return 0;
10565}
10566_ACEOF
10567rm -f conftest.$ac_objext
10568if { (ac_try="$ac_compile"
10569case "(($ac_try" in
10570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10571 *) ac_try_echo=$ac_try;;
10572esac
10573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10574 (eval "$ac_compile") 2>conftest.er1
10575 ac_status=$?
10576 grep -v '^ *+' conftest.er1 >conftest.err
10577 rm -f conftest.er1
10578 cat conftest.err >&5
10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580 (exit $ac_status); } && {
10581 test -z "$ac_c_werror_flag" ||
10582 test ! -s conftest.err
10583 } && test -s conftest.$ac_objext; then
10584 ac_hi=$ac_mid
10585else
10586 echo "$as_me: failed program was:" >&5
10587sed 's/^/| /' conftest.$ac_ext >&5
10588
10589 ac_lo=`expr '(' $ac_mid ')' + 1`
10590fi
10591
10592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10593done
10594case $ac_lo in
10595?*) ac_cv_sizeof_pid_t=$ac_lo;;
10596'') if test "$ac_cv_type_pid_t" = yes; then
10597 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10598See \`config.log' for more details." >&5
10599echo "$as_me: error: cannot compute sizeof (pid_t)
10600See \`config.log' for more details." >&2;}
10601 { (exit 77); exit 77; }; }
10602 else
10603 ac_cv_sizeof_pid_t=0
10604 fi ;;
10605esac
10606else
10607 cat >conftest.$ac_ext <<_ACEOF
10608/* confdefs.h. */
10609_ACEOF
10610cat confdefs.h >>conftest.$ac_ext
10611cat >>conftest.$ac_ext <<_ACEOF
10612/* end confdefs.h. */
10613$ac_includes_default
10614 typedef pid_t ac__type_sizeof_;
10615static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10616static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10617#include <stdio.h>
10618#include <stdlib.h>
10619int
10620main ()
10621{
10622
10623 FILE *f = fopen ("conftest.val", "w");
10624 if (! f)
10625 return 1;
10626 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10627 {
10628 long int i = longval ();
10629 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10630 return 1;
10631 fprintf (f, "%ld\n", i);
10632 }
10633 else
10634 {
10635 unsigned long int i = ulongval ();
10636 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10637 return 1;
10638 fprintf (f, "%lu\n", i);
10639 }
10640 return ferror (f) || fclose (f) != 0;
10641
10642 ;
10643 return 0;
10644}
10645_ACEOF
10646rm -f conftest$ac_exeext
10647if { (ac_try="$ac_link"
10648case "(($ac_try" in
10649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10650 *) ac_try_echo=$ac_try;;
10651esac
10652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10653 (eval "$ac_link") 2>&5
10654 ac_status=$?
10655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10656 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10657 { (case "(($ac_try" in
10658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10659 *) ac_try_echo=$ac_try;;
10660esac
10661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10662 (eval "$ac_try") 2>&5
10663 ac_status=$?
10664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10665 (exit $ac_status); }; }; then
10666 ac_cv_sizeof_pid_t=`cat conftest.val`
10667else
10668 echo "$as_me: program exited with status $ac_status" >&5
10669echo "$as_me: failed program was:" >&5
10670sed 's/^/| /' conftest.$ac_ext >&5
10671
10672( exit $ac_status )
10673if test "$ac_cv_type_pid_t" = yes; then
10674 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10675See \`config.log' for more details." >&5
10676echo "$as_me: error: cannot compute sizeof (pid_t)
10677See \`config.log' for more details." >&2;}
10678 { (exit 77); exit 77; }; }
10679 else
10680 ac_cv_sizeof_pid_t=0
10681 fi
10682fi
10683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10684fi
10685rm -f conftest.val
10686fi
10687{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10688echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10689
10690
10691
10692cat >>confdefs.h <<_ACEOF
10693#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10694_ACEOF
10695
10696
Michael W. Hudson54241132001-12-07 15:38:26 +000010697
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698{ echo "$as_me:$LINENO: checking for long long support" >&5
10699echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010700have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010702/* confdefs.h. */
10703_ACEOF
10704cat confdefs.h >>conftest.$ac_ext
10705cat >>conftest.$ac_ext <<_ACEOF
10706/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010707
Martin v. Löwis11437992002-04-12 09:54:03 +000010708int
10709main ()
10710{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010711long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717if { (ac_try="$ac_compile"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
10722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010725 grep -v '^ *+' conftest.er1 >conftest.err
10726 rm -f conftest.er1
10727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010729 (exit $ac_status); } && {
10730 test -z "$ac_c_werror_flag" ||
10731 test ! -s conftest.err
10732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
10734
10735cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010736#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010737_ACEOF
10738
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010739 have_long_long=yes
10740
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010741else
Martin v. Löwis11437992002-04-12 09:54:03 +000010742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010743sed 's/^/| /' conftest.$ac_ext >&5
10744
Martin v. Löwiseba40652007-08-30 20:10:57 +000010745
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010747
10748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10749{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10750echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010751if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752{ echo "$as_me:$LINENO: checking for long long" >&5
10753echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010754if test "${ac_cv_type_long_long+set}" = set; then
10755 echo $ECHO_N "(cached) $ECHO_C" >&6
10756else
10757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010758/* confdefs.h. */
10759_ACEOF
10760cat confdefs.h >>conftest.$ac_ext
10761cat >>conftest.$ac_ext <<_ACEOF
10762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010763$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010765int
10766main ()
10767{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010768if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010770if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 return 0;
10772 ;
10773 return 0;
10774}
10775_ACEOF
10776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777if { (ac_try="$ac_compile"
10778case "(($ac_try" in
10779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10780 *) ac_try_echo=$ac_try;;
10781esac
10782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010785 grep -v '^ *+' conftest.er1 >conftest.err
10786 rm -f conftest.er1
10787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789 (exit $ac_status); } && {
10790 test -z "$ac_c_werror_flag" ||
10791 test ! -s conftest.err
10792 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ac_cv_type_long_long=yes
10794else
10795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010796sed 's/^/| /' conftest.$ac_ext >&5
10797
Martin v. Löwiseba40652007-08-30 20:10:57 +000010798 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010799fi
Brett Cannon19fab762007-06-02 03:02:29 +000010800
Martin v. Löwiseba40652007-08-30 20:10:57 +000010801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10802fi
10803{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10804echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10805
10806# The cast to long int works around a bug in the HP C Compiler
10807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10809# This bug is HP SR number 8606223364.
10810{ echo "$as_me:$LINENO: checking size of long long" >&5
10811echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010812if test "${ac_cv_sizeof_long_long+set}" = set; then
10813 echo $ECHO_N "(cached) $ECHO_C" >&6
10814else
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 if test "$cross_compiling" = yes; then
10816 # Depending upon the size, compute the lo and hi bounds.
10817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* confdefs.h. */
10819_ACEOF
10820cat confdefs.h >>conftest.$ac_ext
10821cat >>conftest.$ac_ext <<_ACEOF
10822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010823$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010824 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010825int
10826main ()
10827{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010828static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010829test_array [0] = 0
10830
10831 ;
10832 return 0;
10833}
10834_ACEOF
10835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836if { (ac_try="$ac_compile"
10837case "(($ac_try" in
10838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10839 *) ac_try_echo=$ac_try;;
10840esac
10841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010844 grep -v '^ *+' conftest.er1 >conftest.err
10845 rm -f conftest.er1
10846 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010848 (exit $ac_status); } && {
10849 test -z "$ac_c_werror_flag" ||
10850 test ! -s conftest.err
10851 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 ac_lo=0 ac_mid=0
10853 while :; do
10854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010855/* confdefs.h. */
10856_ACEOF
10857cat confdefs.h >>conftest.$ac_ext
10858cat >>conftest.$ac_ext <<_ACEOF
10859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010860$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010861 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010862int
10863main ()
10864{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010866test_array [0] = 0
10867
10868 ;
10869 return 0;
10870}
10871_ACEOF
10872rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010873if { (ac_try="$ac_compile"
10874case "(($ac_try" in
10875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10876 *) ac_try_echo=$ac_try;;
10877esac
10878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010881 grep -v '^ *+' conftest.er1 >conftest.err
10882 rm -f conftest.er1
10883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010885 (exit $ac_status); } && {
10886 test -z "$ac_c_werror_flag" ||
10887 test ! -s conftest.err
10888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 ac_hi=$ac_mid; break
10890else
10891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010892sed 's/^/| /' conftest.$ac_ext >&5
10893
Martin v. Löwiseba40652007-08-30 20:10:57 +000010894 ac_lo=`expr $ac_mid + 1`
10895 if test $ac_lo -le $ac_mid; then
10896 ac_lo= ac_hi=
10897 break
10898 fi
10899 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010901
10902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 done
10904else
10905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010906sed 's/^/| /' conftest.$ac_ext >&5
10907
Martin v. Löwiseba40652007-08-30 20:10:57 +000010908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010909/* confdefs.h. */
10910_ACEOF
10911cat confdefs.h >>conftest.$ac_ext
10912cat >>conftest.$ac_ext <<_ACEOF
10913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010914$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010915 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010916int
10917main ()
10918{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010919static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010920test_array [0] = 0
10921
10922 ;
10923 return 0;
10924}
10925_ACEOF
10926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927if { (ac_try="$ac_compile"
10928case "(($ac_try" in
10929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10930 *) ac_try_echo=$ac_try;;
10931esac
10932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010935 grep -v '^ *+' conftest.er1 >conftest.err
10936 rm -f conftest.er1
10937 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010939 (exit $ac_status); } && {
10940 test -z "$ac_c_werror_flag" ||
10941 test ! -s conftest.err
10942 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010943 ac_hi=-1 ac_mid=-1
10944 while :; do
10945 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* confdefs.h. */
10947_ACEOF
10948cat confdefs.h >>conftest.$ac_ext
10949cat >>conftest.$ac_ext <<_ACEOF
10950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010951$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010952 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010953int
10954main ()
10955{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010957test_array [0] = 0
10958
10959 ;
10960 return 0;
10961}
10962_ACEOF
10963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010964if { (ac_try="$ac_compile"
10965case "(($ac_try" in
10966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10967 *) ac_try_echo=$ac_try;;
10968esac
10969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010972 grep -v '^ *+' conftest.er1 >conftest.err
10973 rm -f conftest.er1
10974 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010976 (exit $ac_status); } && {
10977 test -z "$ac_c_werror_flag" ||
10978 test ! -s conftest.err
10979 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ac_lo=$ac_mid; break
10981else
10982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010983sed 's/^/| /' conftest.$ac_ext >&5
10984
Martin v. Löwiseba40652007-08-30 20:10:57 +000010985 ac_hi=`expr '(' $ac_mid ')' - 1`
10986 if test $ac_mid -le $ac_hi; then
10987 ac_lo= ac_hi=
10988 break
10989 fi
10990 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010992
10993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 done
10995else
10996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010997sed 's/^/| /' conftest.$ac_ext >&5
10998
Martin v. Löwiseba40652007-08-30 20:10:57 +000010999 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001
11002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011004
11005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011006# Binary search between lo and hi bounds.
11007while test "x$ac_lo" != "x$ac_hi"; do
11008 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* confdefs.h. */
11011_ACEOF
11012cat confdefs.h >>conftest.$ac_ext
11013cat >>conftest.$ac_ext <<_ACEOF
11014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011015$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011016 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011017int
11018main ()
11019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011020static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011021test_array [0] = 0
11022
11023 ;
11024 return 0;
11025}
11026_ACEOF
11027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028if { (ac_try="$ac_compile"
11029case "(($ac_try" in
11030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11031 *) ac_try_echo=$ac_try;;
11032esac
11033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011036 grep -v '^ *+' conftest.er1 >conftest.err
11037 rm -f conftest.er1
11038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011040 (exit $ac_status); } && {
11041 test -z "$ac_c_werror_flag" ||
11042 test ! -s conftest.err
11043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ac_hi=$ac_mid
11045else
11046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011047sed 's/^/| /' conftest.$ac_ext >&5
11048
Martin v. Löwiseba40652007-08-30 20:10:57 +000011049 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011051
11052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011053done
11054case $ac_lo in
11055?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011056'') if test "$ac_cv_type_long_long" = yes; then
11057 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011058See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011059echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011060See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061 { (exit 77); exit 77; }; }
11062 else
11063 ac_cv_sizeof_long_long=0
11064 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011065esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011066else
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* confdefs.h. */
11069_ACEOF
11070cat confdefs.h >>conftest.$ac_ext
11071cat >>conftest.$ac_ext <<_ACEOF
11072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011073$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011074 typedef long long ac__type_sizeof_;
11075static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11076static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011077#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011078#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011079int
11080main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011081{
Martin v. Löwis11437992002-04-12 09:54:03 +000011082
11083 FILE *f = fopen ("conftest.val", "w");
11084 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085 return 1;
11086 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088 long int i = longval ();
11089 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11090 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 fprintf (f, "%ld\n", i);
11092 }
11093 else
11094 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011095 unsigned long int i = ulongval ();
11096 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11097 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011098 fprintf (f, "%lu\n", i);
11099 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011101
11102 ;
11103 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011104}
Martin v. Löwis11437992002-04-12 09:54:03 +000011105_ACEOF
11106rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011107if { (ac_try="$ac_link"
11108case "(($ac_try" in
11109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11110 *) ac_try_echo=$ac_try;;
11111esac
11112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11113 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 ac_status=$?
11115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011117 { (case "(($ac_try" in
11118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11119 *) ac_try_echo=$ac_try;;
11120esac
11121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11122 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_status=$?
11124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11125 (exit $ac_status); }; }; then
11126 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011127else
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 echo "$as_me: program exited with status $ac_status" >&5
11129echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011130sed 's/^/| /' conftest.$ac_ext >&5
11131
Martin v. Löwis11437992002-04-12 09:54:03 +000011132( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011133if test "$ac_cv_type_long_long" = yes; then
11134 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011135See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011137See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011138 { (exit 77); exit 77; }; }
11139 else
11140 ac_cv_sizeof_long_long=0
11141 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011143rm -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 +000011144fi
11145rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011147{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11148echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11149
11150
11151
Martin v. Löwis11437992002-04-12 09:54:03 +000011152cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011153#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011154_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011155
Michael W. Hudson54241132001-12-07 15:38:26 +000011156
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011157fi
11158
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011159{ echo "$as_me:$LINENO: checking for long double support" >&5
11160echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11161have_long_double=no
11162cat >conftest.$ac_ext <<_ACEOF
11163/* confdefs.h. */
11164_ACEOF
11165cat confdefs.h >>conftest.$ac_ext
11166cat >>conftest.$ac_ext <<_ACEOF
11167/* end confdefs.h. */
11168
11169int
11170main ()
11171{
11172long double x; x = (long double)0.;
11173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext
11178if { (ac_try="$ac_compile"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
11183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11184 (eval "$ac_compile") 2>conftest.er1
11185 ac_status=$?
11186 grep -v '^ *+' conftest.er1 >conftest.err
11187 rm -f conftest.er1
11188 cat conftest.err >&5
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); } && {
11191 test -z "$ac_c_werror_flag" ||
11192 test ! -s conftest.err
11193 } && test -s conftest.$ac_objext; then
11194
11195
11196cat >>confdefs.h <<\_ACEOF
11197#define HAVE_LONG_DOUBLE 1
11198_ACEOF
11199
11200 have_long_double=yes
11201
11202else
11203 echo "$as_me: failed program was:" >&5
11204sed 's/^/| /' conftest.$ac_ext >&5
11205
11206
11207fi
11208
11209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11210{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11211echo "${ECHO_T}$have_long_double" >&6; }
11212if test "$have_long_double" = yes ; then
11213{ echo "$as_me:$LINENO: checking for long double" >&5
11214echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11215if test "${ac_cv_type_long_double+set}" = set; then
11216 echo $ECHO_N "(cached) $ECHO_C" >&6
11217else
11218 cat >conftest.$ac_ext <<_ACEOF
11219/* confdefs.h. */
11220_ACEOF
11221cat confdefs.h >>conftest.$ac_ext
11222cat >>conftest.$ac_ext <<_ACEOF
11223/* end confdefs.h. */
11224$ac_includes_default
11225typedef long double ac__type_new_;
11226int
11227main ()
11228{
11229if ((ac__type_new_ *) 0)
11230 return 0;
11231if (sizeof (ac__type_new_))
11232 return 0;
11233 ;
11234 return 0;
11235}
11236_ACEOF
11237rm -f conftest.$ac_objext
11238if { (ac_try="$ac_compile"
11239case "(($ac_try" in
11240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11241 *) ac_try_echo=$ac_try;;
11242esac
11243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11244 (eval "$ac_compile") 2>conftest.er1
11245 ac_status=$?
11246 grep -v '^ *+' conftest.er1 >conftest.err
11247 rm -f conftest.er1
11248 cat conftest.err >&5
11249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11250 (exit $ac_status); } && {
11251 test -z "$ac_c_werror_flag" ||
11252 test ! -s conftest.err
11253 } && test -s conftest.$ac_objext; then
11254 ac_cv_type_long_double=yes
11255else
11256 echo "$as_me: failed program was:" >&5
11257sed 's/^/| /' conftest.$ac_ext >&5
11258
11259 ac_cv_type_long_double=no
11260fi
11261
11262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11263fi
11264{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11265echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11266
11267# The cast to long int works around a bug in the HP C Compiler
11268# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11269# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11270# This bug is HP SR number 8606223364.
11271{ echo "$as_me:$LINENO: checking size of long double" >&5
11272echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11273if test "${ac_cv_sizeof_long_double+set}" = set; then
11274 echo $ECHO_N "(cached) $ECHO_C" >&6
11275else
11276 if test "$cross_compiling" = yes; then
11277 # Depending upon the size, compute the lo and hi bounds.
11278cat >conftest.$ac_ext <<_ACEOF
11279/* confdefs.h. */
11280_ACEOF
11281cat confdefs.h >>conftest.$ac_ext
11282cat >>conftest.$ac_ext <<_ACEOF
11283/* end confdefs.h. */
11284$ac_includes_default
11285 typedef long double ac__type_sizeof_;
11286int
11287main ()
11288{
11289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11290test_array [0] = 0
11291
11292 ;
11293 return 0;
11294}
11295_ACEOF
11296rm -f conftest.$ac_objext
11297if { (ac_try="$ac_compile"
11298case "(($ac_try" in
11299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11300 *) ac_try_echo=$ac_try;;
11301esac
11302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11303 (eval "$ac_compile") 2>conftest.er1
11304 ac_status=$?
11305 grep -v '^ *+' conftest.er1 >conftest.err
11306 rm -f conftest.er1
11307 cat conftest.err >&5
11308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11309 (exit $ac_status); } && {
11310 test -z "$ac_c_werror_flag" ||
11311 test ! -s conftest.err
11312 } && test -s conftest.$ac_objext; then
11313 ac_lo=0 ac_mid=0
11314 while :; do
11315 cat >conftest.$ac_ext <<_ACEOF
11316/* confdefs.h. */
11317_ACEOF
11318cat confdefs.h >>conftest.$ac_ext
11319cat >>conftest.$ac_ext <<_ACEOF
11320/* end confdefs.h. */
11321$ac_includes_default
11322 typedef long double ac__type_sizeof_;
11323int
11324main ()
11325{
11326static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11327test_array [0] = 0
11328
11329 ;
11330 return 0;
11331}
11332_ACEOF
11333rm -f conftest.$ac_objext
11334if { (ac_try="$ac_compile"
11335case "(($ac_try" in
11336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11337 *) ac_try_echo=$ac_try;;
11338esac
11339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11340 (eval "$ac_compile") 2>conftest.er1
11341 ac_status=$?
11342 grep -v '^ *+' conftest.er1 >conftest.err
11343 rm -f conftest.er1
11344 cat conftest.err >&5
11345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11346 (exit $ac_status); } && {
11347 test -z "$ac_c_werror_flag" ||
11348 test ! -s conftest.err
11349 } && test -s conftest.$ac_objext; then
11350 ac_hi=$ac_mid; break
11351else
11352 echo "$as_me: failed program was:" >&5
11353sed 's/^/| /' conftest.$ac_ext >&5
11354
11355 ac_lo=`expr $ac_mid + 1`
11356 if test $ac_lo -le $ac_mid; then
11357 ac_lo= ac_hi=
11358 break
11359 fi
11360 ac_mid=`expr 2 '*' $ac_mid + 1`
11361fi
11362
11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364 done
11365else
11366 echo "$as_me: failed program was:" >&5
11367sed 's/^/| /' conftest.$ac_ext >&5
11368
11369 cat >conftest.$ac_ext <<_ACEOF
11370/* confdefs.h. */
11371_ACEOF
11372cat confdefs.h >>conftest.$ac_ext
11373cat >>conftest.$ac_ext <<_ACEOF
11374/* end confdefs.h. */
11375$ac_includes_default
11376 typedef long double ac__type_sizeof_;
11377int
11378main ()
11379{
11380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11381test_array [0] = 0
11382
11383 ;
11384 return 0;
11385}
11386_ACEOF
11387rm -f conftest.$ac_objext
11388if { (ac_try="$ac_compile"
11389case "(($ac_try" in
11390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11391 *) ac_try_echo=$ac_try;;
11392esac
11393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11394 (eval "$ac_compile") 2>conftest.er1
11395 ac_status=$?
11396 grep -v '^ *+' conftest.er1 >conftest.err
11397 rm -f conftest.er1
11398 cat conftest.err >&5
11399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11400 (exit $ac_status); } && {
11401 test -z "$ac_c_werror_flag" ||
11402 test ! -s conftest.err
11403 } && test -s conftest.$ac_objext; then
11404 ac_hi=-1 ac_mid=-1
11405 while :; do
11406 cat >conftest.$ac_ext <<_ACEOF
11407/* confdefs.h. */
11408_ACEOF
11409cat confdefs.h >>conftest.$ac_ext
11410cat >>conftest.$ac_ext <<_ACEOF
11411/* end confdefs.h. */
11412$ac_includes_default
11413 typedef long double ac__type_sizeof_;
11414int
11415main ()
11416{
11417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11418test_array [0] = 0
11419
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424rm -f conftest.$ac_objext
11425if { (ac_try="$ac_compile"
11426case "(($ac_try" in
11427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11428 *) ac_try_echo=$ac_try;;
11429esac
11430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11431 (eval "$ac_compile") 2>conftest.er1
11432 ac_status=$?
11433 grep -v '^ *+' conftest.er1 >conftest.err
11434 rm -f conftest.er1
11435 cat conftest.err >&5
11436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437 (exit $ac_status); } && {
11438 test -z "$ac_c_werror_flag" ||
11439 test ! -s conftest.err
11440 } && test -s conftest.$ac_objext; then
11441 ac_lo=$ac_mid; break
11442else
11443 echo "$as_me: failed program was:" >&5
11444sed 's/^/| /' conftest.$ac_ext >&5
11445
11446 ac_hi=`expr '(' $ac_mid ')' - 1`
11447 if test $ac_mid -le $ac_hi; then
11448 ac_lo= ac_hi=
11449 break
11450 fi
11451 ac_mid=`expr 2 '*' $ac_mid`
11452fi
11453
11454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11455 done
11456else
11457 echo "$as_me: failed program was:" >&5
11458sed 's/^/| /' conftest.$ac_ext >&5
11459
11460 ac_lo= ac_hi=
11461fi
11462
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11464fi
11465
11466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11467# Binary search between lo and hi bounds.
11468while test "x$ac_lo" != "x$ac_hi"; do
11469 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11470 cat >conftest.$ac_ext <<_ACEOF
11471/* confdefs.h. */
11472_ACEOF
11473cat confdefs.h >>conftest.$ac_ext
11474cat >>conftest.$ac_ext <<_ACEOF
11475/* end confdefs.h. */
11476$ac_includes_default
11477 typedef long double ac__type_sizeof_;
11478int
11479main ()
11480{
11481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11482test_array [0] = 0
11483
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488rm -f conftest.$ac_objext
11489if { (ac_try="$ac_compile"
11490case "(($ac_try" in
11491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11492 *) ac_try_echo=$ac_try;;
11493esac
11494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11495 (eval "$ac_compile") 2>conftest.er1
11496 ac_status=$?
11497 grep -v '^ *+' conftest.er1 >conftest.err
11498 rm -f conftest.er1
11499 cat conftest.err >&5
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); } && {
11502 test -z "$ac_c_werror_flag" ||
11503 test ! -s conftest.err
11504 } && test -s conftest.$ac_objext; then
11505 ac_hi=$ac_mid
11506else
11507 echo "$as_me: failed program was:" >&5
11508sed 's/^/| /' conftest.$ac_ext >&5
11509
11510 ac_lo=`expr '(' $ac_mid ')' + 1`
11511fi
11512
11513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11514done
11515case $ac_lo in
11516?*) ac_cv_sizeof_long_double=$ac_lo;;
11517'') if test "$ac_cv_type_long_double" = yes; then
11518 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11519See \`config.log' for more details." >&5
11520echo "$as_me: error: cannot compute sizeof (long double)
11521See \`config.log' for more details." >&2;}
11522 { (exit 77); exit 77; }; }
11523 else
11524 ac_cv_sizeof_long_double=0
11525 fi ;;
11526esac
11527else
11528 cat >conftest.$ac_ext <<_ACEOF
11529/* confdefs.h. */
11530_ACEOF
11531cat confdefs.h >>conftest.$ac_ext
11532cat >>conftest.$ac_ext <<_ACEOF
11533/* end confdefs.h. */
11534$ac_includes_default
11535 typedef long double ac__type_sizeof_;
11536static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11537static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11538#include <stdio.h>
11539#include <stdlib.h>
11540int
11541main ()
11542{
11543
11544 FILE *f = fopen ("conftest.val", "w");
11545 if (! f)
11546 return 1;
11547 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11548 {
11549 long int i = longval ();
11550 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11551 return 1;
11552 fprintf (f, "%ld\n", i);
11553 }
11554 else
11555 {
11556 unsigned long int i = ulongval ();
11557 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11558 return 1;
11559 fprintf (f, "%lu\n", i);
11560 }
11561 return ferror (f) || fclose (f) != 0;
11562
11563 ;
11564 return 0;
11565}
11566_ACEOF
11567rm -f conftest$ac_exeext
11568if { (ac_try="$ac_link"
11569case "(($ac_try" in
11570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11571 *) ac_try_echo=$ac_try;;
11572esac
11573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11574 (eval "$ac_link") 2>&5
11575 ac_status=$?
11576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11578 { (case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
11582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11583 (eval "$ac_try") 2>&5
11584 ac_status=$?
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); }; }; then
11587 ac_cv_sizeof_long_double=`cat conftest.val`
11588else
11589 echo "$as_me: program exited with status $ac_status" >&5
11590echo "$as_me: failed program was:" >&5
11591sed 's/^/| /' conftest.$ac_ext >&5
11592
11593( exit $ac_status )
11594if test "$ac_cv_type_long_double" = yes; then
11595 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11596See \`config.log' for more details." >&5
11597echo "$as_me: error: cannot compute sizeof (long double)
11598See \`config.log' for more details." >&2;}
11599 { (exit 77); exit 77; }; }
11600 else
11601 ac_cv_sizeof_long_double=0
11602 fi
11603fi
11604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11605fi
11606rm -f conftest.val
11607fi
11608{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11609echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11610
11611
11612
11613cat >>confdefs.h <<_ACEOF
11614#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11615_ACEOF
11616
11617
11618fi
11619
Martin v. Löwiseba40652007-08-30 20:10:57 +000011620{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11621echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011622have_c99_bool=no
11623cat >conftest.$ac_ext <<_ACEOF
11624/* confdefs.h. */
11625_ACEOF
11626cat confdefs.h >>conftest.$ac_ext
11627cat >>conftest.$ac_ext <<_ACEOF
11628/* end confdefs.h. */
11629
11630int
11631main ()
11632{
11633_Bool x; x = (_Bool)0;
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011639if { (ac_try="$ac_compile"
11640case "(($ac_try" in
11641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11642 *) ac_try_echo=$ac_try;;
11643esac
11644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011646 ac_status=$?
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011651 (exit $ac_status); } && {
11652 test -z "$ac_c_werror_flag" ||
11653 test ! -s conftest.err
11654 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011655
11656
11657cat >>confdefs.h <<\_ACEOF
11658#define HAVE_C99_BOOL 1
11659_ACEOF
11660
11661 have_c99_bool=yes
11662
11663else
11664 echo "$as_me: failed program was:" >&5
11665sed 's/^/| /' conftest.$ac_ext >&5
11666
Martin v. Löwiseba40652007-08-30 20:10:57 +000011667
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669
11670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11671{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11672echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011673if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674{ echo "$as_me:$LINENO: checking for _Bool" >&5
11675echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011676if test "${ac_cv_type__Bool+set}" = set; then
11677 echo $ECHO_N "(cached) $ECHO_C" >&6
11678else
11679 cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011687int
11688main ()
11689{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011690if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011691 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011692if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011693 return 0;
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699if { (ac_try="$ac_compile"
11700case "(($ac_try" in
11701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11702 *) ac_try_echo=$ac_try;;
11703esac
11704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011706 ac_status=$?
11707 grep -v '^ *+' conftest.er1 >conftest.err
11708 rm -f conftest.er1
11709 cat conftest.err >&5
11710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011711 (exit $ac_status); } && {
11712 test -z "$ac_c_werror_flag" ||
11713 test ! -s conftest.err
11714 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011715 ac_cv_type__Bool=yes
11716else
11717 echo "$as_me: failed program was:" >&5
11718sed 's/^/| /' conftest.$ac_ext >&5
11719
Martin v. Löwiseba40652007-08-30 20:10:57 +000011720 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011721fi
Brett Cannon19fab762007-06-02 03:02:29 +000011722
Martin v. Löwiseba40652007-08-30 20:10:57 +000011723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11724fi
11725{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11726echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11727
11728# The cast to long int works around a bug in the HP C Compiler
11729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11731# This bug is HP SR number 8606223364.
11732{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11733echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011734if test "${ac_cv_sizeof__Bool+set}" = set; then
11735 echo $ECHO_N "(cached) $ECHO_C" >&6
11736else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011737 if test "$cross_compiling" = yes; then
11738 # Depending upon the size, compute the lo and hi bounds.
11739cat >conftest.$ac_ext <<_ACEOF
11740/* confdefs.h. */
11741_ACEOF
11742cat confdefs.h >>conftest.$ac_ext
11743cat >>conftest.$ac_ext <<_ACEOF
11744/* end confdefs.h. */
11745$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011746 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011747int
11748main ()
11749{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011751test_array [0] = 0
11752
11753 ;
11754 return 0;
11755}
11756_ACEOF
11757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758if { (ac_try="$ac_compile"
11759case "(($ac_try" in
11760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11761 *) ac_try_echo=$ac_try;;
11762esac
11763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011765 ac_status=$?
11766 grep -v '^ *+' conftest.er1 >conftest.err
11767 rm -f conftest.er1
11768 cat conftest.err >&5
11769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011770 (exit $ac_status); } && {
11771 test -z "$ac_c_werror_flag" ||
11772 test ! -s conftest.err
11773 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011774 ac_lo=0 ac_mid=0
11775 while :; do
11776 cat >conftest.$ac_ext <<_ACEOF
11777/* confdefs.h. */
11778_ACEOF
11779cat confdefs.h >>conftest.$ac_ext
11780cat >>conftest.$ac_ext <<_ACEOF
11781/* end confdefs.h. */
11782$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011783 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011784int
11785main ()
11786{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011788test_array [0] = 0
11789
11790 ;
11791 return 0;
11792}
11793_ACEOF
11794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011795if { (ac_try="$ac_compile"
11796case "(($ac_try" in
11797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11798 *) ac_try_echo=$ac_try;;
11799esac
11800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011802 ac_status=$?
11803 grep -v '^ *+' conftest.er1 >conftest.err
11804 rm -f conftest.er1
11805 cat conftest.err >&5
11806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011807 (exit $ac_status); } && {
11808 test -z "$ac_c_werror_flag" ||
11809 test ! -s conftest.err
11810 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011811 ac_hi=$ac_mid; break
11812else
11813 echo "$as_me: failed program was:" >&5
11814sed 's/^/| /' conftest.$ac_ext >&5
11815
Martin v. Löwiseba40652007-08-30 20:10:57 +000011816 ac_lo=`expr $ac_mid + 1`
11817 if test $ac_lo -le $ac_mid; then
11818 ac_lo= ac_hi=
11819 break
11820 fi
11821 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011823
11824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011825 done
11826else
11827 echo "$as_me: failed program was:" >&5
11828sed 's/^/| /' conftest.$ac_ext >&5
11829
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011831/* confdefs.h. */
11832_ACEOF
11833cat confdefs.h >>conftest.$ac_ext
11834cat >>conftest.$ac_ext <<_ACEOF
11835/* end confdefs.h. */
11836$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011837 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011838int
11839main ()
11840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011842test_array [0] = 0
11843
11844 ;
11845 return 0;
11846}
11847_ACEOF
11848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011849if { (ac_try="$ac_compile"
11850case "(($ac_try" in
11851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11852 *) ac_try_echo=$ac_try;;
11853esac
11854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011856 ac_status=$?
11857 grep -v '^ *+' conftest.er1 >conftest.err
11858 rm -f conftest.er1
11859 cat conftest.err >&5
11860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861 (exit $ac_status); } && {
11862 test -z "$ac_c_werror_flag" ||
11863 test ! -s conftest.err
11864 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011865 ac_hi=-1 ac_mid=-1
11866 while :; do
11867 cat >conftest.$ac_ext <<_ACEOF
11868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
11873$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011874 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011875int
11876main ()
11877{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011879test_array [0] = 0
11880
11881 ;
11882 return 0;
11883}
11884_ACEOF
11885rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886if { (ac_try="$ac_compile"
11887case "(($ac_try" in
11888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11889 *) ac_try_echo=$ac_try;;
11890esac
11891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011893 ac_status=$?
11894 grep -v '^ *+' conftest.er1 >conftest.err
11895 rm -f conftest.er1
11896 cat conftest.err >&5
11897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011898 (exit $ac_status); } && {
11899 test -z "$ac_c_werror_flag" ||
11900 test ! -s conftest.err
11901 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011902 ac_lo=$ac_mid; break
11903else
11904 echo "$as_me: failed program was:" >&5
11905sed 's/^/| /' conftest.$ac_ext >&5
11906
Martin v. Löwiseba40652007-08-30 20:10:57 +000011907 ac_hi=`expr '(' $ac_mid ')' - 1`
11908 if test $ac_mid -le $ac_hi; then
11909 ac_lo= ac_hi=
11910 break
11911 fi
11912 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011914
11915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011916 done
11917else
11918 echo "$as_me: failed program was:" >&5
11919sed 's/^/| /' conftest.$ac_ext >&5
11920
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011923
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011926
11927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011928# Binary search between lo and hi bounds.
11929while test "x$ac_lo" != "x$ac_hi"; do
11930 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11931 cat >conftest.$ac_ext <<_ACEOF
11932/* confdefs.h. */
11933_ACEOF
11934cat confdefs.h >>conftest.$ac_ext
11935cat >>conftest.$ac_ext <<_ACEOF
11936/* end confdefs.h. */
11937$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011938 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011939int
11940main ()
11941{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011942static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011943test_array [0] = 0
11944
11945 ;
11946 return 0;
11947}
11948_ACEOF
11949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011950if { (ac_try="$ac_compile"
11951case "(($ac_try" in
11952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11953 *) ac_try_echo=$ac_try;;
11954esac
11955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011957 ac_status=$?
11958 grep -v '^ *+' conftest.er1 >conftest.err
11959 rm -f conftest.er1
11960 cat conftest.err >&5
11961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011962 (exit $ac_status); } && {
11963 test -z "$ac_c_werror_flag" ||
11964 test ! -s conftest.err
11965 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011966 ac_hi=$ac_mid
11967else
11968 echo "$as_me: failed program was:" >&5
11969sed 's/^/| /' conftest.$ac_ext >&5
11970
Martin v. Löwiseba40652007-08-30 20:10:57 +000011971 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011973
11974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011975done
11976case $ac_lo in
11977?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011978'') if test "$ac_cv_type__Bool" = yes; then
11979 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011980See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011981echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011982See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983 { (exit 77); exit 77; }; }
11984 else
11985 ac_cv_sizeof__Bool=0
11986 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011987esac
11988else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011989 cat >conftest.$ac_ext <<_ACEOF
11990/* confdefs.h. */
11991_ACEOF
11992cat confdefs.h >>conftest.$ac_ext
11993cat >>conftest.$ac_ext <<_ACEOF
11994/* end confdefs.h. */
11995$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011996 typedef _Bool ac__type_sizeof_;
11997static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11998static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011999#include <stdio.h>
12000#include <stdlib.h>
12001int
12002main ()
12003{
12004
12005 FILE *f = fopen ("conftest.val", "w");
12006 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012007 return 1;
12008 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012009 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012010 long int i = longval ();
12011 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12012 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012013 fprintf (f, "%ld\n", i);
12014 }
12015 else
12016 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012017 unsigned long int i = ulongval ();
12018 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12019 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012020 fprintf (f, "%lu\n", i);
12021 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012022 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012023
12024 ;
12025 return 0;
12026}
12027_ACEOF
12028rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012029if { (ac_try="$ac_link"
12030case "(($ac_try" in
12031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12032 *) ac_try_echo=$ac_try;;
12033esac
12034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12035 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012036 ac_status=$?
12037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012039 { (case "(($ac_try" in
12040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12041 *) ac_try_echo=$ac_try;;
12042esac
12043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12044 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012045 ac_status=$?
12046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047 (exit $ac_status); }; }; then
12048 ac_cv_sizeof__Bool=`cat conftest.val`
12049else
12050 echo "$as_me: program exited with status $ac_status" >&5
12051echo "$as_me: failed program was:" >&5
12052sed 's/^/| /' conftest.$ac_ext >&5
12053
12054( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012055if test "$ac_cv_type__Bool" = yes; then
12056 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012057See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012058echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012059See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012060 { (exit 77); exit 77; }; }
12061 else
12062 ac_cv_sizeof__Bool=0
12063 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012065rm -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 +000012066fi
12067rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012069{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12070echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12071
12072
12073
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012074cat >>confdefs.h <<_ACEOF
12075#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12076_ACEOF
12077
12078
12079fi
12080
Martin v. Löwiseba40652007-08-30 20:10:57 +000012081{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12082echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012083if test "${ac_cv_type_uintptr_t+set}" = set; then
12084 echo $ECHO_N "(cached) $ECHO_C" >&6
12085else
12086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012087/* confdefs.h. */
12088_ACEOF
12089cat confdefs.h >>conftest.$ac_ext
12090cat >>conftest.$ac_ext <<_ACEOF
12091/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012092#ifdef HAVE_STDINT_H
12093 #include <stdint.h>
12094 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012095
Martin v. Löwiseba40652007-08-30 20:10:57 +000012096typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012097int
12098main ()
12099{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012100if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012101 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012102if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012103 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109if { (ac_try="$ac_compile"
12110case "(($ac_try" in
12111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12112 *) ac_try_echo=$ac_try;;
12113esac
12114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012117 grep -v '^ *+' conftest.er1 >conftest.err
12118 rm -f conftest.er1
12119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121 (exit $ac_status); } && {
12122 test -z "$ac_c_werror_flag" ||
12123 test ! -s conftest.err
12124 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012125 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012126else
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012128sed 's/^/| /' conftest.$ac_ext >&5
12129
Martin v. Löwiseba40652007-08-30 20:10:57 +000012130 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012132
12133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12136echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012137if test $ac_cv_type_uintptr_t = yes; then
12138
12139cat >>confdefs.h <<_ACEOF
12140#define HAVE_UINTPTR_T 1
12141_ACEOF
12142
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12144echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012145if test "${ac_cv_type_uintptr_t+set}" = set; then
12146 echo $ECHO_N "(cached) $ECHO_C" >&6
12147else
12148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* confdefs.h. */
12150_ACEOF
12151cat confdefs.h >>conftest.$ac_ext
12152cat >>conftest.$ac_ext <<_ACEOF
12153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012154$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012155typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012156int
12157main ()
12158{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012159if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012161if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 return 0;
12163 ;
12164 return 0;
12165}
12166_ACEOF
12167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012168if { (ac_try="$ac_compile"
12169case "(($ac_try" in
12170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12171 *) ac_try_echo=$ac_try;;
12172esac
12173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012176 grep -v '^ *+' conftest.er1 >conftest.err
12177 rm -f conftest.er1
12178 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180 (exit $ac_status); } && {
12181 test -z "$ac_c_werror_flag" ||
12182 test ! -s conftest.err
12183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ac_cv_type_uintptr_t=yes
12185else
12186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012187sed 's/^/| /' conftest.$ac_ext >&5
12188
Martin v. Löwiseba40652007-08-30 20:10:57 +000012189 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012190fi
Brett Cannon19fab762007-06-02 03:02:29 +000012191
Martin v. Löwiseba40652007-08-30 20:10:57 +000012192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12193fi
12194{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12195echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12196
12197# The cast to long int works around a bug in the HP C Compiler
12198# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12199# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12200# This bug is HP SR number 8606223364.
12201{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12202echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012203if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12204 echo $ECHO_N "(cached) $ECHO_C" >&6
12205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 if test "$cross_compiling" = yes; then
12207 # Depending upon the size, compute the lo and hi bounds.
12208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* confdefs.h. */
12210_ACEOF
12211cat confdefs.h >>conftest.$ac_ext
12212cat >>conftest.$ac_ext <<_ACEOF
12213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012214$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012215 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012216int
12217main ()
12218{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012220test_array [0] = 0
12221
12222 ;
12223 return 0;
12224}
12225_ACEOF
12226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012227if { (ac_try="$ac_compile"
12228case "(($ac_try" in
12229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12230 *) ac_try_echo=$ac_try;;
12231esac
12232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012235 grep -v '^ *+' conftest.er1 >conftest.err
12236 rm -f conftest.er1
12237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239 (exit $ac_status); } && {
12240 test -z "$ac_c_werror_flag" ||
12241 test ! -s conftest.err
12242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ac_lo=0 ac_mid=0
12244 while :; do
12245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012246/* confdefs.h. */
12247_ACEOF
12248cat confdefs.h >>conftest.$ac_ext
12249cat >>conftest.$ac_ext <<_ACEOF
12250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012251$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012257test_array [0] = 0
12258
12259 ;
12260 return 0;
12261}
12262_ACEOF
12263rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264if { (ac_try="$ac_compile"
12265case "(($ac_try" in
12266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12267 *) ac_try_echo=$ac_try;;
12268esac
12269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012272 grep -v '^ *+' conftest.er1 >conftest.err
12273 rm -f conftest.er1
12274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276 (exit $ac_status); } && {
12277 test -z "$ac_c_werror_flag" ||
12278 test ! -s conftest.err
12279 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012280 ac_hi=$ac_mid; break
12281else
12282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012283sed 's/^/| /' conftest.$ac_ext >&5
12284
Martin v. Löwiseba40652007-08-30 20:10:57 +000012285 ac_lo=`expr $ac_mid + 1`
12286 if test $ac_lo -le $ac_mid; then
12287 ac_lo= ac_hi=
12288 break
12289 fi
12290 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292
12293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 done
12295else
12296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012297sed 's/^/| /' conftest.$ac_ext >&5
12298
Martin v. Löwiseba40652007-08-30 20:10:57 +000012299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* confdefs.h. */
12301_ACEOF
12302cat confdefs.h >>conftest.$ac_ext
12303cat >>conftest.$ac_ext <<_ACEOF
12304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012305$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012306 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012307int
12308main ()
12309{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012311test_array [0] = 0
12312
12313 ;
12314 return 0;
12315}
12316_ACEOF
12317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012318if { (ac_try="$ac_compile"
12319case "(($ac_try" in
12320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12321 *) ac_try_echo=$ac_try;;
12322esac
12323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012326 grep -v '^ *+' conftest.er1 >conftest.err
12327 rm -f conftest.er1
12328 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 (exit $ac_status); } && {
12331 test -z "$ac_c_werror_flag" ||
12332 test ! -s conftest.err
12333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 ac_hi=-1 ac_mid=-1
12335 while :; do
12336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012337/* confdefs.h. */
12338_ACEOF
12339cat confdefs.h >>conftest.$ac_ext
12340cat >>conftest.$ac_ext <<_ACEOF
12341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012342$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012344int
12345main ()
12346{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012348test_array [0] = 0
12349
12350 ;
12351 return 0;
12352}
12353_ACEOF
12354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012355if { (ac_try="$ac_compile"
12356case "(($ac_try" in
12357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12358 *) ac_try_echo=$ac_try;;
12359esac
12360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012363 grep -v '^ *+' conftest.er1 >conftest.err
12364 rm -f conftest.er1
12365 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367 (exit $ac_status); } && {
12368 test -z "$ac_c_werror_flag" ||
12369 test ! -s conftest.err
12370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 ac_lo=$ac_mid; break
12372else
12373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012374sed 's/^/| /' conftest.$ac_ext >&5
12375
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376 ac_hi=`expr '(' $ac_mid ')' - 1`
12377 if test $ac_mid -le $ac_hi; then
12378 ac_lo= ac_hi=
12379 break
12380 fi
12381 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012383
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 done
12386else
12387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012388sed 's/^/| /' conftest.$ac_ext >&5
12389
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012392
12393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395
12396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012397# Binary search between lo and hi bounds.
12398while test "x$ac_lo" != "x$ac_hi"; do
12399 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012401/* confdefs.h. */
12402_ACEOF
12403cat confdefs.h >>conftest.$ac_ext
12404cat >>conftest.$ac_ext <<_ACEOF
12405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012406$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012408int
12409main ()
12410{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012411static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012412test_array [0] = 0
12413
12414 ;
12415 return 0;
12416}
12417_ACEOF
12418rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419if { (ac_try="$ac_compile"
12420case "(($ac_try" in
12421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12422 *) ac_try_echo=$ac_try;;
12423esac
12424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12425 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012427 grep -v '^ *+' conftest.er1 >conftest.err
12428 rm -f conftest.er1
12429 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431 (exit $ac_status); } && {
12432 test -z "$ac_c_werror_flag" ||
12433 test ! -s conftest.err
12434 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 ac_hi=$ac_mid
12436else
12437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012438sed 's/^/| /' conftest.$ac_ext >&5
12439
Martin v. Löwiseba40652007-08-30 20:10:57 +000012440 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012442
12443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012444done
12445case $ac_lo in
12446?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447'') if test "$ac_cv_type_uintptr_t" = yes; then
12448 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012449See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012451See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452 { (exit 77); exit 77; }; }
12453 else
12454 ac_cv_sizeof_uintptr_t=0
12455 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012456esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012457else
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012459/* confdefs.h. */
12460_ACEOF
12461cat confdefs.h >>conftest.$ac_ext
12462cat >>conftest.$ac_ext <<_ACEOF
12463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012464$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465 typedef uintptr_t ac__type_sizeof_;
12466static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12467static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012468#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012469#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012470int
12471main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012472{
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
12474 FILE *f = fopen ("conftest.val", "w");
12475 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012476 return 1;
12477 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012479 long int i = longval ();
12480 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12481 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 fprintf (f, "%ld\n", i);
12483 }
12484 else
12485 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486 unsigned long int i = ulongval ();
12487 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12488 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 fprintf (f, "%lu\n", i);
12490 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
12493 ;
12494 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012495}
Martin v. Löwis11437992002-04-12 09:54:03 +000012496_ACEOF
12497rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498if { (ac_try="$ac_link"
12499case "(($ac_try" in
12500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501 *) ac_try_echo=$ac_try;;
12502esac
12503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12504 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508 { (case "(($ac_try" in
12509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12510 *) ac_try_echo=$ac_try;;
12511esac
12512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12513 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ac_status=$?
12515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12516 (exit $ac_status); }; }; then
12517 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012518else
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 echo "$as_me: program exited with status $ac_status" >&5
12520echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012521sed 's/^/| /' conftest.$ac_ext >&5
12522
Martin v. Löwis11437992002-04-12 09:54:03 +000012523( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012524if test "$ac_cv_type_uintptr_t" = yes; then
12525 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012526See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012527echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012528See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012529 { (exit 77); exit 77; }; }
12530 else
12531 ac_cv_sizeof_uintptr_t=0
12532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012534rm -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 +000012535fi
12536rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012538{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12539echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12540
12541
12542
Martin v. Löwis11437992002-04-12 09:54:03 +000012543cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012544#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012545_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012546
Michael W. Hudson54241132001-12-07 15:38:26 +000012547
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012548fi
12549
Martin v. Löwisebe26702006-10-02 14:55:51 +000012550
12551
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012552# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553{ echo "$as_me:$LINENO: checking size of off_t" >&5
12554echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012555if test "${ac_cv_sizeof_off_t+set}" = set; then
12556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012557else
12558 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012559 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012560else
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012567#include <stdio.h>
12568#include <sys/types.h>
12569main()
12570{
12571 FILE *f=fopen("conftestval", "w");
12572 if (!f) exit(1);
12573 fprintf(f, "%d\n", sizeof(off_t));
12574 exit(0);
12575}
Martin v. Löwis11437992002-04-12 09:54:03 +000012576_ACEOF
12577rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012578if { (ac_try="$ac_link"
12579case "(($ac_try" in
12580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12581 *) ac_try_echo=$ac_try;;
12582esac
12583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12584 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 ac_status=$?
12586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012588 { (case "(($ac_try" in
12589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12590 *) ac_try_echo=$ac_try;;
12591esac
12592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12593 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ac_status=$?
12595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12596 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012597 ac_cv_sizeof_off_t=`cat conftestval`
12598else
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 echo "$as_me: program exited with status $ac_status" >&5
12600echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012601sed 's/^/| /' conftest.$ac_ext >&5
12602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603( exit $ac_status )
12604ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606rm -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 +000012607fi
12608
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609
12610
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012611fi
12612
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12614echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
12616cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012617#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012618_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012619
Michael W. Hudson54241132001-12-07 15:38:26 +000012620
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12622echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012623if test "$have_long_long" = yes -a \
12624 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12625 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012626
Martin v. Löwis11437992002-04-12 09:54:03 +000012627cat >>confdefs.h <<\_ACEOF
12628#define HAVE_LARGEFILE_SUPPORT 1
12629_ACEOF
12630
Martin v. Löwiseba40652007-08-30 20:10:57 +000012631 { echo "$as_me:$LINENO: result: yes" >&5
12632echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012633else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012634 { echo "$as_me:$LINENO: result: no" >&5
12635echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012636fi
12637
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012638# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012639{ echo "$as_me:$LINENO: checking size of time_t" >&5
12640echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012641if test "${ac_cv_sizeof_time_t+set}" = set; then
12642 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012643else
12644 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012645 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012646else
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012648/* confdefs.h. */
12649_ACEOF
12650cat confdefs.h >>conftest.$ac_ext
12651cat >>conftest.$ac_ext <<_ACEOF
12652/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012653#include <stdio.h>
12654#include <time.h>
12655main()
12656{
12657 FILE *f=fopen("conftestval", "w");
12658 if (!f) exit(1);
12659 fprintf(f, "%d\n", sizeof(time_t));
12660 exit(0);
12661}
Martin v. Löwis11437992002-04-12 09:54:03 +000012662_ACEOF
12663rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664if { (ac_try="$ac_link"
12665case "(($ac_try" in
12666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667 *) ac_try_echo=$ac_try;;
12668esac
12669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12670 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674 { (case "(($ac_try" in
12675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12676 *) ac_try_echo=$ac_try;;
12677esac
12678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12679 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ac_status=$?
12681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12682 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012683 ac_cv_sizeof_time_t=`cat conftestval`
12684else
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 echo "$as_me: program exited with status $ac_status" >&5
12686echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012687sed 's/^/| /' conftest.$ac_ext >&5
12688
Martin v. Löwis11437992002-04-12 09:54:03 +000012689( exit $ac_status )
12690ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692rm -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 +000012693fi
12694
Martin v. Löwiseba40652007-08-30 20:10:57 +000012695
12696
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012697fi
12698
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12700echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
12702cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012703#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012704_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012705
Michael W. Hudson54241132001-12-07 15:38:26 +000012706
12707
Trent Mick635f6fb2000-08-23 21:33:05 +000012708# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012709ac_save_cc="$CC"
12710if test "$ac_cv_kpthread" = "yes"
12711then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012712elif test "$ac_cv_kthread" = "yes"
12713then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012714elif test "$ac_cv_pthread" = "yes"
12715then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012717{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12718echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012719have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012720cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* confdefs.h. */
12722_ACEOF
12723cat confdefs.h >>conftest.$ac_ext
12724cat >>conftest.$ac_ext <<_ACEOF
12725/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012726#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012727int
12728main ()
12729{
Guido van Rossum12580492000-09-24 16:47:19 +000012730pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ;
12732 return 0;
12733}
12734_ACEOF
12735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736if { (ac_try="$ac_compile"
12737case "(($ac_try" in
12738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12739 *) ac_try_echo=$ac_try;;
12740esac
12741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012744 grep -v '^ *+' conftest.er1 >conftest.err
12745 rm -f conftest.er1
12746 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012748 (exit $ac_status); } && {
12749 test -z "$ac_c_werror_flag" ||
12750 test ! -s conftest.err
12751 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012752 have_pthread_t=yes
12753else
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012755sed 's/^/| /' conftest.$ac_ext >&5
12756
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757
Trent Mick635f6fb2000-08-23 21:33:05 +000012758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012759
12760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12762echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012763if test "$have_pthread_t" = yes ; then
12764 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12766echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012769else
12770 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012771 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012772else
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* confdefs.h. */
12775_ACEOF
12776cat confdefs.h >>conftest.$ac_ext
12777cat >>conftest.$ac_ext <<_ACEOF
12778/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012779#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012780#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012781 main()
12782 {
12783 FILE *f=fopen("conftestval", "w");
12784 if (!f) exit(1);
12785 fprintf(f, "%d\n", sizeof(pthread_t));
12786 exit(0);
12787 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012788_ACEOF
12789rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012790if { (ac_try="$ac_link"
12791case "(($ac_try" in
12792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12793 *) ac_try_echo=$ac_try;;
12794esac
12795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12796 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ac_status=$?
12798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 { (case "(($ac_try" in
12801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12802 *) ac_try_echo=$ac_try;;
12803esac
12804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12805 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ac_status=$?
12807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012809 ac_cv_sizeof_pthread_t=`cat conftestval`
12810else
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 echo "$as_me: program exited with status $ac_status" >&5
12812echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012813sed 's/^/| /' conftest.$ac_ext >&5
12814
Martin v. Löwis11437992002-04-12 09:54:03 +000012815( exit $ac_status )
12816ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818rm -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 +000012819fi
12820
Martin v. Löwiseba40652007-08-30 20:10:57 +000012821
12822
Trent Mick635f6fb2000-08-23 21:33:05 +000012823fi
12824
Martin v. Löwiseba40652007-08-30 20:10:57 +000012825 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12826echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
12828cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012829#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012830_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012831
12832fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012833CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012834
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12836echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12837# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012838if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012839 enableval=$enable_toolbox_glue;
12840fi
Jack Jansene578a632001-08-15 01:27:14 +000012841
12842
12843if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012844then
Jack Jansene578a632001-08-15 01:27:14 +000012845 case $ac_sys_system/$ac_sys_release in
12846 Darwin/*)
12847 enable_toolbox_glue="yes";;
12848 *)
12849 enable_toolbox_glue="no";;
12850 esac
12851fi
12852case "$enable_toolbox_glue" in
12853yes)
Jack Jansene578a632001-08-15 01:27:14 +000012854 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012855 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
12857cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012858#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012859_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012860
12861 ;;
12862*)
Jack Jansene578a632001-08-15 01:27:14 +000012863 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012864 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012865 ;;
12866esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12868echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012869
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012870
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012871
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012872case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012873 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012874 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12875 ;;
12876 Darwin/*)
12877 OTHER_LIBTOOL_OPT=""
12878 ;;
12879esac
12880
12881
12882case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012883 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012884 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12885 if test "${enable_universalsdk}"; then
12886 :
12887 else
12888 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12889 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012890 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012891 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012892 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012893 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12894 if test ${gcc_version} '<' 4.0
12895 then
12896 LIBTOOL_CRUFT="-lcc_dynamic"
12897 else
12898 LIBTOOL_CRUFT=""
12899 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012900 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012901 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012902 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012903esac
12904
Martin v. Löwiseba40652007-08-30 20:10:57 +000012905{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12906echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012907if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012908then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012909 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012911 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012912
Martin v. Löwis11437992002-04-12 09:54:03 +000012913cat >>confdefs.h <<\_ACEOF
12914#define WITH_NEXT_FRAMEWORK 1
12915_ACEOF
12916
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917 { echo "$as_me:$LINENO: result: yes" >&5
12918echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012919else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012920 { echo "$as_me:$LINENO: result: no" >&5
12921echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012922fi
12923
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924{ echo "$as_me:$LINENO: checking for dyld" >&5
12925echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012926case $ac_sys_system/$ac_sys_release in
12927 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012928
Martin v. Löwis11437992002-04-12 09:54:03 +000012929cat >>confdefs.h <<\_ACEOF
12930#define WITH_DYLD 1
12931_ACEOF
12932
Martin v. Löwiseba40652007-08-30 20:10:57 +000012933 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12934echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012935 ;;
12936 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012937 { echo "$as_me:$LINENO: result: no" >&5
12938echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012939 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012940esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012941
Guido van Rossum0a516c91994-09-12 10:58:40 +000012942# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012943
Michael W. Hudson54241132001-12-07 15:38:26 +000012944
12945
12946
12947
Guido van Rossum0a516c91994-09-12 10:58:40 +000012948# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012949# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950{ echo "$as_me:$LINENO: checking SO" >&5
12951echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012952if test -z "$SO"
12953then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012955 hp*|HP*)
12956 case `uname -m` in
12957 ia64) SO=.so;;
12958 *) SO=.sl;;
12959 esac
12960 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012961 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012962 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012963 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012964else
12965 # this might also be a termcap variable, see #610332
12966 echo
12967 echo '====================================================================='
12968 echo '+ +'
12969 echo '+ WARNING: You have set SO in your environment. +'
12970 echo '+ Do you really mean to change the extension for shared libraries? +'
12971 echo '+ Continuing in 10 seconds to let you to ponder. +'
12972 echo '+ +'
12973 echo '====================================================================='
12974 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012976{ echo "$as_me:$LINENO: result: $SO" >&5
12977echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012978
12979cat >>confdefs.h <<_ACEOF
12980#define SHLIB_EXT "$SO"
12981_ACEOF
12982
Guido van Rossum0a516c91994-09-12 10:58:40 +000012983# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012984# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012985# (Shared libraries in this instance are shared modules to be loaded into
12986# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012987{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12988echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012989if test -z "$LDSHARED"
12990then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012991 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012992 AIX*)
12993 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012994 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012995 ;;
12996 BeOS*)
12997 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012998 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012999 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013000 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013001 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013003 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013004 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013005 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013006 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013007 hp*|HP*)
13008 if test "$GCC" = "yes"
13009 then LDSHARED='$(CC) -shared'
13010 else LDSHARED='ld -b';
13011 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013012 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013013 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013014 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13015 if test "$enable_framework" ; then
13016 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013017 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13018 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013019 else
13020 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013021 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013022 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013023 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013024 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13025 if test "$enable_framework" ; then
13026 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013027 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13028 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013029 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013030 # No framework, use the Python app as bundle-loader
13031 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013032 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013033 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013034 Darwin/*)
13035 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13036 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000013037 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000013038 if test ${cur_target} '>' 10.2; then
13039 cur_target=10.3
13040 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013041 if test "${UNIVERSAL_ARCHS}" = "all"; then
13042 # Ensure that the default platform for a 4-way
13043 # universal build is OSX 10.5, that's the first
13044 # OS release where 4-way builds make sense.
13045 cur_target='10.5'
13046 fi
Jack Jansenc110f862005-01-07 10:49:32 +000013047 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013048
13049 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
13050 # environment with a value that is the same as what we'll use
13051 # in the Makefile to ensure that we'll get the same compiler
13052 # environment during configure and build time.
13053 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
13054 export MACOSX_DEPLOYMENT_TARGET
13055
Ronald Oussoren988117f2006-04-29 11:31:35 +000013056 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013057 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013058 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013059 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013060 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013061 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013062 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13063 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013064 else
13065 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13066 if test "$enable_framework" ; then
13067 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013068 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13069 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013070 else
13071 # No framework, use the Python app as bundle-loader
13072 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13073 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13074 fi
13075 fi
13076 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013077 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013078 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013079 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013080 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013081 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013082 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013083 else
13084 LDSHARED="ld -Bshareable ${LDFLAGS}"
13085 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013086 OpenBSD*)
13087 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13088 then
13089 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13090 else
13091 case `uname -r` in
13092 [01].* | 2.[0-7] | 2.[0-7].*)
13093 LDSHARED="ld -Bshareable ${LDFLAGS}"
13094 ;;
13095 *)
13096 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13097 ;;
13098 esac
13099 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013100 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013101 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013102 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013103 then LDSHARED='$(CC) -shared'
13104 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013105 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013106 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013107 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013108 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013109 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013110 *) LDSHARED="ld";;
13111 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13114echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013115BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013116# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013117# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13119echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013120if test -z "$CCSHARED"
13121then
Guido van Rossum07397971997-04-29 21:49:50 +000013122 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013123 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013124 then CCSHARED="-fPIC";
13125 elif test `uname -p` = sparc;
13126 then CCSHARED="-xcode=pic32";
13127 else CCSHARED="-Kpic";
13128 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013129 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013130 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013131 else CCSHARED="+z";
13132 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013133 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013134 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013135 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013136 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013137 if test "$GCC" = "yes"
13138 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013139 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013140 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013141 SCO_SV*)
13142 if test "$GCC" = "yes"
13143 then CCSHARED="-fPIC"
13144 else CCSHARED="-Kpic -belf"
13145 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013146 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013147 IRIX*/6*) case $CC in
13148 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013149 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013150 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013151 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013152 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013154{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13155echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013156# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013157# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013158{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13159echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013160if test -z "$LINKFORSHARED"
13161then
Guido van Rossum07397971997-04-29 21:49:50 +000013162 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013163 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013164 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013165 LINKFORSHARED="-Wl,-E -Wl,+s";;
13166# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013167 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013168 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013169 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013171 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13172 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013173 # not used by the core itself but which needs to be in the core so
13174 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013175 # -prebind is no longer used, because it actually seems to give a
13176 # slowdown in stead of a speedup, maybe due to the large number of
13177 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013178
13179 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013180 if test "$enable_framework"
13181 then
Jack Jansenda49e192005-01-07 13:08:22 +000013182 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013183 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013184 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013185 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013186 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013187 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013188 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013189 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13190 then
13191 LINKFORSHARED="-Wl,--export-dynamic"
13192 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013193 SunOS/5*) case $CC in
13194 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013195 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013196 then
13197 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013198 fi;;
13199 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013200 CYGWIN*)
13201 if test $enable_shared = "no"
13202 then
13203 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13204 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013205 QNX*)
13206 # -Wl,-E causes the symbols to be added to the dynamic
13207 # symbol table so that they can be found when a module
13208 # is loaded. -N 2048K causes the stack size to be set
13209 # to 2048 kilobytes so that the stack doesn't overflow
13210 # when running test_compile.py.
13211 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013212 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013214{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13215echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013216
Michael W. Hudson54241132001-12-07 15:38:26 +000013217
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013218
Martin v. Löwiseba40652007-08-30 20:10:57 +000013219{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13220echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013221if test ! "$LIBRARY" = "$LDLIBRARY"
13222then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013223 case $ac_sys_system in
13224 CYGWIN*)
13225 # Cygwin needs CCSHARED when building extension DLLs
13226 # but not when building the interpreter DLL.
13227 CFLAGSFORSHARED='';;
13228 *)
13229 CFLAGSFORSHARED='$(CCSHARED)'
13230 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013232{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13233echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013234
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013235# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13236# library (with --enable-shared).
13237# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013238# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13239# if it is not required, since it creates a dependency of the shared library
13240# to LIBS. This, in turn, means that applications linking the shared libpython
13241# don't need to link LIBS explicitly. The default should be only changed
13242# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013243
Martin v. Löwiseba40652007-08-30 20:10:57 +000013244{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13245echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013246case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013247 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013248 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013249esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013250{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13251echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013252
13253
Guido van Rossum627b2d71993-12-24 10:39:16 +000013254# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Martin v. Löwiseba40652007-08-30 20:10:57 +000013256{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13257echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013258if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013260else
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013262LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013264/* confdefs.h. */
13265_ACEOF
13266cat confdefs.h >>conftest.$ac_ext
13267cat >>conftest.$ac_ext <<_ACEOF
13268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
Martin v. Löwiseba40652007-08-30 20:10:57 +000013270/* Override any GCC internal prototype to avoid an error.
13271 Use char because int might match the return type of a GCC
13272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013273#ifdef __cplusplus
13274extern "C"
13275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013276char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013277int
13278main ()
13279{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013280return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 ;
13282 return 0;
13283}
13284_ACEOF
13285rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013286if { (ac_try="$ac_link"
13287case "(($ac_try" in
13288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13289 *) ac_try_echo=$ac_try;;
13290esac
13291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013294 grep -v '^ *+' conftest.er1 >conftest.err
13295 rm -f conftest.er1
13296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013298 (exit $ac_status); } && {
13299 test -z "$ac_c_werror_flag" ||
13300 test ! -s conftest.err
13301 } && test -s conftest$ac_exeext &&
13302 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013304else
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013306sed 's/^/| /' conftest.$ac_ext >&5
13307
Martin v. Löwiseba40652007-08-30 20:10:57 +000013308 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310
13311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013312 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013313LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013315{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13316echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013317if test $ac_cv_lib_dl_dlopen = yes; then
13318 cat >>confdefs.h <<_ACEOF
13319#define HAVE_LIBDL 1
13320_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013321
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013322 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013323
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324fi
13325 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Martin v. Löwiseba40652007-08-30 20:10:57 +000013327{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13328echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013329if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13330 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331else
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013333LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013335/* confdefs.h. */
13336_ACEOF
13337cat confdefs.h >>conftest.$ac_ext
13338cat >>conftest.$ac_ext <<_ACEOF
13339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
Martin v. Löwiseba40652007-08-30 20:10:57 +000013341/* Override any GCC internal prototype to avoid an error.
13342 Use char because int might match the return type of a GCC
13343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013344#ifdef __cplusplus
13345extern "C"
13346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013347char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013348int
13349main ()
13350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013351return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 ;
13353 return 0;
13354}
13355_ACEOF
13356rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013357if { (ac_try="$ac_link"
13358case "(($ac_try" in
13359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13360 *) ac_try_echo=$ac_try;;
13361esac
13362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013365 grep -v '^ *+' conftest.er1 >conftest.err
13366 rm -f conftest.er1
13367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013369 (exit $ac_status); } && {
13370 test -z "$ac_c_werror_flag" ||
13371 test ! -s conftest.err
13372 } && test -s conftest$ac_exeext &&
13373 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375else
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013377sed 's/^/| /' conftest.$ac_ext >&5
13378
Martin v. Löwiseba40652007-08-30 20:10:57 +000013379 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013381
13382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013384LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13387echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013388if test $ac_cv_lib_dld_shl_load = yes; then
13389 cat >>confdefs.h <<_ACEOF
13390#define HAVE_LIBDLD 1
13391_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013392
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013393 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395fi
13396 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013397
13398# only check for sem_ini if thread support is requested
13399if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013400 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13401echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013402if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013404else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013405 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013406cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013407/* confdefs.h. */
13408_ACEOF
13409cat confdefs.h >>conftest.$ac_ext
13410cat >>conftest.$ac_ext <<_ACEOF
13411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413/* Override any GCC internal prototype to avoid an error.
13414 Use char because int might match the return type of a GCC
13415 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013416#ifdef __cplusplus
13417extern "C"
13418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013419char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013420int
13421main ()
13422{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 ;
13425 return 0;
13426}
13427_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013428for ac_lib in '' pthread rt posix4; do
13429 if test -z "$ac_lib"; then
13430 ac_res="none required"
13431 else
13432 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013433 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013434 fi
13435 rm -f conftest.$ac_objext conftest$ac_exeext
13436if { (ac_try="$ac_link"
13437case "(($ac_try" in
13438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13439 *) ac_try_echo=$ac_try;;
13440esac
13441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13442 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013443 ac_status=$?
13444 grep -v '^ *+' conftest.er1 >conftest.err
13445 rm -f conftest.er1
13446 cat conftest.err >&5
13447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448 (exit $ac_status); } && {
13449 test -z "$ac_c_werror_flag" ||
13450 test ! -s conftest.err
13451 } && test -s conftest$ac_exeext &&
13452 $as_test_x conftest$ac_exeext; then
13453 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013454else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013455 echo "$as_me: failed program was:" >&5
13456sed 's/^/| /' conftest.$ac_ext >&5
13457
Martin v. Löwiseba40652007-08-30 20:10:57 +000013458
Brett Cannon19fab762007-06-02 03:02:29 +000013459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013460
13461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13462 conftest$ac_exeext
13463 if test "${ac_cv_search_sem_init+set}" = set; then
13464 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466done
13467if test "${ac_cv_search_sem_init+set}" = set; then
13468 :
13469else
13470 ac_cv_search_sem_init=no
13471fi
13472rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013473LIBS=$ac_func_search_save_LIBS
13474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013475{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13476echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13477ac_res=$ac_cv_search_sem_init
13478if test "$ac_res" != no; then
13479 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013480
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013481fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013482 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013483 # posix4 on Solaris 2.6
13484 # pthread (first!) on Linux
13485fi
13486
Martin v. Löwis19d17342003-06-14 21:03:05 +000013487# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013488{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13489echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013490if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13491 echo $ECHO_N "(cached) $ECHO_C" >&6
13492else
13493 ac_check_lib_save_LIBS=$LIBS
13494LIBS="-lintl $LIBS"
13495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013496/* confdefs.h. */
13497_ACEOF
13498cat confdefs.h >>conftest.$ac_ext
13499cat >>conftest.$ac_ext <<_ACEOF
13500/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013501
Martin v. Löwiseba40652007-08-30 20:10:57 +000013502/* Override any GCC internal prototype to avoid an error.
13503 Use char because int might match the return type of a GCC
13504 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013505#ifdef __cplusplus
13506extern "C"
13507#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013508char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013509int
13510main ()
13511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013512return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013513 ;
13514 return 0;
13515}
13516_ACEOF
13517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013518if { (ac_try="$ac_link"
13519case "(($ac_try" in
13520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13521 *) ac_try_echo=$ac_try;;
13522esac
13523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013526 grep -v '^ *+' conftest.er1 >conftest.err
13527 rm -f conftest.er1
13528 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013530 (exit $ac_status); } && {
13531 test -z "$ac_c_werror_flag" ||
13532 test ! -s conftest.err
13533 } && test -s conftest$ac_exeext &&
13534 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013535 ac_cv_lib_intl_textdomain=yes
13536else
13537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013538sed 's/^/| /' conftest.$ac_ext >&5
13539
Martin v. Löwiseba40652007-08-30 20:10:57 +000013540 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013542
13543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013545LIBS=$ac_check_lib_save_LIBS
13546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013547{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13548echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013549if test $ac_cv_lib_intl_textdomain = yes; then
13550
13551cat >>confdefs.h <<\_ACEOF
13552#define WITH_LIBINTL 1
13553_ACEOF
13554
13555fi
13556
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013557
13558# checks for system dependent C++ extensions support
13559case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013560 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13561echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013563/* confdefs.h. */
13564_ACEOF
13565cat confdefs.h >>conftest.$ac_ext
13566cat >>conftest.$ac_ext <<_ACEOF
13567/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013568#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013569int
13570main ()
13571{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013572loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 ;
13574 return 0;
13575}
13576_ACEOF
13577rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013578if { (ac_try="$ac_link"
13579case "(($ac_try" in
13580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13581 *) ac_try_echo=$ac_try;;
13582esac
13583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13584 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013586 grep -v '^ *+' conftest.er1 >conftest.err
13587 rm -f conftest.er1
13588 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013590 (exit $ac_status); } && {
13591 test -z "$ac_c_werror_flag" ||
13592 test ! -s conftest.err
13593 } && test -s conftest$ac_exeext &&
13594 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013595
Martin v. Löwis11437992002-04-12 09:54:03 +000013596cat >>confdefs.h <<\_ACEOF
13597#define AIX_GENUINE_CPLUSPLUS 1
13598_ACEOF
13599
Martin v. Löwiseba40652007-08-30 20:10:57 +000013600 { echo "$as_me:$LINENO: result: yes" >&5
13601echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013602else
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013604sed 's/^/| /' conftest.$ac_ext >&5
13605
Martin v. Löwiseba40652007-08-30 20:10:57 +000013606 { echo "$as_me:$LINENO: result: no" >&5
13607echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013609
13610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013611 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013612 *) ;;
13613esac
13614
Guido van Rossum70c7f481998-03-26 18:44:10 +000013615# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013616# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013617{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13618echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013619if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13620 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013621else
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013623LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013624cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013625/* confdefs.h. */
13626_ACEOF
13627cat confdefs.h >>conftest.$ac_ext
13628cat >>conftest.$ac_ext <<_ACEOF
13629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Martin v. Löwiseba40652007-08-30 20:10:57 +000013631/* Override any GCC internal prototype to avoid an error.
13632 Use char because int might match the return type of a GCC
13633 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013634#ifdef __cplusplus
13635extern "C"
13636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013637char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013638int
13639main ()
13640{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 ;
13643 return 0;
13644}
13645_ACEOF
13646rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013647if { (ac_try="$ac_link"
13648case "(($ac_try" in
13649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13650 *) ac_try_echo=$ac_try;;
13651esac
13652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13653 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013655 grep -v '^ *+' conftest.er1 >conftest.err
13656 rm -f conftest.er1
13657 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659 (exit $ac_status); } && {
13660 test -z "$ac_c_werror_flag" ||
13661 test ! -s conftest.err
13662 } && test -s conftest$ac_exeext &&
13663 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013665else
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013667sed 's/^/| /' conftest.$ac_ext >&5
13668
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013671
13672rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013676{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13677echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013678if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013679 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013680fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013681 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013682{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13683echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013684if test "${ac_cv_lib_socket_socket+set}" = set; then
13685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686else
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013688LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013690/* confdefs.h. */
13691_ACEOF
13692cat confdefs.h >>conftest.$ac_ext
13693cat >>conftest.$ac_ext <<_ACEOF
13694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013695
Martin v. Löwiseba40652007-08-30 20:10:57 +000013696/* Override any GCC internal prototype to avoid an error.
13697 Use char because int might match the return type of a GCC
13698 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013699#ifdef __cplusplus
13700extern "C"
13701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013702char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013703int
13704main ()
13705{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013706return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
13711rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712if { (ac_try="$ac_link"
13713case "(($ac_try" in
13714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13715 *) ac_try_echo=$ac_try;;
13716esac
13717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13718 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013720 grep -v '^ *+' conftest.er1 >conftest.err
13721 rm -f conftest.er1
13722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724 (exit $ac_status); } && {
13725 test -z "$ac_c_werror_flag" ||
13726 test ! -s conftest.err
13727 } && test -s conftest$ac_exeext &&
13728 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013730else
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013732sed 's/^/| /' conftest.$ac_ext >&5
13733
Martin v. Löwiseba40652007-08-30 20:10:57 +000013734 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736
13737rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013739LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13742echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013743if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013744 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013745fi
13746 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013747
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013748case "$ac_sys_system" in
13749BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013750{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13751echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013752if test "${ac_cv_lib_net_socket+set}" = set; then
13753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013754else
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013756LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013758/* confdefs.h. */
13759_ACEOF
13760cat confdefs.h >>conftest.$ac_ext
13761cat >>conftest.$ac_ext <<_ACEOF
13762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013763
Martin v. Löwiseba40652007-08-30 20:10:57 +000013764/* Override any GCC internal prototype to avoid an error.
13765 Use char because int might match the return type of a GCC
13766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013767#ifdef __cplusplus
13768extern "C"
13769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013770char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013771int
13772main ()
13773{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013774return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ;
13776 return 0;
13777}
13778_ACEOF
13779rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780if { (ac_try="$ac_link"
13781case "(($ac_try" in
13782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13783 *) ac_try_echo=$ac_try;;
13784esac
13785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013788 grep -v '^ *+' conftest.er1 >conftest.err
13789 rm -f conftest.er1
13790 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013792 (exit $ac_status); } && {
13793 test -z "$ac_c_werror_flag" ||
13794 test ! -s conftest.err
13795 } && test -s conftest$ac_exeext &&
13796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013798else
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013800sed 's/^/| /' conftest.$ac_ext >&5
13801
Martin v. Löwiseba40652007-08-30 20:10:57 +000013802 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013804
13805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013807LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013809{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13810echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013811if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013812 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013813fi
13814 # BeOS
13815;;
13816esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013817
Martin v. Löwiseba40652007-08-30 20:10:57 +000013818{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13819echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Martin v. Löwiseba40652007-08-30 20:10:57 +000013821# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013822if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823 withval=$with_libs;
13824{ echo "$as_me:$LINENO: result: $withval" >&5
13825echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013826LIBS="$withval $LIBS"
13827
13828else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829 { echo "$as_me:$LINENO: result: no" >&5
13830echo "${ECHO_T}no" >&6; }
13831fi
13832
Guido van Rossum7f43da71994-08-01 12:15:30 +000013833
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013834# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13836echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013837
Martin v. Löwiseba40652007-08-30 20:10:57 +000013838# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013839if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840 withval=$with_system_ffi;
13841fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013842
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013843
Martin v. Löwiseba40652007-08-30 20:10:57 +000013844{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13845echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013846
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013847# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013848
13849
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13851echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Martin v. Löwiseba40652007-08-30 20:10:57 +000013853# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013854if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013855 withval=$with_signal_module;
13856fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013857
13858
13859if test -z "$with_signal_module"
13860then with_signal_module="yes"
13861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13863echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013864
13865if test "${with_signal_module}" = "yes"; then
13866 USE_SIGNAL_MODULE=""
13867 SIGNAL_OBJS=""
13868else
13869 USE_SIGNAL_MODULE="#"
13870 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13871fi
13872
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013873# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013874
Barry Warsawc0d24d82000-06-29 16:12:00 +000013875USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013876
Martin v. Löwiseba40652007-08-30 20:10:57 +000013877{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13878echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013879
Guido van Rossumec2f0731997-01-22 20:54:01 +000013880
Martin v. Löwiseba40652007-08-30 20:10:57 +000013881# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013882if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013883 withval=$with_dec_threads;
13884{ echo "$as_me:$LINENO: result: $withval" >&5
13885echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013886LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013887if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013888 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013889fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013890else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 { echo "$as_me:$LINENO: result: no" >&5
13892echo "${ECHO_T}no" >&6; }
13893fi
13894
Martin v. Löwis11437992002-04-12 09:54:03 +000013895
13896# Templates for things AC_DEFINEd more than once.
13897# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013898
13899
Martin v. Löwis11437992002-04-12 09:54:03 +000013900
13901
13902
13903
13904
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13906echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013907
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013909if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 withval=$with_threads;
13911fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013912
13913
Barry Warsawc0d24d82000-06-29 16:12:00 +000013914# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013915
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013917if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918 withval=$with_thread; with_threads=$with_thread
13919fi
13920
Barry Warsawc0d24d82000-06-29 16:12:00 +000013921
13922if test -z "$with_threads"
13923then with_threads="yes"
13924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013925{ echo "$as_me:$LINENO: result: $with_threads" >&5
13926echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013927
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013928
Barry Warsawc0d24d82000-06-29 16:12:00 +000013929if test "$with_threads" = "no"
13930then
13931 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013932elif test "$ac_cv_pthread_is_default" = yes
13933then
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013935#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013936_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013937
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013938 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013940#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013941_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013942
13943 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013945elif test "$ac_cv_kpthread" = "yes"
13946then
13947 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013948 if test "$ac_cv_cxx_thread" = "yes"; then
13949 CXX="$CXX -Kpthread"
13950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013952#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013953_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013954
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013955 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013956 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013957elif test "$ac_cv_kthread" = "yes"
13958then
13959 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013960 if test "$ac_cv_cxx_thread" = "yes"; then
13961 CXX="$CXX -Kthread"
13962 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013963 cat >>confdefs.h <<\_ACEOF
13964#define WITH_THREAD 1
13965_ACEOF
13966
13967 posix_threads=yes
13968 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013969elif test "$ac_cv_pthread" = "yes"
13970then
13971 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013972 if test "$ac_cv_cxx_thread" = "yes"; then
13973 CXX="$CXX -pthread"
13974 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013975 cat >>confdefs.h <<\_ACEOF
13976#define WITH_THREAD 1
13977_ACEOF
13978
13979 posix_threads=yes
13980 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013981else
13982 if test ! -z "$with_threads" -a -d "$with_threads"
13983 then LDFLAGS="$LDFLAGS -L$with_threads"
13984 fi
13985 if test ! -z "$withval" -a -d "$withval"
13986 then LDFLAGS="$LDFLAGS -L$withval"
13987 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013988
13989 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013990 # define _POSIX_THREADS in unistd.h. Some apparently don't
13991 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13993echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013995/* confdefs.h. */
13996_ACEOF
13997cat confdefs.h >>conftest.$ac_ext
13998cat >>conftest.$ac_ext <<_ACEOF
13999/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014000
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014001#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014002#ifdef _POSIX_THREADS
14003yes
14004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
14006_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014008 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014009 unistd_defines_pthreads=yes
14010else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014011 unistd_defines_pthreads=no
14012fi
14013rm -f conftest*
14014
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14016echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014017
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014019#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014020_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014023 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14024echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014025if test "${ac_cv_header_cthreads_h+set}" = set; then
14026 echo $ECHO_N "(cached) $ECHO_C" >&6
14027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014028{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14029echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014032{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14033echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014035/* confdefs.h. */
14036_ACEOF
14037cat confdefs.h >>conftest.$ac_ext
14038cat >>conftest.$ac_ext <<_ACEOF
14039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014040$ac_includes_default
14041#include <cthreads.h>
14042_ACEOF
14043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044if { (ac_try="$ac_compile"
14045case "(($ac_try" in
14046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14047 *) ac_try_echo=$ac_try;;
14048esac
14049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014052 grep -v '^ *+' conftest.er1 >conftest.err
14053 rm -f conftest.er1
14054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014056 (exit $ac_status); } && {
14057 test -z "$ac_c_werror_flag" ||
14058 test ! -s conftest.err
14059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 ac_header_compiler=yes
14061else
14062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014063sed 's/^/| /' conftest.$ac_ext >&5
14064
Martin v. Löwiseba40652007-08-30 20:10:57 +000014065 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067
14068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14069{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14070echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
14072# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014073{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14074echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* confdefs.h. */
14077_ACEOF
14078cat confdefs.h >>conftest.$ac_ext
14079cat >>conftest.$ac_ext <<_ACEOF
14080/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014081#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014082_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014083if { (ac_try="$ac_cpp conftest.$ac_ext"
14084case "(($ac_try" in
14085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14086 *) ac_try_echo=$ac_try;;
14087esac
14088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14089 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014091 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 rm -f conftest.er1
14093 cat conftest.err >&5
14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014095 (exit $ac_status); } >/dev/null && {
14096 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14097 test ! -s conftest.err
14098 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ac_header_preproc=yes
14100else
14101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014102sed 's/^/| /' conftest.$ac_ext >&5
14103
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106
Martin v. Löwis11437992002-04-12 09:54:03 +000014107rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14109echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
14111# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014112case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14113 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14115echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014116 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14117echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14118 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014119 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14122echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14124echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14125 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14126echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14127 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14128echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14130echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014131 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14132echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014133 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014134## ------------------------------------------------ ##
14135## Report this to http://www.python.org/python-bugs ##
14136## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014137_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014139 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014140esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014141{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14142echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014143if test "${ac_cv_header_cthreads_h+set}" = set; then
14144 echo $ECHO_N "(cached) $ECHO_C" >&6
14145else
14146 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014148{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14149echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
14151fi
14152if test $ac_cv_header_cthreads_h = yes; then
14153 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014154#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014155_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014158#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014159_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161
14162cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014163#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014164_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014165
14166 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014167 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014168else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014169
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14172echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14174 echo $ECHO_N "(cached) $ECHO_C" >&6
14175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014176{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14177echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014178else
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014180{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14181echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014183/* confdefs.h. */
14184_ACEOF
14185cat confdefs.h >>conftest.$ac_ext
14186cat >>conftest.$ac_ext <<_ACEOF
14187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014188$ac_includes_default
14189#include <mach/cthreads.h>
14190_ACEOF
14191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014192if { (ac_try="$ac_compile"
14193case "(($ac_try" in
14194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14195 *) ac_try_echo=$ac_try;;
14196esac
14197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014200 grep -v '^ *+' conftest.er1 >conftest.err
14201 rm -f conftest.er1
14202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204 (exit $ac_status); } && {
14205 test -z "$ac_c_werror_flag" ||
14206 test ! -s conftest.err
14207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 ac_header_compiler=yes
14209else
14210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014211sed 's/^/| /' conftest.$ac_ext >&5
14212
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014215
14216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14217{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14218echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
14220# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14222echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014224/* confdefs.h. */
14225_ACEOF
14226cat confdefs.h >>conftest.$ac_ext
14227cat >>conftest.$ac_ext <<_ACEOF
14228/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014229#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014230_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231if { (ac_try="$ac_cpp conftest.$ac_ext"
14232case "(($ac_try" in
14233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14234 *) ac_try_echo=$ac_try;;
14235esac
14236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14237 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014239 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014240 rm -f conftest.er1
14241 cat conftest.err >&5
14242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243 (exit $ac_status); } >/dev/null && {
14244 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14245 test ! -s conftest.err
14246 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 ac_header_preproc=yes
14248else
14249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014250sed 's/^/| /' conftest.$ac_ext >&5
14251
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014254
Martin v. Löwis11437992002-04-12 09:54:03 +000014255rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014256{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14257echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
14259# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14261 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014262 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14263echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014264 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14265echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14266 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014267 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014268 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014269 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14270echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014271 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14272echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14273 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14274echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14275 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14276echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014277 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14278echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014279 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14280echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014282## ------------------------------------------------ ##
14283## Report this to http://www.python.org/python-bugs ##
14284## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014285_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014286 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014287 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014288esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014289{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14290echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014291if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14292 echo $ECHO_N "(cached) $ECHO_C" >&6
14293else
14294 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14297echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
14299fi
14300if test $ac_cv_header_mach_cthreads_h = yes; then
14301 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014303_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014304
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014306#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014307_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014308
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
14310cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014311#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014312_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014313
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014314 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014315else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014316
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14318echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014319
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014321if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014322 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14323echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014324 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014325#define WITH_THREAD 1
14326_ACEOF
14327
14328
14329cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014330#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014331_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014332
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014333 LIBS="-lpth $LIBS"
14334 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014335else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014336 { echo "$as_me:$LINENO: result: no" >&5
14337echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014338
14339 # Just looking for pthread_create in libpthread is not enough:
14340 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14341 # So we really have to include pthread.h, and then link.
14342 _libs=$LIBS
14343 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014344 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14345echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014347/* confdefs.h. */
14348_ACEOF
14349cat confdefs.h >>conftest.$ac_ext
14350cat >>conftest.$ac_ext <<_ACEOF
14351/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014352#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014353
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014354void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014355int
14356main ()
14357{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014358
14359pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 ;
14361 return 0;
14362}
14363_ACEOF
14364rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365if { (ac_try="$ac_link"
14366case "(($ac_try" in
14367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14368 *) ac_try_echo=$ac_try;;
14369esac
14370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14371 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014373 grep -v '^ *+' conftest.er1 >conftest.err
14374 rm -f conftest.er1
14375 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014377 (exit $ac_status); } && {
14378 test -z "$ac_c_werror_flag" ||
14379 test ! -s conftest.err
14380 } && test -s conftest$ac_exeext &&
14381 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Martin v. Löwiseba40652007-08-30 20:10:57 +000014383 { echo "$as_me:$LINENO: result: yes" >&5
14384echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014386#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014387_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014388
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014389 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014390 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014391else
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014393sed 's/^/| /' conftest.$ac_ext >&5
14394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014396 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014397 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14398echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014399if test "${ac_cv_func_pthread_detach+set}" = set; then
14400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014403/* confdefs.h. */
14404_ACEOF
14405cat confdefs.h >>conftest.$ac_ext
14406cat >>conftest.$ac_ext <<_ACEOF
14407/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014408/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14409 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14410#define pthread_detach innocuous_pthread_detach
14411
Guido van Rossumad678af1998-10-02 14:42:15 +000014412/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014413 which can conflict with char pthread_detach (); below.
14414 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014415 <limits.h> exists even on freestanding compilers. */
14416
14417#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014418# include <limits.h>
14419#else
14420# include <assert.h>
14421#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014422
14423#undef pthread_detach
14424
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425/* Override any GCC internal prototype to avoid an error.
14426 Use char because int might match the return type of a GCC
14427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014428#ifdef __cplusplus
14429extern "C"
14430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014431char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014432/* The GNU C library defines this for functions which it implements
14433 to always fail with ENOSYS. Some functions are actually named
14434 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014436choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014437#endif
14438
Skip Montanaro6dead952003-09-25 14:50:04 +000014439int
14440main ()
14441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 ;
14444 return 0;
14445}
14446_ACEOF
14447rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448if { (ac_try="$ac_link"
14449case "(($ac_try" in
14450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14451 *) ac_try_echo=$ac_try;;
14452esac
14453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14454 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014456 grep -v '^ *+' conftest.er1 >conftest.err
14457 rm -f conftest.er1
14458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014460 (exit $ac_status); } && {
14461 test -z "$ac_c_werror_flag" ||
14462 test ! -s conftest.err
14463 } && test -s conftest$ac_exeext &&
14464 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014466else
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014468sed 's/^/| /' conftest.$ac_ext >&5
14469
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014472
14473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014474 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014476{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14477echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014478if test $ac_cv_func_pthread_detach = yes; then
14479 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014480#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014481_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014482
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014483 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014484 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014485else
Guido van Rossumad678af1998-10-02 14:42:15 +000014486
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014487 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014488 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14489echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014490if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14491 echo $ECHO_N "(cached) $ECHO_C" >&6
14492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014493{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14494echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014495else
14496 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014497{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14498echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* confdefs.h. */
14501_ACEOF
14502cat confdefs.h >>conftest.$ac_ext
14503cat >>conftest.$ac_ext <<_ACEOF
14504/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014505$ac_includes_default
14506#include <atheos/threads.h>
14507_ACEOF
14508rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014509if { (ac_try="$ac_compile"
14510case "(($ac_try" in
14511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14512 *) ac_try_echo=$ac_try;;
14513esac
14514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014517 grep -v '^ *+' conftest.er1 >conftest.err
14518 rm -f conftest.er1
14519 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014521 (exit $ac_status); } && {
14522 test -z "$ac_c_werror_flag" ||
14523 test ! -s conftest.err
14524 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014525 ac_header_compiler=yes
14526else
14527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014528sed 's/^/| /' conftest.$ac_ext >&5
14529
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532
14533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14534{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14535echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014536
14537# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014538{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14539echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014541/* confdefs.h. */
14542_ACEOF
14543cat confdefs.h >>conftest.$ac_ext
14544cat >>conftest.$ac_ext <<_ACEOF
14545/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014546#include <atheos/threads.h>
14547_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014548if { (ac_try="$ac_cpp conftest.$ac_ext"
14549case "(($ac_try" in
14550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14551 *) ac_try_echo=$ac_try;;
14552esac
14553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14554 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014555 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014556 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014557 rm -f conftest.er1
14558 cat conftest.err >&5
14559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560 (exit $ac_status); } >/dev/null && {
14561 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14562 test ! -s conftest.err
14563 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014564 ac_header_preproc=yes
14565else
14566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014567sed 's/^/| /' conftest.$ac_ext >&5
14568
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014569 ac_header_preproc=no
14570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014572rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14574echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014575
14576# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014577case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14578 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014579 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14580echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014581 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14582echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14583 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014584 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014585 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014586 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14587echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014588 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14589echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14590 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14591echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14592 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14593echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014594 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14595echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014596 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14597echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014598 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014599## ------------------------------------------------ ##
14600## Report this to http://www.python.org/python-bugs ##
14601## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014602_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014603 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014604 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014605esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14607echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014608if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14609 echo $ECHO_N "(cached) $ECHO_C" >&6
14610else
14611 ac_cv_header_atheos_threads_h=$ac_header_preproc
14612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014613{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14614echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014615
14616fi
14617if test $ac_cv_header_atheos_threads_h = yes; then
14618 cat >>confdefs.h <<\_ACEOF
14619#define WITH_THREAD 1
14620_ACEOF
14621
14622
14623cat >>confdefs.h <<\_ACEOF
14624#define ATHEOS_THREADS 1
14625_ACEOF
14626
14627 THREADOBJ="Python/thread.o"
14628else
14629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014631 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14632echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014633if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14634 echo $ECHO_N "(cached) $ECHO_C" >&6
14635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14637echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014640{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14641echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014643/* confdefs.h. */
14644_ACEOF
14645cat confdefs.h >>conftest.$ac_ext
14646cat >>conftest.$ac_ext <<_ACEOF
14647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014648$ac_includes_default
14649#include <kernel/OS.h>
14650_ACEOF
14651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014652if { (ac_try="$ac_compile"
14653case "(($ac_try" in
14654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14655 *) ac_try_echo=$ac_try;;
14656esac
14657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014660 grep -v '^ *+' conftest.er1 >conftest.err
14661 rm -f conftest.er1
14662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014664 (exit $ac_status); } && {
14665 test -z "$ac_c_werror_flag" ||
14666 test ! -s conftest.err
14667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014668 ac_header_compiler=yes
14669else
14670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014671sed 's/^/| /' conftest.$ac_ext >&5
14672
Martin v. Löwiseba40652007-08-30 20:10:57 +000014673 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675
14676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14677{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14678echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014679
14680# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014681{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14682echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014684/* confdefs.h. */
14685_ACEOF
14686cat confdefs.h >>conftest.$ac_ext
14687cat >>conftest.$ac_ext <<_ACEOF
14688/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014689#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014690_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691if { (ac_try="$ac_cpp conftest.$ac_ext"
14692case "(($ac_try" in
14693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14694 *) ac_try_echo=$ac_try;;
14695esac
14696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014699 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 rm -f conftest.er1
14701 cat conftest.err >&5
14702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014703 (exit $ac_status); } >/dev/null && {
14704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14705 test ! -s conftest.err
14706 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 ac_header_preproc=yes
14708else
14709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014710sed 's/^/| /' conftest.$ac_ext >&5
14711
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014714
Martin v. Löwis11437992002-04-12 09:54:03 +000014715rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014716{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14717echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014718
Martin v. Löwis11437992002-04-12 09:54:03 +000014719# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14721 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14723echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014724 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14725echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14726 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014727 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014728 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014729 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14730echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014731 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14732echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14733 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14734echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14735 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14736echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014737 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14738echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014739 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14740echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014742## ------------------------------------------------ ##
14743## Report this to http://www.python.org/python-bugs ##
14744## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014745_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014747 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014748esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014749{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14750echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014751if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14752 echo $ECHO_N "(cached) $ECHO_C" >&6
14753else
14754 ac_cv_header_kernel_OS_h=$ac_header_preproc
14755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14757echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
14759fi
14760if test $ac_cv_header_kernel_OS_h = yes; then
14761 cat >>confdefs.h <<\_ACEOF
14762#define WITH_THREAD 1
14763_ACEOF
14764
14765
14766cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014767#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014768_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014769
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014770 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014771else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014772
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14774echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014775if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14776 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014777else
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014779LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014781/* confdefs.h. */
14782_ACEOF
14783cat confdefs.h >>conftest.$ac_ext
14784cat >>conftest.$ac_ext <<_ACEOF
14785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787/* Override any GCC internal prototype to avoid an error.
14788 Use char because int might match the return type of a GCC
14789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014790#ifdef __cplusplus
14791extern "C"
14792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014793char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014794int
14795main ()
14796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 ;
14799 return 0;
14800}
14801_ACEOF
14802rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014803if { (ac_try="$ac_link"
14804case "(($ac_try" in
14805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14806 *) ac_try_echo=$ac_try;;
14807esac
14808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014811 grep -v '^ *+' conftest.er1 >conftest.err
14812 rm -f conftest.er1
14813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014815 (exit $ac_status); } && {
14816 test -z "$ac_c_werror_flag" ||
14817 test ! -s conftest.err
14818 } && test -s conftest$ac_exeext &&
14819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014821else
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014823sed 's/^/| /' conftest.$ac_ext >&5
14824
Martin v. Löwiseba40652007-08-30 20:10:57 +000014825 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014827
14828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014830LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014832{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14833echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014834if test $ac_cv_lib_pthreads_pthread_create = yes; then
14835 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014836#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014837_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014839 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014840 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014841 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014842else
Greg Steinadf63d62000-07-05 10:38:09 +000014843
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14845echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014846if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14847 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014848else
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014850LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014852/* confdefs.h. */
14853_ACEOF
14854cat confdefs.h >>conftest.$ac_ext
14855cat >>conftest.$ac_ext <<_ACEOF
14856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Martin v. Löwiseba40652007-08-30 20:10:57 +000014858/* Override any GCC internal prototype to avoid an error.
14859 Use char because int might match the return type of a GCC
14860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014861#ifdef __cplusplus
14862extern "C"
14863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014864char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014865int
14866main ()
14867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ;
14870 return 0;
14871}
14872_ACEOF
14873rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014874if { (ac_try="$ac_link"
14875case "(($ac_try" in
14876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14877 *) ac_try_echo=$ac_try;;
14878esac
14879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14880 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014882 grep -v '^ *+' conftest.er1 >conftest.err
14883 rm -f conftest.er1
14884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014886 (exit $ac_status); } && {
14887 test -z "$ac_c_werror_flag" ||
14888 test ! -s conftest.err
14889 } && test -s conftest$ac_exeext &&
14890 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014892else
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014894sed 's/^/| /' conftest.$ac_ext >&5
14895
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898
14899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14904echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014905if test $ac_cv_lib_c_r_pthread_create = yes; then
14906 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014907#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014908_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014909
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014910 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014911 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014912 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014913else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014914
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14916echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014917if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014919else
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014921LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014923/* confdefs.h. */
14924_ACEOF
14925cat confdefs.h >>conftest.$ac_ext
14926cat >>conftest.$ac_ext <<_ACEOF
14927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014928
Martin v. Löwiseba40652007-08-30 20:10:57 +000014929/* Override any GCC internal prototype to avoid an error.
14930 Use char because int might match the return type of a GCC
14931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014932#ifdef __cplusplus
14933extern "C"
14934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014935char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014936int
14937main ()
14938{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014939return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 ;
14941 return 0;
14942}
14943_ACEOF
14944rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014945if { (ac_try="$ac_link"
14946case "(($ac_try" in
14947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14948 *) ac_try_echo=$ac_try;;
14949esac
14950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14951 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014953 grep -v '^ *+' conftest.er1 >conftest.err
14954 rm -f conftest.er1
14955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014957 (exit $ac_status); } && {
14958 test -z "$ac_c_werror_flag" ||
14959 test ! -s conftest.err
14960 } && test -s conftest$ac_exeext &&
14961 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014963else
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014965sed 's/^/| /' conftest.$ac_ext >&5
14966
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014969
14970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014971 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014972LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14975echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014976if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14977 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014978#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014979_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014980
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014981 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014982 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014983 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014984else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014985
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14987echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014988if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14989 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014990else
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014992LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014993cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* confdefs.h. */
14995_ACEOF
14996cat confdefs.h >>conftest.$ac_ext
14997cat >>conftest.$ac_ext <<_ACEOF
14998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014999
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000/* Override any GCC internal prototype to avoid an error.
15001 Use char because int might match the return type of a GCC
15002 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015003#ifdef __cplusplus
15004extern "C"
15005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015006char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015007int
15008main ()
15009{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ;
15012 return 0;
15013}
15014_ACEOF
15015rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015016if { (ac_try="$ac_link"
15017case "(($ac_try" in
15018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15019 *) ac_try_echo=$ac_try;;
15020esac
15021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15022 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024 grep -v '^ *+' conftest.er1 >conftest.err
15025 rm -f conftest.er1
15026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028 (exit $ac_status); } && {
15029 test -z "$ac_c_werror_flag" ||
15030 test ! -s conftest.err
15031 } && test -s conftest$ac_exeext &&
15032 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015034else
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015036sed 's/^/| /' conftest.$ac_ext >&5
15037
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040
15041rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015043LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015045{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15046echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015047if test $ac_cv_lib_cma_pthread_create = yes; then
15048 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015049#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015050_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015051
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015052 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015053 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015054 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015055else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015056
Martin v. Löwis130fb172001-07-19 11:00:41 +000015057 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015058fi
15059
Guido van Rossum627b2d71993-12-24 10:39:16 +000015060
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015061fi
15062
Guido van Rossum0be3e491997-05-22 20:33:33 +000015063fi
15064
Guido van Rossum49545951997-12-02 19:28:29 +000015065fi
15066
Guido van Rossumb93a8621998-05-07 13:27:32 +000015067fi
15068
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015069
Michael W. Hudson54241132001-12-07 15:38:26 +000015070fi
15071
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015072
15073fi
15074
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015076
15077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015079fi
15080
Martin v. Löwis11437992002-04-12 09:54:03 +000015081fi
15082
15083
15084fi
15085
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015086
Michael W. Hudson54241132001-12-07 15:38:26 +000015087
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15089echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015090if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015092else
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015094LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015096/* confdefs.h. */
15097_ACEOF
15098cat confdefs.h >>conftest.$ac_ext
15099cat >>conftest.$ac_ext <<_ACEOF
15100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015101
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102/* Override any GCC internal prototype to avoid an error.
15103 Use char because int might match the return type of a GCC
15104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015105#ifdef __cplusplus
15106extern "C"
15107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015108char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015109int
15110main ()
15111{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015112return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 ;
15114 return 0;
15115}
15116_ACEOF
15117rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118if { (ac_try="$ac_link"
15119case "(($ac_try" in
15120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15121 *) ac_try_echo=$ac_try;;
15122esac
15123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15124 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015126 grep -v '^ *+' conftest.er1 >conftest.err
15127 rm -f conftest.er1
15128 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130 (exit $ac_status); } && {
15131 test -z "$ac_c_werror_flag" ||
15132 test ! -s conftest.err
15133 } && test -s conftest$ac_exeext &&
15134 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015136else
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015138sed 's/^/| /' conftest.$ac_ext >&5
15139
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142
15143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015145LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15148echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015149if test $ac_cv_lib_mpc_usconfig = yes; then
15150 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015152_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015153
Martin v. Löwis130fb172001-07-19 11:00:41 +000015154 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015155 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015156 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015157fi
15158
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015159
Neal Norwitza978ab02002-11-02 16:58:05 +000015160 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15162echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015163if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015165else
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015167LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015169/* confdefs.h. */
15170_ACEOF
15171cat confdefs.h >>conftest.$ac_ext
15172cat >>conftest.$ac_ext <<_ACEOF
15173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015174
Martin v. Löwiseba40652007-08-30 20:10:57 +000015175/* Override any GCC internal prototype to avoid an error.
15176 Use char because int might match the return type of a GCC
15177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015178#ifdef __cplusplus
15179extern "C"
15180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015181char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015182int
15183main ()
15184{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ;
15187 return 0;
15188}
15189_ACEOF
15190rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191if { (ac_try="$ac_link"
15192case "(($ac_try" in
15193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15194 *) ac_try_echo=$ac_try;;
15195esac
15196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015199 grep -v '^ *+' conftest.er1 >conftest.err
15200 rm -f conftest.er1
15201 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203 (exit $ac_status); } && {
15204 test -z "$ac_c_werror_flag" ||
15205 test ! -s conftest.err
15206 } && test -s conftest$ac_exeext &&
15207 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015209else
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015211sed 's/^/| /' conftest.$ac_ext >&5
15212
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215
15216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015218LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15221echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015222if test $ac_cv_lib_thread_thr_create = yes; then
15223 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015224#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015225_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015226
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015227 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015228 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015229 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015230fi
15231
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015232 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015233
Martin v. Löwis130fb172001-07-19 11:00:41 +000015234 if test "$USE_THREAD_MODULE" != "#"
15235 then
15236 # If the above checks didn't disable threads, (at least) OSF1
15237 # needs this '-threads' argument during linking.
15238 case $ac_sys_system in
15239 OSF1) LDLAST=-threads;;
15240 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015241 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015242fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015243
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015244if test "$posix_threads" = "yes"; then
15245 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015246
15247cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015248#define _POSIX_THREADS 1
15249_ACEOF
15250
15251 fi
15252
15253 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15254 case $ac_sys_system/$ac_sys_release in
15255 SunOS/5.6)
15256cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015257#define HAVE_PTHREAD_DESTRUCTOR 1
15258_ACEOF
15259
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015260 ;;
15261 SunOS/5.8)
15262cat >>confdefs.h <<\_ACEOF
15263#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15264_ACEOF
15265
15266 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015267 AIX/5)
15268cat >>confdefs.h <<\_ACEOF
15269#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15270_ACEOF
15271
15272 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015273 esac
15274
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15276echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015277 if test "${ac_cv_pthread_system_supported+set}" = set; then
15278 echo $ECHO_N "(cached) $ECHO_C" >&6
15279else
15280 if test "$cross_compiling" = yes; then
15281 ac_cv_pthread_system_supported=no
15282else
15283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015284/* confdefs.h. */
15285_ACEOF
15286cat confdefs.h >>conftest.$ac_ext
15287cat >>conftest.$ac_ext <<_ACEOF
15288/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015289#include <pthread.h>
15290 void *foo(void *parm) {
15291 return NULL;
15292 }
15293 main() {
15294 pthread_attr_t attr;
15295 pthread_t id;
15296 if (pthread_attr_init(&attr)) exit(-1);
15297 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15298 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15299 exit(0);
15300 }
15301_ACEOF
15302rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303if { (ac_try="$ac_link"
15304case "(($ac_try" in
15305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15306 *) ac_try_echo=$ac_try;;
15307esac
15308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15309 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015310 ac_status=$?
15311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313 { (case "(($ac_try" in
15314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15315 *) ac_try_echo=$ac_try;;
15316esac
15317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15318 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015319 ac_status=$?
15320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15321 (exit $ac_status); }; }; then
15322 ac_cv_pthread_system_supported=yes
15323else
15324 echo "$as_me: program exited with status $ac_status" >&5
15325echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015326sed 's/^/| /' conftest.$ac_ext >&5
15327
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015328( exit $ac_status )
15329ac_cv_pthread_system_supported=no
15330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331rm -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 +000015332fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015333
Martin v. Löwiseba40652007-08-30 20:10:57 +000015334
15335
Guido van Rossum627b2d71993-12-24 10:39:16 +000015336fi
15337
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15339echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015340 if test "$ac_cv_pthread_system_supported" = "yes"; then
15341
15342cat >>confdefs.h <<\_ACEOF
15343#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15344_ACEOF
15345
15346 fi
15347
15348for ac_func in pthread_sigmask
15349do
15350as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15352echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15353if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015354 echo $ECHO_N "(cached) $ECHO_C" >&6
15355else
15356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015357/* confdefs.h. */
15358_ACEOF
15359cat confdefs.h >>conftest.$ac_ext
15360cat >>conftest.$ac_ext <<_ACEOF
15361/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015362/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15363 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15364#define $ac_func innocuous_$ac_func
15365
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015366/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015367 which can conflict with char $ac_func (); below.
15368 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015369 <limits.h> exists even on freestanding compilers. */
15370
15371#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015372# include <limits.h>
15373#else
15374# include <assert.h>
15375#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015376
15377#undef $ac_func
15378
Martin v. Löwiseba40652007-08-30 20:10:57 +000015379/* Override any GCC internal prototype to avoid an error.
15380 Use char because int might match the return type of a GCC
15381 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015382#ifdef __cplusplus
15383extern "C"
15384#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015385char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015386/* The GNU C library defines this for functions which it implements
15387 to always fail with ENOSYS. Some functions are actually named
15388 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015389#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015390choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015391#endif
15392
Skip Montanaro6dead952003-09-25 14:50:04 +000015393int
15394main ()
15395{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015397 ;
15398 return 0;
15399}
15400_ACEOF
15401rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402if { (ac_try="$ac_link"
15403case "(($ac_try" in
15404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15405 *) ac_try_echo=$ac_try;;
15406esac
15407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15408 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015410 grep -v '^ *+' conftest.er1 >conftest.err
15411 rm -f conftest.er1
15412 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414 (exit $ac_status); } && {
15415 test -z "$ac_c_werror_flag" ||
15416 test ! -s conftest.err
15417 } && test -s conftest$ac_exeext &&
15418 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015419 eval "$as_ac_var=yes"
15420else
15421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015422sed 's/^/| /' conftest.$ac_ext >&5
15423
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426
15427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015428 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015430ac_res=`eval echo '${'$as_ac_var'}'`
15431 { echo "$as_me:$LINENO: result: $ac_res" >&5
15432echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015433if test `eval echo '${'$as_ac_var'}'` = yes; then
15434 cat >>confdefs.h <<_ACEOF
15435#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15436_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015437 case $ac_sys_system in
15438 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015439
Jason Tishlerfac083d2003-07-22 15:20:49 +000015440cat >>confdefs.h <<\_ACEOF
15441#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15442_ACEOF
15443
15444 ;;
15445 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015446fi
15447done
15448
15449fi
15450
15451
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015452# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454
Martin v. Löwiseba40652007-08-30 20:10:57 +000015455{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15456echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15457# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015458if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015460 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015461 { echo "$as_me:$LINENO: result: no" >&5
15462echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015463 ipv6=no
15464 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465 *) { echo "$as_me:$LINENO: result: yes" >&5
15466echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015468#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015469_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015470
15471 ipv6=yes
15472 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015474else
Martin v. Löwis11437992002-04-12 09:54:03 +000015475
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015476 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 { echo "$as_me:$LINENO: result: no" >&5
15478echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015479 ipv6=no
15480
15481else
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015483/* confdefs.h. */
15484_ACEOF
15485cat confdefs.h >>conftest.$ac_ext
15486cat >>conftest.$ac_ext <<_ACEOF
15487/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015488 /* AF_INET6 available check */
15489#include <sys/types.h>
15490#include <sys/socket.h>
15491main()
15492{
15493 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15494 exit(1);
15495 else
15496 exit(0);
15497}
15498
Martin v. Löwis11437992002-04-12 09:54:03 +000015499_ACEOF
15500rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501if { (ac_try="$ac_link"
15502case "(($ac_try" in
15503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15504 *) ac_try_echo=$ac_try;;
15505esac
15506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15507 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 ac_status=$?
15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511 { (case "(($ac_try" in
15512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15513 *) ac_try_echo=$ac_try;;
15514esac
15515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15516 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520 { echo "$as_me:$LINENO: result: yes" >&5
15521echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015522 ipv6=yes
15523else
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 echo "$as_me: program exited with status $ac_status" >&5
15525echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015526sed 's/^/| /' conftest.$ac_ext >&5
15527
Martin v. Löwis11437992002-04-12 09:54:03 +000015528( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015529{ echo "$as_me:$LINENO: result: no" >&5
15530echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015531 ipv6=no
15532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015533rm -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 +000015534fi
15535
Martin v. Löwiseba40652007-08-30 20:10:57 +000015536
15537
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015538if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015539 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15540echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* confdefs.h. */
15543_ACEOF
15544cat confdefs.h >>conftest.$ac_ext
15545cat >>conftest.$ac_ext <<_ACEOF
15546/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015547#include <sys/types.h>
15548#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015549int
15550main ()
15551{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015552struct sockaddr_in6 x;
15553x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ;
15555 return 0;
15556}
15557_ACEOF
15558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559if { (ac_try="$ac_compile"
15560case "(($ac_try" in
15561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15562 *) ac_try_echo=$ac_try;;
15563esac
15564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015567 grep -v '^ *+' conftest.er1 >conftest.err
15568 rm -f conftest.er1
15569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571 (exit $ac_status); } && {
15572 test -z "$ac_c_werror_flag" ||
15573 test ! -s conftest.err
15574 } && test -s conftest.$ac_objext; then
15575 { echo "$as_me:$LINENO: result: yes" >&5
15576echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015577 ipv6=yes
15578else
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015580sed 's/^/| /' conftest.$ac_ext >&5
15581
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582 { echo "$as_me:$LINENO: result: no" >&5
15583echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015584 ipv6=no
15585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015586
15587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015588fi
15589
15590if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015592#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015593_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015594
15595fi
15596
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597fi
15598
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015599
15600ipv6type=unknown
15601ipv6lib=none
15602ipv6trylibc=no
15603
15604if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15606echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015607 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15608 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015609 case $i in
15610 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015612/* confdefs.h. */
15613_ACEOF
15614cat confdefs.h >>conftest.$ac_ext
15615cat >>conftest.$ac_ext <<_ACEOF
15616/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015617
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015618#include <netinet/in.h>
15619#ifdef IPV6_INRIA_VERSION
15620yes
15621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015622_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015624 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015625 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015626fi
15627rm -f conftest*
15628
15629 ;;
15630 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015632/* confdefs.h. */
15633_ACEOF
15634cat confdefs.h >>conftest.$ac_ext
15635cat >>conftest.$ac_ext <<_ACEOF
15636/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015637
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015638#include <netinet/in.h>
15639#ifdef __KAME__
15640yes
15641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015644 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015645 ipv6type=$i;
15646 ipv6lib=inet6
15647 ipv6libdir=/usr/local/v6/lib
15648 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015649fi
15650rm -f conftest*
15651
15652 ;;
15653 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015655/* confdefs.h. */
15656_ACEOF
15657cat confdefs.h >>conftest.$ac_ext
15658cat >>conftest.$ac_ext <<_ACEOF
15659/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015660
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015661#include <features.h>
15662#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15663yes
15664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015667 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015668 ipv6type=$i;
15669 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015670fi
15671rm -f conftest*
15672
15673 ;;
15674 linux-inet6)
15675 if test -d /usr/inet6; then
15676 ipv6type=$i
15677 ipv6lib=inet6
15678 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015679 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015680 fi
15681 ;;
15682 solaris)
15683 if test -f /etc/netconfig; then
15684 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15685 ipv6type=$i
15686 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015687 fi
15688 fi
15689 ;;
15690 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* confdefs.h. */
15693_ACEOF
15694cat confdefs.h >>conftest.$ac_ext
15695cat >>conftest.$ac_ext <<_ACEOF
15696/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015697
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015698#include <sys/param.h>
15699#ifdef _TOSHIBA_INET6
15700yes
15701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015702_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015704 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015705 ipv6type=$i;
15706 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015707 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015708fi
15709rm -f conftest*
15710
15711 ;;
15712 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015714/* confdefs.h. */
15715_ACEOF
15716cat confdefs.h >>conftest.$ac_ext
15717cat >>conftest.$ac_ext <<_ACEOF
15718/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015719
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015720#include </usr/local/v6/include/sys/v6config.h>
15721#ifdef __V6D__
15722yes
15723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015726 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015727 ipv6type=$i;
15728 ipv6lib=v6;
15729 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015730 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015731fi
15732rm -f conftest*
15733
15734 ;;
15735 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015737/* confdefs.h. */
15738_ACEOF
15739cat confdefs.h >>conftest.$ac_ext
15740cat >>conftest.$ac_ext <<_ACEOF
15741/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015742
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015743#include <sys/param.h>
15744#ifdef _ZETA_MINAMI_INET6
15745yes
15746#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015747_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015749 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015750 ipv6type=$i;
15751 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015752 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015753fi
15754rm -f conftest*
15755
15756 ;;
15757 esac
15758 if test "$ipv6type" != "unknown"; then
15759 break
15760 fi
15761 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15763echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015764fi
15765
15766if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15767 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15768 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15769 echo "using lib$ipv6lib"
15770 else
15771 if test $ipv6trylibc = "yes"; then
15772 echo "using libc"
15773 else
15774 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15775 echo "You need to fetch lib$ipv6lib.a from appropriate"
15776 echo 'ipv6 kit and compile beforehand.'
15777 exit 1
15778 fi
15779 fi
15780fi
15781
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015782{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15783echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15784cat >conftest.$ac_ext <<_ACEOF
15785/* confdefs.h. */
15786_ACEOF
15787cat confdefs.h >>conftest.$ac_ext
15788cat >>conftest.$ac_ext <<_ACEOF
15789/* end confdefs.h. */
15790#include <Carbon/Carbon.h>
15791int
15792main ()
15793{
15794FSIORefNum fRef = 0
15795 ;
15796 return 0;
15797}
15798_ACEOF
15799rm -f conftest.$ac_objext
15800if { (ac_try="$ac_compile"
15801case "(($ac_try" in
15802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15803 *) ac_try_echo=$ac_try;;
15804esac
15805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15806 (eval "$ac_compile") 2>conftest.er1
15807 ac_status=$?
15808 grep -v '^ *+' conftest.er1 >conftest.err
15809 rm -f conftest.er1
15810 cat conftest.err >&5
15811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15812 (exit $ac_status); } && {
15813 test -z "$ac_c_werror_flag" ||
15814 test ! -s conftest.err
15815 } && test -s conftest.$ac_objext; then
15816
15817cat >>confdefs.h <<\_ACEOF
15818#define HAVE_OSX105_SDK 1
15819_ACEOF
15820
15821 { echo "$as_me:$LINENO: result: yes" >&5
15822echo "${ECHO_T}yes" >&6; }
15823else
15824 echo "$as_me: failed program was:" >&5
15825sed 's/^/| /' conftest.$ac_ext >&5
15826
15827 { echo "$as_me:$LINENO: result: no" >&5
15828echo "${ECHO_T}no" >&6; }
15829
15830fi
15831
15832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15833
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015834# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15836echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015837
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015839if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015840 withval=$with_doc_strings;
15841fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015842
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015843
15844if test -z "$with_doc_strings"
15845then with_doc_strings="yes"
15846fi
15847if test "$with_doc_strings" != "no"
15848then
15849
15850cat >>confdefs.h <<\_ACEOF
15851#define WITH_DOC_STRINGS 1
15852_ACEOF
15853
15854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015855{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15856echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015857
Neil Schemenauera35c6882001-02-27 04:45:05 +000015858# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15860echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015861
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015863if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015865if test "$withval" != no
15866then
15867
15868cat >>confdefs.h <<\_ACEOF
15869#define WITH_TSC 1
15870_ACEOF
15871
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872 { echo "$as_me:$LINENO: result: yes" >&5
15873echo "${ECHO_T}yes" >&6; }
15874else { echo "$as_me:$LINENO: result: no" >&5
15875echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015876fi
15877else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878 { echo "$as_me:$LINENO: result: no" >&5
15879echo "${ECHO_T}no" >&6; }
15880fi
15881
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015882
15883# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15885echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
Martin v. Löwiseba40652007-08-30 20:10:57 +000015887# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015888if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889 withval=$with_pymalloc;
15890fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015891
Neil Schemenauera35c6882001-02-27 04:45:05 +000015892
Neil Schemenauer16c22972002-03-22 15:34:49 +000015893if test -z "$with_pymalloc"
15894then with_pymalloc="yes"
15895fi
15896if test "$with_pymalloc" != "no"
15897then
Martin v. Löwis11437992002-04-12 09:54:03 +000015898
15899cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015900#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015902
15903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15905echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015906
Barry Warsawef82cd72000-06-30 16:21:01 +000015907# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15909echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015910
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015912if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015914if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015915then
15916
15917cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015918#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015919_ACEOF
15920
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921 { echo "$as_me:$LINENO: result: yes" >&5
15922echo "${ECHO_T}yes" >&6; }
15923else { echo "$as_me:$LINENO: result: no" >&5
15924echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015925fi
15926else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927 { echo "$as_me:$LINENO: result: no" >&5
15928echo "${ECHO_T}no" >&6; }
15929fi
15930
Barry Warsawef82cd72000-06-30 16:21:01 +000015931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015932# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015933
Guido van Rossum98935bf2001-09-05 19:13:16 +000015934DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015935
Guido van Rossume97ee181999-12-20 21:27:22 +000015936# the dlopen() function means we might want to use dynload_shlib.o. some
15937# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015938
Thomas Wouters3a584202000-08-05 23:28:51 +000015939for ac_func in dlopen
15940do
Martin v. Löwis11437992002-04-12 09:54:03 +000015941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015942{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15944if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015946else
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015953/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15954 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15955#define $ac_func innocuous_$ac_func
15956
Guido van Rossume97ee181999-12-20 21:27:22 +000015957/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015958 which can conflict with char $ac_func (); below.
15959 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015960 <limits.h> exists even on freestanding compilers. */
15961
15962#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015963# include <limits.h>
15964#else
15965# include <assert.h>
15966#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015967
15968#undef $ac_func
15969
Martin v. Löwiseba40652007-08-30 20:10:57 +000015970/* Override any GCC internal prototype to avoid an error.
15971 Use char because int might match the return type of a GCC
15972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015973#ifdef __cplusplus
15974extern "C"
15975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015976char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015977/* The GNU C library defines this for functions which it implements
15978 to always fail with ENOSYS. Some functions are actually named
15979 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015981choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015982#endif
15983
Skip Montanaro6dead952003-09-25 14:50:04 +000015984int
15985main ()
15986{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015987return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 ;
15989 return 0;
15990}
15991_ACEOF
15992rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993if { (ac_try="$ac_link"
15994case "(($ac_try" in
15995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15996 *) ac_try_echo=$ac_try;;
15997esac
15998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016001 grep -v '^ *+' conftest.er1 >conftest.err
16002 rm -f conftest.er1
16003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016005 (exit $ac_status); } && {
16006 test -z "$ac_c_werror_flag" ||
16007 test ! -s conftest.err
16008 } && test -s conftest$ac_exeext &&
16009 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016010 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016011else
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016013sed 's/^/| /' conftest.$ac_ext >&5
16014
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017
16018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016019 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016021ac_res=`eval echo '${'$as_ac_var'}'`
16022 { echo "$as_me:$LINENO: result: $ac_res" >&5
16023echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016024if test `eval echo '${'$as_ac_var'}'` = yes; then
16025 cat >>confdefs.h <<_ACEOF
16026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16027_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016028
Guido van Rossume97ee181999-12-20 21:27:22 +000016029fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016030done
Guido van Rossume97ee181999-12-20 21:27:22 +000016031
Michael W. Hudson54241132001-12-07 15:38:26 +000016032
Guido van Rossume97ee181999-12-20 21:27:22 +000016033# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16034# loading of modules.
16035
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16037echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016038if test -z "$DYNLOADFILE"
16039then
16040 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016041 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16042 if test "$ac_cv_func_dlopen" = yes
16043 then DYNLOADFILE="dynload_shlib.o"
16044 else DYNLOADFILE="dynload_aix.o"
16045 fi
16046 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016047 BeOS*) DYNLOADFILE="dynload_beos.o";;
16048 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016049 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16050 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016051 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016052 *)
16053 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16054 # out any dynamic loading
16055 if test "$ac_cv_func_dlopen" = yes
16056 then DYNLOADFILE="dynload_shlib.o"
16057 else DYNLOADFILE="dynload_stub.o"
16058 fi
16059 ;;
16060 esac
16061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016062{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16063echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016064if test "$DYNLOADFILE" != "dynload_stub.o"
16065then
Martin v. Löwis11437992002-04-12 09:54:03 +000016066
16067cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016068#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016069_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016070
16071fi
16072
Neil Schemenauer4e425612001-06-19 15:44:15 +000016073# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16074
Michael W. Hudson54241132001-12-07 15:38:26 +000016075
Martin v. Löwiseba40652007-08-30 20:10:57 +000016076{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16077echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016078if test -z "$MACHDEP_OBJS"
16079then
Jack Jansene578a632001-08-15 01:27:14 +000016080 MACHDEP_OBJS=$extra_machdep_objs
16081else
16082 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016084{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16085echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016086
Guido van Rossum627b2d71993-12-24 10:39:16 +000016087# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
Martin v. Löwisd6320502004-08-12 13:45:08 +000016159
Martin v. Löwisc3001752005-01-23 09:27:24 +000016160
16161
Neal Norwitz05a45592006-03-20 06:30:08 +000016162
16163
Martin v. Löwis382abef2007-02-19 10:55:19 +000016164
16165
Christian Heimes36281872007-11-30 21:11:28 +000016166
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016167
16168
16169for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16170 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016171 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016172 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016173 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016174 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016175 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016176 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016177 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016178 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016179 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016180 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016181do
Martin v. Löwis11437992002-04-12 09:54:03 +000016182as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016183{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16184echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16185if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016187else
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016189/* confdefs.h. */
16190_ACEOF
16191cat confdefs.h >>conftest.$ac_ext
16192cat >>conftest.$ac_ext <<_ACEOF
16193/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016194/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16196#define $ac_func innocuous_$ac_func
16197
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016198/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016199 which can conflict with char $ac_func (); below.
16200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016201 <limits.h> exists even on freestanding compilers. */
16202
16203#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016204# include <limits.h>
16205#else
16206# include <assert.h>
16207#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016208
16209#undef $ac_func
16210
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211/* Override any GCC internal prototype to avoid an error.
16212 Use char because int might match the return type of a GCC
16213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214#ifdef __cplusplus
16215extern "C"
16216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016217char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016218/* The GNU C library defines this for functions which it implements
16219 to always fail with ENOSYS. Some functions are actually named
16220 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016222choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016223#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016224
Skip Montanaro6dead952003-09-25 14:50:04 +000016225int
16226main ()
16227{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 ;
16230 return 0;
16231}
16232_ACEOF
16233rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234if { (ac_try="$ac_link"
16235case "(($ac_try" in
16236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16237 *) ac_try_echo=$ac_try;;
16238esac
16239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16240 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016242 grep -v '^ *+' conftest.er1 >conftest.err
16243 rm -f conftest.er1
16244 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016246 (exit $ac_status); } && {
16247 test -z "$ac_c_werror_flag" ||
16248 test ! -s conftest.err
16249 } && test -s conftest$ac_exeext &&
16250 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016252else
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016254sed 's/^/| /' conftest.$ac_ext >&5
16255
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016258
16259rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016260 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016262ac_res=`eval echo '${'$as_ac_var'}'`
16263 { echo "$as_me:$LINENO: result: $ac_res" >&5
16264echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016265if test `eval echo '${'$as_ac_var'}'` = yes; then
16266 cat >>confdefs.h <<_ACEOF
16267#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16268_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016269
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016270fi
16271done
16272
Michael W. Hudson54241132001-12-07 15:38:26 +000016273
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016274# For some functions, having a definition is not sufficient, since
16275# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276{ echo "$as_me:$LINENO: checking for chroot" >&5
16277echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016279/* confdefs.h. */
16280_ACEOF
16281cat confdefs.h >>conftest.$ac_ext
16282cat >>conftest.$ac_ext <<_ACEOF
16283/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016284#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016285int
16286main ()
16287{
16288void *x=chroot
16289 ;
16290 return 0;
16291}
16292_ACEOF
16293rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294if { (ac_try="$ac_compile"
16295case "(($ac_try" in
16296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16297 *) ac_try_echo=$ac_try;;
16298esac
16299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16300 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016302 grep -v '^ *+' conftest.er1 >conftest.err
16303 rm -f conftest.er1
16304 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306 (exit $ac_status); } && {
16307 test -z "$ac_c_werror_flag" ||
16308 test ! -s conftest.err
16309 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016310
16311cat >>confdefs.h <<\_ACEOF
16312#define HAVE_CHROOT 1
16313_ACEOF
16314
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315 { echo "$as_me:$LINENO: result: yes" >&5
16316echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016317else
16318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016319sed 's/^/| /' conftest.$ac_ext >&5
16320
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321 { echo "$as_me:$LINENO: result: no" >&5
16322echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016323
16324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325
16326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16327{ echo "$as_me:$LINENO: checking for link" >&5
16328echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016329cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016330/* confdefs.h. */
16331_ACEOF
16332cat confdefs.h >>conftest.$ac_ext
16333cat >>conftest.$ac_ext <<_ACEOF
16334/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016335#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016336int
16337main ()
16338{
16339void *x=link
16340 ;
16341 return 0;
16342}
16343_ACEOF
16344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016345if { (ac_try="$ac_compile"
16346case "(($ac_try" in
16347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16348 *) ac_try_echo=$ac_try;;
16349esac
16350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016353 grep -v '^ *+' conftest.er1 >conftest.err
16354 rm -f conftest.er1
16355 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016357 (exit $ac_status); } && {
16358 test -z "$ac_c_werror_flag" ||
16359 test ! -s conftest.err
16360 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016361
16362cat >>confdefs.h <<\_ACEOF
16363#define HAVE_LINK 1
16364_ACEOF
16365
Martin v. Löwiseba40652007-08-30 20:10:57 +000016366 { echo "$as_me:$LINENO: result: yes" >&5
16367echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016368else
16369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016370sed 's/^/| /' conftest.$ac_ext >&5
16371
Martin v. Löwiseba40652007-08-30 20:10:57 +000016372 { echo "$as_me:$LINENO: result: no" >&5
16373echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016374
16375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376
16377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16378{ echo "$as_me:$LINENO: checking for symlink" >&5
16379echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016381/* confdefs.h. */
16382_ACEOF
16383cat confdefs.h >>conftest.$ac_ext
16384cat >>conftest.$ac_ext <<_ACEOF
16385/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016386#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016387int
16388main ()
16389{
16390void *x=symlink
16391 ;
16392 return 0;
16393}
16394_ACEOF
16395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396if { (ac_try="$ac_compile"
16397case "(($ac_try" in
16398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16399 *) ac_try_echo=$ac_try;;
16400esac
16401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016404 grep -v '^ *+' conftest.er1 >conftest.err
16405 rm -f conftest.er1
16406 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016408 (exit $ac_status); } && {
16409 test -z "$ac_c_werror_flag" ||
16410 test ! -s conftest.err
16411 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016412
16413cat >>confdefs.h <<\_ACEOF
16414#define HAVE_SYMLINK 1
16415_ACEOF
16416
Martin v. Löwiseba40652007-08-30 20:10:57 +000016417 { echo "$as_me:$LINENO: result: yes" >&5
16418echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016419else
16420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016421sed 's/^/| /' conftest.$ac_ext >&5
16422
Martin v. Löwiseba40652007-08-30 20:10:57 +000016423 { echo "$as_me:$LINENO: result: no" >&5
16424echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016425
16426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427
16428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16429{ echo "$as_me:$LINENO: checking for fchdir" >&5
16430echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016432/* confdefs.h. */
16433_ACEOF
16434cat confdefs.h >>conftest.$ac_ext
16435cat >>conftest.$ac_ext <<_ACEOF
16436/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016437#include <unistd.h>
16438int
16439main ()
16440{
16441void *x=fchdir
16442 ;
16443 return 0;
16444}
16445_ACEOF
16446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016447if { (ac_try="$ac_compile"
16448case "(($ac_try" in
16449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16450 *) ac_try_echo=$ac_try;;
16451esac
16452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016455 grep -v '^ *+' conftest.er1 >conftest.err
16456 rm -f conftest.er1
16457 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459 (exit $ac_status); } && {
16460 test -z "$ac_c_werror_flag" ||
16461 test ! -s conftest.err
16462 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016463
16464cat >>confdefs.h <<\_ACEOF
16465#define HAVE_FCHDIR 1
16466_ACEOF
16467
Martin v. Löwiseba40652007-08-30 20:10:57 +000016468 { echo "$as_me:$LINENO: result: yes" >&5
16469echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016470else
16471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016472sed 's/^/| /' conftest.$ac_ext >&5
16473
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474 { echo "$as_me:$LINENO: result: no" >&5
16475echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016476
16477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016478
16479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16480{ echo "$as_me:$LINENO: checking for fsync" >&5
16481echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016483/* confdefs.h. */
16484_ACEOF
16485cat confdefs.h >>conftest.$ac_ext
16486cat >>conftest.$ac_ext <<_ACEOF
16487/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016488#include <unistd.h>
16489int
16490main ()
16491{
16492void *x=fsync
16493 ;
16494 return 0;
16495}
16496_ACEOF
16497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016498if { (ac_try="$ac_compile"
16499case "(($ac_try" in
16500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16501 *) ac_try_echo=$ac_try;;
16502esac
16503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016506 grep -v '^ *+' conftest.er1 >conftest.err
16507 rm -f conftest.er1
16508 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016510 (exit $ac_status); } && {
16511 test -z "$ac_c_werror_flag" ||
16512 test ! -s conftest.err
16513 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016514
16515cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016516#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016517_ACEOF
16518
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519 { echo "$as_me:$LINENO: result: yes" >&5
16520echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016521else
16522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016523sed 's/^/| /' conftest.$ac_ext >&5
16524
Martin v. Löwiseba40652007-08-30 20:10:57 +000016525 { echo "$as_me:$LINENO: result: no" >&5
16526echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016527
16528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016529
16530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16531{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16532echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016539#include <unistd.h>
16540int
16541main ()
16542{
16543void *x=fdatasync
16544 ;
16545 return 0;
16546}
16547_ACEOF
16548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016549if { (ac_try="$ac_compile"
16550case "(($ac_try" in
16551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16552 *) ac_try_echo=$ac_try;;
16553esac
16554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016557 grep -v '^ *+' conftest.er1 >conftest.err
16558 rm -f conftest.er1
16559 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016561 (exit $ac_status); } && {
16562 test -z "$ac_c_werror_flag" ||
16563 test ! -s conftest.err
16564 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016565
16566cat >>confdefs.h <<\_ACEOF
16567#define HAVE_FDATASYNC 1
16568_ACEOF
16569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570 { echo "$as_me:$LINENO: result: yes" >&5
16571echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016572else
16573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016574sed 's/^/| /' conftest.$ac_ext >&5
16575
Martin v. Löwiseba40652007-08-30 20:10:57 +000016576 { echo "$as_me:$LINENO: result: no" >&5
16577echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016578
16579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580
16581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016582{ echo "$as_me:$LINENO: checking for epoll" >&5
16583echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16584cat >conftest.$ac_ext <<_ACEOF
16585/* confdefs.h. */
16586_ACEOF
16587cat confdefs.h >>conftest.$ac_ext
16588cat >>conftest.$ac_ext <<_ACEOF
16589/* end confdefs.h. */
16590#include <sys/epoll.h>
16591int
16592main ()
16593{
16594void *x=epoll_create
16595 ;
16596 return 0;
16597}
16598_ACEOF
16599rm -f conftest.$ac_objext
16600if { (ac_try="$ac_compile"
16601case "(($ac_try" in
16602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16603 *) ac_try_echo=$ac_try;;
16604esac
16605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16606 (eval "$ac_compile") 2>conftest.er1
16607 ac_status=$?
16608 grep -v '^ *+' conftest.er1 >conftest.err
16609 rm -f conftest.er1
16610 cat conftest.err >&5
16611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612 (exit $ac_status); } && {
16613 test -z "$ac_c_werror_flag" ||
16614 test ! -s conftest.err
16615 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016616
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016617cat >>confdefs.h <<\_ACEOF
16618#define HAVE_EPOLL 1
16619_ACEOF
16620
16621 { echo "$as_me:$LINENO: result: yes" >&5
16622echo "${ECHO_T}yes" >&6; }
16623else
16624 echo "$as_me: failed program was:" >&5
16625sed 's/^/| /' conftest.$ac_ext >&5
16626
16627 { echo "$as_me:$LINENO: result: no" >&5
16628echo "${ECHO_T}no" >&6; }
16629
16630fi
16631
16632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16633{ echo "$as_me:$LINENO: checking for kqueue" >&5
16634echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16635cat >conftest.$ac_ext <<_ACEOF
16636/* confdefs.h. */
16637_ACEOF
16638cat confdefs.h >>conftest.$ac_ext
16639cat >>conftest.$ac_ext <<_ACEOF
16640/* end confdefs.h. */
16641
16642#include <sys/types.h>
16643#include <sys/event.h>
16644
16645int
16646main ()
16647{
16648int x=kqueue()
16649 ;
16650 return 0;
16651}
16652_ACEOF
16653rm -f conftest.$ac_objext
16654if { (ac_try="$ac_compile"
16655case "(($ac_try" in
16656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16657 *) ac_try_echo=$ac_try;;
16658esac
16659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16660 (eval "$ac_compile") 2>conftest.er1
16661 ac_status=$?
16662 grep -v '^ *+' conftest.er1 >conftest.err
16663 rm -f conftest.er1
16664 cat conftest.err >&5
16665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16666 (exit $ac_status); } && {
16667 test -z "$ac_c_werror_flag" ||
16668 test ! -s conftest.err
16669 } && test -s conftest.$ac_objext; then
16670
16671cat >>confdefs.h <<\_ACEOF
16672#define HAVE_KQUEUE 1
16673_ACEOF
16674
16675 { echo "$as_me:$LINENO: result: yes" >&5
16676echo "${ECHO_T}yes" >&6; }
16677else
16678 echo "$as_me: failed program was:" >&5
16679sed 's/^/| /' conftest.$ac_ext >&5
16680
16681 { echo "$as_me:$LINENO: result: no" >&5
16682echo "${ECHO_T}no" >&6; }
16683
16684fi
16685
16686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016687# On some systems (eg. FreeBSD 5), we would find a definition of the
16688# functions ctermid_r, setgroups in the library, but no prototype
16689# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16690# address to avoid compiler warnings and potential miscompilations
16691# because of the missing prototypes.
16692
Martin v. Löwiseba40652007-08-30 20:10:57 +000016693{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16694echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016695cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016696/* confdefs.h. */
16697_ACEOF
16698cat confdefs.h >>conftest.$ac_ext
16699cat >>conftest.$ac_ext <<_ACEOF
16700/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016701
16702#include "confdefs.h"
16703#include <stdio.h>
16704
Martin v. Löwisd5843682002-11-21 20:41:28 +000016705int
16706main ()
16707{
16708void* p = ctermid_r
16709 ;
16710 return 0;
16711}
16712_ACEOF
16713rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016714if { (ac_try="$ac_compile"
16715case "(($ac_try" in
16716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16717 *) ac_try_echo=$ac_try;;
16718esac
16719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 grep -v '^ *+' conftest.er1 >conftest.err
16723 rm -f conftest.er1
16724 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016726 (exit $ac_status); } && {
16727 test -z "$ac_c_werror_flag" ||
16728 test ! -s conftest.err
16729 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016730
16731cat >>confdefs.h <<\_ACEOF
16732#define HAVE_CTERMID_R 1
16733_ACEOF
16734
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735 { echo "$as_me:$LINENO: result: yes" >&5
16736echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016737else
16738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016739sed 's/^/| /' conftest.$ac_ext >&5
16740
Martin v. Löwiseba40652007-08-30 20:10:57 +000016741 { echo "$as_me:$LINENO: result: no" >&5
16742echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016743
16744fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016745
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16747
16748{ echo "$as_me:$LINENO: checking for flock" >&5
16749echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016751/* confdefs.h. */
16752_ACEOF
16753cat confdefs.h >>conftest.$ac_ext
16754cat >>conftest.$ac_ext <<_ACEOF
16755/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016756
16757#include "confdefs.h"
16758#include <sys/file.h>
16759
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016760int
16761main ()
16762{
16763void* p = flock
16764 ;
16765 return 0;
16766}
16767_ACEOF
16768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769if { (ac_try="$ac_compile"
16770case "(($ac_try" in
16771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16772 *) ac_try_echo=$ac_try;;
16773esac
16774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016777 grep -v '^ *+' conftest.er1 >conftest.err
16778 rm -f conftest.er1
16779 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781 (exit $ac_status); } && {
16782 test -z "$ac_c_werror_flag" ||
16783 test ! -s conftest.err
16784 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016785
16786cat >>confdefs.h <<\_ACEOF
16787#define HAVE_FLOCK 1
16788_ACEOF
16789
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790 { echo "$as_me:$LINENO: result: yes" >&5
16791echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016792else
16793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016794sed 's/^/| /' conftest.$ac_ext >&5
16795
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796 { echo "$as_me:$LINENO: result: no" >&5
16797echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016798
16799fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016800
Martin v. Löwiseba40652007-08-30 20:10:57 +000016801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16802
16803{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16804echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016806/* confdefs.h. */
16807_ACEOF
16808cat confdefs.h >>conftest.$ac_ext
16809cat >>conftest.$ac_ext <<_ACEOF
16810/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016811
16812#include "confdefs.h"
16813#include <unistd.h>
16814
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016815int
16816main ()
16817{
16818void* p = getpagesize
16819 ;
16820 return 0;
16821}
16822_ACEOF
16823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +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öwisf26d63b2003-03-30 17:23:49 +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_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016840
16841cat >>confdefs.h <<\_ACEOF
16842#define HAVE_GETPAGESIZE 1
16843_ACEOF
16844
Martin v. Löwiseba40652007-08-30 20:10:57 +000016845 { echo "$as_me:$LINENO: result: yes" >&5
16846echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016847else
16848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016849sed 's/^/| /' conftest.$ac_ext >&5
16850
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851 { echo "$as_me:$LINENO: result: no" >&5
16852echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016853
16854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855
16856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016857
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016858for ac_prog in true
16859do
16860 # Extract the first word of "$ac_prog", so it can be a program name with args.
16861set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016862{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016864if test "${ac_cv_prog_TRUE+set}" = set; then
16865 echo $ECHO_N "(cached) $ECHO_C" >&6
16866else
16867 if test -n "$TRUE"; then
16868 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16869else
16870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16871for as_dir in $PATH
16872do
16873 IFS=$as_save_IFS
16874 test -z "$as_dir" && as_dir=.
16875 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016876 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 +000016877 ac_cv_prog_TRUE="$ac_prog"
16878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16879 break 2
16880 fi
16881done
16882done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016883IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016884
16885fi
16886fi
16887TRUE=$ac_cv_prog_TRUE
16888if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016889 { echo "$as_me:$LINENO: result: $TRUE" >&5
16890echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016891else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016892 { echo "$as_me:$LINENO: result: no" >&5
16893echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016894fi
16895
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016897 test -n "$TRUE" && break
16898done
16899test -n "$TRUE" || TRUE="/bin/true"
16900
16901
Martin v. Löwiseba40652007-08-30 20:10:57 +000016902{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16903echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016904if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16905 echo $ECHO_N "(cached) $ECHO_C" >&6
16906else
16907 ac_check_lib_save_LIBS=$LIBS
16908LIBS="-lc $LIBS"
16909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016910/* confdefs.h. */
16911_ACEOF
16912cat confdefs.h >>conftest.$ac_ext
16913cat >>conftest.$ac_ext <<_ACEOF
16914/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016915
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916/* Override any GCC internal prototype to avoid an error.
16917 Use char because int might match the return type of a GCC
16918 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016919#ifdef __cplusplus
16920extern "C"
16921#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016922char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016923int
16924main ()
16925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016927 ;
16928 return 0;
16929}
16930_ACEOF
16931rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016932if { (ac_try="$ac_link"
16933case "(($ac_try" in
16934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16935 *) ac_try_echo=$ac_try;;
16936esac
16937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16938 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016940 grep -v '^ *+' conftest.er1 >conftest.err
16941 rm -f conftest.er1
16942 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016944 (exit $ac_status); } && {
16945 test -z "$ac_c_werror_flag" ||
16946 test ! -s conftest.err
16947 } && test -s conftest$ac_exeext &&
16948 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016949 ac_cv_lib_c_inet_aton=yes
16950else
16951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016952sed 's/^/| /' conftest.$ac_ext >&5
16953
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016956
16957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016959LIBS=$ac_check_lib_save_LIBS
16960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016961{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16962echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016963if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016964 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016965else
16966
Martin v. Löwiseba40652007-08-30 20:10:57 +000016967{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16968echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016969if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16970 echo $ECHO_N "(cached) $ECHO_C" >&6
16971else
16972 ac_check_lib_save_LIBS=$LIBS
16973LIBS="-lresolv $LIBS"
16974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016975/* confdefs.h. */
16976_ACEOF
16977cat confdefs.h >>conftest.$ac_ext
16978cat >>conftest.$ac_ext <<_ACEOF
16979/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016980
Martin v. Löwiseba40652007-08-30 20:10:57 +000016981/* Override any GCC internal prototype to avoid an error.
16982 Use char because int might match the return type of a GCC
16983 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016984#ifdef __cplusplus
16985extern "C"
16986#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016987char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016988int
16989main ()
16990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016991return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016997if { (ac_try="$ac_link"
16998case "(($ac_try" in
16999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17000 *) ac_try_echo=$ac_try;;
17001esac
17002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17003 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017005 grep -v '^ *+' conftest.er1 >conftest.err
17006 rm -f conftest.er1
17007 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009 (exit $ac_status); } && {
17010 test -z "$ac_c_werror_flag" ||
17011 test ! -s conftest.err
17012 } && test -s conftest$ac_exeext &&
17013 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017014 ac_cv_lib_resolv_inet_aton=yes
17015else
17016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017017sed 's/^/| /' conftest.$ac_ext >&5
17018
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021
17022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017024LIBS=$ac_check_lib_save_LIBS
17025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17027echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017028if test $ac_cv_lib_resolv_inet_aton = yes; then
17029 cat >>confdefs.h <<_ACEOF
17030#define HAVE_LIBRESOLV 1
17031_ACEOF
17032
17033 LIBS="-lresolv $LIBS"
17034
17035fi
17036
17037
17038fi
17039
17040
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017041# On Tru64, chflags seems to be present, but calling it will
17042# exit Python
17043{ echo "$as_me:$LINENO: checking for chflags" >&5
17044echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17045if test "$cross_compiling" = yes; then
17046 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17047See \`config.log' for more details." >&5
17048echo "$as_me: error: cannot run test program while cross compiling
17049See \`config.log' for more details." >&2;}
17050 { (exit 1); exit 1; }; }
17051else
17052 cat >conftest.$ac_ext <<_ACEOF
17053/* confdefs.h. */
17054_ACEOF
17055cat confdefs.h >>conftest.$ac_ext
17056cat >>conftest.$ac_ext <<_ACEOF
17057/* end confdefs.h. */
17058
17059#include <sys/stat.h>
17060#include <unistd.h>
17061int main(int argc, char*argv[])
17062{
17063 if(chflags(argv[0], 0) != 0)
17064 return 1;
17065 return 0;
17066}
17067
17068_ACEOF
17069rm -f conftest$ac_exeext
17070if { (ac_try="$ac_link"
17071case "(($ac_try" in
17072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17073 *) ac_try_echo=$ac_try;;
17074esac
17075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17076 (eval "$ac_link") 2>&5
17077 ac_status=$?
17078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17080 { (case "(($ac_try" in
17081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17082 *) ac_try_echo=$ac_try;;
17083esac
17084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17085 (eval "$ac_try") 2>&5
17086 ac_status=$?
17087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17088 (exit $ac_status); }; }; then
17089
17090cat >>confdefs.h <<\_ACEOF
17091#define HAVE_CHFLAGS 1
17092_ACEOF
17093
17094 { echo "$as_me:$LINENO: result: yes" >&5
17095echo "${ECHO_T}yes" >&6; }
17096else
17097 echo "$as_me: program exited with status $ac_status" >&5
17098echo "$as_me: failed program was:" >&5
17099sed 's/^/| /' conftest.$ac_ext >&5
17100
17101( exit $ac_status )
17102{ echo "$as_me:$LINENO: result: no" >&5
17103echo "${ECHO_T}no" >&6; }
17104
17105fi
17106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17107fi
17108
17109
17110
17111{ echo "$as_me:$LINENO: checking for lchflags" >&5
17112echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17113if test "$cross_compiling" = yes; then
17114 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17115See \`config.log' for more details." >&5
17116echo "$as_me: error: cannot run test program while cross compiling
17117See \`config.log' for more details." >&2;}
17118 { (exit 1); exit 1; }; }
17119else
17120 cat >conftest.$ac_ext <<_ACEOF
17121/* confdefs.h. */
17122_ACEOF
17123cat confdefs.h >>conftest.$ac_ext
17124cat >>conftest.$ac_ext <<_ACEOF
17125/* end confdefs.h. */
17126
17127#include <sys/stat.h>
17128#include <unistd.h>
17129int main(int argc, char*argv[])
17130{
17131 if(lchflags(argv[0], 0) != 0)
17132 return 1;
17133 return 0;
17134}
17135
17136_ACEOF
17137rm -f conftest$ac_exeext
17138if { (ac_try="$ac_link"
17139case "(($ac_try" in
17140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17141 *) ac_try_echo=$ac_try;;
17142esac
17143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17144 (eval "$ac_link") 2>&5
17145 ac_status=$?
17146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17148 { (case "(($ac_try" in
17149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17150 *) ac_try_echo=$ac_try;;
17151esac
17152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17153 (eval "$ac_try") 2>&5
17154 ac_status=$?
17155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17156 (exit $ac_status); }; }; then
17157
17158cat >>confdefs.h <<\_ACEOF
17159#define HAVE_LCHFLAGS 1
17160_ACEOF
17161
17162 { echo "$as_me:$LINENO: result: yes" >&5
17163echo "${ECHO_T}yes" >&6; }
17164else
17165 echo "$as_me: program exited with status $ac_status" >&5
17166echo "$as_me: failed program was:" >&5
17167sed 's/^/| /' conftest.$ac_ext >&5
17168
17169( exit $ac_status )
17170{ echo "$as_me:$LINENO: result: no" >&5
17171echo "${ECHO_T}no" >&6; }
17172
17173fi
17174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17175fi
17176
17177
17178
Ronald Oussorenf8752642006-07-06 10:13:35 +000017179case $ac_sys_system/$ac_sys_release in
17180Darwin/*)
17181 _CUR_CFLAGS="${CFLAGS}"
17182 _CUR_LDFLAGS="${LDFLAGS}"
17183 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17184 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17185 ;;
17186esac
17187
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17189echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017190if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17191 echo $ECHO_N "(cached) $ECHO_C" >&6
17192else
17193 ac_check_lib_save_LIBS=$LIBS
17194LIBS="-lz $LIBS"
17195cat >conftest.$ac_ext <<_ACEOF
17196/* confdefs.h. */
17197_ACEOF
17198cat confdefs.h >>conftest.$ac_ext
17199cat >>conftest.$ac_ext <<_ACEOF
17200/* end confdefs.h. */
17201
Martin v. Löwiseba40652007-08-30 20:10:57 +000017202/* Override any GCC internal prototype to avoid an error.
17203 Use char because int might match the return type of a GCC
17204 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017205#ifdef __cplusplus
17206extern "C"
17207#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017208char inflateCopy ();
17209int
17210main ()
17211{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017212return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017213 ;
17214 return 0;
17215}
17216_ACEOF
17217rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017218if { (ac_try="$ac_link"
17219case "(($ac_try" in
17220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17221 *) ac_try_echo=$ac_try;;
17222esac
17223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17224 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017225 ac_status=$?
17226 grep -v '^ *+' conftest.er1 >conftest.err
17227 rm -f conftest.er1
17228 cat conftest.err >&5
17229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017230 (exit $ac_status); } && {
17231 test -z "$ac_c_werror_flag" ||
17232 test ! -s conftest.err
17233 } && test -s conftest$ac_exeext &&
17234 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017235 ac_cv_lib_z_inflateCopy=yes
17236else
17237 echo "$as_me: failed program was:" >&5
17238sed 's/^/| /' conftest.$ac_ext >&5
17239
Martin v. Löwiseba40652007-08-30 20:10:57 +000017240 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242
17243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017244 conftest$ac_exeext conftest.$ac_ext
17245LIBS=$ac_check_lib_save_LIBS
17246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017247{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17248echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017249if test $ac_cv_lib_z_inflateCopy = yes; then
17250
17251cat >>confdefs.h <<\_ACEOF
17252#define HAVE_ZLIB_COPY 1
17253_ACEOF
17254
17255fi
17256
17257
Ronald Oussorenf8752642006-07-06 10:13:35 +000017258case $ac_sys_system/$ac_sys_release in
17259Darwin/*)
17260 CFLAGS="${_CUR_CFLAGS}"
17261 LDFLAGS="${_CUR_LDFLAGS}"
17262 ;;
17263esac
17264
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17266echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017268/* confdefs.h. */
17269_ACEOF
17270cat confdefs.h >>conftest.$ac_ext
17271cat >>conftest.$ac_ext <<_ACEOF
17272/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017273
17274#include "confdefs.h"
17275#include <netdb.h>
17276
Martin v. Löwise9416172003-05-03 10:12:45 +000017277int
17278main ()
17279{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017280void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017281 ;
17282 return 0;
17283}
17284_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017285rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017286if { (ac_try="$ac_link"
17287case "(($ac_try" in
17288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17289 *) ac_try_echo=$ac_try;;
17290esac
17291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017294 grep -v '^ *+' conftest.er1 >conftest.err
17295 rm -f conftest.er1
17296 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017298 (exit $ac_status); } && {
17299 test -z "$ac_c_werror_flag" ||
17300 test ! -s conftest.err
17301 } && test -s conftest$ac_exeext &&
17302 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017303
17304cat >>confdefs.h <<\_ACEOF
17305#define HAVE_HSTRERROR 1
17306_ACEOF
17307
Martin v. Löwiseba40652007-08-30 20:10:57 +000017308 { echo "$as_me:$LINENO: result: yes" >&5
17309echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017310else
17311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017312sed 's/^/| /' conftest.$ac_ext >&5
17313
Martin v. Löwiseba40652007-08-30 20:10:57 +000017314 { echo "$as_me:$LINENO: result: no" >&5
17315echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017316
17317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017318
17319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017321
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17323echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017324cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017325/* confdefs.h. */
17326_ACEOF
17327cat confdefs.h >>conftest.$ac_ext
17328cat >>conftest.$ac_ext <<_ACEOF
17329/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017330
17331#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017332#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017333#include <sys/socket.h>
17334#include <netinet/in.h>
17335#include <arpa/inet.h>
17336
Martin v. Löwise9416172003-05-03 10:12:45 +000017337int
17338main ()
17339{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017340void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017341 ;
17342 return 0;
17343}
17344_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017345rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017346if { (ac_try="$ac_link"
17347case "(($ac_try" in
17348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17349 *) ac_try_echo=$ac_try;;
17350esac
17351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17352 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017353 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017354 grep -v '^ *+' conftest.er1 >conftest.err
17355 rm -f conftest.er1
17356 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017358 (exit $ac_status); } && {
17359 test -z "$ac_c_werror_flag" ||
17360 test ! -s conftest.err
17361 } && test -s conftest$ac_exeext &&
17362 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017363
17364cat >>confdefs.h <<\_ACEOF
17365#define HAVE_INET_ATON 1
17366_ACEOF
17367
Martin v. Löwiseba40652007-08-30 20:10:57 +000017368 { echo "$as_me:$LINENO: result: yes" >&5
17369echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017370else
17371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017372sed 's/^/| /' conftest.$ac_ext >&5
17373
Martin v. Löwiseba40652007-08-30 20:10:57 +000017374 { echo "$as_me:$LINENO: result: no" >&5
17375echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017376
17377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017378
17379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017381
Martin v. Löwiseba40652007-08-30 20:10:57 +000017382{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17383echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017384cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017385/* confdefs.h. */
17386_ACEOF
17387cat confdefs.h >>conftest.$ac_ext
17388cat >>conftest.$ac_ext <<_ACEOF
17389/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017390
17391#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017392#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017393#include <sys/socket.h>
17394#include <netinet/in.h>
17395#include <arpa/inet.h>
17396
Martin v. Löwise9416172003-05-03 10:12:45 +000017397int
17398main ()
17399{
17400void* p = inet_pton
17401 ;
17402 return 0;
17403}
17404_ACEOF
17405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017406if { (ac_try="$ac_compile"
17407case "(($ac_try" in
17408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17409 *) ac_try_echo=$ac_try;;
17410esac
17411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017414 grep -v '^ *+' conftest.er1 >conftest.err
17415 rm -f conftest.er1
17416 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418 (exit $ac_status); } && {
17419 test -z "$ac_c_werror_flag" ||
17420 test ! -s conftest.err
17421 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017422
17423cat >>confdefs.h <<\_ACEOF
17424#define HAVE_INET_PTON 1
17425_ACEOF
17426
Martin v. Löwiseba40652007-08-30 20:10:57 +000017427 { echo "$as_me:$LINENO: result: yes" >&5
17428echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017429else
17430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017431sed 's/^/| /' conftest.$ac_ext >&5
17432
Martin v. Löwiseba40652007-08-30 20:10:57 +000017433 { echo "$as_me:$LINENO: result: no" >&5
17434echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017435
17436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017437
17438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017439
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017440# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017441{ echo "$as_me:$LINENO: checking for setgroups" >&5
17442echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017443cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017444/* confdefs.h. */
17445_ACEOF
17446cat confdefs.h >>conftest.$ac_ext
17447cat >>conftest.$ac_ext <<_ACEOF
17448/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017449
17450#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017451#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017452#ifdef HAVE_GRP_H
17453#include <grp.h>
17454#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017455
Martin v. Löwisd5843682002-11-21 20:41:28 +000017456int
17457main ()
17458{
17459void* p = setgroups
17460 ;
17461 return 0;
17462}
17463_ACEOF
17464rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017465if { (ac_try="$ac_compile"
17466case "(($ac_try" in
17467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17468 *) ac_try_echo=$ac_try;;
17469esac
17470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17471 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017473 grep -v '^ *+' conftest.er1 >conftest.err
17474 rm -f conftest.er1
17475 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017477 (exit $ac_status); } && {
17478 test -z "$ac_c_werror_flag" ||
17479 test ! -s conftest.err
17480 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017481
17482cat >>confdefs.h <<\_ACEOF
17483#define HAVE_SETGROUPS 1
17484_ACEOF
17485
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486 { echo "$as_me:$LINENO: result: yes" >&5
17487echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017488else
17489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017490sed 's/^/| /' conftest.$ac_ext >&5
17491
Martin v. Löwiseba40652007-08-30 20:10:57 +000017492 { echo "$as_me:$LINENO: result: no" >&5
17493echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017494
17495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017496
17497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017498
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017499# check for openpty and forkpty
17500
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017502for ac_func in openpty
17503do
Martin v. Löwis11437992002-04-12 09:54:03 +000017504as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017505{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17506echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17507if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017509else
Martin v. Löwis11437992002-04-12 09:54:03 +000017510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017511/* confdefs.h. */
17512_ACEOF
17513cat confdefs.h >>conftest.$ac_ext
17514cat >>conftest.$ac_ext <<_ACEOF
17515/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017516/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17517 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17518#define $ac_func innocuous_$ac_func
17519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017520/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017521 which can conflict with char $ac_func (); below.
17522 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017523 <limits.h> exists even on freestanding compilers. */
17524
17525#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017526# include <limits.h>
17527#else
17528# include <assert.h>
17529#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017530
17531#undef $ac_func
17532
Martin v. Löwiseba40652007-08-30 20:10:57 +000017533/* Override any GCC internal prototype to avoid an error.
17534 Use char because int might match the return type of a GCC
17535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017536#ifdef __cplusplus
17537extern "C"
17538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017539char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017540/* The GNU C library defines this for functions which it implements
17541 to always fail with ENOSYS. Some functions are actually named
17542 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017543#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017544choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017545#endif
17546
Skip Montanaro6dead952003-09-25 14:50:04 +000017547int
17548main ()
17549{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017550return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017551 ;
17552 return 0;
17553}
17554_ACEOF
17555rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017556if { (ac_try="$ac_link"
17557case "(($ac_try" in
17558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559 *) ac_try_echo=$ac_try;;
17560esac
17561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017564 grep -v '^ *+' conftest.er1 >conftest.err
17565 rm -f conftest.er1
17566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017568 (exit $ac_status); } && {
17569 test -z "$ac_c_werror_flag" ||
17570 test ! -s conftest.err
17571 } && test -s conftest$ac_exeext &&
17572 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017574else
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017576sed 's/^/| /' conftest.$ac_ext >&5
17577
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017580
17581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017582 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017584ac_res=`eval echo '${'$as_ac_var'}'`
17585 { echo "$as_me:$LINENO: result: $ac_res" >&5
17586echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017587if test `eval echo '${'$as_ac_var'}'` = yes; then
17588 cat >>confdefs.h <<_ACEOF
17589#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17590_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017591
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017592else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017593 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17594echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017595if test "${ac_cv_lib_util_openpty+set}" = set; then
17596 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017597else
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017599LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017601/* confdefs.h. */
17602_ACEOF
17603cat confdefs.h >>conftest.$ac_ext
17604cat >>conftest.$ac_ext <<_ACEOF
17605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017606
Martin v. Löwiseba40652007-08-30 20:10:57 +000017607/* Override any GCC internal prototype to avoid an error.
17608 Use char because int might match the return type of a GCC
17609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017610#ifdef __cplusplus
17611extern "C"
17612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017613char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017614int
17615main ()
17616{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 ;
17619 return 0;
17620}
17621_ACEOF
17622rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623if { (ac_try="$ac_link"
17624case "(($ac_try" in
17625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17626 *) ac_try_echo=$ac_try;;
17627esac
17628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17629 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017631 grep -v '^ *+' conftest.er1 >conftest.err
17632 rm -f conftest.er1
17633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017635 (exit $ac_status); } && {
17636 test -z "$ac_c_werror_flag" ||
17637 test ! -s conftest.err
17638 } && test -s conftest$ac_exeext &&
17639 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017641else
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017643sed 's/^/| /' conftest.$ac_ext >&5
17644
Martin v. Löwiseba40652007-08-30 20:10:57 +000017645 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017647
17648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017650LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017652{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17653echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017654if test $ac_cv_lib_util_openpty = yes; then
17655 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017656#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017657_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017658 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017659else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17661echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017662if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17663 echo $ECHO_N "(cached) $ECHO_C" >&6
17664else
17665 ac_check_lib_save_LIBS=$LIBS
17666LIBS="-lbsd $LIBS"
17667cat >conftest.$ac_ext <<_ACEOF
17668/* confdefs.h. */
17669_ACEOF
17670cat confdefs.h >>conftest.$ac_ext
17671cat >>conftest.$ac_ext <<_ACEOF
17672/* end confdefs.h. */
17673
Martin v. Löwiseba40652007-08-30 20:10:57 +000017674/* Override any GCC internal prototype to avoid an error.
17675 Use char because int might match the return type of a GCC
17676 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017677#ifdef __cplusplus
17678extern "C"
17679#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017680char openpty ();
17681int
17682main ()
17683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017684return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017685 ;
17686 return 0;
17687}
17688_ACEOF
17689rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017690if { (ac_try="$ac_link"
17691case "(($ac_try" in
17692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17693 *) ac_try_echo=$ac_try;;
17694esac
17695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17696 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017697 ac_status=$?
17698 grep -v '^ *+' conftest.er1 >conftest.err
17699 rm -f conftest.er1
17700 cat conftest.err >&5
17701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017702 (exit $ac_status); } && {
17703 test -z "$ac_c_werror_flag" ||
17704 test ! -s conftest.err
17705 } && test -s conftest$ac_exeext &&
17706 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017707 ac_cv_lib_bsd_openpty=yes
17708else
17709 echo "$as_me: failed program was:" >&5
17710sed 's/^/| /' conftest.$ac_ext >&5
17711
Martin v. Löwiseba40652007-08-30 20:10:57 +000017712 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017714
17715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017716 conftest$ac_exeext conftest.$ac_ext
17717LIBS=$ac_check_lib_save_LIBS
17718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017719{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17720echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017721if test $ac_cv_lib_bsd_openpty = yes; then
17722 cat >>confdefs.h <<\_ACEOF
17723#define HAVE_OPENPTY 1
17724_ACEOF
17725 LIBS="$LIBS -lbsd"
17726fi
17727
17728
17729fi
17730
Fred Drake8cef4cf2000-06-28 16:40:38 +000017731
17732fi
17733done
17734
Martin v. Löwis11437992002-04-12 09:54:03 +000017735
Fred Drake8cef4cf2000-06-28 16:40:38 +000017736for ac_func in forkpty
17737do
Martin v. Löwis11437992002-04-12 09:54:03 +000017738as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017739{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17740echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17741if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017743else
Martin v. Löwis11437992002-04-12 09:54:03 +000017744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017745/* confdefs.h. */
17746_ACEOF
17747cat confdefs.h >>conftest.$ac_ext
17748cat >>conftest.$ac_ext <<_ACEOF
17749/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017750/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17751 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17752#define $ac_func innocuous_$ac_func
17753
Fred Drake8cef4cf2000-06-28 16:40:38 +000017754/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017755 which can conflict with char $ac_func (); below.
17756 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017757 <limits.h> exists even on freestanding compilers. */
17758
17759#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017760# include <limits.h>
17761#else
17762# include <assert.h>
17763#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017764
17765#undef $ac_func
17766
Martin v. Löwiseba40652007-08-30 20:10:57 +000017767/* Override any GCC internal prototype to avoid an error.
17768 Use char because int might match the return type of a GCC
17769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017770#ifdef __cplusplus
17771extern "C"
17772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017773char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017774/* The GNU C library defines this for functions which it implements
17775 to always fail with ENOSYS. Some functions are actually named
17776 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017777#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017778choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017779#endif
17780
Skip Montanaro6dead952003-09-25 14:50:04 +000017781int
17782main ()
17783{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017784return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 ;
17786 return 0;
17787}
17788_ACEOF
17789rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017790if { (ac_try="$ac_link"
17791case "(($ac_try" in
17792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17793 *) ac_try_echo=$ac_try;;
17794esac
17795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17796 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017798 grep -v '^ *+' conftest.er1 >conftest.err
17799 rm -f conftest.er1
17800 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017802 (exit $ac_status); } && {
17803 test -z "$ac_c_werror_flag" ||
17804 test ! -s conftest.err
17805 } && test -s conftest$ac_exeext &&
17806 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017808else
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017810sed 's/^/| /' conftest.$ac_ext >&5
17811
Martin v. Löwiseba40652007-08-30 20:10:57 +000017812 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017814
17815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017816 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818ac_res=`eval echo '${'$as_ac_var'}'`
17819 { echo "$as_me:$LINENO: result: $ac_res" >&5
17820echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017821if test `eval echo '${'$as_ac_var'}'` = yes; then
17822 cat >>confdefs.h <<_ACEOF
17823#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17824_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017825
Fred Drake8cef4cf2000-06-28 16:40:38 +000017826else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017827 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17828echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017829if test "${ac_cv_lib_util_forkpty+set}" = set; then
17830 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017831else
Martin v. Löwis11437992002-04-12 09:54:03 +000017832 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017833LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017835/* confdefs.h. */
17836_ACEOF
17837cat confdefs.h >>conftest.$ac_ext
17838cat >>conftest.$ac_ext <<_ACEOF
17839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017840
Martin v. Löwiseba40652007-08-30 20:10:57 +000017841/* Override any GCC internal prototype to avoid an error.
17842 Use char because int might match the return type of a GCC
17843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017844#ifdef __cplusplus
17845extern "C"
17846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017847char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017848int
17849main ()
17850{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017851return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 ;
17853 return 0;
17854}
17855_ACEOF
17856rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017857if { (ac_try="$ac_link"
17858case "(($ac_try" in
17859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17860 *) ac_try_echo=$ac_try;;
17861esac
17862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17863 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017865 grep -v '^ *+' conftest.er1 >conftest.err
17866 rm -f conftest.er1
17867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017869 (exit $ac_status); } && {
17870 test -z "$ac_c_werror_flag" ||
17871 test ! -s conftest.err
17872 } && test -s conftest$ac_exeext &&
17873 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017875else
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017877sed 's/^/| /' conftest.$ac_ext >&5
17878
Martin v. Löwiseba40652007-08-30 20:10:57 +000017879 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881
17882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017884LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017886{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17887echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017888if test $ac_cv_lib_util_forkpty = yes; then
17889 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017890#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017891_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017892 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017893else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017894 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17895echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017896if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17897 echo $ECHO_N "(cached) $ECHO_C" >&6
17898else
17899 ac_check_lib_save_LIBS=$LIBS
17900LIBS="-lbsd $LIBS"
17901cat >conftest.$ac_ext <<_ACEOF
17902/* confdefs.h. */
17903_ACEOF
17904cat confdefs.h >>conftest.$ac_ext
17905cat >>conftest.$ac_ext <<_ACEOF
17906/* end confdefs.h. */
17907
Martin v. Löwiseba40652007-08-30 20:10:57 +000017908/* Override any GCC internal prototype to avoid an error.
17909 Use char because int might match the return type of a GCC
17910 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017911#ifdef __cplusplus
17912extern "C"
17913#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017914char forkpty ();
17915int
17916main ()
17917{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017918return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017919 ;
17920 return 0;
17921}
17922_ACEOF
17923rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017924if { (ac_try="$ac_link"
17925case "(($ac_try" in
17926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17927 *) ac_try_echo=$ac_try;;
17928esac
17929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17930 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017931 ac_status=$?
17932 grep -v '^ *+' conftest.er1 >conftest.err
17933 rm -f conftest.er1
17934 cat conftest.err >&5
17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017936 (exit $ac_status); } && {
17937 test -z "$ac_c_werror_flag" ||
17938 test ! -s conftest.err
17939 } && test -s conftest$ac_exeext &&
17940 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017941 ac_cv_lib_bsd_forkpty=yes
17942else
17943 echo "$as_me: failed program was:" >&5
17944sed 's/^/| /' conftest.$ac_ext >&5
17945
Martin v. Löwiseba40652007-08-30 20:10:57 +000017946 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017948
17949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017950 conftest$ac_exeext conftest.$ac_ext
17951LIBS=$ac_check_lib_save_LIBS
17952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17954echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017955if test $ac_cv_lib_bsd_forkpty = yes; then
17956 cat >>confdefs.h <<\_ACEOF
17957#define HAVE_FORKPTY 1
17958_ACEOF
17959 LIBS="$LIBS -lbsd"
17960fi
17961
17962
17963fi
17964
Fred Drake8cef4cf2000-06-28 16:40:38 +000017965
17966fi
17967done
17968
Jack Jansendd19cf82001-12-06 22:36:17 +000017969
Brett Cannonaa5778d2008-03-18 04:09:00 +000017970# Stuff for expat.
17971
17972for ac_func in memmove
17973do
17974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17975{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17977if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17978 echo $ECHO_N "(cached) $ECHO_C" >&6
17979else
17980 cat >conftest.$ac_ext <<_ACEOF
17981/* confdefs.h. */
17982_ACEOF
17983cat confdefs.h >>conftest.$ac_ext
17984cat >>conftest.$ac_ext <<_ACEOF
17985/* end confdefs.h. */
17986/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17987 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17988#define $ac_func innocuous_$ac_func
17989
17990/* System header to define __stub macros and hopefully few prototypes,
17991 which can conflict with char $ac_func (); below.
17992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17993 <limits.h> exists even on freestanding compilers. */
17994
17995#ifdef __STDC__
17996# include <limits.h>
17997#else
17998# include <assert.h>
17999#endif
18000
18001#undef $ac_func
18002
18003/* Override any GCC internal prototype to avoid an error.
18004 Use char because int might match the return type of a GCC
18005 builtin and then its argument prototype would still apply. */
18006#ifdef __cplusplus
18007extern "C"
18008#endif
18009char $ac_func ();
18010/* The GNU C library defines this for functions which it implements
18011 to always fail with ENOSYS. Some functions are actually named
18012 something starting with __ and the normal name is an alias. */
18013#if defined __stub_$ac_func || defined __stub___$ac_func
18014choke me
18015#endif
18016
18017int
18018main ()
18019{
18020return $ac_func ();
18021 ;
18022 return 0;
18023}
18024_ACEOF
18025rm -f conftest.$ac_objext conftest$ac_exeext
18026if { (ac_try="$ac_link"
18027case "(($ac_try" in
18028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18029 *) ac_try_echo=$ac_try;;
18030esac
18031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18032 (eval "$ac_link") 2>conftest.er1
18033 ac_status=$?
18034 grep -v '^ *+' conftest.er1 >conftest.err
18035 rm -f conftest.er1
18036 cat conftest.err >&5
18037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18038 (exit $ac_status); } && {
18039 test -z "$ac_c_werror_flag" ||
18040 test ! -s conftest.err
18041 } && test -s conftest$ac_exeext &&
18042 $as_test_x conftest$ac_exeext; then
18043 eval "$as_ac_var=yes"
18044else
18045 echo "$as_me: failed program was:" >&5
18046sed 's/^/| /' conftest.$ac_ext >&5
18047
18048 eval "$as_ac_var=no"
18049fi
18050
18051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18052 conftest$ac_exeext conftest.$ac_ext
18053fi
18054ac_res=`eval echo '${'$as_ac_var'}'`
18055 { echo "$as_me:$LINENO: result: $ac_res" >&5
18056echo "${ECHO_T}$ac_res" >&6; }
18057if test `eval echo '${'$as_ac_var'}'` = yes; then
18058 cat >>confdefs.h <<_ACEOF
18059#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18060_ACEOF
18061
18062fi
18063done
18064
18065
Michael W. Hudson54241132001-12-07 15:38:26 +000018066# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018067
18068
18069
18070
18071
18072
Fred Drake8cef4cf2000-06-28 16:40:38 +000018073for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18074do
Martin v. Löwis11437992002-04-12 09:54:03 +000018075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018076{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18078if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018080else
Martin v. Löwis11437992002-04-12 09:54:03 +000018081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018082/* confdefs.h. */
18083_ACEOF
18084cat confdefs.h >>conftest.$ac_ext
18085cat >>conftest.$ac_ext <<_ACEOF
18086/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018087/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18088 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18089#define $ac_func innocuous_$ac_func
18090
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018091/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018092 which can conflict with char $ac_func (); below.
18093 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018094 <limits.h> exists even on freestanding compilers. */
18095
18096#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018097# include <limits.h>
18098#else
18099# include <assert.h>
18100#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018101
18102#undef $ac_func
18103
Martin v. Löwiseba40652007-08-30 20:10:57 +000018104/* Override any GCC internal prototype to avoid an error.
18105 Use char because int might match the return type of a GCC
18106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018107#ifdef __cplusplus
18108extern "C"
18109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018110char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018111/* The GNU C library defines this for functions which it implements
18112 to always fail with ENOSYS. Some functions are actually named
18113 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018114#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018115choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018116#endif
18117
Skip Montanaro6dead952003-09-25 14:50:04 +000018118int
18119main ()
18120{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018122 ;
18123 return 0;
18124}
18125_ACEOF
18126rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018127if { (ac_try="$ac_link"
18128case "(($ac_try" in
18129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18130 *) ac_try_echo=$ac_try;;
18131esac
18132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18133 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018135 grep -v '^ *+' conftest.er1 >conftest.err
18136 rm -f conftest.er1
18137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018139 (exit $ac_status); } && {
18140 test -z "$ac_c_werror_flag" ||
18141 test ! -s conftest.err
18142 } && test -s conftest$ac_exeext &&
18143 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018145else
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018147sed 's/^/| /' conftest.$ac_ext >&5
18148
Martin v. Löwiseba40652007-08-30 20:10:57 +000018149 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151
18152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018153 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018155ac_res=`eval echo '${'$as_ac_var'}'`
18156 { echo "$as_me:$LINENO: result: $ac_res" >&5
18157echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018158if test `eval echo '${'$as_ac_var'}'` = yes; then
18159 cat >>confdefs.h <<_ACEOF
18160#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18161_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018162
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018163fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018164done
18165
Michael W. Hudson54241132001-12-07 15:38:26 +000018166
Martin v. Löwis11437992002-04-12 09:54:03 +000018167
18168
18169
Brett Cannonaa5778d2008-03-18 04:09:00 +000018170for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018171do
Martin v. Löwis11437992002-04-12 09:54:03 +000018172as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018173{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18174echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18175if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018177else
Martin v. Löwis11437992002-04-12 09:54:03 +000018178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018179/* confdefs.h. */
18180_ACEOF
18181cat confdefs.h >>conftest.$ac_ext
18182cat >>conftest.$ac_ext <<_ACEOF
18183/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018184/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18186#define $ac_func innocuous_$ac_func
18187
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018188/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018189 which can conflict with char $ac_func (); below.
18190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018191 <limits.h> exists even on freestanding compilers. */
18192
18193#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018194# include <limits.h>
18195#else
18196# include <assert.h>
18197#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018198
18199#undef $ac_func
18200
Martin v. Löwiseba40652007-08-30 20:10:57 +000018201/* Override any GCC internal prototype to avoid an error.
18202 Use char because int might match the return type of a GCC
18203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018204#ifdef __cplusplus
18205extern "C"
18206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018207char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018208/* The GNU C library defines this for functions which it implements
18209 to always fail with ENOSYS. Some functions are actually named
18210 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018211#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018212choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018213#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018214
Skip Montanaro6dead952003-09-25 14:50:04 +000018215int
18216main ()
18217{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018218return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 ;
18220 return 0;
18221}
18222_ACEOF
18223rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018224if { (ac_try="$ac_link"
18225case "(($ac_try" in
18226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18227 *) ac_try_echo=$ac_try;;
18228esac
18229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18230 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018232 grep -v '^ *+' conftest.er1 >conftest.err
18233 rm -f conftest.er1
18234 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018236 (exit $ac_status); } && {
18237 test -z "$ac_c_werror_flag" ||
18238 test ! -s conftest.err
18239 } && test -s conftest$ac_exeext &&
18240 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018242else
Martin v. Löwis11437992002-04-12 09:54:03 +000018243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018244sed 's/^/| /' conftest.$ac_ext >&5
18245
Martin v. Löwiseba40652007-08-30 20:10:57 +000018246 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018248
18249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018252ac_res=`eval echo '${'$as_ac_var'}'`
18253 { echo "$as_me:$LINENO: result: $ac_res" >&5
18254echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018255if test `eval echo '${'$as_ac_var'}'` = yes; then
18256 cat >>confdefs.h <<_ACEOF
18257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18258_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018259
Martin v. Löwis1142de32002-03-29 16:28:31 +000018260else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018262 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018263 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18264 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018265esac
18266
Martin v. Löwis1142de32002-03-29 16:28:31 +000018267fi
18268done
18269
18270
Martin v. Löwis11437992002-04-12 09:54:03 +000018271
Martin v. Löwis1142de32002-03-29 16:28:31 +000018272for ac_func in getpgrp
18273do
Martin v. Löwis11437992002-04-12 09:54:03 +000018274as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018275{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18276echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18277if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018279else
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018281/* confdefs.h. */
18282_ACEOF
18283cat confdefs.h >>conftest.$ac_ext
18284cat >>conftest.$ac_ext <<_ACEOF
18285/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018286/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18288#define $ac_func innocuous_$ac_func
18289
Martin v. Löwis1142de32002-03-29 16:28:31 +000018290/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018291 which can conflict with char $ac_func (); below.
18292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018293 <limits.h> exists even on freestanding compilers. */
18294
18295#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018296# include <limits.h>
18297#else
18298# include <assert.h>
18299#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018300
18301#undef $ac_func
18302
Martin v. Löwiseba40652007-08-30 20:10:57 +000018303/* Override any GCC internal prototype to avoid an error.
18304 Use char because int might match the return type of a GCC
18305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018306#ifdef __cplusplus
18307extern "C"
18308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018309char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018310/* The GNU C library defines this for functions which it implements
18311 to always fail with ENOSYS. Some functions are actually named
18312 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018313#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018314choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018315#endif
18316
Skip Montanaro6dead952003-09-25 14:50:04 +000018317int
18318main ()
18319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018320return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 ;
18322 return 0;
18323}
18324_ACEOF
18325rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326if { (ac_try="$ac_link"
18327case "(($ac_try" in
18328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18329 *) ac_try_echo=$ac_try;;
18330esac
18331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018334 grep -v '^ *+' conftest.er1 >conftest.err
18335 rm -f conftest.er1
18336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018338 (exit $ac_status); } && {
18339 test -z "$ac_c_werror_flag" ||
18340 test ! -s conftest.err
18341 } && test -s conftest$ac_exeext &&
18342 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018343 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018344else
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018346sed 's/^/| /' conftest.$ac_ext >&5
18347
Martin v. Löwiseba40652007-08-30 20:10:57 +000018348 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350
18351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018352 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018354ac_res=`eval echo '${'$as_ac_var'}'`
18355 { echo "$as_me:$LINENO: result: $ac_res" >&5
18356echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018357if test `eval echo '${'$as_ac_var'}'` = yes; then
18358 cat >>confdefs.h <<_ACEOF
18359#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18360_ACEOF
18361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018362/* confdefs.h. */
18363_ACEOF
18364cat confdefs.h >>conftest.$ac_ext
18365cat >>conftest.$ac_ext <<_ACEOF
18366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018367#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018368int
18369main ()
18370{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018371getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018372 ;
18373 return 0;
18374}
18375_ACEOF
18376rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018377if { (ac_try="$ac_compile"
18378case "(($ac_try" in
18379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18380 *) ac_try_echo=$ac_try;;
18381esac
18382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018385 grep -v '^ *+' conftest.er1 >conftest.err
18386 rm -f conftest.er1
18387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389 (exit $ac_status); } && {
18390 test -z "$ac_c_werror_flag" ||
18391 test ! -s conftest.err
18392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018393
18394cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018395#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018396_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018397
Martin v. Löwis11437992002-04-12 09:54:03 +000018398
Guido van Rossumf78abae1997-01-21 22:02:36 +000018399else
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018401sed 's/^/| /' conftest.$ac_ext >&5
18402
Martin v. Löwiseba40652007-08-30 20:10:57 +000018403
Guido van Rossum627b2d71993-12-24 10:39:16 +000018404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018405
18406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018407
Guido van Rossum627b2d71993-12-24 10:39:16 +000018408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018409done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018410
Jack Jansen150753c2003-03-29 22:07:47 +000018411
18412for ac_func in setpgrp
18413do
18414as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018415{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18416echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18417if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018418 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018419else
Martin v. Löwis11437992002-04-12 09:54:03 +000018420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018421/* confdefs.h. */
18422_ACEOF
18423cat confdefs.h >>conftest.$ac_ext
18424cat >>conftest.$ac_ext <<_ACEOF
18425/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018426/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18427 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18428#define $ac_func innocuous_$ac_func
18429
Jack Jansen150753c2003-03-29 22:07:47 +000018430/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018431 which can conflict with char $ac_func (); below.
18432 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018433 <limits.h> exists even on freestanding compilers. */
18434
18435#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018436# include <limits.h>
18437#else
18438# include <assert.h>
18439#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018440
18441#undef $ac_func
18442
Martin v. Löwiseba40652007-08-30 20:10:57 +000018443/* Override any GCC internal prototype to avoid an error.
18444 Use char because int might match the return type of a GCC
18445 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018446#ifdef __cplusplus
18447extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018448#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018449char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018450/* The GNU C library defines this for functions which it implements
18451 to always fail with ENOSYS. Some functions are actually named
18452 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018454choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018455#endif
18456
Skip Montanaro6dead952003-09-25 14:50:04 +000018457int
18458main ()
18459{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 ;
18462 return 0;
18463}
18464_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018465rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018466if { (ac_try="$ac_link"
18467case "(($ac_try" in
18468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18469 *) ac_try_echo=$ac_try;;
18470esac
18471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18472 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018474 grep -v '^ *+' conftest.er1 >conftest.err
18475 rm -f conftest.er1
18476 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018478 (exit $ac_status); } && {
18479 test -z "$ac_c_werror_flag" ||
18480 test ! -s conftest.err
18481 } && test -s conftest$ac_exeext &&
18482 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018483 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018484else
Jack Jansen150753c2003-03-29 22:07:47 +000018485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018486sed 's/^/| /' conftest.$ac_ext >&5
18487
Martin v. Löwiseba40652007-08-30 20:10:57 +000018488 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018490
18491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018492 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018494ac_res=`eval echo '${'$as_ac_var'}'`
18495 { echo "$as_me:$LINENO: result: $ac_res" >&5
18496echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018497if test `eval echo '${'$as_ac_var'}'` = yes; then
18498 cat >>confdefs.h <<_ACEOF
18499#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18500_ACEOF
18501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018502/* confdefs.h. */
18503_ACEOF
18504cat confdefs.h >>conftest.$ac_ext
18505cat >>conftest.$ac_ext <<_ACEOF
18506/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018507#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018508int
18509main ()
18510{
18511setpgrp(0,0);
18512 ;
18513 return 0;
18514}
18515_ACEOF
18516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018517if { (ac_try="$ac_compile"
18518case "(($ac_try" in
18519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18520 *) ac_try_echo=$ac_try;;
18521esac
18522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18523 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018525 grep -v '^ *+' conftest.er1 >conftest.err
18526 rm -f conftest.er1
18527 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018529 (exit $ac_status); } && {
18530 test -z "$ac_c_werror_flag" ||
18531 test ! -s conftest.err
18532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018533
18534cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018535#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018536_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018537
Jack Jansen150753c2003-03-29 22:07:47 +000018538
18539else
18540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018541sed 's/^/| /' conftest.$ac_ext >&5
18542
Martin v. Löwiseba40652007-08-30 20:10:57 +000018543
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018545
18546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018547
18548fi
18549done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018550
Martin v. Löwis11437992002-04-12 09:54:03 +000018551
Thomas Wouters3a584202000-08-05 23:28:51 +000018552for ac_func in gettimeofday
18553do
Martin v. Löwis11437992002-04-12 09:54:03 +000018554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018555{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18557if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018559else
Martin v. Löwis11437992002-04-12 09:54:03 +000018560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018561/* confdefs.h. */
18562_ACEOF
18563cat confdefs.h >>conftest.$ac_ext
18564cat >>conftest.$ac_ext <<_ACEOF
18565/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018566/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18568#define $ac_func innocuous_$ac_func
18569
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018570/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018571 which can conflict with char $ac_func (); below.
18572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018573 <limits.h> exists even on freestanding compilers. */
18574
18575#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018576# include <limits.h>
18577#else
18578# include <assert.h>
18579#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018580
18581#undef $ac_func
18582
Martin v. Löwiseba40652007-08-30 20:10:57 +000018583/* Override any GCC internal prototype to avoid an error.
18584 Use char because int might match the return type of a GCC
18585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018586#ifdef __cplusplus
18587extern "C"
18588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018589char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018590/* The GNU C library defines this for functions which it implements
18591 to always fail with ENOSYS. Some functions are actually named
18592 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018594choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018595#endif
18596
Skip Montanaro6dead952003-09-25 14:50:04 +000018597int
18598main ()
18599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018601 ;
18602 return 0;
18603}
18604_ACEOF
18605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018606if { (ac_try="$ac_link"
18607case "(($ac_try" in
18608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18609 *) ac_try_echo=$ac_try;;
18610esac
18611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018614 grep -v '^ *+' conftest.er1 >conftest.err
18615 rm -f conftest.er1
18616 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018618 (exit $ac_status); } && {
18619 test -z "$ac_c_werror_flag" ||
18620 test ! -s conftest.err
18621 } && test -s conftest$ac_exeext &&
18622 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018624else
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018626sed 's/^/| /' conftest.$ac_ext >&5
18627
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018630
18631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018632 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018634ac_res=`eval echo '${'$as_ac_var'}'`
18635 { echo "$as_me:$LINENO: result: $ac_res" >&5
18636echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018637if test `eval echo '${'$as_ac_var'}'` = yes; then
18638 cat >>confdefs.h <<_ACEOF
18639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18640_ACEOF
18641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018642/* confdefs.h. */
18643_ACEOF
18644cat confdefs.h >>conftest.$ac_ext
18645cat >>conftest.$ac_ext <<_ACEOF
18646/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018647#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018648int
18649main ()
18650{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018651gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 ;
18653 return 0;
18654}
18655_ACEOF
18656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018657if { (ac_try="$ac_compile"
18658case "(($ac_try" in
18659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18660 *) ac_try_echo=$ac_try;;
18661esac
18662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018665 grep -v '^ *+' conftest.er1 >conftest.err
18666 rm -f conftest.er1
18667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018669 (exit $ac_status); } && {
18670 test -z "$ac_c_werror_flag" ||
18671 test ! -s conftest.err
18672 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018673 :
18674else
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018676sed 's/^/| /' conftest.$ac_ext >&5
18677
Martin v. Löwis11437992002-04-12 09:54:03 +000018678
18679cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018680#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018681_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018682
Martin v. Löwis11437992002-04-12 09:54:03 +000018683
Guido van Rossum627b2d71993-12-24 10:39:16 +000018684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018685
18686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018687
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018688fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018689done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018690
Michael W. Hudson54241132001-12-07 15:38:26 +000018691
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692{ echo "$as_me:$LINENO: checking for major" >&5
18693echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018695/* confdefs.h. */
18696_ACEOF
18697cat confdefs.h >>conftest.$ac_ext
18698cat >>conftest.$ac_ext <<_ACEOF
18699/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018700
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018701#if defined(MAJOR_IN_MKDEV)
18702#include <sys/mkdev.h>
18703#elif defined(MAJOR_IN_SYSMACROS)
18704#include <sys/sysmacros.h>
18705#else
18706#include <sys/types.h>
18707#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018708
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018709int
18710main ()
18711{
18712
18713 makedev(major(0),minor(0));
18714
18715 ;
18716 return 0;
18717}
18718_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018719rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018720if { (ac_try="$ac_link"
18721case "(($ac_try" in
18722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18723 *) ac_try_echo=$ac_try;;
18724esac
18725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18726 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018728 grep -v '^ *+' conftest.er1 >conftest.err
18729 rm -f conftest.er1
18730 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018732 (exit $ac_status); } && {
18733 test -z "$ac_c_werror_flag" ||
18734 test ! -s conftest.err
18735 } && test -s conftest$ac_exeext &&
18736 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018737
18738
18739cat >>confdefs.h <<\_ACEOF
18740#define HAVE_DEVICE_MACROS 1
18741_ACEOF
18742
Martin v. Löwiseba40652007-08-30 20:10:57 +000018743 { echo "$as_me:$LINENO: result: yes" >&5
18744echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018745
18746else
18747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018748sed 's/^/| /' conftest.$ac_ext >&5
18749
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018750
Martin v. Löwiseba40652007-08-30 20:10:57 +000018751 { echo "$as_me:$LINENO: result: no" >&5
18752echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018753
18754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018755
18756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018757 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018758
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018759# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018760# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018761{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18762echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018764/* confdefs.h. */
18765_ACEOF
18766cat confdefs.h >>conftest.$ac_ext
18767cat >>conftest.$ac_ext <<_ACEOF
18768/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018769
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018770#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018771#include <sys/socket.h>
18772#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018773#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018774
Martin v. Löwis11437992002-04-12 09:54:03 +000018775int
18776main ()
18777{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018778
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018779getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018780
Martin v. Löwis11437992002-04-12 09:54:03 +000018781 ;
18782 return 0;
18783}
18784_ACEOF
18785rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786if { (ac_try="$ac_link"
18787case "(($ac_try" in
18788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18789 *) ac_try_echo=$ac_try;;
18790esac
18791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18792 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018794 grep -v '^ *+' conftest.er1 >conftest.err
18795 rm -f conftest.er1
18796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018798 (exit $ac_status); } && {
18799 test -z "$ac_c_werror_flag" ||
18800 test ! -s conftest.err
18801 } && test -s conftest$ac_exeext &&
18802 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018803
Martin v. Löwiseba40652007-08-30 20:10:57 +000018804{ echo "$as_me:$LINENO: result: yes" >&5
18805echo "${ECHO_T}yes" >&6; }
18806{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18807echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018808if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018809 { echo "$as_me:$LINENO: result: buggy" >&5
18810echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018811buggygetaddrinfo=yes
18812else
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018814/* confdefs.h. */
18815_ACEOF
18816cat confdefs.h >>conftest.$ac_ext
18817cat >>conftest.$ac_ext <<_ACEOF
18818/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018819
18820#include <sys/types.h>
18821#include <netdb.h>
18822#include <string.h>
18823#include <sys/socket.h>
18824#include <netinet/in.h>
18825
18826main()
18827{
18828 int passive, gaierr, inet4 = 0, inet6 = 0;
18829 struct addrinfo hints, *ai, *aitop;
18830 char straddr[INET6_ADDRSTRLEN], strport[16];
18831
18832 for (passive = 0; passive <= 1; passive++) {
18833 memset(&hints, 0, sizeof(hints));
18834 hints.ai_family = AF_UNSPEC;
18835 hints.ai_flags = passive ? AI_PASSIVE : 0;
18836 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018837 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018838 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18839 (void)gai_strerror(gaierr);
18840 goto bad;
18841 }
18842 for (ai = aitop; ai; ai = ai->ai_next) {
18843 if (ai->ai_addr == NULL ||
18844 ai->ai_addrlen == 0 ||
18845 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18846 straddr, sizeof(straddr), strport, sizeof(strport),
18847 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18848 goto bad;
18849 }
18850 switch (ai->ai_family) {
18851 case AF_INET:
18852 if (strcmp(strport, "54321") != 0) {
18853 goto bad;
18854 }
18855 if (passive) {
18856 if (strcmp(straddr, "0.0.0.0") != 0) {
18857 goto bad;
18858 }
18859 } else {
18860 if (strcmp(straddr, "127.0.0.1") != 0) {
18861 goto bad;
18862 }
18863 }
18864 inet4++;
18865 break;
18866 case AF_INET6:
18867 if (strcmp(strport, "54321") != 0) {
18868 goto bad;
18869 }
18870 if (passive) {
18871 if (strcmp(straddr, "::") != 0) {
18872 goto bad;
18873 }
18874 } else {
18875 if (strcmp(straddr, "::1") != 0) {
18876 goto bad;
18877 }
18878 }
18879 inet6++;
18880 break;
18881 case AF_UNSPEC:
18882 goto bad;
18883 break;
18884 default:
18885 /* another family support? */
18886 break;
18887 }
18888 }
18889 }
18890
18891 if (!(inet4 == 0 || inet4 == 2))
18892 goto bad;
18893 if (!(inet6 == 0 || inet6 == 2))
18894 goto bad;
18895
18896 if (aitop)
18897 freeaddrinfo(aitop);
18898 exit(0);
18899
18900 bad:
18901 if (aitop)
18902 freeaddrinfo(aitop);
18903 exit(1);
18904}
18905
Martin v. Löwis11437992002-04-12 09:54:03 +000018906_ACEOF
18907rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908if { (ac_try="$ac_link"
18909case "(($ac_try" in
18910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18911 *) ac_try_echo=$ac_try;;
18912esac
18913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018915 ac_status=$?
18916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018918 { (case "(($ac_try" in
18919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18920 *) ac_try_echo=$ac_try;;
18921esac
18922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018924 ac_status=$?
18925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018927 { echo "$as_me:$LINENO: result: good" >&5
18928echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018929buggygetaddrinfo=no
18930else
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 echo "$as_me: program exited with status $ac_status" >&5
18932echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018933sed 's/^/| /' conftest.$ac_ext >&5
18934
Martin v. Löwis11437992002-04-12 09:54:03 +000018935( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936{ echo "$as_me:$LINENO: result: buggy" >&5
18937echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018938buggygetaddrinfo=yes
18939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018940rm -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 +000018941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942
18943
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018944else
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018946sed 's/^/| /' conftest.$ac_ext >&5
18947
Martin v. Löwis11437992002-04-12 09:54:03 +000018948
Martin v. Löwiseba40652007-08-30 20:10:57 +000018949{ echo "$as_me:$LINENO: result: no" >&5
18950echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018951buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018952
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018954
18955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018956 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018957
18958if test "$buggygetaddrinfo" = "yes"; then
18959 if test "$ipv6" = "yes"; then
18960 echo 'Fatal: You must get working getaddrinfo() function.'
18961 echo ' or you can specify "--disable-ipv6"'.
18962 exit 1
18963 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018964else
Martin v. Löwis11437992002-04-12 09:54:03 +000018965
18966cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018967#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018968_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018969
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018971
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018972for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018973do
Martin v. Löwis11437992002-04-12 09:54:03 +000018974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018975{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18977if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018979else
Martin v. Löwis11437992002-04-12 09:54:03 +000018980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018981/* confdefs.h. */
18982_ACEOF
18983cat confdefs.h >>conftest.$ac_ext
18984cat >>conftest.$ac_ext <<_ACEOF
18985/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018986/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18987 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18988#define $ac_func innocuous_$ac_func
18989
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018990/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018991 which can conflict with char $ac_func (); below.
18992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018993 <limits.h> exists even on freestanding compilers. */
18994
18995#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018996# include <limits.h>
18997#else
18998# include <assert.h>
18999#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019000
19001#undef $ac_func
19002
Martin v. Löwiseba40652007-08-30 20:10:57 +000019003/* Override any GCC internal prototype to avoid an error.
19004 Use char because int might match the return type of a GCC
19005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019006#ifdef __cplusplus
19007extern "C"
19008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019009char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019010/* The GNU C library defines this for functions which it implements
19011 to always fail with ENOSYS. Some functions are actually named
19012 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019013#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019014choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019015#endif
19016
Skip Montanaro6dead952003-09-25 14:50:04 +000019017int
19018main ()
19019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019020return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019021 ;
19022 return 0;
19023}
19024_ACEOF
19025rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019026if { (ac_try="$ac_link"
19027case "(($ac_try" in
19028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19029 *) ac_try_echo=$ac_try;;
19030esac
19031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019034 grep -v '^ *+' conftest.er1 >conftest.err
19035 rm -f conftest.er1
19036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019038 (exit $ac_status); } && {
19039 test -z "$ac_c_werror_flag" ||
19040 test ! -s conftest.err
19041 } && test -s conftest$ac_exeext &&
19042 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019043 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019044else
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019046sed 's/^/| /' conftest.$ac_ext >&5
19047
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019050
19051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019052 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019054ac_res=`eval echo '${'$as_ac_var'}'`
19055 { echo "$as_me:$LINENO: result: $ac_res" >&5
19056echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019057if test `eval echo '${'$as_ac_var'}'` = yes; then
19058 cat >>confdefs.h <<_ACEOF
19059#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19060_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019061
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019062fi
19063done
19064
Michael W. Hudson54241132001-12-07 15:38:26 +000019065
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019066# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19068echo $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 +000019069if test "${ac_cv_header_time+set}" = set; then
19070 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019071else
Martin v. Löwis11437992002-04-12 09:54:03 +000019072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019073/* confdefs.h. */
19074_ACEOF
19075cat confdefs.h >>conftest.$ac_ext
19076cat >>conftest.$ac_ext <<_ACEOF
19077/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019078#include <sys/types.h>
19079#include <sys/time.h>
19080#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019081
Martin v. Löwis11437992002-04-12 09:54:03 +000019082int
19083main ()
19084{
19085if ((struct tm *) 0)
19086return 0;
19087 ;
19088 return 0;
19089}
19090_ACEOF
19091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019092if { (ac_try="$ac_compile"
19093case "(($ac_try" in
19094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19095 *) ac_try_echo=$ac_try;;
19096esac
19097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019100 grep -v '^ *+' conftest.er1 >conftest.err
19101 rm -f conftest.er1
19102 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019104 (exit $ac_status); } && {
19105 test -z "$ac_c_werror_flag" ||
19106 test ! -s conftest.err
19107 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019108 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019109else
Martin v. Löwis11437992002-04-12 09:54:03 +000019110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019111sed 's/^/| /' conftest.$ac_ext >&5
19112
Martin v. Löwiseba40652007-08-30 20:10:57 +000019113 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019115
19116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19119echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019120if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019121
19122cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019123#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019124_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019125
19126fi
19127
Martin v. Löwiseba40652007-08-30 20:10:57 +000019128{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19129echo $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 +000019130if test "${ac_cv_struct_tm+set}" = set; then
19131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019132else
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019134/* confdefs.h. */
19135_ACEOF
19136cat confdefs.h >>conftest.$ac_ext
19137cat >>conftest.$ac_ext <<_ACEOF
19138/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019139#include <sys/types.h>
19140#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019141
Martin v. Löwis11437992002-04-12 09:54:03 +000019142int
19143main ()
19144{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019145struct tm tm;
19146 int *p = &tm.tm_sec;
19147 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019148 ;
19149 return 0;
19150}
19151_ACEOF
19152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019153if { (ac_try="$ac_compile"
19154case "(($ac_try" in
19155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19156 *) ac_try_echo=$ac_try;;
19157esac
19158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161 grep -v '^ *+' conftest.er1 >conftest.err
19162 rm -f conftest.er1
19163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019165 (exit $ac_status); } && {
19166 test -z "$ac_c_werror_flag" ||
19167 test ! -s conftest.err
19168 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019169 ac_cv_struct_tm=time.h
19170else
Martin v. Löwis11437992002-04-12 09:54:03 +000019171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019172sed 's/^/| /' conftest.$ac_ext >&5
19173
Martin v. Löwiseba40652007-08-30 20:10:57 +000019174 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019176
19177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019179{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19180echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019181if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019182
19183cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019184#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019185_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019186
19187fi
19188
Martin v. Löwiseba40652007-08-30 20:10:57 +000019189{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19190echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019191if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019193else
Martin v. Löwis11437992002-04-12 09:54:03 +000019194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019195/* confdefs.h. */
19196_ACEOF
19197cat confdefs.h >>conftest.$ac_ext
19198cat >>conftest.$ac_ext <<_ACEOF
19199/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019200#include <sys/types.h>
19201#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019202
19203
Martin v. Löwis11437992002-04-12 09:54:03 +000019204int
19205main ()
19206{
19207static struct tm ac_aggr;
19208if (ac_aggr.tm_zone)
19209return 0;
19210 ;
19211 return 0;
19212}
19213_ACEOF
19214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019215if { (ac_try="$ac_compile"
19216case "(($ac_try" in
19217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19218 *) ac_try_echo=$ac_try;;
19219esac
19220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019223 grep -v '^ *+' conftest.er1 >conftest.err
19224 rm -f conftest.er1
19225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019227 (exit $ac_status); } && {
19228 test -z "$ac_c_werror_flag" ||
19229 test ! -s conftest.err
19230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019231 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019232else
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019234sed 's/^/| /' conftest.$ac_ext >&5
19235
Martin v. Löwiseba40652007-08-30 20:10:57 +000019236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019237/* confdefs.h. */
19238_ACEOF
19239cat confdefs.h >>conftest.$ac_ext
19240cat >>conftest.$ac_ext <<_ACEOF
19241/* end confdefs.h. */
19242#include <sys/types.h>
19243#include <$ac_cv_struct_tm>
19244
19245
19246int
19247main ()
19248{
19249static struct tm ac_aggr;
19250if (sizeof ac_aggr.tm_zone)
19251return 0;
19252 ;
19253 return 0;
19254}
19255_ACEOF
19256rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257if { (ac_try="$ac_compile"
19258case "(($ac_try" in
19259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19260 *) ac_try_echo=$ac_try;;
19261esac
19262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19263 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019265 grep -v '^ *+' conftest.er1 >conftest.err
19266 rm -f conftest.er1
19267 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019269 (exit $ac_status); } && {
19270 test -z "$ac_c_werror_flag" ||
19271 test ! -s conftest.err
19272 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019273 ac_cv_member_struct_tm_tm_zone=yes
19274else
19275 echo "$as_me: failed program was:" >&5
19276sed 's/^/| /' conftest.$ac_ext >&5
19277
Martin v. Löwiseba40652007-08-30 20:10:57 +000019278 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019280
19281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019283
19284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019286{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19287echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019288if test $ac_cv_member_struct_tm_tm_zone = yes; then
19289
19290cat >>confdefs.h <<_ACEOF
19291#define HAVE_STRUCT_TM_TM_ZONE 1
19292_ACEOF
19293
19294
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019295fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019296
Martin v. Löwis11437992002-04-12 09:54:03 +000019297if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19298
19299cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019300#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019302
19303else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019304 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19305echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19306if test "${ac_cv_have_decl_tzname+set}" = set; then
19307 echo $ECHO_N "(cached) $ECHO_C" >&6
19308else
19309 cat >conftest.$ac_ext <<_ACEOF
19310/* confdefs.h. */
19311_ACEOF
19312cat confdefs.h >>conftest.$ac_ext
19313cat >>conftest.$ac_ext <<_ACEOF
19314/* end confdefs.h. */
19315#include <time.h>
19316
19317int
19318main ()
19319{
19320#ifndef tzname
19321 (void) tzname;
19322#endif
19323
19324 ;
19325 return 0;
19326}
19327_ACEOF
19328rm -f conftest.$ac_objext
19329if { (ac_try="$ac_compile"
19330case "(($ac_try" in
19331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19332 *) ac_try_echo=$ac_try;;
19333esac
19334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19335 (eval "$ac_compile") 2>conftest.er1
19336 ac_status=$?
19337 grep -v '^ *+' conftest.er1 >conftest.err
19338 rm -f conftest.er1
19339 cat conftest.err >&5
19340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19341 (exit $ac_status); } && {
19342 test -z "$ac_c_werror_flag" ||
19343 test ! -s conftest.err
19344 } && test -s conftest.$ac_objext; then
19345 ac_cv_have_decl_tzname=yes
19346else
19347 echo "$as_me: failed program was:" >&5
19348sed 's/^/| /' conftest.$ac_ext >&5
19349
19350 ac_cv_have_decl_tzname=no
19351fi
19352
19353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19354fi
19355{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19356echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19357if test $ac_cv_have_decl_tzname = yes; then
19358
19359cat >>confdefs.h <<_ACEOF
19360#define HAVE_DECL_TZNAME 1
19361_ACEOF
19362
19363
19364else
19365 cat >>confdefs.h <<_ACEOF
19366#define HAVE_DECL_TZNAME 0
19367_ACEOF
19368
19369
19370fi
19371
19372
19373 { echo "$as_me:$LINENO: checking for tzname" >&5
19374echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019375if test "${ac_cv_var_tzname+set}" = set; then
19376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019377else
Martin v. Löwis11437992002-04-12 09:54:03 +000019378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019379/* confdefs.h. */
19380_ACEOF
19381cat confdefs.h >>conftest.$ac_ext
19382cat >>conftest.$ac_ext <<_ACEOF
19383/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019384#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385#if !HAVE_DECL_TZNAME
19386extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019388
Martin v. Löwis11437992002-04-12 09:54:03 +000019389int
19390main ()
19391{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019392return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019393 ;
19394 return 0;
19395}
19396_ACEOF
19397rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019398if { (ac_try="$ac_link"
19399case "(($ac_try" in
19400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19401 *) ac_try_echo=$ac_try;;
19402esac
19403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19404 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019406 grep -v '^ *+' conftest.er1 >conftest.err
19407 rm -f conftest.er1
19408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019410 (exit $ac_status); } && {
19411 test -z "$ac_c_werror_flag" ||
19412 test ! -s conftest.err
19413 } && test -s conftest$ac_exeext &&
19414 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019415 ac_cv_var_tzname=yes
19416else
Martin v. Löwis11437992002-04-12 09:54:03 +000019417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019418sed 's/^/| /' conftest.$ac_ext >&5
19419
Martin v. Löwiseba40652007-08-30 20:10:57 +000019420 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422
19423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019424 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019426{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19427echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019428 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019429
19430cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019431#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019434 fi
19435fi
19436
Martin v. Löwiseba40652007-08-30 20:10:57 +000019437{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19438echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019439if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19440 echo $ECHO_N "(cached) $ECHO_C" >&6
19441else
19442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019443/* confdefs.h. */
19444_ACEOF
19445cat confdefs.h >>conftest.$ac_ext
19446cat >>conftest.$ac_ext <<_ACEOF
19447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019448$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019449int
19450main ()
19451{
19452static struct stat ac_aggr;
19453if (ac_aggr.st_rdev)
19454return 0;
19455 ;
19456 return 0;
19457}
19458_ACEOF
19459rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460if { (ac_try="$ac_compile"
19461case "(($ac_try" in
19462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19463 *) ac_try_echo=$ac_try;;
19464esac
19465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019468 grep -v '^ *+' conftest.er1 >conftest.err
19469 rm -f conftest.er1
19470 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019472 (exit $ac_status); } && {
19473 test -z "$ac_c_werror_flag" ||
19474 test ! -s conftest.err
19475 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 ac_cv_member_struct_stat_st_rdev=yes
19477else
19478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019479sed 's/^/| /' conftest.$ac_ext >&5
19480
Martin v. Löwiseba40652007-08-30 20:10:57 +000019481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019482/* confdefs.h. */
19483_ACEOF
19484cat confdefs.h >>conftest.$ac_ext
19485cat >>conftest.$ac_ext <<_ACEOF
19486/* end confdefs.h. */
19487$ac_includes_default
19488int
19489main ()
19490{
19491static struct stat ac_aggr;
19492if (sizeof ac_aggr.st_rdev)
19493return 0;
19494 ;
19495 return 0;
19496}
19497_ACEOF
19498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019499if { (ac_try="$ac_compile"
19500case "(($ac_try" in
19501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19502 *) ac_try_echo=$ac_try;;
19503esac
19504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19505 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019507 grep -v '^ *+' conftest.er1 >conftest.err
19508 rm -f conftest.er1
19509 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019511 (exit $ac_status); } && {
19512 test -z "$ac_c_werror_flag" ||
19513 test ! -s conftest.err
19514 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019515 ac_cv_member_struct_stat_st_rdev=yes
19516else
19517 echo "$as_me: failed program was:" >&5
19518sed 's/^/| /' conftest.$ac_ext >&5
19519
Martin v. Löwiseba40652007-08-30 20:10:57 +000019520 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522
19523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019525
19526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019528{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19529echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019530if test $ac_cv_member_struct_stat_st_rdev = yes; then
19531
19532cat >>confdefs.h <<_ACEOF
19533#define HAVE_STRUCT_STAT_ST_RDEV 1
19534_ACEOF
19535
19536
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019537fi
19538
Martin v. Löwiseba40652007-08-30 20:10:57 +000019539{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19540echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019541if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019543else
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019545/* confdefs.h. */
19546_ACEOF
19547cat confdefs.h >>conftest.$ac_ext
19548cat >>conftest.$ac_ext <<_ACEOF
19549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019550$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019551int
19552main ()
19553{
19554static struct stat ac_aggr;
19555if (ac_aggr.st_blksize)
19556return 0;
19557 ;
19558 return 0;
19559}
19560_ACEOF
19561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019562if { (ac_try="$ac_compile"
19563case "(($ac_try" in
19564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19565 *) ac_try_echo=$ac_try;;
19566esac
19567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019570 grep -v '^ *+' conftest.er1 >conftest.err
19571 rm -f conftest.er1
19572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019574 (exit $ac_status); } && {
19575 test -z "$ac_c_werror_flag" ||
19576 test ! -s conftest.err
19577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019578 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019579else
Martin v. Löwis11437992002-04-12 09:54:03 +000019580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019581sed 's/^/| /' conftest.$ac_ext >&5
19582
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019584/* confdefs.h. */
19585_ACEOF
19586cat confdefs.h >>conftest.$ac_ext
19587cat >>conftest.$ac_ext <<_ACEOF
19588/* end confdefs.h. */
19589$ac_includes_default
19590int
19591main ()
19592{
19593static struct stat ac_aggr;
19594if (sizeof ac_aggr.st_blksize)
19595return 0;
19596 ;
19597 return 0;
19598}
19599_ACEOF
19600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019601if { (ac_try="$ac_compile"
19602case "(($ac_try" in
19603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19604 *) ac_try_echo=$ac_try;;
19605esac
19606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19607 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019609 grep -v '^ *+' conftest.er1 >conftest.err
19610 rm -f conftest.er1
19611 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613 (exit $ac_status); } && {
19614 test -z "$ac_c_werror_flag" ||
19615 test ! -s conftest.err
19616 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019617 ac_cv_member_struct_stat_st_blksize=yes
19618else
19619 echo "$as_me: failed program was:" >&5
19620sed 's/^/| /' conftest.$ac_ext >&5
19621
Martin v. Löwiseba40652007-08-30 20:10:57 +000019622 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624
19625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019627
19628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19631echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019632if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019633
Martin v. Löwis11437992002-04-12 09:54:03 +000019634cat >>confdefs.h <<_ACEOF
19635#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19636_ACEOF
19637
19638
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019639fi
19640
Martin v. Löwiseba40652007-08-30 20:10:57 +000019641{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19642echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019643if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19644 echo $ECHO_N "(cached) $ECHO_C" >&6
19645else
19646 cat >conftest.$ac_ext <<_ACEOF
19647/* confdefs.h. */
19648_ACEOF
19649cat confdefs.h >>conftest.$ac_ext
19650cat >>conftest.$ac_ext <<_ACEOF
19651/* end confdefs.h. */
19652$ac_includes_default
19653int
19654main ()
19655{
19656static struct stat ac_aggr;
19657if (ac_aggr.st_flags)
19658return 0;
19659 ;
19660 return 0;
19661}
19662_ACEOF
19663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664if { (ac_try="$ac_compile"
19665case "(($ac_try" in
19666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19667 *) ac_try_echo=$ac_try;;
19668esac
19669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19670 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019671 ac_status=$?
19672 grep -v '^ *+' conftest.er1 >conftest.err
19673 rm -f conftest.er1
19674 cat conftest.err >&5
19675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019676 (exit $ac_status); } && {
19677 test -z "$ac_c_werror_flag" ||
19678 test ! -s conftest.err
19679 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019680 ac_cv_member_struct_stat_st_flags=yes
19681else
19682 echo "$as_me: failed program was:" >&5
19683sed 's/^/| /' conftest.$ac_ext >&5
19684
Martin v. Löwiseba40652007-08-30 20:10:57 +000019685 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019686/* confdefs.h. */
19687_ACEOF
19688cat confdefs.h >>conftest.$ac_ext
19689cat >>conftest.$ac_ext <<_ACEOF
19690/* end confdefs.h. */
19691$ac_includes_default
19692int
19693main ()
19694{
19695static struct stat ac_aggr;
19696if (sizeof ac_aggr.st_flags)
19697return 0;
19698 ;
19699 return 0;
19700}
19701_ACEOF
19702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019703if { (ac_try="$ac_compile"
19704case "(($ac_try" in
19705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19706 *) ac_try_echo=$ac_try;;
19707esac
19708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19709 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019710 ac_status=$?
19711 grep -v '^ *+' conftest.er1 >conftest.err
19712 rm -f conftest.er1
19713 cat conftest.err >&5
19714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019715 (exit $ac_status); } && {
19716 test -z "$ac_c_werror_flag" ||
19717 test ! -s conftest.err
19718 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019719 ac_cv_member_struct_stat_st_flags=yes
19720else
19721 echo "$as_me: failed program was:" >&5
19722sed 's/^/| /' conftest.$ac_ext >&5
19723
Martin v. Löwiseba40652007-08-30 20:10:57 +000019724 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726
19727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019729
19730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19733echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019734if test $ac_cv_member_struct_stat_st_flags = yes; then
19735
19736cat >>confdefs.h <<_ACEOF
19737#define HAVE_STRUCT_STAT_ST_FLAGS 1
19738_ACEOF
19739
19740
19741fi
19742
Martin v. Löwiseba40652007-08-30 20:10:57 +000019743{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19744echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019745if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19746 echo $ECHO_N "(cached) $ECHO_C" >&6
19747else
19748 cat >conftest.$ac_ext <<_ACEOF
19749/* confdefs.h. */
19750_ACEOF
19751cat confdefs.h >>conftest.$ac_ext
19752cat >>conftest.$ac_ext <<_ACEOF
19753/* end confdefs.h. */
19754$ac_includes_default
19755int
19756main ()
19757{
19758static struct stat ac_aggr;
19759if (ac_aggr.st_gen)
19760return 0;
19761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766if { (ac_try="$ac_compile"
19767case "(($ac_try" in
19768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19769 *) ac_try_echo=$ac_try;;
19770esac
19771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019773 ac_status=$?
19774 grep -v '^ *+' conftest.er1 >conftest.err
19775 rm -f conftest.er1
19776 cat conftest.err >&5
19777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019778 (exit $ac_status); } && {
19779 test -z "$ac_c_werror_flag" ||
19780 test ! -s conftest.err
19781 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019782 ac_cv_member_struct_stat_st_gen=yes
19783else
19784 echo "$as_me: failed program was:" >&5
19785sed 's/^/| /' conftest.$ac_ext >&5
19786
Martin v. Löwiseba40652007-08-30 20:10:57 +000019787 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019788/* confdefs.h. */
19789_ACEOF
19790cat confdefs.h >>conftest.$ac_ext
19791cat >>conftest.$ac_ext <<_ACEOF
19792/* end confdefs.h. */
19793$ac_includes_default
19794int
19795main ()
19796{
19797static struct stat ac_aggr;
19798if (sizeof ac_aggr.st_gen)
19799return 0;
19800 ;
19801 return 0;
19802}
19803_ACEOF
19804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805if { (ac_try="$ac_compile"
19806case "(($ac_try" in
19807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19808 *) ac_try_echo=$ac_try;;
19809esac
19810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019812 ac_status=$?
19813 grep -v '^ *+' conftest.er1 >conftest.err
19814 rm -f conftest.er1
19815 cat conftest.err >&5
19816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817 (exit $ac_status); } && {
19818 test -z "$ac_c_werror_flag" ||
19819 test ! -s conftest.err
19820 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019821 ac_cv_member_struct_stat_st_gen=yes
19822else
19823 echo "$as_me: failed program was:" >&5
19824sed 's/^/| /' conftest.$ac_ext >&5
19825
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828
19829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019831
19832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19835echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019836if test $ac_cv_member_struct_stat_st_gen = yes; then
19837
19838cat >>confdefs.h <<_ACEOF
19839#define HAVE_STRUCT_STAT_ST_GEN 1
19840_ACEOF
19841
19842
19843fi
19844
Martin v. Löwiseba40652007-08-30 20:10:57 +000019845{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19846echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019847if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19848 echo $ECHO_N "(cached) $ECHO_C" >&6
19849else
19850 cat >conftest.$ac_ext <<_ACEOF
19851/* confdefs.h. */
19852_ACEOF
19853cat confdefs.h >>conftest.$ac_ext
19854cat >>conftest.$ac_ext <<_ACEOF
19855/* end confdefs.h. */
19856$ac_includes_default
19857int
19858main ()
19859{
19860static struct stat ac_aggr;
19861if (ac_aggr.st_birthtime)
19862return 0;
19863 ;
19864 return 0;
19865}
19866_ACEOF
19867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868if { (ac_try="$ac_compile"
19869case "(($ac_try" in
19870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19871 *) ac_try_echo=$ac_try;;
19872esac
19873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019875 ac_status=$?
19876 grep -v '^ *+' conftest.er1 >conftest.err
19877 rm -f conftest.er1
19878 cat conftest.err >&5
19879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019880 (exit $ac_status); } && {
19881 test -z "$ac_c_werror_flag" ||
19882 test ! -s conftest.err
19883 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019884 ac_cv_member_struct_stat_st_birthtime=yes
19885else
19886 echo "$as_me: failed program was:" >&5
19887sed 's/^/| /' conftest.$ac_ext >&5
19888
Martin v. Löwiseba40652007-08-30 20:10:57 +000019889 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019890/* confdefs.h. */
19891_ACEOF
19892cat confdefs.h >>conftest.$ac_ext
19893cat >>conftest.$ac_ext <<_ACEOF
19894/* end confdefs.h. */
19895$ac_includes_default
19896int
19897main ()
19898{
19899static struct stat ac_aggr;
19900if (sizeof ac_aggr.st_birthtime)
19901return 0;
19902 ;
19903 return 0;
19904}
19905_ACEOF
19906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019907if { (ac_try="$ac_compile"
19908case "(($ac_try" in
19909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19910 *) ac_try_echo=$ac_try;;
19911esac
19912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019914 ac_status=$?
19915 grep -v '^ *+' conftest.er1 >conftest.err
19916 rm -f conftest.er1
19917 cat conftest.err >&5
19918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019919 (exit $ac_status); } && {
19920 test -z "$ac_c_werror_flag" ||
19921 test ! -s conftest.err
19922 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019923 ac_cv_member_struct_stat_st_birthtime=yes
19924else
19925 echo "$as_me: failed program was:" >&5
19926sed 's/^/| /' conftest.$ac_ext >&5
19927
Martin v. Löwiseba40652007-08-30 20:10:57 +000019928 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019930
19931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933
19934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19937echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019938if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19939
19940cat >>confdefs.h <<_ACEOF
19941#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19942_ACEOF
19943
19944
19945fi
19946
Martin v. Löwiseba40652007-08-30 20:10:57 +000019947{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19948echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019949if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19950 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019951else
Martin v. Löwis11437992002-04-12 09:54:03 +000019952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019953/* confdefs.h. */
19954_ACEOF
19955cat confdefs.h >>conftest.$ac_ext
19956cat >>conftest.$ac_ext <<_ACEOF
19957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019958$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019959int
19960main ()
19961{
19962static struct stat ac_aggr;
19963if (ac_aggr.st_blocks)
19964return 0;
19965 ;
19966 return 0;
19967}
19968_ACEOF
19969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970if { (ac_try="$ac_compile"
19971case "(($ac_try" in
19972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19973 *) ac_try_echo=$ac_try;;
19974esac
19975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019978 grep -v '^ *+' conftest.er1 >conftest.err
19979 rm -f conftest.er1
19980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982 (exit $ac_status); } && {
19983 test -z "$ac_c_werror_flag" ||
19984 test ! -s conftest.err
19985 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019986 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019987else
Martin v. Löwis11437992002-04-12 09:54:03 +000019988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019989sed 's/^/| /' conftest.$ac_ext >&5
19990
Martin v. Löwiseba40652007-08-30 20:10:57 +000019991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019992/* confdefs.h. */
19993_ACEOF
19994cat confdefs.h >>conftest.$ac_ext
19995cat >>conftest.$ac_ext <<_ACEOF
19996/* end confdefs.h. */
19997$ac_includes_default
19998int
19999main ()
20000{
20001static struct stat ac_aggr;
20002if (sizeof ac_aggr.st_blocks)
20003return 0;
20004 ;
20005 return 0;
20006}
20007_ACEOF
20008rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020009if { (ac_try="$ac_compile"
20010case "(($ac_try" in
20011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20012 *) ac_try_echo=$ac_try;;
20013esac
20014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20015 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020017 grep -v '^ *+' conftest.er1 >conftest.err
20018 rm -f conftest.er1
20019 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021 (exit $ac_status); } && {
20022 test -z "$ac_c_werror_flag" ||
20023 test ! -s conftest.err
20024 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020025 ac_cv_member_struct_stat_st_blocks=yes
20026else
20027 echo "$as_me: failed program was:" >&5
20028sed 's/^/| /' conftest.$ac_ext >&5
20029
Martin v. Löwiseba40652007-08-30 20:10:57 +000020030 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032
20033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035
20036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20039echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020040if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020041
Martin v. Löwis11437992002-04-12 09:54:03 +000020042cat >>confdefs.h <<_ACEOF
20043#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20044_ACEOF
20045
20046
20047cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020048#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020049_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020050
20051else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020052 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020053 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020054 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20055 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020056esac
20057
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020058fi
20059
Michael W. Hudson54241132001-12-07 15:38:26 +000020060
Martin v. Löwis11437992002-04-12 09:54:03 +000020061
Martin v. Löwiseba40652007-08-30 20:10:57 +000020062{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20063echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020064if test "${ac_cv_header_time_altzone+set}" = set; then
20065 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020066else
Martin v. Löwis11437992002-04-12 09:54:03 +000020067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020068/* confdefs.h. */
20069_ACEOF
20070cat confdefs.h >>conftest.$ac_ext
20071cat >>conftest.$ac_ext <<_ACEOF
20072/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020073#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020074int
20075main ()
20076{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020077return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020078 ;
20079 return 0;
20080}
20081_ACEOF
20082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020083if { (ac_try="$ac_compile"
20084case "(($ac_try" in
20085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20086 *) ac_try_echo=$ac_try;;
20087esac
20088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020091 grep -v '^ *+' conftest.er1 >conftest.err
20092 rm -f conftest.er1
20093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020095 (exit $ac_status); } && {
20096 test -z "$ac_c_werror_flag" ||
20097 test ! -s conftest.err
20098 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020099 ac_cv_header_time_altzone=yes
20100else
Martin v. Löwis11437992002-04-12 09:54:03 +000020101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020102sed 's/^/| /' conftest.$ac_ext >&5
20103
Martin v. Löwiseba40652007-08-30 20:10:57 +000020104 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020105fi
20106
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20108fi
20109
20110{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20111echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020112if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020113
20114cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020115#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020116_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020117
20118fi
20119
Guido van Rossumda88dad1995-01-26 00:46:29 +000020120was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20122echo $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 +000020123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020124/* confdefs.h. */
20125_ACEOF
20126cat confdefs.h >>conftest.$ac_ext
20127cat >>conftest.$ac_ext <<_ACEOF
20128/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020129
20130#include <sys/types.h>
20131#include <sys/select.h>
20132#include <sys/time.h>
20133
Martin v. Löwis11437992002-04-12 09:54:03 +000020134int
20135main ()
20136{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020137;
Martin v. Löwis11437992002-04-12 09:54:03 +000020138 ;
20139 return 0;
20140}
20141_ACEOF
20142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020143if { (ac_try="$ac_compile"
20144case "(($ac_try" in
20145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20146 *) ac_try_echo=$ac_try;;
20147esac
20148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020151 grep -v '^ *+' conftest.er1 >conftest.err
20152 rm -f conftest.er1
20153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020155 (exit $ac_status); } && {
20156 test -z "$ac_c_werror_flag" ||
20157 test ! -s conftest.err
20158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020159
20160
20161cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020162#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020163_ACEOF
20164
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020165 was_it_defined=yes
20166
Guido van Rossumf78abae1997-01-21 22:02:36 +000020167else
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020169sed 's/^/| /' conftest.$ac_ext >&5
20170
Brett Cannon19fab762007-06-02 03:02:29 +000020171
Martin v. Löwiseba40652007-08-30 20:10:57 +000020172fi
20173
20174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20175{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20176echo "${ECHO_T}$was_it_defined" >&6; }
20177
20178{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20179echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020180if test "${ac_cv_struct_addrinfo+set}" = set; then
20181 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020182else
Martin v. Löwis11437992002-04-12 09:54:03 +000020183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020184/* confdefs.h. */
20185_ACEOF
20186cat confdefs.h >>conftest.$ac_ext
20187cat >>conftest.$ac_ext <<_ACEOF
20188/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020189
20190# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020191int
20192main ()
20193{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020194struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020195 ;
20196 return 0;
20197}
20198_ACEOF
20199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020200if { (ac_try="$ac_compile"
20201case "(($ac_try" in
20202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20203 *) ac_try_echo=$ac_try;;
20204esac
20205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020208 grep -v '^ *+' conftest.er1 >conftest.err
20209 rm -f conftest.er1
20210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212 (exit $ac_status); } && {
20213 test -z "$ac_c_werror_flag" ||
20214 test ! -s conftest.err
20215 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020216 ac_cv_struct_addrinfo=yes
20217else
Martin v. Löwis11437992002-04-12 09:54:03 +000020218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020219sed 's/^/| /' conftest.$ac_ext >&5
20220
Martin v. Löwiseba40652007-08-30 20:10:57 +000020221 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020222fi
20223
Martin v. Löwiseba40652007-08-30 20:10:57 +000020224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20225fi
20226
20227{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20228echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020229if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020230
20231cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020232#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020233_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020234
20235fi
20236
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20238echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020239if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20240 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020241else
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020243/* confdefs.h. */
20244_ACEOF
20245cat confdefs.h >>conftest.$ac_ext
20246cat >>conftest.$ac_ext <<_ACEOF
20247/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020248
20249# include <sys/types.h>
20250# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020251int
20252main ()
20253{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020254struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020255 ;
20256 return 0;
20257}
20258_ACEOF
20259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020260if { (ac_try="$ac_compile"
20261case "(($ac_try" in
20262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20263 *) ac_try_echo=$ac_try;;
20264esac
20265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020268 grep -v '^ *+' conftest.er1 >conftest.err
20269 rm -f conftest.er1
20270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020272 (exit $ac_status); } && {
20273 test -z "$ac_c_werror_flag" ||
20274 test ! -s conftest.err
20275 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020276 ac_cv_struct_sockaddr_storage=yes
20277else
Martin v. Löwis11437992002-04-12 09:54:03 +000020278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020279sed 's/^/| /' conftest.$ac_ext >&5
20280
Martin v. Löwiseba40652007-08-30 20:10:57 +000020281 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020282fi
20283
Martin v. Löwiseba40652007-08-30 20:10:57 +000020284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20285fi
20286
20287{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20288echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020289if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020290
20291cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020292#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020293_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020294
20295fi
20296
Guido van Rossum627b2d71993-12-24 10:39:16 +000020297# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020298
Michael W. Hudson54241132001-12-07 15:38:26 +000020299
Martin v. Löwiseba40652007-08-30 20:10:57 +000020300{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20301echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020302if test "${ac_cv_c_char_unsigned+set}" = set; then
20303 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020304else
Martin v. Löwis11437992002-04-12 09:54:03 +000020305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020306/* confdefs.h. */
20307_ACEOF
20308cat confdefs.h >>conftest.$ac_ext
20309cat >>conftest.$ac_ext <<_ACEOF
20310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020311$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020312int
20313main ()
20314{
20315static int test_array [1 - 2 * !(((char) -1) < 0)];
20316test_array [0] = 0
20317
20318 ;
20319 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020320}
Martin v. Löwis11437992002-04-12 09:54:03 +000020321_ACEOF
20322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020323if { (ac_try="$ac_compile"
20324case "(($ac_try" in
20325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20326 *) ac_try_echo=$ac_try;;
20327esac
20328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020331 grep -v '^ *+' conftest.er1 >conftest.err
20332 rm -f conftest.er1
20333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020335 (exit $ac_status); } && {
20336 test -z "$ac_c_werror_flag" ||
20337 test ! -s conftest.err
20338 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020339 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020340else
20341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020342sed 's/^/| /' conftest.$ac_ext >&5
20343
Martin v. Löwiseba40652007-08-30 20:10:57 +000020344 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020346
20347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020349{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20350echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020351if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020353#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020354_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020355
20356fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020357
Martin v. Löwiseba40652007-08-30 20:10:57 +000020358{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20359echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020360if test "${ac_cv_c_const+set}" = set; then
20361 echo $ECHO_N "(cached) $ECHO_C" >&6
20362else
20363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020364/* confdefs.h. */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020369
Martin v. Löwis11437992002-04-12 09:54:03 +000020370int
20371main ()
20372{
20373/* FIXME: Include the comments suggested by Paul. */
20374#ifndef __cplusplus
20375 /* Ultrix mips cc rejects this. */
20376 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020377 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020378 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379 char const *const *pcpcc;
20380 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020381 /* NEC SVR4.0.2 mips cc rejects this. */
20382 struct point {int x, y;};
20383 static struct point const zero = {0,0};
20384 /* AIX XL C 1.02.0.0 rejects this.
20385 It does not let you subtract one const X* pointer from another in
20386 an arm of an if-expression whose if-part is not a constant
20387 expression */
20388 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020389 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020390 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020391 ++pcpcc;
20392 ppc = (char**) pcpcc;
20393 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020394 { /* SCO 3.2v4 cc rejects this. */
20395 char *t;
20396 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020397
Martin v. Löwis11437992002-04-12 09:54:03 +000020398 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020399 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 }
20401 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20402 int x[] = {25, 17};
20403 const int *foo = &x[0];
20404 ++foo;
20405 }
20406 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20407 typedef const int *iptr;
20408 iptr p = 0;
20409 ++p;
20410 }
20411 { /* AIX XL C 1.02.0.0 rejects this saying
20412 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20413 struct s { int j; const int *ap[3]; };
20414 struct s *b; b->j = 5;
20415 }
20416 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20417 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020419 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020421#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020422
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 ;
20424 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020425}
Martin v. Löwis11437992002-04-12 09:54:03 +000020426_ACEOF
20427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428if { (ac_try="$ac_compile"
20429case "(($ac_try" in
20430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20431 *) ac_try_echo=$ac_try;;
20432esac
20433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020436 grep -v '^ *+' conftest.er1 >conftest.err
20437 rm -f conftest.er1
20438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440 (exit $ac_status); } && {
20441 test -z "$ac_c_werror_flag" ||
20442 test ! -s conftest.err
20443 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020444 ac_cv_c_const=yes
20445else
Martin v. Löwis11437992002-04-12 09:54:03 +000020446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020447sed 's/^/| /' conftest.$ac_ext >&5
20448
Martin v. Löwiseba40652007-08-30 20:10:57 +000020449 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451
20452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020454{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20455echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020456if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020457
20458cat >>confdefs.h <<\_ACEOF
20459#define const
20460_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020461
20462fi
20463
Michael W. Hudson54241132001-12-07 15:38:26 +000020464
Guido van Rossumda88dad1995-01-26 00:46:29 +000020465works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020466{ echo "$as_me:$LINENO: checking for working volatile" >&5
20467echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020469/* confdefs.h. */
20470_ACEOF
20471cat confdefs.h >>conftest.$ac_ext
20472cat >>conftest.$ac_ext <<_ACEOF
20473/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020474
Martin v. Löwis11437992002-04-12 09:54:03 +000020475int
20476main ()
20477{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020478volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020479 ;
20480 return 0;
20481}
20482_ACEOF
20483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020484if { (ac_try="$ac_compile"
20485case "(($ac_try" in
20486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20487 *) ac_try_echo=$ac_try;;
20488esac
20489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020492 grep -v '^ *+' conftest.er1 >conftest.err
20493 rm -f conftest.er1
20494 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020496 (exit $ac_status); } && {
20497 test -z "$ac_c_werror_flag" ||
20498 test ! -s conftest.err
20499 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020500 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020501else
Martin v. Löwis11437992002-04-12 09:54:03 +000020502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020503sed 's/^/| /' conftest.$ac_ext >&5
20504
Martin v. Löwis11437992002-04-12 09:54:03 +000020505
20506cat >>confdefs.h <<\_ACEOF
20507#define volatile
20508_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020510
Guido van Rossum627b2d71993-12-24 10:39:16 +000020511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020512
20513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20514{ echo "$as_me:$LINENO: result: $works" >&5
20515echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020516
Guido van Rossumda88dad1995-01-26 00:46:29 +000020517works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020518{ echo "$as_me:$LINENO: checking for working signed char" >&5
20519echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020521/* confdefs.h. */
20522_ACEOF
20523cat confdefs.h >>conftest.$ac_ext
20524cat >>conftest.$ac_ext <<_ACEOF
20525/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020526
Martin v. Löwis11437992002-04-12 09:54:03 +000020527int
20528main ()
20529{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020530signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 ;
20532 return 0;
20533}
20534_ACEOF
20535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020536if { (ac_try="$ac_compile"
20537case "(($ac_try" in
20538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20539 *) ac_try_echo=$ac_try;;
20540esac
20541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020544 grep -v '^ *+' conftest.er1 >conftest.err
20545 rm -f conftest.er1
20546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020548 (exit $ac_status); } && {
20549 test -z "$ac_c_werror_flag" ||
20550 test ! -s conftest.err
20551 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020552 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020553else
Martin v. Löwis11437992002-04-12 09:54:03 +000020554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020555sed 's/^/| /' conftest.$ac_ext >&5
20556
Martin v. Löwis11437992002-04-12 09:54:03 +000020557
20558cat >>confdefs.h <<\_ACEOF
20559#define signed
20560_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020562
Guido van Rossum7f43da71994-08-01 12:15:30 +000020563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020564
20565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20566{ echo "$as_me:$LINENO: result: $works" >&5
20567echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020568
Guido van Rossumda88dad1995-01-26 00:46:29 +000020569have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020570{ echo "$as_me:$LINENO: checking for prototypes" >&5
20571echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020573/* confdefs.h. */
20574_ACEOF
20575cat confdefs.h >>conftest.$ac_ext
20576cat >>conftest.$ac_ext <<_ACEOF
20577/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020578int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020579int
20580main ()
20581{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020582return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020583 ;
20584 return 0;
20585}
20586_ACEOF
20587rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020588if { (ac_try="$ac_compile"
20589case "(($ac_try" in
20590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20591 *) ac_try_echo=$ac_try;;
20592esac
20593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020596 grep -v '^ *+' conftest.er1 >conftest.err
20597 rm -f conftest.er1
20598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020600 (exit $ac_status); } && {
20601 test -z "$ac_c_werror_flag" ||
20602 test ! -s conftest.err
20603 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020604
20605
20606cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020607#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020608_ACEOF
20609
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020610 have_prototypes=yes
20611
Guido van Rossumf78abae1997-01-21 22:02:36 +000020612else
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020614sed 's/^/| /' conftest.$ac_ext >&5
20615
Martin v. Löwiseba40652007-08-30 20:10:57 +000020616
Guido van Rossum7f43da71994-08-01 12:15:30 +000020617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618
20619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20620{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20621echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020622
Guido van Rossumda88dad1995-01-26 00:46:29 +000020623works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20625echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020627/* confdefs.h. */
20628_ACEOF
20629cat confdefs.h >>conftest.$ac_ext
20630cat >>conftest.$ac_ext <<_ACEOF
20631/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020632
20633#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020634int foo(int x, ...) {
20635 va_list va;
20636 va_start(va, x);
20637 va_arg(va, int);
20638 va_arg(va, char *);
20639 va_arg(va, double);
20640 return 0;
20641}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020642
Martin v. Löwis11437992002-04-12 09:54:03 +000020643int
20644main ()
20645{
Guido van Rossum90eea071996-08-30 20:58:57 +000020646return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 ;
20648 return 0;
20649}
20650_ACEOF
20651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652if { (ac_try="$ac_compile"
20653case "(($ac_try" in
20654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20655 *) ac_try_echo=$ac_try;;
20656esac
20657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020660 grep -v '^ *+' conftest.er1 >conftest.err
20661 rm -f conftest.er1
20662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020664 (exit $ac_status); } && {
20665 test -z "$ac_c_werror_flag" ||
20666 test ! -s conftest.err
20667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020668
20669
20670cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020671#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020672_ACEOF
20673
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020674 works=yes
20675
Guido van Rossumf78abae1997-01-21 22:02:36 +000020676else
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020678sed 's/^/| /' conftest.$ac_ext >&5
20679
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680
Guido van Rossum627b2d71993-12-24 10:39:16 +000020681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682
20683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20684{ echo "$as_me:$LINENO: result: $works" >&5
20685echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020686
Martin v. Löwisd6320502004-08-12 13:45:08 +000020687# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688{ echo "$as_me:$LINENO: checking for socketpair" >&5
20689echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020690cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020691/* confdefs.h. */
20692_ACEOF
20693cat confdefs.h >>conftest.$ac_ext
20694cat >>conftest.$ac_ext <<_ACEOF
20695/* end confdefs.h. */
20696
20697#include <sys/types.h>
20698#include <sys/socket.h>
20699
20700int
20701main ()
20702{
20703void *x=socketpair
20704 ;
20705 return 0;
20706}
20707_ACEOF
20708rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709if { (ac_try="$ac_compile"
20710case "(($ac_try" in
20711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20712 *) ac_try_echo=$ac_try;;
20713esac
20714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020717 grep -v '^ *+' conftest.er1 >conftest.err
20718 rm -f conftest.er1
20719 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020721 (exit $ac_status); } && {
20722 test -z "$ac_c_werror_flag" ||
20723 test ! -s conftest.err
20724 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020725
20726cat >>confdefs.h <<\_ACEOF
20727#define HAVE_SOCKETPAIR 1
20728_ACEOF
20729
Martin v. Löwiseba40652007-08-30 20:10:57 +000020730 { echo "$as_me:$LINENO: result: yes" >&5
20731echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020732else
20733 echo "$as_me: failed program was:" >&5
20734sed 's/^/| /' conftest.$ac_ext >&5
20735
Martin v. Löwiseba40652007-08-30 20:10:57 +000020736 { echo "$as_me:$LINENO: result: no" >&5
20737echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020738
20739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020740
20741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020742
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020743# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20745echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020746cat >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öwis01dfdb32001-06-23 16:30:13 +000020752#include <sys/types.h>
20753#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020754int
20755main ()
20756{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020757struct sockaddr x;
20758x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020759 ;
20760 return 0;
20761}
20762_ACEOF
20763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020764if { (ac_try="$ac_compile"
20765case "(($ac_try" in
20766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20767 *) ac_try_echo=$ac_try;;
20768esac
20769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020772 grep -v '^ *+' conftest.er1 >conftest.err
20773 rm -f conftest.er1
20774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 (exit $ac_status); } && {
20777 test -z "$ac_c_werror_flag" ||
20778 test ! -s conftest.err
20779 } && test -s conftest.$ac_objext; then
20780 { echo "$as_me:$LINENO: result: yes" >&5
20781echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020782
20783cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020784#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020785_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020786
20787else
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020789sed 's/^/| /' conftest.$ac_ext >&5
20790
Martin v. Löwiseba40652007-08-30 20:10:57 +000020791 { echo "$as_me:$LINENO: result: no" >&5
20792echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020794
20795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020796
Guido van Rossumda88dad1995-01-26 00:46:29 +000020797va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20799echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020801/* confdefs.h. */
20802_ACEOF
20803cat confdefs.h >>conftest.$ac_ext
20804cat >>conftest.$ac_ext <<_ACEOF
20805/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020806
20807#ifdef HAVE_STDARG_PROTOTYPES
20808#include <stdarg.h>
20809#else
20810#include <varargs.h>
20811#endif
20812
Martin v. Löwis11437992002-04-12 09:54:03 +000020813int
20814main ()
20815{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020816va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 ;
20818 return 0;
20819}
20820_ACEOF
20821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822if { (ac_try="$ac_compile"
20823case "(($ac_try" in
20824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20825 *) ac_try_echo=$ac_try;;
20826esac
20827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020830 grep -v '^ *+' conftest.er1 >conftest.err
20831 rm -f conftest.er1
20832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834 (exit $ac_status); } && {
20835 test -z "$ac_c_werror_flag" ||
20836 test ! -s conftest.err
20837 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020838 :
20839else
Martin v. Löwis11437992002-04-12 09:54:03 +000020840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020841sed 's/^/| /' conftest.$ac_ext >&5
20842
Martin v. Löwis11437992002-04-12 09:54:03 +000020843
20844
20845cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020846#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020847_ACEOF
20848
Guido van Rossumda88dad1995-01-26 00:46:29 +000020849 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020852
20853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20854{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20855echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020857# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020858
20859
20860
Martin v. Löwiseba40652007-08-30 20:10:57 +000020861{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20862echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020863if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20864 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020865else
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020867/* confdefs.h. */
20868_ACEOF
20869cat confdefs.h >>conftest.$ac_ext
20870cat >>conftest.$ac_ext <<_ACEOF
20871/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020872/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20873 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20874#define gethostbyname_r innocuous_gethostbyname_r
20875
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020876/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020877 which can conflict with char gethostbyname_r (); below.
20878 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020879 <limits.h> exists even on freestanding compilers. */
20880
20881#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020882# include <limits.h>
20883#else
20884# include <assert.h>
20885#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020886
20887#undef gethostbyname_r
20888
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889/* Override any GCC internal prototype to avoid an error.
20890 Use char because int might match the return type of a GCC
20891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020892#ifdef __cplusplus
20893extern "C"
20894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020895char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020896/* The GNU C library defines this for functions which it implements
20897 to always fail with ENOSYS. Some functions are actually named
20898 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020900choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020901#endif
20902
Skip Montanaro6dead952003-09-25 14:50:04 +000020903int
20904main ()
20905{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020907 ;
20908 return 0;
20909}
20910_ACEOF
20911rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020912if { (ac_try="$ac_link"
20913case "(($ac_try" in
20914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20915 *) ac_try_echo=$ac_try;;
20916esac
20917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20918 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020920 grep -v '^ *+' conftest.er1 >conftest.err
20921 rm -f conftest.er1
20922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020924 (exit $ac_status); } && {
20925 test -z "$ac_c_werror_flag" ||
20926 test ! -s conftest.err
20927 } && test -s conftest$ac_exeext &&
20928 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020929 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020930else
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020932sed 's/^/| /' conftest.$ac_ext >&5
20933
Martin v. Löwiseba40652007-08-30 20:10:57 +000020934 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020936
20937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020938 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020940{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20941echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020942if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020943
Martin v. Löwis11437992002-04-12 09:54:03 +000020944 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020945#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020946_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020947
Martin v. Löwiseba40652007-08-30 20:10:57 +000020948 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20949echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020950 OLD_CFLAGS=$CFLAGS
20951 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020953/* confdefs.h. */
20954_ACEOF
20955cat confdefs.h >>conftest.$ac_ext
20956cat >>conftest.$ac_ext <<_ACEOF
20957/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020958
20959# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020960
Martin v. Löwis11437992002-04-12 09:54:03 +000020961int
20962main ()
20963{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020964
20965 char *name;
20966 struct hostent *he, *res;
20967 char buffer[2048];
20968 int buflen = 2048;
20969 int h_errnop;
20970
20971 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020972
20973 ;
20974 return 0;
20975}
20976_ACEOF
20977rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020978if { (ac_try="$ac_compile"
20979case "(($ac_try" in
20980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20981 *) ac_try_echo=$ac_try;;
20982esac
20983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020986 grep -v '^ *+' conftest.er1 >conftest.err
20987 rm -f conftest.er1
20988 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020990 (exit $ac_status); } && {
20991 test -z "$ac_c_werror_flag" ||
20992 test ! -s conftest.err
20993 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020994
20995 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020996#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020997_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020998
Martin v. Löwis11437992002-04-12 09:54:03 +000020999
21000cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021001#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021002_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021003
Martin v. Löwiseba40652007-08-30 20:10:57 +000021004 { echo "$as_me:$LINENO: result: yes" >&5
21005echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021007else
Martin v. Löwis11437992002-04-12 09:54:03 +000021008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021009sed 's/^/| /' conftest.$ac_ext >&5
21010
Martin v. Löwis11437992002-04-12 09:54:03 +000021011
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012 { echo "$as_me:$LINENO: result: no" >&5
21013echo "${ECHO_T}no" >&6; }
21014 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21015echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021017/* confdefs.h. */
21018_ACEOF
21019cat confdefs.h >>conftest.$ac_ext
21020cat >>conftest.$ac_ext <<_ACEOF
21021/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021022
21023# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021024
Martin v. Löwis11437992002-04-12 09:54:03 +000021025int
21026main ()
21027{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021028
21029 char *name;
21030 struct hostent *he;
21031 char buffer[2048];
21032 int buflen = 2048;
21033 int h_errnop;
21034
21035 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021036
21037 ;
21038 return 0;
21039}
21040_ACEOF
21041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042if { (ac_try="$ac_compile"
21043case "(($ac_try" in
21044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21045 *) ac_try_echo=$ac_try;;
21046esac
21047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021050 grep -v '^ *+' conftest.er1 >conftest.err
21051 rm -f conftest.er1
21052 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021054 (exit $ac_status); } && {
21055 test -z "$ac_c_werror_flag" ||
21056 test ! -s conftest.err
21057 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021058
21059 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021060#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021061_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021062
Martin v. Löwis11437992002-04-12 09:54:03 +000021063
21064cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021065#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021066_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021067
Martin v. Löwiseba40652007-08-30 20:10:57 +000021068 { echo "$as_me:$LINENO: result: yes" >&5
21069echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021070
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021071else
Martin v. Löwis11437992002-04-12 09:54:03 +000021072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021073sed 's/^/| /' conftest.$ac_ext >&5
21074
Martin v. Löwis11437992002-04-12 09:54:03 +000021075
Martin v. Löwiseba40652007-08-30 20:10:57 +000021076 { echo "$as_me:$LINENO: result: no" >&5
21077echo "${ECHO_T}no" >&6; }
21078 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21079echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021081/* confdefs.h. */
21082_ACEOF
21083cat confdefs.h >>conftest.$ac_ext
21084cat >>conftest.$ac_ext <<_ACEOF
21085/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021086
21087# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021088
Martin v. Löwis11437992002-04-12 09:54:03 +000021089int
21090main ()
21091{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021092
21093 char *name;
21094 struct hostent *he;
21095 struct hostent_data data;
21096
21097 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021098
21099 ;
21100 return 0;
21101}
21102_ACEOF
21103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104if { (ac_try="$ac_compile"
21105case "(($ac_try" in
21106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21107 *) ac_try_echo=$ac_try;;
21108esac
21109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021112 grep -v '^ *+' conftest.er1 >conftest.err
21113 rm -f conftest.er1
21114 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021116 (exit $ac_status); } && {
21117 test -z "$ac_c_werror_flag" ||
21118 test ! -s conftest.err
21119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021120
21121 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021122#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021123_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021124
Martin v. Löwis11437992002-04-12 09:54:03 +000021125
21126cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021127#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021128_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021129
Martin v. Löwiseba40652007-08-30 20:10:57 +000021130 { echo "$as_me:$LINENO: result: yes" >&5
21131echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021132
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021133else
Martin v. Löwis11437992002-04-12 09:54:03 +000021134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021135sed 's/^/| /' conftest.$ac_ext >&5
21136
Martin v. Löwis11437992002-04-12 09:54:03 +000021137
Martin v. Löwiseba40652007-08-30 20:10:57 +000021138 { echo "$as_me:$LINENO: result: no" >&5
21139echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021140
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021142
21143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021144
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021146
21147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021150
21151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021152 CFLAGS=$OLD_CFLAGS
21153
21154else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021155
Martin v. Löwis11437992002-04-12 09:54:03 +000021156
21157for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021158do
Martin v. Löwis11437992002-04-12 09:54:03 +000021159as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021160{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21161echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21162if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021164else
Martin v. Löwis11437992002-04-12 09:54:03 +000021165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021166/* confdefs.h. */
21167_ACEOF
21168cat confdefs.h >>conftest.$ac_ext
21169cat >>conftest.$ac_ext <<_ACEOF
21170/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021171/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21172 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21173#define $ac_func innocuous_$ac_func
21174
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021175/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021176 which can conflict with char $ac_func (); below.
21177 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021178 <limits.h> exists even on freestanding compilers. */
21179
21180#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021181# include <limits.h>
21182#else
21183# include <assert.h>
21184#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021185
21186#undef $ac_func
21187
Martin v. Löwiseba40652007-08-30 20:10:57 +000021188/* Override any GCC internal prototype to avoid an error.
21189 Use char because int might match the return type of a GCC
21190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021191#ifdef __cplusplus
21192extern "C"
21193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021194char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021195/* The GNU C library defines this for functions which it implements
21196 to always fail with ENOSYS. Some functions are actually named
21197 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021199choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021200#endif
21201
Skip Montanaro6dead952003-09-25 14:50:04 +000021202int
21203main ()
21204{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021206 ;
21207 return 0;
21208}
21209_ACEOF
21210rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021211if { (ac_try="$ac_link"
21212case "(($ac_try" in
21213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21214 *) ac_try_echo=$ac_try;;
21215esac
21216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21217 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021219 grep -v '^ *+' conftest.er1 >conftest.err
21220 rm -f conftest.er1
21221 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223 (exit $ac_status); } && {
21224 test -z "$ac_c_werror_flag" ||
21225 test ! -s conftest.err
21226 } && test -s conftest$ac_exeext &&
21227 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021229else
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021231sed 's/^/| /' conftest.$ac_ext >&5
21232
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235
21236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021237 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021239ac_res=`eval echo '${'$as_ac_var'}'`
21240 { echo "$as_me:$LINENO: result: $ac_res" >&5
21241echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021242if test `eval echo '${'$as_ac_var'}'` = yes; then
21243 cat >>confdefs.h <<_ACEOF
21244#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21245_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021246
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021247fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021248done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021249
Michael W. Hudson54241132001-12-07 15:38:26 +000021250
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021251fi
21252
Michael W. Hudson54241132001-12-07 15:38:26 +000021253
21254
21255
21256
21257
21258
Guido van Rossum627b2d71993-12-24 10:39:16 +000021259# checks for system services
21260# (none yet)
21261
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021262# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021263{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21264echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021265if test "${ac_cv_func___fpu_control+set}" = set; then
21266 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021267else
Martin v. Löwis11437992002-04-12 09:54:03 +000021268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021274/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21275 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21276#define __fpu_control innocuous___fpu_control
21277
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021278/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021279 which can conflict with char __fpu_control (); below.
21280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021281 <limits.h> exists even on freestanding compilers. */
21282
21283#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021284# include <limits.h>
21285#else
21286# include <assert.h>
21287#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021288
21289#undef __fpu_control
21290
Martin v. Löwiseba40652007-08-30 20:10:57 +000021291/* Override any GCC internal prototype to avoid an error.
21292 Use char because int might match the return type of a GCC
21293 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021294#ifdef __cplusplus
21295extern "C"
21296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021297char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021298/* The GNU C library defines this for functions which it implements
21299 to always fail with ENOSYS. Some functions are actually named
21300 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021302choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021303#endif
21304
Skip Montanaro6dead952003-09-25 14:50:04 +000021305int
21306main ()
21307{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021309 ;
21310 return 0;
21311}
21312_ACEOF
21313rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021314if { (ac_try="$ac_link"
21315case "(($ac_try" in
21316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21317 *) ac_try_echo=$ac_try;;
21318esac
21319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21320 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021322 grep -v '^ *+' conftest.er1 >conftest.err
21323 rm -f conftest.er1
21324 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326 (exit $ac_status); } && {
21327 test -z "$ac_c_werror_flag" ||
21328 test ! -s conftest.err
21329 } && test -s conftest$ac_exeext &&
21330 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021332else
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021334sed 's/^/| /' conftest.$ac_ext >&5
21335
Martin v. Löwiseba40652007-08-30 20:10:57 +000021336 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021338
21339rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021340 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021342{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21343echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021344if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021345 :
21346else
Martin v. Löwis11437992002-04-12 09:54:03 +000021347
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21349echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021350if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21351 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021352else
Martin v. Löwis11437992002-04-12 09:54:03 +000021353 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021354LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021355cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021356/* confdefs.h. */
21357_ACEOF
21358cat confdefs.h >>conftest.$ac_ext
21359cat >>conftest.$ac_ext <<_ACEOF
21360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021361
Martin v. Löwiseba40652007-08-30 20:10:57 +000021362/* Override any GCC internal prototype to avoid an error.
21363 Use char because int might match the return type of a GCC
21364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021365#ifdef __cplusplus
21366extern "C"
21367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021368char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021369int
21370main ()
21371{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021373 ;
21374 return 0;
21375}
21376_ACEOF
21377rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378if { (ac_try="$ac_link"
21379case "(($ac_try" in
21380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21381 *) ac_try_echo=$ac_try;;
21382esac
21383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21384 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021386 grep -v '^ *+' conftest.er1 >conftest.err
21387 rm -f conftest.er1
21388 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390 (exit $ac_status); } && {
21391 test -z "$ac_c_werror_flag" ||
21392 test ! -s conftest.err
21393 } && test -s conftest$ac_exeext &&
21394 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021396else
Martin v. Löwis11437992002-04-12 09:54:03 +000021397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021398sed 's/^/| /' conftest.$ac_ext >&5
21399
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402
21403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021405LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021407{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21408echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021409if test $ac_cv_lib_ieee___fpu_control = yes; then
21410 cat >>confdefs.h <<_ACEOF
21411#define HAVE_LIBIEEE 1
21412_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021413
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021414 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021415
Guido van Rossum627b2d71993-12-24 10:39:16 +000021416fi
21417
Michael W. Hudson54241132001-12-07 15:38:26 +000021418
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021419fi
21420
Michael W. Hudson54241132001-12-07 15:38:26 +000021421
Guido van Rossum7f253911997-05-09 02:42:48 +000021422# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021423{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21424echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021425
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021427if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021428 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021429if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021430then
21431
21432cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021433#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021434_ACEOF
21435
Martin v. Löwiseba40652007-08-30 20:10:57 +000021436 { echo "$as_me:$LINENO: result: yes" >&5
21437echo "${ECHO_T}yes" >&6; }
21438else { echo "$as_me:$LINENO: result: no" >&5
21439echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021440fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021441else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021442 { echo "$as_me:$LINENO: result: no" >&5
21443echo "${ECHO_T}no" >&6; }
21444fi
21445
Guido van Rossum7f253911997-05-09 02:42:48 +000021446
Guido van Rossum7f43da71994-08-01 12:15:30 +000021447# check for --with-libm=...
21448
Guido van Rossum563e7081996-09-10 18:20:48 +000021449case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021450Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021451BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021452*) LIBM=-lm
21453esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021454{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21455echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021456
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021458if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021460if test "$withval" = no
21461then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21463echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021464elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021465then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21467echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021468else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21469echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21470 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021471fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021472else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021473 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21474echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21475fi
21476
Guido van Rossum7f43da71994-08-01 12:15:30 +000021477
21478# check for --with-libc=...
21479
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21481echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021482
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021484if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021485 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021486if test "$withval" = no
21487then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021488 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21489echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021490elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021491then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21493echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021494else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21495echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21496 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021497fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021498else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021499 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21500echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21501fi
21502
Guido van Rossum7f43da71994-08-01 12:15:30 +000021503
Christian Heimes0a8143f2007-12-18 23:22:54 +000021504# ************************************
21505# * Check for mathematical functions *
21506# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021507
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021508LIBS_SAVE=$LIBS
21509LIBS="$LIBS $LIBM"
21510
Mark Dickinson265d7382008-04-21 22:32:24 +000021511# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21512# -0. on some architectures.
21513{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21514echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21515if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21516 echo $ECHO_N "(cached) $ECHO_C" >&6
21517else
21518
21519if test "$cross_compiling" = yes; then
21520 ac_cv_tanh_preserves_zero_sign=no
21521else
21522 cat >conftest.$ac_ext <<_ACEOF
21523/* confdefs.h. */
21524_ACEOF
21525cat confdefs.h >>conftest.$ac_ext
21526cat >>conftest.$ac_ext <<_ACEOF
21527/* end confdefs.h. */
21528
21529#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021530#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021531int main() {
21532 /* return 0 if either negative zeros don't exist
21533 on this platform or if negative zeros exist
21534 and tanh(-0.) == -0. */
21535 if (atan2(0., -1.) == atan2(-0., -1.) ||
21536 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21537 else exit(1);
21538}
21539
21540_ACEOF
21541rm -f conftest$ac_exeext
21542if { (ac_try="$ac_link"
21543case "(($ac_try" in
21544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21545 *) ac_try_echo=$ac_try;;
21546esac
21547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21548 (eval "$ac_link") 2>&5
21549 ac_status=$?
21550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21552 { (case "(($ac_try" in
21553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21554 *) ac_try_echo=$ac_try;;
21555esac
21556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21557 (eval "$ac_try") 2>&5
21558 ac_status=$?
21559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21560 (exit $ac_status); }; }; then
21561 ac_cv_tanh_preserves_zero_sign=yes
21562else
21563 echo "$as_me: program exited with status $ac_status" >&5
21564echo "$as_me: failed program was:" >&5
21565sed 's/^/| /' conftest.$ac_ext >&5
21566
21567( exit $ac_status )
21568ac_cv_tanh_preserves_zero_sign=no
21569fi
21570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21571fi
21572
21573
21574fi
21575
21576{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21577echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21578if test "$ac_cv_tanh_preserves_zero_sign" = yes
21579then
21580
21581cat >>confdefs.h <<\_ACEOF
21582#define TANH_PRESERVES_ZERO_SIGN 1
21583_ACEOF
21584
21585fi
21586
Martin v. Löwis11437992002-04-12 09:54:03 +000021587
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021588for ac_func in hypot
21589do
Martin v. Löwis11437992002-04-12 09:54:03 +000021590as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021591{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21592echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21593if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021594 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021595else
Martin v. Löwis11437992002-04-12 09:54:03 +000021596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021597/* confdefs.h. */
21598_ACEOF
21599cat confdefs.h >>conftest.$ac_ext
21600cat >>conftest.$ac_ext <<_ACEOF
21601/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021602/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21603 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21604#define $ac_func innocuous_$ac_func
21605
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021606/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021607 which can conflict with char $ac_func (); below.
21608 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021609 <limits.h> exists even on freestanding compilers. */
21610
21611#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021612# include <limits.h>
21613#else
21614# include <assert.h>
21615#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021616
21617#undef $ac_func
21618
Martin v. Löwiseba40652007-08-30 20:10:57 +000021619/* Override any GCC internal prototype to avoid an error.
21620 Use char because int might match the return type of a GCC
21621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021622#ifdef __cplusplus
21623extern "C"
21624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021625char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021626/* The GNU C library defines this for functions which it implements
21627 to always fail with ENOSYS. Some functions are actually named
21628 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021629#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021630choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021631#endif
21632
Skip Montanaro6dead952003-09-25 14:50:04 +000021633int
21634main ()
21635{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021637 ;
21638 return 0;
21639}
21640_ACEOF
21641rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021642if { (ac_try="$ac_link"
21643case "(($ac_try" in
21644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21645 *) ac_try_echo=$ac_try;;
21646esac
21647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21648 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021650 grep -v '^ *+' conftest.er1 >conftest.err
21651 rm -f conftest.er1
21652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654 (exit $ac_status); } && {
21655 test -z "$ac_c_werror_flag" ||
21656 test ! -s conftest.err
21657 } && test -s conftest$ac_exeext &&
21658 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021659 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021660else
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021662sed 's/^/| /' conftest.$ac_ext >&5
21663
Martin v. Löwiseba40652007-08-30 20:10:57 +000021664 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021666
21667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021668 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021670ac_res=`eval echo '${'$as_ac_var'}'`
21671 { echo "$as_me:$LINENO: result: $ac_res" >&5
21672echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021673if test `eval echo '${'$as_ac_var'}'` = yes; then
21674 cat >>confdefs.h <<_ACEOF
21675#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21676_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021677
Michael W. Hudson54241132001-12-07 15:38:26 +000021678else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021679 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021680 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21682 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021683esac
21684
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021685fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021686done
21687
Michael W. Hudson54241132001-12-07 15:38:26 +000021688
Christian Heimes0a8143f2007-12-18 23:22:54 +000021689
21690
21691
21692
21693
Christian Heimes48723512008-01-20 14:28:28 +000021694
21695
21696
21697
21698
21699for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021700do
21701as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21702{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21703echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21704if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21705 echo $ECHO_N "(cached) $ECHO_C" >&6
21706else
21707 cat >conftest.$ac_ext <<_ACEOF
21708/* confdefs.h. */
21709_ACEOF
21710cat confdefs.h >>conftest.$ac_ext
21711cat >>conftest.$ac_ext <<_ACEOF
21712/* end confdefs.h. */
21713/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21714 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21715#define $ac_func innocuous_$ac_func
21716
21717/* System header to define __stub macros and hopefully few prototypes,
21718 which can conflict with char $ac_func (); below.
21719 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21720 <limits.h> exists even on freestanding compilers. */
21721
21722#ifdef __STDC__
21723# include <limits.h>
21724#else
21725# include <assert.h>
21726#endif
21727
21728#undef $ac_func
21729
21730/* Override any GCC internal prototype to avoid an error.
21731 Use char because int might match the return type of a GCC
21732 builtin and then its argument prototype would still apply. */
21733#ifdef __cplusplus
21734extern "C"
21735#endif
21736char $ac_func ();
21737/* The GNU C library defines this for functions which it implements
21738 to always fail with ENOSYS. Some functions are actually named
21739 something starting with __ and the normal name is an alias. */
21740#if defined __stub_$ac_func || defined __stub___$ac_func
21741choke me
21742#endif
21743
21744int
21745main ()
21746{
21747return $ac_func ();
21748 ;
21749 return 0;
21750}
21751_ACEOF
21752rm -f conftest.$ac_objext conftest$ac_exeext
21753if { (ac_try="$ac_link"
21754case "(($ac_try" in
21755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21756 *) ac_try_echo=$ac_try;;
21757esac
21758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21759 (eval "$ac_link") 2>conftest.er1
21760 ac_status=$?
21761 grep -v '^ *+' conftest.er1 >conftest.err
21762 rm -f conftest.er1
21763 cat conftest.err >&5
21764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21765 (exit $ac_status); } && {
21766 test -z "$ac_c_werror_flag" ||
21767 test ! -s conftest.err
21768 } && test -s conftest$ac_exeext &&
21769 $as_test_x conftest$ac_exeext; then
21770 eval "$as_ac_var=yes"
21771else
21772 echo "$as_me: failed program was:" >&5
21773sed 's/^/| /' conftest.$ac_ext >&5
21774
21775 eval "$as_ac_var=no"
21776fi
21777
21778rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21779 conftest$ac_exeext conftest.$ac_ext
21780fi
21781ac_res=`eval echo '${'$as_ac_var'}'`
21782 { echo "$as_me:$LINENO: result: $ac_res" >&5
21783echo "${ECHO_T}$ac_res" >&6; }
21784if test `eval echo '${'$as_ac_var'}'` = yes; then
21785 cat >>confdefs.h <<_ACEOF
21786#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21787_ACEOF
21788
21789fi
21790done
21791
21792
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021793LIBS=$LIBS_SAVE
21794
Guido van Rossumef2255b2000-03-10 22:30:29 +000021795# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021796if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21798echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021799if test "${ac_cv_header_wchar_h+set}" = set; then
21800 echo $ECHO_N "(cached) $ECHO_C" >&6
21801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21803echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021804else
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021806{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21807echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021809/* confdefs.h. */
21810_ACEOF
21811cat confdefs.h >>conftest.$ac_ext
21812cat >>conftest.$ac_ext <<_ACEOF
21813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021814$ac_includes_default
21815#include <wchar.h>
21816_ACEOF
21817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818if { (ac_try="$ac_compile"
21819case "(($ac_try" in
21820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21821 *) ac_try_echo=$ac_try;;
21822esac
21823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021826 grep -v '^ *+' conftest.er1 >conftest.err
21827 rm -f conftest.er1
21828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021830 (exit $ac_status); } && {
21831 test -z "$ac_c_werror_flag" ||
21832 test ! -s conftest.err
21833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ac_header_compiler=yes
21835else
21836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021837sed 's/^/| /' conftest.$ac_ext >&5
21838
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021841
21842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21843{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21844echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021845
21846# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021847{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21848echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021849cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021850/* confdefs.h. */
21851_ACEOF
21852cat confdefs.h >>conftest.$ac_ext
21853cat >>conftest.$ac_ext <<_ACEOF
21854/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021855#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021856_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857if { (ac_try="$ac_cpp conftest.$ac_ext"
21858case "(($ac_try" in
21859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21860 *) ac_try_echo=$ac_try;;
21861esac
21862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21863 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021864 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021865 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021866 rm -f conftest.er1
21867 cat conftest.err >&5
21868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021869 (exit $ac_status); } >/dev/null && {
21870 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21871 test ! -s conftest.err
21872 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021873 ac_header_preproc=yes
21874else
21875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021876sed 's/^/| /' conftest.$ac_ext >&5
21877
Martin v. Löwis11437992002-04-12 09:54:03 +000021878 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880
Martin v. Löwis11437992002-04-12 09:54:03 +000021881rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21883echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021884
21885# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021886case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21887 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021888 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21889echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021890 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21891echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21892 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021893 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021894 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021895 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21896echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021897 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21898echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21899 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21900echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21901 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21902echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021903 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21904echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021905 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21906echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021907 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021908## ------------------------------------------------ ##
21909## Report this to http://www.python.org/python-bugs ##
21910## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021911_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021913 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021914esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21916echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021917if test "${ac_cv_header_wchar_h+set}" = set; then
21918 echo $ECHO_N "(cached) $ECHO_C" >&6
21919else
21920 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021922{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21923echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021924
21925fi
21926if test $ac_cv_header_wchar_h = yes; then
21927
21928
21929cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021930#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021931_ACEOF
21932
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021933 wchar_h="yes"
21934
Guido van Rossumef2255b2000-03-10 22:30:29 +000021935else
Martin v. Löwis11437992002-04-12 09:54:03 +000021936 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021937
21938fi
21939
Michael W. Hudson54241132001-12-07 15:38:26 +000021940
Martin v. Löwis11437992002-04-12 09:54:03 +000021941
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021942# determine wchar_t size
21943if test "$wchar_h" = yes
21944then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021945 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21946echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021947if test "${ac_cv_type_wchar_t+set}" = set; then
21948 echo $ECHO_N "(cached) $ECHO_C" >&6
21949else
21950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021951/* confdefs.h. */
21952_ACEOF
21953cat confdefs.h >>conftest.$ac_ext
21954cat >>conftest.$ac_ext <<_ACEOF
21955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021956#include <wchar.h>
21957
Martin v. Löwiseba40652007-08-30 20:10:57 +000021958typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021959int
21960main ()
21961{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021962if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021963 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021964if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021965 return 0;
21966 ;
21967 return 0;
21968}
21969_ACEOF
21970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021971if { (ac_try="$ac_compile"
21972case "(($ac_try" in
21973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21974 *) ac_try_echo=$ac_try;;
21975esac
21976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021979 grep -v '^ *+' conftest.er1 >conftest.err
21980 rm -f conftest.er1
21981 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021983 (exit $ac_status); } && {
21984 test -z "$ac_c_werror_flag" ||
21985 test ! -s conftest.err
21986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021987 ac_cv_type_wchar_t=yes
21988else
21989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021990sed 's/^/| /' conftest.$ac_ext >&5
21991
Martin v. Löwiseba40652007-08-30 20:10:57 +000021992 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021993fi
Brett Cannon19fab762007-06-02 03:02:29 +000021994
Martin v. Löwiseba40652007-08-30 20:10:57 +000021995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21996fi
21997{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21998echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21999
22000# The cast to long int works around a bug in the HP C Compiler
22001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22003# This bug is HP SR number 8606223364.
22004{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22005echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022006if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22007 echo $ECHO_N "(cached) $ECHO_C" >&6
22008else
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 if test "$cross_compiling" = yes; then
22010 # Depending upon the size, compute the lo and hi bounds.
22011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022012/* confdefs.h. */
22013_ACEOF
22014cat confdefs.h >>conftest.$ac_ext
22015cat >>conftest.$ac_ext <<_ACEOF
22016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022017#include <wchar.h>
22018
Martin v. Löwiseba40652007-08-30 20:10:57 +000022019 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022020int
22021main ()
22022{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022024test_array [0] = 0
22025
22026 ;
22027 return 0;
22028}
22029_ACEOF
22030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022031if { (ac_try="$ac_compile"
22032case "(($ac_try" in
22033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22034 *) ac_try_echo=$ac_try;;
22035esac
22036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022039 grep -v '^ *+' conftest.er1 >conftest.err
22040 rm -f conftest.er1
22041 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022043 (exit $ac_status); } && {
22044 test -z "$ac_c_werror_flag" ||
22045 test ! -s conftest.err
22046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022047 ac_lo=0 ac_mid=0
22048 while :; do
22049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022050/* confdefs.h. */
22051_ACEOF
22052cat confdefs.h >>conftest.$ac_ext
22053cat >>conftest.$ac_ext <<_ACEOF
22054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022055#include <wchar.h>
22056
Martin v. Löwiseba40652007-08-30 20:10:57 +000022057 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022058int
22059main ()
22060{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022062test_array [0] = 0
22063
22064 ;
22065 return 0;
22066}
22067_ACEOF
22068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069if { (ac_try="$ac_compile"
22070case "(($ac_try" in
22071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22072 *) ac_try_echo=$ac_try;;
22073esac
22074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022077 grep -v '^ *+' conftest.er1 >conftest.err
22078 rm -f conftest.er1
22079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081 (exit $ac_status); } && {
22082 test -z "$ac_c_werror_flag" ||
22083 test ! -s conftest.err
22084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022085 ac_hi=$ac_mid; break
22086else
22087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022088sed 's/^/| /' conftest.$ac_ext >&5
22089
Martin v. Löwiseba40652007-08-30 20:10:57 +000022090 ac_lo=`expr $ac_mid + 1`
22091 if test $ac_lo -le $ac_mid; then
22092 ac_lo= ac_hi=
22093 break
22094 fi
22095 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022097
22098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022099 done
22100else
22101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022102sed 's/^/| /' conftest.$ac_ext >&5
22103
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022105/* confdefs.h. */
22106_ACEOF
22107cat confdefs.h >>conftest.$ac_ext
22108cat >>conftest.$ac_ext <<_ACEOF
22109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022110#include <wchar.h>
22111
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022113int
22114main ()
22115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022117test_array [0] = 0
22118
22119 ;
22120 return 0;
22121}
22122_ACEOF
22123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022124if { (ac_try="$ac_compile"
22125case "(($ac_try" in
22126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22127 *) ac_try_echo=$ac_try;;
22128esac
22129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022132 grep -v '^ *+' conftest.er1 >conftest.err
22133 rm -f conftest.er1
22134 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136 (exit $ac_status); } && {
22137 test -z "$ac_c_werror_flag" ||
22138 test ! -s conftest.err
22139 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 ac_hi=-1 ac_mid=-1
22141 while :; do
22142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022143/* confdefs.h. */
22144_ACEOF
22145cat confdefs.h >>conftest.$ac_ext
22146cat >>conftest.$ac_ext <<_ACEOF
22147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022148#include <wchar.h>
22149
Martin v. Löwiseba40652007-08-30 20:10:57 +000022150 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022151int
22152main ()
22153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022155test_array [0] = 0
22156
22157 ;
22158 return 0;
22159}
22160_ACEOF
22161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022162if { (ac_try="$ac_compile"
22163case "(($ac_try" in
22164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22165 *) ac_try_echo=$ac_try;;
22166esac
22167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022170 grep -v '^ *+' conftest.er1 >conftest.err
22171 rm -f conftest.er1
22172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022174 (exit $ac_status); } && {
22175 test -z "$ac_c_werror_flag" ||
22176 test ! -s conftest.err
22177 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022178 ac_lo=$ac_mid; break
22179else
22180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022181sed 's/^/| /' conftest.$ac_ext >&5
22182
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183 ac_hi=`expr '(' $ac_mid ')' - 1`
22184 if test $ac_mid -le $ac_hi; then
22185 ac_lo= ac_hi=
22186 break
22187 fi
22188 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022190
22191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 done
22193else
22194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022195sed 's/^/| /' conftest.$ac_ext >&5
22196
Martin v. Löwiseba40652007-08-30 20:10:57 +000022197 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022199
22200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202
22203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022204# Binary search between lo and hi bounds.
22205while test "x$ac_lo" != "x$ac_hi"; do
22206 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022208/* confdefs.h. */
22209_ACEOF
22210cat confdefs.h >>conftest.$ac_ext
22211cat >>conftest.$ac_ext <<_ACEOF
22212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022213#include <wchar.h>
22214
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022216int
22217main ()
22218{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022220test_array [0] = 0
22221
22222 ;
22223 return 0;
22224}
22225_ACEOF
22226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022227if { (ac_try="$ac_compile"
22228case "(($ac_try" in
22229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22230 *) ac_try_echo=$ac_try;;
22231esac
22232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022235 grep -v '^ *+' conftest.er1 >conftest.err
22236 rm -f conftest.er1
22237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022239 (exit $ac_status); } && {
22240 test -z "$ac_c_werror_flag" ||
22241 test ! -s conftest.err
22242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022243 ac_hi=$ac_mid
22244else
22245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022246sed 's/^/| /' conftest.$ac_ext >&5
22247
Martin v. Löwiseba40652007-08-30 20:10:57 +000022248 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022250
22251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022252done
22253case $ac_lo in
22254?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022255'') if test "$ac_cv_type_wchar_t" = yes; then
22256 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022257See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022258echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022259See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260 { (exit 77); exit 77; }; }
22261 else
22262 ac_cv_sizeof_wchar_t=0
22263 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022264esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022265else
Martin v. Löwis11437992002-04-12 09:54:03 +000022266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022267/* confdefs.h. */
22268_ACEOF
22269cat confdefs.h >>conftest.$ac_ext
22270cat >>conftest.$ac_ext <<_ACEOF
22271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022272#include <wchar.h>
22273
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274 typedef wchar_t ac__type_sizeof_;
22275static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22276static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022277#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022278#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022279int
22280main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022281{
Martin v. Löwis11437992002-04-12 09:54:03 +000022282
22283 FILE *f = fopen ("conftest.val", "w");
22284 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022285 return 1;
22286 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022287 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288 long int i = longval ();
22289 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22290 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022291 fprintf (f, "%ld\n", i);
22292 }
22293 else
22294 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022295 unsigned long int i = ulongval ();
22296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22297 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022298 fprintf (f, "%lu\n", i);
22299 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022300 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022301
22302 ;
22303 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022304}
Martin v. Löwis11437992002-04-12 09:54:03 +000022305_ACEOF
22306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022307if { (ac_try="$ac_link"
22308case "(($ac_try" in
22309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22310 *) ac_try_echo=$ac_try;;
22311esac
22312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022314 ac_status=$?
22315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 { (case "(($ac_try" in
22318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22319 *) ac_try_echo=$ac_try;;
22320esac
22321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 ac_status=$?
22324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22325 (exit $ac_status); }; }; then
22326 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022327else
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 echo "$as_me: program exited with status $ac_status" >&5
22329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022330sed 's/^/| /' conftest.$ac_ext >&5
22331
Martin v. Löwis11437992002-04-12 09:54:03 +000022332( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333if test "$ac_cv_type_wchar_t" = yes; then
22334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022335See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022336echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022337See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022338 { (exit 77); exit 77; }; }
22339 else
22340 ac_cv_sizeof_wchar_t=0
22341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000022344fi
22345rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022347{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22348echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22349
22350
22351
Martin v. Löwis11437992002-04-12 09:54:03 +000022352cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022353#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022354_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022355
Michael W. Hudson54241132001-12-07 15:38:26 +000022356
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022357fi
22358
Martin v. Löwiseba40652007-08-30 20:10:57 +000022359{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22360echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022361have_ucs4_tcl=no
22362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022363/* confdefs.h. */
22364_ACEOF
22365cat confdefs.h >>conftest.$ac_ext
22366cat >>conftest.$ac_ext <<_ACEOF
22367/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022368
22369#include <tcl.h>
22370#if TCL_UTF_MAX != 6
22371# error "NOT UCS4_TCL"
22372#endif
22373int
22374main ()
22375{
22376
22377 ;
22378 return 0;
22379}
22380_ACEOF
22381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022382if { (ac_try="$ac_compile"
22383case "(($ac_try" in
22384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22385 *) ac_try_echo=$ac_try;;
22386esac
22387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022390 grep -v '^ *+' conftest.er1 >conftest.err
22391 rm -f conftest.er1
22392 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394 (exit $ac_status); } && {
22395 test -z "$ac_c_werror_flag" ||
22396 test ! -s conftest.err
22397 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022398
22399
22400cat >>confdefs.h <<\_ACEOF
22401#define HAVE_UCS4_TCL 1
22402_ACEOF
22403
22404 have_ucs4_tcl=yes
22405
22406else
22407 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
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412
22413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22414{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22415echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022416
Skip Montanaro6dead952003-09-25 14:50:04 +000022417# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022418if test "$wchar_h" = yes
22419then
22420 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022421 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22422echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022423 if test "${ac_cv_wchar_t_signed+set}" = set; then
22424 echo $ECHO_N "(cached) $ECHO_C" >&6
22425else
22426
22427 if test "$cross_compiling" = yes; then
22428 ac_cv_wchar_t_signed=yes
22429else
22430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022431/* confdefs.h. */
22432_ACEOF
22433cat confdefs.h >>conftest.$ac_ext
22434cat >>conftest.$ac_ext <<_ACEOF
22435/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022436
22437 #include <wchar.h>
22438 int main()
22439 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022440 /* Success: exit code 0 */
22441 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022442 }
22443
22444_ACEOF
22445rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446if { (ac_try="$ac_link"
22447case "(($ac_try" in
22448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22449 *) ac_try_echo=$ac_try;;
22450esac
22451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22452 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022453 ac_status=$?
22454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456 { (case "(($ac_try" in
22457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22458 *) ac_try_echo=$ac_try;;
22459esac
22460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22461 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022462 ac_status=$?
22463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22464 (exit $ac_status); }; }; then
22465 ac_cv_wchar_t_signed=yes
22466else
22467 echo "$as_me: program exited with status $ac_status" >&5
22468echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022469sed 's/^/| /' conftest.$ac_ext >&5
22470
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022471( exit $ac_status )
22472ac_cv_wchar_t_signed=no
22473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474rm -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 +000022475fi
22476
Martin v. Löwiseba40652007-08-30 20:10:57 +000022477
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022478fi
22479
Martin v. Löwiseba40652007-08-30 20:10:57 +000022480 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22481echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22482fi
22483
22484{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22485echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22486# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022487if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022488 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022489else
22490 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491fi
22492
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022493
22494if test $enable_unicode = yes
22495then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022496 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022497 case "$have_ucs4_tcl" in
22498 yes) enable_unicode="ucs4"
22499 ;;
22500 *) enable_unicode="ucs2"
22501 ;;
22502 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022503fi
22504
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022505
22506
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022507case "$enable_unicode" in
22508ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022509 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022510#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022511_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022512
22513 ;;
22514ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022515 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022516#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022517_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022518
22519 ;;
22520esac
22521
Michael W. Hudson54241132001-12-07 15:38:26 +000022522
Martin v. Löwis11437992002-04-12 09:54:03 +000022523
22524
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022525
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022526if test "$enable_unicode" = "no"
22527then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022528 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529 { echo "$as_me:$LINENO: result: not used" >&5
22530echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022531else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022532 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022533
22534cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022535#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022536_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022537
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022538
22539 # wchar_t is only usable if it maps to an unsigned type
22540 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022541 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022542 then
22543 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022544
Martin v. Löwis11437992002-04-12 09:54:03 +000022545cat >>confdefs.h <<\_ACEOF
22546#define HAVE_USABLE_WCHAR_T 1
22547_ACEOF
22548
22549 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022550#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022551_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022552
22553 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22554 then
22555 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022556 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022557#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022558_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022559
22560 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22561 then
22562 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022563 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022564#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022565_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022566
22567 else
22568 PY_UNICODE_TYPE="no type found"
22569 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22571echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022572fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022573
22574# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22576echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022577if test "${ac_cv_c_bigendian+set}" = set; then
22578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022579else
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 # See if sys/param.h defines the BYTE_ORDER macro.
22581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022582/* confdefs.h. */
22583_ACEOF
22584cat confdefs.h >>conftest.$ac_ext
22585cat >>conftest.$ac_ext <<_ACEOF
22586/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022587#include <sys/types.h>
22588#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022589
Martin v. Löwis11437992002-04-12 09:54:03 +000022590int
22591main ()
22592{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022593#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22594 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022595 bogus endian macros
22596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022597
22598 ;
22599 return 0;
22600}
22601_ACEOF
22602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022603if { (ac_try="$ac_compile"
22604case "(($ac_try" in
22605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22606 *) ac_try_echo=$ac_try;;
22607esac
22608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022611 grep -v '^ *+' conftest.er1 >conftest.err
22612 rm -f conftest.er1
22613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022615 (exit $ac_status); } && {
22616 test -z "$ac_c_werror_flag" ||
22617 test ! -s conftest.err
22618 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022619 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022621/* confdefs.h. */
22622_ACEOF
22623cat confdefs.h >>conftest.$ac_ext
22624cat >>conftest.$ac_ext <<_ACEOF
22625/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022626#include <sys/types.h>
22627#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022628
Martin v. Löwis11437992002-04-12 09:54:03 +000022629int
22630main ()
22631{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022632#if BYTE_ORDER != BIG_ENDIAN
22633 not big endian
22634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022635
22636 ;
22637 return 0;
22638}
22639_ACEOF
22640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641if { (ac_try="$ac_compile"
22642case "(($ac_try" in
22643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22644 *) ac_try_echo=$ac_try;;
22645esac
22646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022649 grep -v '^ *+' conftest.er1 >conftest.err
22650 rm -f conftest.er1
22651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022653 (exit $ac_status); } && {
22654 test -z "$ac_c_werror_flag" ||
22655 test ! -s conftest.err
22656 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022657 ac_cv_c_bigendian=yes
22658else
Martin v. Löwis11437992002-04-12 09:54:03 +000022659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022660sed 's/^/| /' conftest.$ac_ext >&5
22661
Martin v. Löwiseba40652007-08-30 20:10:57 +000022662 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664
22665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022666else
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022668sed 's/^/| /' conftest.$ac_ext >&5
22669
Martin v. Löwiseba40652007-08-30 20:10:57 +000022670 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022671if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022672 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 ac_cv_c_bigendian=unknown
22674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022675/* confdefs.h. */
22676_ACEOF
22677cat confdefs.h >>conftest.$ac_ext
22678cat >>conftest.$ac_ext <<_ACEOF
22679/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022680short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22681short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022682void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022683short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22684short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022685void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022686int
22687main ()
22688{
22689 _ascii (); _ebcdic ();
22690 ;
22691 return 0;
22692}
22693_ACEOF
22694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022695if { (ac_try="$ac_compile"
22696case "(($ac_try" in
22697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22698 *) ac_try_echo=$ac_try;;
22699esac
22700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022703 grep -v '^ *+' conftest.er1 >conftest.err
22704 rm -f conftest.er1
22705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707 (exit $ac_status); } && {
22708 test -z "$ac_c_werror_flag" ||
22709 test ! -s conftest.err
22710 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022711 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022712 ac_cv_c_bigendian=yes
22713fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022714if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022715 if test "$ac_cv_c_bigendian" = unknown; then
22716 ac_cv_c_bigendian=no
22717 else
22718 # finding both strings is unlikely to happen, but who knows?
22719 ac_cv_c_bigendian=unknown
22720 fi
22721fi
22722else
22723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022724sed 's/^/| /' conftest.$ac_ext >&5
22725
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726
Martin v. Löwis11437992002-04-12 09:54:03 +000022727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022728
22729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022730else
22731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022732/* confdefs.h. */
22733_ACEOF
22734cat confdefs.h >>conftest.$ac_ext
22735cat >>conftest.$ac_ext <<_ACEOF
22736/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022737$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022738int
22739main ()
22740{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022741
Guido van Rossumef2255b2000-03-10 22:30:29 +000022742 /* Are we little or big endian? From Harbison&Steele. */
22743 union
22744 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022745 long int l;
22746 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022747 } u;
22748 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022749 return u.c[sizeof (long int) - 1] == 1;
22750
22751 ;
22752 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022753}
Martin v. Löwis11437992002-04-12 09:54:03 +000022754_ACEOF
22755rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022756if { (ac_try="$ac_link"
22757case "(($ac_try" in
22758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22759 *) ac_try_echo=$ac_try;;
22760esac
22761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22762 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022763 ac_status=$?
22764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022766 { (case "(($ac_try" in
22767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22768 *) ac_try_echo=$ac_try;;
22769esac
22770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22771 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 ac_status=$?
22773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22774 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022775 ac_cv_c_bigendian=no
22776else
Martin v. Löwis11437992002-04-12 09:54:03 +000022777 echo "$as_me: program exited with status $ac_status" >&5
22778echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022779sed 's/^/| /' conftest.$ac_ext >&5
22780
Martin v. Löwis11437992002-04-12 09:54:03 +000022781( exit $ac_status )
22782ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022784rm -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 +000022785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786
22787
Martin v. Löwis11437992002-04-12 09:54:03 +000022788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789
22790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022792{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22793echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022794case $ac_cv_c_bigendian in
22795 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022796
Martin v. Löwis11437992002-04-12 09:54:03 +000022797cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022798#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022799_ACEOF
22800 ;;
22801 no)
22802 ;;
22803 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022804 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022805presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022806echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022807presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22808 { (exit 1); exit 1; }; } ;;
22809esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022810
Michael W. Hudson54241132001-12-07 15:38:26 +000022811
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022812# Check whether right shifting a negative integer extends the sign bit
22813# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22815echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022816if test "${ac_cv_rshift_extends_sign+set}" = set; then
22817 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022818else
Martin v. Löwis11437992002-04-12 09:54:03 +000022819
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022820if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022821 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022822else
Martin v. Löwis11437992002-04-12 09:54:03 +000022823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022824/* confdefs.h. */
22825_ACEOF
22826cat confdefs.h >>conftest.$ac_ext
22827cat >>conftest.$ac_ext <<_ACEOF
22828/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022829
22830int main()
22831{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022832 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022833}
22834
Martin v. Löwis11437992002-04-12 09:54:03 +000022835_ACEOF
22836rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837if { (ac_try="$ac_link"
22838case "(($ac_try" in
22839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22840 *) ac_try_echo=$ac_try;;
22841esac
22842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22843 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022844 ac_status=$?
22845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22846 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022847 { (case "(($ac_try" in
22848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22849 *) ac_try_echo=$ac_try;;
22850esac
22851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22852 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022853 ac_status=$?
22854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22855 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022856 ac_cv_rshift_extends_sign=yes
22857else
Martin v. Löwis11437992002-04-12 09:54:03 +000022858 echo "$as_me: program exited with status $ac_status" >&5
22859echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022860sed 's/^/| /' conftest.$ac_ext >&5
22861
Martin v. Löwis11437992002-04-12 09:54:03 +000022862( exit $ac_status )
22863ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865rm -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 +000022866fi
22867
Martin v. Löwiseba40652007-08-30 20:10:57 +000022868
22869fi
22870
22871{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22872echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022873if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022874then
Martin v. Löwis11437992002-04-12 09:54:03 +000022875
22876cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022877#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022878_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022879
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022880fi
22881
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022882# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22884echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022885if test "${ac_cv_have_getc_unlocked+set}" = set; then
22886 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022887else
Martin v. Löwis11437992002-04-12 09:54:03 +000022888
22889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022890/* confdefs.h. */
22891_ACEOF
22892cat confdefs.h >>conftest.$ac_ext
22893cat >>conftest.$ac_ext <<_ACEOF
22894/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022895#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022896int
22897main ()
22898{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022899
22900 FILE *f = fopen("/dev/null", "r");
22901 flockfile(f);
22902 getc_unlocked(f);
22903 funlockfile(f);
22904
Martin v. Löwis11437992002-04-12 09:54:03 +000022905 ;
22906 return 0;
22907}
22908_ACEOF
22909rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910if { (ac_try="$ac_link"
22911case "(($ac_try" in
22912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22913 *) ac_try_echo=$ac_try;;
22914esac
22915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22916 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022918 grep -v '^ *+' conftest.er1 >conftest.err
22919 rm -f conftest.er1
22920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922 (exit $ac_status); } && {
22923 test -z "$ac_c_werror_flag" ||
22924 test ! -s conftest.err
22925 } && test -s conftest$ac_exeext &&
22926 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022927 ac_cv_have_getc_unlocked=yes
22928else
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022930sed 's/^/| /' conftest.$ac_ext >&5
22931
Martin v. Löwiseba40652007-08-30 20:10:57 +000022932 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022934
22935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022936 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022937fi
22938
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22940echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022941if test "$ac_cv_have_getc_unlocked" = yes
22942then
Martin v. Löwis11437992002-04-12 09:54:03 +000022943
22944cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022945#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022946_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022947
22948fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022949
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022950# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022951# save the value of LIBS so we don't actually link Python with readline
22952LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022953
Martin v. Löwiseba40652007-08-30 20:10:57 +000022954{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22955echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022956if test "${ac_cv_lib_readline_readline+set}" = set; then
22957 echo $ECHO_N "(cached) $ECHO_C" >&6
22958else
22959 ac_check_lib_save_LIBS=$LIBS
22960LIBS="-lreadline $LIBS"
22961cat >conftest.$ac_ext <<_ACEOF
22962/* confdefs.h. */
22963_ACEOF
22964cat confdefs.h >>conftest.$ac_ext
22965cat >>conftest.$ac_ext <<_ACEOF
22966/* end confdefs.h. */
22967
Martin v. Löwiseba40652007-08-30 20:10:57 +000022968/* Override any GCC internal prototype to avoid an error.
22969 Use char because int might match the return type of a GCC
22970 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022971#ifdef __cplusplus
22972extern "C"
22973#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022974char readline ();
22975int
22976main ()
22977{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022979 ;
22980 return 0;
22981}
22982_ACEOF
22983rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022984if { (ac_try="$ac_link"
22985case "(($ac_try" in
22986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22987 *) ac_try_echo=$ac_try;;
22988esac
22989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22990 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022991 ac_status=$?
22992 grep -v '^ *+' conftest.er1 >conftest.err
22993 rm -f conftest.er1
22994 cat conftest.err >&5
22995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996 (exit $ac_status); } && {
22997 test -z "$ac_c_werror_flag" ||
22998 test ! -s conftest.err
22999 } && test -s conftest$ac_exeext &&
23000 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023001 ac_cv_lib_readline_readline=yes
23002else
23003 echo "$as_me: failed program was:" >&5
23004sed 's/^/| /' conftest.$ac_ext >&5
23005
Martin v. Löwiseba40652007-08-30 20:10:57 +000023006 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008
23009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023010 conftest$ac_exeext conftest.$ac_ext
23011LIBS=$ac_check_lib_save_LIBS
23012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
23014echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023015if test $ac_cv_lib_readline_readline = yes; then
23016 cat >>confdefs.h <<_ACEOF
23017#define HAVE_LIBREADLINE 1
23018_ACEOF
23019
23020 LIBS="-lreadline $LIBS"
23021
23022fi
23023
23024if test "$ac_cv_have_readline_readline" = no
23025then
23026
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
23028echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023029if test "${ac_cv_lib_termcap_readline+set}" = set; then
23030 echo $ECHO_N "(cached) $ECHO_C" >&6
23031else
23032 ac_check_lib_save_LIBS=$LIBS
23033LIBS="-ltermcap $LIBS"
23034cat >conftest.$ac_ext <<_ACEOF
23035/* confdefs.h. */
23036_ACEOF
23037cat confdefs.h >>conftest.$ac_ext
23038cat >>conftest.$ac_ext <<_ACEOF
23039/* end confdefs.h. */
23040
Martin v. Löwiseba40652007-08-30 20:10:57 +000023041/* Override any GCC internal prototype to avoid an error.
23042 Use char because int might match the return type of a GCC
23043 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023044#ifdef __cplusplus
23045extern "C"
23046#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023047char readline ();
23048int
23049main ()
23050{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023051return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023052 ;
23053 return 0;
23054}
23055_ACEOF
23056rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023057if { (ac_try="$ac_link"
23058case "(($ac_try" in
23059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23060 *) ac_try_echo=$ac_try;;
23061esac
23062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23063 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023064 ac_status=$?
23065 grep -v '^ *+' conftest.er1 >conftest.err
23066 rm -f conftest.er1
23067 cat conftest.err >&5
23068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069 (exit $ac_status); } && {
23070 test -z "$ac_c_werror_flag" ||
23071 test ! -s conftest.err
23072 } && test -s conftest$ac_exeext &&
23073 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023074 ac_cv_lib_termcap_readline=yes
23075else
23076 echo "$as_me: failed program was:" >&5
23077sed 's/^/| /' conftest.$ac_ext >&5
23078
Martin v. Löwiseba40652007-08-30 20:10:57 +000023079 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023081
23082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023083 conftest$ac_exeext conftest.$ac_ext
23084LIBS=$ac_check_lib_save_LIBS
23085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023086{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
23087echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023088if test $ac_cv_lib_termcap_readline = yes; then
23089 cat >>confdefs.h <<_ACEOF
23090#define HAVE_LIBTERMCAP 1
23091_ACEOF
23092
23093 LIBS="-ltermcap $LIBS"
23094
23095fi
23096
23097fi
23098
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023099# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023100{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23101echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023102if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23103 echo $ECHO_N "(cached) $ECHO_C" >&6
23104else
23105 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023106LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023107cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023108/* confdefs.h. */
23109_ACEOF
23110cat confdefs.h >>conftest.$ac_ext
23111cat >>conftest.$ac_ext <<_ACEOF
23112/* end confdefs.h. */
23113
Martin v. Löwiseba40652007-08-30 20:10:57 +000023114/* Override any GCC internal prototype to avoid an error.
23115 Use char because int might match the return type of a GCC
23116 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023117#ifdef __cplusplus
23118extern "C"
23119#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023120char rl_callback_handler_install ();
23121int
23122main ()
23123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023125 ;
23126 return 0;
23127}
23128_ACEOF
23129rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023130if { (ac_try="$ac_link"
23131case "(($ac_try" in
23132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23133 *) ac_try_echo=$ac_try;;
23134esac
23135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23136 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023138 grep -v '^ *+' conftest.er1 >conftest.err
23139 rm -f conftest.er1
23140 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023142 (exit $ac_status); } && {
23143 test -z "$ac_c_werror_flag" ||
23144 test ! -s conftest.err
23145 } && test -s conftest$ac_exeext &&
23146 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023147 ac_cv_lib_readline_rl_callback_handler_install=yes
23148else
23149 echo "$as_me: failed program was:" >&5
23150sed 's/^/| /' conftest.$ac_ext >&5
23151
Martin v. Löwiseba40652007-08-30 20:10:57 +000023152 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023154
23155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023157LIBS=$ac_check_lib_save_LIBS
23158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023159{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23160echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023161if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23162
23163cat >>confdefs.h <<\_ACEOF
23164#define HAVE_RL_CALLBACK 1
23165_ACEOF
23166
23167fi
23168
23169
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023170# check for readline 2.2
23171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023172/* confdefs.h. */
23173_ACEOF
23174cat confdefs.h >>conftest.$ac_ext
23175cat >>conftest.$ac_ext <<_ACEOF
23176/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023177#include <readline/readline.h>
23178_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023179if { (ac_try="$ac_cpp conftest.$ac_ext"
23180case "(($ac_try" in
23181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23182 *) ac_try_echo=$ac_try;;
23183esac
23184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23185 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023186 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023187 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023188 rm -f conftest.er1
23189 cat conftest.err >&5
23190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023191 (exit $ac_status); } >/dev/null && {
23192 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23193 test ! -s conftest.err
23194 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023195 have_readline=yes
23196else
23197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023198sed 's/^/| /' conftest.$ac_ext >&5
23199
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023200 have_readline=no
23201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023202
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023203rm -f conftest.err conftest.$ac_ext
23204if test $have_readline = yes
23205then
23206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023207/* confdefs.h. */
23208_ACEOF
23209cat confdefs.h >>conftest.$ac_ext
23210cat >>conftest.$ac_ext <<_ACEOF
23211/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023212#include <readline/readline.h>
23213
23214_ACEOF
23215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023216 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023217
23218cat >>confdefs.h <<\_ACEOF
23219#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23220_ACEOF
23221
23222fi
23223rm -f conftest*
23224
23225fi
23226
Martin v. Löwis0daad592001-09-30 21:09:59 +000023227# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023228{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23229echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023230if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23231 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023232else
Martin v. Löwis11437992002-04-12 09:54:03 +000023233 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023234LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023236/* confdefs.h. */
23237_ACEOF
23238cat confdefs.h >>conftest.$ac_ext
23239cat >>conftest.$ac_ext <<_ACEOF
23240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023241
Martin v. Löwiseba40652007-08-30 20:10:57 +000023242/* Override any GCC internal prototype to avoid an error.
23243 Use char because int might match the return type of a GCC
23244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023245#ifdef __cplusplus
23246extern "C"
23247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023248char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023249int
23250main ()
23251{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023253 ;
23254 return 0;
23255}
23256_ACEOF
23257rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023258if { (ac_try="$ac_link"
23259case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
23263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23264 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023266 grep -v '^ *+' conftest.er1 >conftest.err
23267 rm -f conftest.er1
23268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023270 (exit $ac_status); } && {
23271 test -z "$ac_c_werror_flag" ||
23272 test ! -s conftest.err
23273 } && test -s conftest$ac_exeext &&
23274 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023275 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023276else
Martin v. Löwis11437992002-04-12 09:54:03 +000023277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023278sed 's/^/| /' conftest.$ac_ext >&5
23279
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023282
23283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023285LIBS=$ac_check_lib_save_LIBS
23286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023287{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23288echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023289if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023290
Martin v. Löwis11437992002-04-12 09:54:03 +000023291cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023292#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023293_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023294
Martin v. Löwis0daad592001-09-30 21:09:59 +000023295fi
23296
Michael W. Hudson54241132001-12-07 15:38:26 +000023297
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023298# also in 4.0
23299{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23300echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23301if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23302 echo $ECHO_N "(cached) $ECHO_C" >&6
23303else
23304 ac_check_lib_save_LIBS=$LIBS
23305LIBS="-lreadline $LIBS"
23306cat >conftest.$ac_ext <<_ACEOF
23307/* confdefs.h. */
23308_ACEOF
23309cat confdefs.h >>conftest.$ac_ext
23310cat >>conftest.$ac_ext <<_ACEOF
23311/* end confdefs.h. */
23312
23313/* Override any GCC internal prototype to avoid an error.
23314 Use char because int might match the return type of a GCC
23315 builtin and then its argument prototype would still apply. */
23316#ifdef __cplusplus
23317extern "C"
23318#endif
23319char rl_completion_display_matches_hook ();
23320int
23321main ()
23322{
23323return rl_completion_display_matches_hook ();
23324 ;
23325 return 0;
23326}
23327_ACEOF
23328rm -f conftest.$ac_objext conftest$ac_exeext
23329if { (ac_try="$ac_link"
23330case "(($ac_try" in
23331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23332 *) ac_try_echo=$ac_try;;
23333esac
23334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23335 (eval "$ac_link") 2>conftest.er1
23336 ac_status=$?
23337 grep -v '^ *+' conftest.er1 >conftest.err
23338 rm -f conftest.er1
23339 cat conftest.err >&5
23340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23341 (exit $ac_status); } && {
23342 test -z "$ac_c_werror_flag" ||
23343 test ! -s conftest.err
23344 } && test -s conftest$ac_exeext &&
23345 $as_test_x conftest$ac_exeext; then
23346 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23347else
23348 echo "$as_me: failed program was:" >&5
23349sed 's/^/| /' conftest.$ac_ext >&5
23350
23351 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23352fi
23353
23354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23355 conftest$ac_exeext conftest.$ac_ext
23356LIBS=$ac_check_lib_save_LIBS
23357fi
23358{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23359echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23360if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23361
23362cat >>confdefs.h <<\_ACEOF
23363#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23364_ACEOF
23365
23366fi
23367
23368
Martin v. Löwis0daad592001-09-30 21:09:59 +000023369# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023370{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23371echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023372if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023374else
Martin v. Löwis11437992002-04-12 09:54:03 +000023375 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023376LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023378/* confdefs.h. */
23379_ACEOF
23380cat confdefs.h >>conftest.$ac_ext
23381cat >>conftest.$ac_ext <<_ACEOF
23382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023383
Martin v. Löwiseba40652007-08-30 20:10:57 +000023384/* Override any GCC internal prototype to avoid an error.
23385 Use char because int might match the return type of a GCC
23386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023387#ifdef __cplusplus
23388extern "C"
23389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023390char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023391int
23392main ()
23393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023394return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023395 ;
23396 return 0;
23397}
23398_ACEOF
23399rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023400if { (ac_try="$ac_link"
23401case "(($ac_try" in
23402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403 *) ac_try_echo=$ac_try;;
23404esac
23405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23406 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023408 grep -v '^ *+' conftest.er1 >conftest.err
23409 rm -f conftest.er1
23410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023412 (exit $ac_status); } && {
23413 test -z "$ac_c_werror_flag" ||
23414 test ! -s conftest.err
23415 } && test -s conftest$ac_exeext &&
23416 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023417 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023418else
Martin v. Löwis11437992002-04-12 09:54:03 +000023419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023420sed 's/^/| /' conftest.$ac_ext >&5
23421
Martin v. Löwiseba40652007-08-30 20:10:57 +000023422 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424
23425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023427LIBS=$ac_check_lib_save_LIBS
23428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023429{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23430echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023431if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023432
Martin v. Löwis11437992002-04-12 09:54:03 +000023433cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023434#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023435_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023436
Guido van Rossum353ae582001-07-10 16:45:32 +000023437fi
23438
Jack Jansendd19cf82001-12-06 22:36:17 +000023439
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023440# also in readline 4.2
23441cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023442/* confdefs.h. */
23443_ACEOF
23444cat confdefs.h >>conftest.$ac_ext
23445cat >>conftest.$ac_ext <<_ACEOF
23446/* end confdefs.h. */
23447#include <readline/readline.h>
23448_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023449if { (ac_try="$ac_cpp conftest.$ac_ext"
23450case "(($ac_try" in
23451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23452 *) ac_try_echo=$ac_try;;
23453esac
23454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23455 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023456 ac_status=$?
23457 grep -v '^ *+' conftest.er1 >conftest.err
23458 rm -f conftest.er1
23459 cat conftest.err >&5
23460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461 (exit $ac_status); } >/dev/null && {
23462 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23463 test ! -s conftest.err
23464 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023465 have_readline=yes
23466else
23467 echo "$as_me: failed program was:" >&5
23468sed 's/^/| /' conftest.$ac_ext >&5
23469
23470 have_readline=no
23471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023472
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023473rm -f conftest.err conftest.$ac_ext
23474if test $have_readline = yes
23475then
23476 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023477/* confdefs.h. */
23478_ACEOF
23479cat confdefs.h >>conftest.$ac_ext
23480cat >>conftest.$ac_ext <<_ACEOF
23481/* end confdefs.h. */
23482#include <readline/readline.h>
23483
23484_ACEOF
23485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23486 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23487
23488cat >>confdefs.h <<\_ACEOF
23489#define HAVE_RL_CATCH_SIGNAL 1
23490_ACEOF
23491
23492fi
23493rm -f conftest*
23494
23495fi
23496
Martin v. Löwis82bca632006-02-10 20:49:30 +000023497# End of readline checks: restore LIBS
23498LIBS=$LIBS_no_readline
23499
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23501echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023502if test "${ac_cv_broken_nice+set}" = set; then
23503 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023504else
Martin v. Löwis11437992002-04-12 09:54:03 +000023505
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023506if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023507 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023508else
Martin v. Löwis11437992002-04-12 09:54:03 +000023509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023510/* confdefs.h. */
23511_ACEOF
23512cat confdefs.h >>conftest.$ac_ext
23513cat >>conftest.$ac_ext <<_ACEOF
23514/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023515
23516int main()
23517{
23518 int val1 = nice(1);
23519 if (val1 != -1 && val1 == nice(2))
23520 exit(0);
23521 exit(1);
23522}
23523
Martin v. Löwis11437992002-04-12 09:54:03 +000023524_ACEOF
23525rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023526if { (ac_try="$ac_link"
23527case "(($ac_try" in
23528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23529 *) ac_try_echo=$ac_try;;
23530esac
23531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23532 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023533 ac_status=$?
23534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536 { (case "(($ac_try" in
23537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23538 *) ac_try_echo=$ac_try;;
23539esac
23540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23541 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023542 ac_status=$?
23543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23544 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023545 ac_cv_broken_nice=yes
23546else
Martin v. Löwis11437992002-04-12 09:54:03 +000023547 echo "$as_me: program exited with status $ac_status" >&5
23548echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023549sed 's/^/| /' conftest.$ac_ext >&5
23550
Martin v. Löwis11437992002-04-12 09:54:03 +000023551( exit $ac_status )
23552ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023554rm -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 +000023555fi
23556
Martin v. Löwiseba40652007-08-30 20:10:57 +000023557
23558fi
23559
23560{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23561echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023562if test "$ac_cv_broken_nice" = yes
23563then
Martin v. Löwis11437992002-04-12 09:54:03 +000023564
23565cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023566#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023567_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023568
23569fi
23570
Martin v. Löwiseba40652007-08-30 20:10:57 +000023571{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23572echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023573if test "$cross_compiling" = yes; then
23574 ac_cv_broken_poll=no
23575else
23576 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023577/* confdefs.h. */
23578_ACEOF
23579cat confdefs.h >>conftest.$ac_ext
23580cat >>conftest.$ac_ext <<_ACEOF
23581/* end confdefs.h. */
23582
23583#include <poll.h>
23584
23585int main (void)
23586 {
23587 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23588
23589 close (42);
23590
23591 int poll_test = poll (&poll_struct, 1, 0);
23592
23593 if (poll_test < 0)
23594 {
23595 exit(0);
23596 }
23597 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23598 {
23599 exit(0);
23600 }
23601 else
23602 {
23603 exit(1);
23604 }
23605 }
23606
23607_ACEOF
23608rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023609if { (ac_try="$ac_link"
23610case "(($ac_try" in
23611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23612 *) ac_try_echo=$ac_try;;
23613esac
23614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23615 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023616 ac_status=$?
23617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23618 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023619 { (case "(($ac_try" in
23620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23621 *) ac_try_echo=$ac_try;;
23622esac
23623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23624 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023625 ac_status=$?
23626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23627 (exit $ac_status); }; }; then
23628 ac_cv_broken_poll=yes
23629else
23630 echo "$as_me: program exited with status $ac_status" >&5
23631echo "$as_me: failed program was:" >&5
23632sed 's/^/| /' conftest.$ac_ext >&5
23633
23634( exit $ac_status )
23635ac_cv_broken_poll=no
23636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023637rm -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 +000023638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023639
23640
23641{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23642echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023643if test "$ac_cv_broken_poll" = yes
23644then
23645
23646cat >>confdefs.h <<\_ACEOF
23647#define HAVE_BROKEN_POLL 1
23648_ACEOF
23649
23650fi
23651
Brett Cannon43802422005-02-10 20:48:03 +000023652# 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 +000023653# (which is not required by ISO C or UNIX spec) and/or if we support
23654# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023655{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23656echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023657if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23658 echo $ECHO_N "(cached) $ECHO_C" >&6
23659else
23660 cat >conftest.$ac_ext <<_ACEOF
23661/* confdefs.h. */
23662_ACEOF
23663cat confdefs.h >>conftest.$ac_ext
23664cat >>conftest.$ac_ext <<_ACEOF
23665/* end confdefs.h. */
23666#include <sys/types.h>
23667#include <$ac_cv_struct_tm>
23668
23669
23670int
23671main ()
23672{
23673static struct tm ac_aggr;
23674if (ac_aggr.tm_zone)
23675return 0;
23676 ;
23677 return 0;
23678}
23679_ACEOF
23680rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023681if { (ac_try="$ac_compile"
23682case "(($ac_try" in
23683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23684 *) ac_try_echo=$ac_try;;
23685esac
23686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23687 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023688 ac_status=$?
23689 grep -v '^ *+' conftest.er1 >conftest.err
23690 rm -f conftest.er1
23691 cat conftest.err >&5
23692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023693 (exit $ac_status); } && {
23694 test -z "$ac_c_werror_flag" ||
23695 test ! -s conftest.err
23696 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023697 ac_cv_member_struct_tm_tm_zone=yes
23698else
23699 echo "$as_me: failed program was:" >&5
23700sed 's/^/| /' conftest.$ac_ext >&5
23701
Martin v. Löwiseba40652007-08-30 20:10:57 +000023702 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023703/* confdefs.h. */
23704_ACEOF
23705cat confdefs.h >>conftest.$ac_ext
23706cat >>conftest.$ac_ext <<_ACEOF
23707/* end confdefs.h. */
23708#include <sys/types.h>
23709#include <$ac_cv_struct_tm>
23710
23711
23712int
23713main ()
23714{
23715static struct tm ac_aggr;
23716if (sizeof ac_aggr.tm_zone)
23717return 0;
23718 ;
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
Brett Cannon43802422005-02-10 20:48:03 +000023730 ac_status=$?
23731 grep -v '^ *+' conftest.er1 >conftest.err
23732 rm -f conftest.er1
23733 cat conftest.err >&5
23734 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
Brett Cannon43802422005-02-10 20:48:03 +000023739 ac_cv_member_struct_tm_tm_zone=yes
23740else
23741 echo "$as_me: failed program was:" >&5
23742sed 's/^/| /' conftest.$ac_ext >&5
23743
Martin v. Löwiseba40652007-08-30 20:10:57 +000023744 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746
23747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749
23750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023752{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23753echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023754if test $ac_cv_member_struct_tm_tm_zone = yes; then
23755
23756cat >>confdefs.h <<_ACEOF
23757#define HAVE_STRUCT_TM_TM_ZONE 1
23758_ACEOF
23759
23760
23761fi
23762
23763if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23764
23765cat >>confdefs.h <<\_ACEOF
23766#define HAVE_TM_ZONE 1
23767_ACEOF
23768
23769else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023770 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23771echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23772if test "${ac_cv_have_decl_tzname+set}" = set; then
23773 echo $ECHO_N "(cached) $ECHO_C" >&6
23774else
23775 cat >conftest.$ac_ext <<_ACEOF
23776/* confdefs.h. */
23777_ACEOF
23778cat confdefs.h >>conftest.$ac_ext
23779cat >>conftest.$ac_ext <<_ACEOF
23780/* end confdefs.h. */
23781#include <time.h>
23782
23783int
23784main ()
23785{
23786#ifndef tzname
23787 (void) tzname;
23788#endif
23789
23790 ;
23791 return 0;
23792}
23793_ACEOF
23794rm -f conftest.$ac_objext
23795if { (ac_try="$ac_compile"
23796case "(($ac_try" in
23797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23798 *) ac_try_echo=$ac_try;;
23799esac
23800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23801 (eval "$ac_compile") 2>conftest.er1
23802 ac_status=$?
23803 grep -v '^ *+' conftest.er1 >conftest.err
23804 rm -f conftest.er1
23805 cat conftest.err >&5
23806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23807 (exit $ac_status); } && {
23808 test -z "$ac_c_werror_flag" ||
23809 test ! -s conftest.err
23810 } && test -s conftest.$ac_objext; then
23811 ac_cv_have_decl_tzname=yes
23812else
23813 echo "$as_me: failed program was:" >&5
23814sed 's/^/| /' conftest.$ac_ext >&5
23815
23816 ac_cv_have_decl_tzname=no
23817fi
23818
23819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23820fi
23821{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23822echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23823if test $ac_cv_have_decl_tzname = yes; then
23824
23825cat >>confdefs.h <<_ACEOF
23826#define HAVE_DECL_TZNAME 1
23827_ACEOF
23828
23829
23830else
23831 cat >>confdefs.h <<_ACEOF
23832#define HAVE_DECL_TZNAME 0
23833_ACEOF
23834
23835
23836fi
23837
23838
23839 { echo "$as_me:$LINENO: checking for tzname" >&5
23840echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023841if test "${ac_cv_var_tzname+set}" = set; then
23842 echo $ECHO_N "(cached) $ECHO_C" >&6
23843else
23844 cat >conftest.$ac_ext <<_ACEOF
23845/* confdefs.h. */
23846_ACEOF
23847cat confdefs.h >>conftest.$ac_ext
23848cat >>conftest.$ac_ext <<_ACEOF
23849/* end confdefs.h. */
23850#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023851#if !HAVE_DECL_TZNAME
23852extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023853#endif
23854
23855int
23856main ()
23857{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023858return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023859 ;
23860 return 0;
23861}
23862_ACEOF
23863rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023864if { (ac_try="$ac_link"
23865case "(($ac_try" in
23866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23867 *) ac_try_echo=$ac_try;;
23868esac
23869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23870 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023871 ac_status=$?
23872 grep -v '^ *+' conftest.er1 >conftest.err
23873 rm -f conftest.er1
23874 cat conftest.err >&5
23875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023876 (exit $ac_status); } && {
23877 test -z "$ac_c_werror_flag" ||
23878 test ! -s conftest.err
23879 } && test -s conftest$ac_exeext &&
23880 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023881 ac_cv_var_tzname=yes
23882else
23883 echo "$as_me: failed program was:" >&5
23884sed 's/^/| /' conftest.$ac_ext >&5
23885
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023888
23889rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023890 conftest$ac_exeext conftest.$ac_ext
23891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023892{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23893echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023894 if test $ac_cv_var_tzname = yes; then
23895
23896cat >>confdefs.h <<\_ACEOF
23897#define HAVE_TZNAME 1
23898_ACEOF
23899
23900 fi
23901fi
23902
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023903
Martin v. Löwis1d459062005-03-14 21:23:33 +000023904# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023905{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23906echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023907if test "${ac_cv_working_tzset+set}" = set; then
23908 echo $ECHO_N "(cached) $ECHO_C" >&6
23909else
23910
23911if test "$cross_compiling" = yes; then
23912 ac_cv_working_tzset=no
23913else
23914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023915/* confdefs.h. */
23916_ACEOF
23917cat confdefs.h >>conftest.$ac_ext
23918cat >>conftest.$ac_ext <<_ACEOF
23919/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023920
23921#include <stdlib.h>
23922#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023923#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023924
23925#if HAVE_TZNAME
23926extern char *tzname[];
23927#endif
23928
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023929int main()
23930{
Brett Cannon18367812003-09-19 00:59:16 +000023931 /* Note that we need to ensure that not only does tzset(3)
23932 do 'something' with localtime, but it works as documented
23933 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023934 This includes making sure that tzname is set properly if
23935 tm->tm_zone does not exist since it is the alternative way
23936 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023937
23938 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023939 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023940 */
23941
Martin v. Löwis1d459062005-03-14 21:23:33 +000023942 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023943 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23944
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023945 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023946 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023947 if (localtime(&groundhogday)->tm_hour != 0)
23948 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023949#if HAVE_TZNAME
23950 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23951 if (strcmp(tzname[0], "UTC") ||
23952 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23953 exit(1);
23954#endif
Brett Cannon18367812003-09-19 00:59:16 +000023955
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023956 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023957 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023958 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023959 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023960#if HAVE_TZNAME
23961 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23962 exit(1);
23963#endif
Brett Cannon18367812003-09-19 00:59:16 +000023964
23965 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23966 tzset();
23967 if (localtime(&groundhogday)->tm_hour != 11)
23968 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023969#if HAVE_TZNAME
23970 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23971 exit(1);
23972#endif
23973
23974#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023975 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23976 exit(1);
23977 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23978 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023979#endif
Brett Cannon18367812003-09-19 00:59:16 +000023980
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023981 exit(0);
23982}
23983
23984_ACEOF
23985rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023986if { (ac_try="$ac_link"
23987case "(($ac_try" in
23988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23989 *) ac_try_echo=$ac_try;;
23990esac
23991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23992 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023993 ac_status=$?
23994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023996 { (case "(($ac_try" in
23997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23998 *) ac_try_echo=$ac_try;;
23999esac
24000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24001 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024002 ac_status=$?
24003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24004 (exit $ac_status); }; }; then
24005 ac_cv_working_tzset=yes
24006else
24007 echo "$as_me: program exited with status $ac_status" >&5
24008echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024009sed 's/^/| /' conftest.$ac_ext >&5
24010
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024011( exit $ac_status )
24012ac_cv_working_tzset=no
24013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024014rm -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 +000024015fi
24016
Martin v. Löwiseba40652007-08-30 20:10:57 +000024017
24018fi
24019
24020{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24021echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024022if test "$ac_cv_working_tzset" = yes
24023then
24024
24025cat >>confdefs.h <<\_ACEOF
24026#define HAVE_WORKING_TZSET 1
24027_ACEOF
24028
24029fi
24030
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024031# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024032{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24033echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024034if test "${ac_cv_stat_tv_nsec+set}" = set; then
24035 echo $ECHO_N "(cached) $ECHO_C" >&6
24036else
24037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024038/* confdefs.h. */
24039_ACEOF
24040cat confdefs.h >>conftest.$ac_ext
24041cat >>conftest.$ac_ext <<_ACEOF
24042/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024043#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024044int
24045main ()
24046{
24047
24048struct stat st;
24049st.st_mtim.tv_nsec = 1;
24050
24051 ;
24052 return 0;
24053}
24054_ACEOF
24055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024056if { (ac_try="$ac_compile"
24057case "(($ac_try" in
24058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24059 *) ac_try_echo=$ac_try;;
24060esac
24061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024064 grep -v '^ *+' conftest.er1 >conftest.err
24065 rm -f conftest.er1
24066 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024068 (exit $ac_status); } && {
24069 test -z "$ac_c_werror_flag" ||
24070 test ! -s conftest.err
24071 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024072 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024073else
24074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024075sed 's/^/| /' conftest.$ac_ext >&5
24076
Martin v. Löwiseba40652007-08-30 20:10:57 +000024077 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024078fi
24079
Martin v. Löwiseba40652007-08-30 20:10:57 +000024080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24081fi
24082
24083{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24084echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024085if test "$ac_cv_stat_tv_nsec" = yes
24086then
24087
24088cat >>confdefs.h <<\_ACEOF
24089#define HAVE_STAT_TV_NSEC 1
24090_ACEOF
24091
24092fi
24093
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024094# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024095{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24096echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024097if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24098 echo $ECHO_N "(cached) $ECHO_C" >&6
24099else
24100 cat >conftest.$ac_ext <<_ACEOF
24101/* confdefs.h. */
24102_ACEOF
24103cat confdefs.h >>conftest.$ac_ext
24104cat >>conftest.$ac_ext <<_ACEOF
24105/* end confdefs.h. */
24106#include <sys/stat.h>
24107int
24108main ()
24109{
24110
24111struct stat st;
24112st.st_mtimespec.tv_nsec = 1;
24113
24114 ;
24115 return 0;
24116}
24117_ACEOF
24118rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024119if { (ac_try="$ac_compile"
24120case "(($ac_try" in
24121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24122 *) ac_try_echo=$ac_try;;
24123esac
24124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024126 ac_status=$?
24127 grep -v '^ *+' conftest.er1 >conftest.err
24128 rm -f conftest.er1
24129 cat conftest.err >&5
24130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024131 (exit $ac_status); } && {
24132 test -z "$ac_c_werror_flag" ||
24133 test ! -s conftest.err
24134 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024135 ac_cv_stat_tv_nsec2=yes
24136else
24137 echo "$as_me: failed program was:" >&5
24138sed 's/^/| /' conftest.$ac_ext >&5
24139
Martin v. Löwiseba40652007-08-30 20:10:57 +000024140 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024141fi
24142
Martin v. Löwiseba40652007-08-30 20:10:57 +000024143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24144fi
24145
24146{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24147echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024148if test "$ac_cv_stat_tv_nsec2" = yes
24149then
24150
24151cat >>confdefs.h <<\_ACEOF
24152#define HAVE_STAT_TV_NSEC2 1
24153_ACEOF
24154
24155fi
24156
Jack Jansen666b1e72001-10-31 12:11:48 +000024157# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024158{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24159echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024160if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24161 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024162else
Martin v. Löwis11437992002-04-12 09:54:03 +000024163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024164/* confdefs.h. */
24165_ACEOF
24166cat confdefs.h >>conftest.$ac_ext
24167cat >>conftest.$ac_ext <<_ACEOF
24168/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024169#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024170int
24171main ()
24172{
Jack Jansen666b1e72001-10-31 12:11:48 +000024173
24174 int rtn;
24175 rtn = mvwdelch(0,0,0);
24176
Martin v. Löwis11437992002-04-12 09:54:03 +000024177 ;
24178 return 0;
24179}
24180_ACEOF
24181rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024182if { (ac_try="$ac_compile"
24183case "(($ac_try" in
24184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24185 *) ac_try_echo=$ac_try;;
24186esac
24187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024190 grep -v '^ *+' conftest.er1 >conftest.err
24191 rm -f conftest.er1
24192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024194 (exit $ac_status); } && {
24195 test -z "$ac_c_werror_flag" ||
24196 test ! -s conftest.err
24197 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024198 ac_cv_mvwdelch_is_expression=yes
24199else
Martin v. Löwis11437992002-04-12 09:54:03 +000024200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024201sed 's/^/| /' conftest.$ac_ext >&5
24202
Martin v. Löwiseba40652007-08-30 20:10:57 +000024203 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024204fi
24205
Martin v. Löwiseba40652007-08-30 20:10:57 +000024206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24207fi
24208
24209{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24210echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024211
24212if test "$ac_cv_mvwdelch_is_expression" = yes
24213then
Martin v. Löwis11437992002-04-12 09:54:03 +000024214
24215cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024216#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024217_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024218
24219fi
24220
Martin v. Löwiseba40652007-08-30 20:10:57 +000024221{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24222echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024223if test "${ac_cv_window_has_flags+set}" = set; then
24224 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024225else
Martin v. Löwis11437992002-04-12 09:54:03 +000024226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024227/* confdefs.h. */
24228_ACEOF
24229cat confdefs.h >>conftest.$ac_ext
24230cat >>conftest.$ac_ext <<_ACEOF
24231/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024232#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024233int
24234main ()
24235{
Jack Jansen666b1e72001-10-31 12:11:48 +000024236
24237 WINDOW *w;
24238 w->_flags = 0;
24239
Martin v. Löwis11437992002-04-12 09:54:03 +000024240 ;
24241 return 0;
24242}
24243_ACEOF
24244rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024245if { (ac_try="$ac_compile"
24246case "(($ac_try" in
24247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24248 *) ac_try_echo=$ac_try;;
24249esac
24250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024253 grep -v '^ *+' conftest.er1 >conftest.err
24254 rm -f conftest.er1
24255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024257 (exit $ac_status); } && {
24258 test -z "$ac_c_werror_flag" ||
24259 test ! -s conftest.err
24260 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024261 ac_cv_window_has_flags=yes
24262else
Martin v. Löwis11437992002-04-12 09:54:03 +000024263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024264sed 's/^/| /' conftest.$ac_ext >&5
24265
Martin v. Löwiseba40652007-08-30 20:10:57 +000024266 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024267fi
24268
Martin v. Löwiseba40652007-08-30 20:10:57 +000024269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24270fi
24271
24272{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24273echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024274
Jack Jansen666b1e72001-10-31 12:11:48 +000024275
24276if test "$ac_cv_window_has_flags" = yes
24277then
Martin v. Löwis11437992002-04-12 09:54:03 +000024278
24279cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024280#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024281_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024282
24283fi
24284
Martin v. Löwiseba40652007-08-30 20:10:57 +000024285{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24286echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024287cat >conftest.$ac_ext <<_ACEOF
24288/* confdefs.h. */
24289_ACEOF
24290cat confdefs.h >>conftest.$ac_ext
24291cat >>conftest.$ac_ext <<_ACEOF
24292/* end confdefs.h. */
24293#include <curses.h>
24294int
24295main ()
24296{
24297void *x=is_term_resized
24298 ;
24299 return 0;
24300}
24301_ACEOF
24302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024303if { (ac_try="$ac_compile"
24304case "(($ac_try" in
24305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24306 *) ac_try_echo=$ac_try;;
24307esac
24308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24309 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024310 ac_status=$?
24311 grep -v '^ *+' conftest.er1 >conftest.err
24312 rm -f conftest.er1
24313 cat conftest.err >&5
24314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024315 (exit $ac_status); } && {
24316 test -z "$ac_c_werror_flag" ||
24317 test ! -s conftest.err
24318 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024319
24320cat >>confdefs.h <<\_ACEOF
24321#define HAVE_CURSES_IS_TERM_RESIZED 1
24322_ACEOF
24323
Martin v. Löwiseba40652007-08-30 20:10:57 +000024324 { echo "$as_me:$LINENO: result: yes" >&5
24325echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024326else
24327 echo "$as_me: failed program was:" >&5
24328sed 's/^/| /' conftest.$ac_ext >&5
24329
Martin v. Löwiseba40652007-08-30 20:10:57 +000024330 { echo "$as_me:$LINENO: result: no" >&5
24331echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024332
24333fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024334
Martin v. Löwiseba40652007-08-30 20:10:57 +000024335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24336
24337{ echo "$as_me:$LINENO: checking for resize_term" >&5
24338echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024339cat >conftest.$ac_ext <<_ACEOF
24340/* confdefs.h. */
24341_ACEOF
24342cat confdefs.h >>conftest.$ac_ext
24343cat >>conftest.$ac_ext <<_ACEOF
24344/* end confdefs.h. */
24345#include <curses.h>
24346int
24347main ()
24348{
24349void *x=resize_term
24350 ;
24351 return 0;
24352}
24353_ACEOF
24354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024355if { (ac_try="$ac_compile"
24356case "(($ac_try" in
24357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24358 *) ac_try_echo=$ac_try;;
24359esac
24360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24361 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024362 ac_status=$?
24363 grep -v '^ *+' conftest.er1 >conftest.err
24364 rm -f conftest.er1
24365 cat conftest.err >&5
24366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024367 (exit $ac_status); } && {
24368 test -z "$ac_c_werror_flag" ||
24369 test ! -s conftest.err
24370 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024371
24372cat >>confdefs.h <<\_ACEOF
24373#define HAVE_CURSES_RESIZE_TERM 1
24374_ACEOF
24375
Martin v. Löwiseba40652007-08-30 20:10:57 +000024376 { echo "$as_me:$LINENO: result: yes" >&5
24377echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024378else
24379 echo "$as_me: failed program was:" >&5
24380sed 's/^/| /' conftest.$ac_ext >&5
24381
Martin v. Löwiseba40652007-08-30 20:10:57 +000024382 { echo "$as_me:$LINENO: result: no" >&5
24383echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024384
24385fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024386
Martin v. Löwiseba40652007-08-30 20:10:57 +000024387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24388
24389{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24390echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024391cat >conftest.$ac_ext <<_ACEOF
24392/* confdefs.h. */
24393_ACEOF
24394cat confdefs.h >>conftest.$ac_ext
24395cat >>conftest.$ac_ext <<_ACEOF
24396/* end confdefs.h. */
24397#include <curses.h>
24398int
24399main ()
24400{
24401void *x=resizeterm
24402 ;
24403 return 0;
24404}
24405_ACEOF
24406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407if { (ac_try="$ac_compile"
24408case "(($ac_try" in
24409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24410 *) ac_try_echo=$ac_try;;
24411esac
24412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24413 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024414 ac_status=$?
24415 grep -v '^ *+' conftest.er1 >conftest.err
24416 rm -f conftest.er1
24417 cat conftest.err >&5
24418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024419 (exit $ac_status); } && {
24420 test -z "$ac_c_werror_flag" ||
24421 test ! -s conftest.err
24422 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024423
24424cat >>confdefs.h <<\_ACEOF
24425#define HAVE_CURSES_RESIZETERM 1
24426_ACEOF
24427
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428 { echo "$as_me:$LINENO: result: yes" >&5
24429echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024430else
24431 echo "$as_me: failed program was:" >&5
24432sed 's/^/| /' conftest.$ac_ext >&5
24433
Martin v. Löwiseba40652007-08-30 20:10:57 +000024434 { echo "$as_me:$LINENO: result: no" >&5
24435echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024436
24437fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024438
Martin v. Löwiseba40652007-08-30 20:10:57 +000024439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24440
24441{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24442echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024443
24444if test -r /dev/ptmx
24445then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024446 { echo "$as_me:$LINENO: result: yes" >&5
24447echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024448
24449cat >>confdefs.h <<\_ACEOF
24450#define HAVE_DEV_PTMX 1
24451_ACEOF
24452
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024453else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024454 { echo "$as_me:$LINENO: result: no" >&5
24455echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024456fi
24457
Martin v. Löwiseba40652007-08-30 20:10:57 +000024458{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24459echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024460
24461if test -r /dev/ptc
24462then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024463 { echo "$as_me:$LINENO: result: yes" >&5
24464echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024465
24466cat >>confdefs.h <<\_ACEOF
24467#define HAVE_DEV_PTC 1
24468_ACEOF
24469
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024470else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471 { echo "$as_me:$LINENO: result: no" >&5
24472echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024473fi
24474
Martin v. Löwiseba40652007-08-30 20:10:57 +000024475{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24476echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024477if test "$cross_compiling" = yes; then
24478 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24479See \`config.log' for more details." >&5
24480echo "$as_me: error: cannot run test program while cross compiling
24481See \`config.log' for more details." >&2;}
24482 { (exit 1); exit 1; }; }
24483else
24484 cat >conftest.$ac_ext <<_ACEOF
24485/* confdefs.h. */
24486_ACEOF
24487cat confdefs.h >>conftest.$ac_ext
24488cat >>conftest.$ac_ext <<_ACEOF
24489/* end confdefs.h. */
24490#include <stdio.h>
24491#include <stddef.h>
24492#include <string.h>
24493
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024494#ifdef HAVE_SYS_TYPES_H
24495#include <sys/types.h>
24496#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024497
24498#ifdef HAVE_SSIZE_T
24499typedef ssize_t Py_ssize_t;
24500#elif SIZEOF_VOID_P == SIZEOF_LONG
24501typedef long Py_ssize_t;
24502#else
24503typedef int Py_ssize_t;
24504#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024505
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024506int main()
24507{
24508 char buffer[256];
24509
Brett Cannon09d12362006-05-11 05:11:33 +000024510 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24511 return 1;
24512
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024513 if (strcmp(buffer, "123"))
24514 return 1;
24515
24516 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24517 return 1;
24518
24519 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024520 return 1;
24521
24522 return 0;
24523}
24524_ACEOF
24525rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024526if { (ac_try="$ac_link"
24527case "(($ac_try" in
24528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24529 *) ac_try_echo=$ac_try;;
24530esac
24531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24532 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024533 ac_status=$?
24534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024536 { (case "(($ac_try" in
24537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24538 *) ac_try_echo=$ac_try;;
24539esac
24540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24541 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024542 ac_status=$?
24543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24544 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024545 { echo "$as_me:$LINENO: result: yes" >&5
24546echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024547
24548cat >>confdefs.h <<\_ACEOF
24549#define PY_FORMAT_SIZE_T "z"
24550_ACEOF
24551
24552else
24553 echo "$as_me: program exited with status $ac_status" >&5
24554echo "$as_me: failed program was:" >&5
24555sed 's/^/| /' conftest.$ac_ext >&5
24556
24557( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024558{ echo "$as_me:$LINENO: result: no" >&5
24559echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024561rm -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 +000024562fi
24563
Martin v. Löwiseba40652007-08-30 20:10:57 +000024564
24565
24566{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24567echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024568if test "${ac_cv_type_socklen_t+set}" = set; then
24569 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024570else
Martin v. Löwis11437992002-04-12 09:54:03 +000024571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024572/* confdefs.h. */
24573_ACEOF
24574cat confdefs.h >>conftest.$ac_ext
24575cat >>conftest.$ac_ext <<_ACEOF
24576/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024577
24578#ifdef HAVE_SYS_TYPES_H
24579#include <sys/types.h>
24580#endif
24581#ifdef HAVE_SYS_SOCKET_H
24582#include <sys/socket.h>
24583#endif
24584
24585
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024587int
24588main ()
24589{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024590if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024591 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024592if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024593 return 0;
24594 ;
24595 return 0;
24596}
24597_ACEOF
24598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599if { (ac_try="$ac_compile"
24600case "(($ac_try" in
24601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24602 *) ac_try_echo=$ac_try;;
24603esac
24604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024607 grep -v '^ *+' conftest.er1 >conftest.err
24608 rm -f conftest.er1
24609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024611 (exit $ac_status); } && {
24612 test -z "$ac_c_werror_flag" ||
24613 test ! -s conftest.err
24614 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024615 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024616else
Martin v. Löwis11437992002-04-12 09:54:03 +000024617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024618sed 's/^/| /' conftest.$ac_ext >&5
24619
Martin v. Löwiseba40652007-08-30 20:10:57 +000024620 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024622
24623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024625{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24626echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024627if test $ac_cv_type_socklen_t = yes; then
24628 :
24629else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024630
Martin v. Löwis01c04012002-11-11 14:58:44 +000024631cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024632#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024633_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024634
24635fi
24636
Michael W. Hudson54241132001-12-07 15:38:26 +000024637
Michael W. Hudson54241132001-12-07 15:38:26 +000024638
24639
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024640for h in `(cd $srcdir;echo Python/thread_*.h)`
24641do
24642 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24643done
24644
Michael W. Hudson54241132001-12-07 15:38:26 +000024645
Neal Norwitzd24499d2005-12-18 21:36:39 +000024646SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024647{ echo "$as_me:$LINENO: checking for build directories" >&5
24648echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024649for dir in $SRCDIRS; do
24650 if test ! -d $dir; then
24651 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024652 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024653done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024654{ echo "$as_me:$LINENO: result: done" >&5
24655echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024656
Guido van Rossum627b2d71993-12-24 10:39:16 +000024657# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024658ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024659
Martin v. Löwis11437992002-04-12 09:54:03 +000024660cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024661# This file is a shell script that caches the results of configure
24662# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024663# scripts and configure runs, see configure's option --config-cache.
24664# It is not useful on other systems. If it contains results you don't
24665# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024666#
Martin v. Löwis11437992002-04-12 09:54:03 +000024667# config.status only pays attention to the cache file if you give it
24668# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024669#
Skip Montanaro6dead952003-09-25 14:50:04 +000024670# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024671# loading this file, other *unset* `ac_cv_foo' will be assigned the
24672# following values.
24673
24674_ACEOF
24675
Guido van Rossumf78abae1997-01-21 22:02:36 +000024676# The following way of writing the cache mishandles newlines in values,
24677# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024678# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024679# Ultrix sh set writes to stderr and can't be redirected directly,
24680# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024681(
24682 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24683 eval ac_val=\$$ac_var
24684 case $ac_val in #(
24685 *${as_nl}*)
24686 case $ac_var in #(
24687 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24688echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24689 esac
24690 case $ac_var in #(
24691 _ | IFS | as_nl) ;; #(
24692 *) $as_unset $ac_var ;;
24693 esac ;;
24694 esac
24695 done
24696
Martin v. Löwis11437992002-04-12 09:54:03 +000024697 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024698 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24699 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 # `set' does not quote correctly, so add quotes (double-quote
24701 # substitution turns \\\\ into \\, and sed turns \\ into \).
24702 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024703 "s/'/'\\\\''/g;
24704 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024705 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024706 *)
24707 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024709 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024710 esac |
24711 sort
24712) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024713 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024714 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024715 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024716 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024717 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24718 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024719 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24720 :end' >>confcache
24721if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24722 if test -w "$cache_file"; then
24723 test "x$cache_file" != "x/dev/null" &&
24724 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24725echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024726 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024727 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024728 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24729echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024730 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024731fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024732rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024733
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024734test "x$prefix" = xNONE && prefix=$ac_default_prefix
24735# Let make expand exec_prefix.
24736test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024738DEFS=-DHAVE_CONFIG_H
24739
Skip Montanaro6dead952003-09-25 14:50:04 +000024740ac_libobjs=
24741ac_ltlibobjs=
24742for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24743 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024744 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24745 ac_i=`echo "$ac_i" | sed "$ac_script"`
24746 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24747 # will be set to the directory where LIBOBJS objects are built.
24748 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24749 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024750done
24751LIBOBJS=$ac_libobjs
24752
24753LTLIBOBJS=$ac_ltlibobjs
24754
24755
Martin v. Löwis11437992002-04-12 09:54:03 +000024756
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024757: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024758ac_clean_files_save=$ac_clean_files
24759ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24760{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24761echo "$as_me: creating $CONFIG_STATUS" >&6;}
24762cat >$CONFIG_STATUS <<_ACEOF
24763#! $SHELL
24764# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024765# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024766# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024767# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024768
Martin v. Löwis11437992002-04-12 09:54:03 +000024769debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024770ac_cs_recheck=false
24771ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024772SHELL=\${CONFIG_SHELL-$SHELL}
24773_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024774
Martin v. Löwis11437992002-04-12 09:54:03 +000024775cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024776## --------------------- ##
24777## M4sh Initialization. ##
24778## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024779
Martin v. Löwiseba40652007-08-30 20:10:57 +000024780# Be more Bourne compatible
24781DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024782if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24783 emulate sh
24784 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024785 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24786 # is contrary to our usage. Disable this feature.
24787 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024788 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024789else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024790 case `(set -o) 2>/dev/null` in
24791 *posix*) set -o posix ;;
24792esac
24793
Martin v. Löwis11437992002-04-12 09:54:03 +000024794fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024795
Skip Montanaro6dead952003-09-25 14:50:04 +000024796
Martin v. Löwis11437992002-04-12 09:54:03 +000024797
24798
Martin v. Löwiseba40652007-08-30 20:10:57 +000024799# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024800# Avoid depending upon Character Ranges.
24801as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24802as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24803as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24804as_cr_digits='0123456789'
24805as_cr_alnum=$as_cr_Letters$as_cr_digits
24806
24807# The user is always right.
24808if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024809 echo "#! /bin/sh" >conf$$.sh
24810 echo "exit 0" >>conf$$.sh
24811 chmod +x conf$$.sh
24812 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024813 PATH_SEPARATOR=';'
24814 else
24815 PATH_SEPARATOR=:
24816 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024817 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024818fi
24819
Martin v. Löwiseba40652007-08-30 20:10:57 +000024820# Support unset when possible.
24821if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24822 as_unset=unset
24823else
24824 as_unset=false
24825fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024826
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827
24828# IFS
24829# We need space, tab and new line, in precisely that order. Quoting is
24830# there to prevent editors from complaining about space-tab.
24831# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24832# splitting by setting IFS to empty value.)
24833as_nl='
24834'
24835IFS=" "" $as_nl"
24836
24837# Find who we are. Look in the path if we contain no directory separator.
24838case $0 in
24839 *[\\/]* ) as_myself=$0 ;;
24840 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024841for as_dir in $PATH
24842do
24843 IFS=$as_save_IFS
24844 test -z "$as_dir" && as_dir=.
24845 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24846done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024847IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024848
Martin v. Löwiseba40652007-08-30 20:10:57 +000024849 ;;
24850esac
24851# We did not find ourselves, most probably we were run as `sh COMMAND'
24852# in which case we are not to be found in the path.
24853if test "x$as_myself" = x; then
24854 as_myself=$0
24855fi
24856if test ! -f "$as_myself"; then
24857 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24858 { (exit 1); exit 1; }
24859fi
24860
24861# Work around bugs in pre-3.0 UWIN ksh.
24862for as_var in ENV MAIL MAILPATH
24863do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24864done
24865PS1='$ '
24866PS2='> '
24867PS4='+ '
24868
24869# NLS nuisances.
24870for as_var in \
24871 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24872 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24873 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024874do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024875 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24876 eval $as_var=C; export $as_var
24877 else
24878 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24879 fi
24880done
24881
24882# Required to use basename.
24883if expr a : '\(a\)' >/dev/null 2>&1 &&
24884 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24885 as_expr=expr
24886else
24887 as_expr=false
24888fi
24889
24890if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24891 as_basename=basename
24892else
24893 as_basename=false
24894fi
24895
24896
24897# Name of the executable.
24898as_me=`$as_basename -- "$0" ||
24899$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24900 X"$0" : 'X\(//\)$' \| \
24901 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24902echo X/"$0" |
24903 sed '/^.*\/\([^/][^/]*\)\/*$/{
24904 s//\1/
24905 q
24906 }
24907 /^X\/\(\/\/\)$/{
24908 s//\1/
24909 q
24910 }
24911 /^X\/\(\/\).*/{
24912 s//\1/
24913 q
24914 }
24915 s/.*/./; q'`
24916
24917# CDPATH.
24918$as_unset CDPATH
24919
24920
24921
Martin v. Löwis11437992002-04-12 09:54:03 +000024922 as_lineno_1=$LINENO
24923 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024924 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024925 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024926
Martin v. Löwis11437992002-04-12 09:54:03 +000024927 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24928 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929 # line-number line after each line using $LINENO; the second 'sed'
24930 # does the real work. The second script uses 'N' to pair each
24931 # line-number line with the line containing $LINENO, and appends
24932 # trailing '-' during substitution so that $LINENO is not a special
24933 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024934 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 # scripts with optimization help from Paolo Bonzini. Blame Lee
24936 # E. McMahon (1931-1989) for sed's syntax. :-)
24937 sed -n '
24938 p
24939 /[$]LINENO/=
24940 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024941 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024942 s/[$]LINENO.*/&-/
24943 t lineno
24944 b
24945 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024946 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024947 :loop
24948 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024949 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024950 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024951 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024952 chmod +x "$as_me.lineno" ||
24953 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024954 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024955
Martin v. Löwis11437992002-04-12 09:54:03 +000024956 # Don't try to exec as it changes $[0], causing all sort of problems
24957 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024958 # original and so on. Autoconf is especially sensitive to this).
24959 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024960 # Exit status is that of the last command.
24961 exit
24962}
24963
24964
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24966 as_dirname=dirname
24967else
24968 as_dirname=false
24969fi
24970
24971ECHO_C= ECHO_N= ECHO_T=
24972case `echo -n x` in
24973-n*)
24974 case `echo 'x\c'` in
24975 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24976 *) ECHO_C='\c';;
24977 esac;;
24978*)
24979 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024980esac
24981
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982if expr a : '\(a\)' >/dev/null 2>&1 &&
24983 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024984 as_expr=expr
24985else
24986 as_expr=false
24987fi
24988
24989rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024990if test -d conf$$.dir; then
24991 rm -f conf$$.dir/conf$$.file
24992else
24993 rm -f conf$$.dir
24994 mkdir conf$$.dir
24995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024996echo >conf$$.file
24997if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998 as_ln_s='ln -s'
24999 # ... but there are two gotchas:
25000 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25001 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25002 # In both cases, we have to default to `cp -p'.
25003 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025004 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025005elif ln conf$$.file conf$$ 2>/dev/null; then
25006 as_ln_s=ln
25007else
25008 as_ln_s='cp -p'
25009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025010rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25011rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025012
Skip Montanaro6dead952003-09-25 14:50:04 +000025013if mkdir -p . 2>/dev/null; then
25014 as_mkdir_p=:
25015else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025016 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025017 as_mkdir_p=false
25018fi
25019
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020if test -x / >/dev/null 2>&1; then
25021 as_test_x='test -x'
25022else
25023 if ls -dL / >/dev/null 2>&1; then
25024 as_ls_L_option=L
25025 else
25026 as_ls_L_option=
25027 fi
25028 as_test_x='
25029 eval sh -c '\''
25030 if test -d "$1"; then
25031 test -d "$1/.";
25032 else
25033 case $1 in
25034 -*)set "./$1";;
25035 esac;
25036 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25037 ???[sx]*):;;*)false;;esac;fi
25038 '\'' sh
25039 '
25040fi
25041as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025042
25043# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025044as_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 +000025045
25046# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025047as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025048
25049
Martin v. Löwis11437992002-04-12 09:54:03 +000025050exec 6>&1
25051
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025053# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025054# values after options handling.
25055ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025056This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025057generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025058
25059 CONFIG_FILES = $CONFIG_FILES
25060 CONFIG_HEADERS = $CONFIG_HEADERS
25061 CONFIG_LINKS = $CONFIG_LINKS
25062 CONFIG_COMMANDS = $CONFIG_COMMANDS
25063 $ $0 $@
25064
Martin v. Löwiseba40652007-08-30 20:10:57 +000025065on `(hostname || uname -n) 2>/dev/null | sed 1q`
25066"
25067
Martin v. Löwis11437992002-04-12 09:54:03 +000025068_ACEOF
25069
Martin v. Löwiseba40652007-08-30 20:10:57 +000025070cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025071# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025072config_files="$ac_config_files"
25073config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025074
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025076
25077cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025078ac_cs_usage="\
25079\`$as_me' instantiates files from templates according to the
25080current configuration.
25081
25082Usage: $0 [OPTIONS] [FILE]...
25083
25084 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025085 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025086 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025087 -d, --debug don't remove temporary files
25088 --recheck update $as_me by reconfiguring in the same conditions
25089 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025090 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025091 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025092 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025093
25094Configuration files:
25095$config_files
25096
25097Configuration headers:
25098$config_headers
25099
25100Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025101
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025103cat >>$CONFIG_STATUS <<_ACEOF
25104ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025105python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025106configured by $0, generated by GNU Autoconf 2.61,
25107 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025108
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025110This config.status script is free software; the Free Software Foundation
25111gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025112
25113ac_pwd='$ac_pwd'
25114srcdir='$srcdir'
25115INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025116_ACEOF
25117
25118cat >>$CONFIG_STATUS <<\_ACEOF
25119# If no file are specified by the user, then we need to provide default
25120# value. By we need to know if files were specified by the user.
25121ac_need_defaults=:
25122while test $# != 0
25123do
25124 case $1 in
25125 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025126 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25127 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025128 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025129 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025130 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025131 ac_option=$1
25132 ac_optarg=$2
25133 ac_shift=shift
25134 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025135 esac
25136
Skip Montanaro6dead952003-09-25 14:50:04 +000025137 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025138 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025139 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25140 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025141 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25142 echo "$ac_cs_version"; exit ;;
25143 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025144 debug=: ;;
25145 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025146 $ac_shift
25147 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025148 ac_need_defaults=false;;
25149 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025150 $ac_shift
25151 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025152 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153 --he | --h)
25154 # Conflict between --help and --header
25155 { echo "$as_me: error: ambiguous option: $1
25156Try \`$0 --help' for more information." >&2
25157 { (exit 1); exit 1; }; };;
25158 --help | --hel | -h )
25159 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025160 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25161 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25162 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025163
25164 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025165 -*) { echo "$as_me: error: unrecognized option: $1
25166Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025167 { (exit 1); exit 1; }; } ;;
25168
Martin v. Löwiseba40652007-08-30 20:10:57 +000025169 *) ac_config_targets="$ac_config_targets $1"
25170 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025171
25172 esac
25173 shift
25174done
25175
Skip Montanaro6dead952003-09-25 14:50:04 +000025176ac_configure_extra_args=
25177
25178if $ac_cs_silent; then
25179 exec 6>/dev/null
25180 ac_configure_extra_args="$ac_configure_extra_args --silent"
25181fi
25182
25183_ACEOF
25184cat >>$CONFIG_STATUS <<_ACEOF
25185if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025186 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25187 CONFIG_SHELL=$SHELL
25188 export CONFIG_SHELL
25189 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025190fi
25191
Martin v. Löwis11437992002-04-12 09:54:03 +000025192_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193cat >>$CONFIG_STATUS <<\_ACEOF
25194exec 5>>config.log
25195{
25196 echo
25197 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25198## Running $as_me. ##
25199_ASBOX
25200 echo "$ac_log"
25201} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025202
Martin v. Löwiseba40652007-08-30 20:10:57 +000025203_ACEOF
25204cat >>$CONFIG_STATUS <<_ACEOF
25205_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025206
25207cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025208
25209# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025210for ac_config_target in $ac_config_targets
25211do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025212 case $ac_config_target in
25213 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25214 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25215 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25216 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025217 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25218 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025219 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25220 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25221
Martin v. Löwis11437992002-04-12 09:54:03 +000025222 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25223echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25224 { (exit 1); exit 1; }; };;
25225 esac
25226done
25227
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228
Martin v. Löwis11437992002-04-12 09:54:03 +000025229# If the user did not use the arguments to specify the items to instantiate,
25230# then the envvar interface is used. Set only those that are not.
25231# We use the long form for the default assignment because of an extremely
25232# bizarre bug on SunOS 4.1.3.
25233if $ac_need_defaults; then
25234 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25235 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25236fi
25237
Skip Montanaro6dead952003-09-25 14:50:04 +000025238# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025239# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025240# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025241# Hook for its removal unless debugging.
25242# Note that there is a small window in which the directory will not be cleaned:
25243# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025244$debug ||
25245{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025246 tmp=
25247 trap 'exit_status=$?
25248 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25249' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 trap '{ (exit 1); exit 1; }' 1 2 13 15
25251}
Martin v. Löwis11437992002-04-12 09:54:03 +000025252# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025253
Martin v. Löwis11437992002-04-12 09:54:03 +000025254{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025256 test -n "$tmp" && test -d "$tmp"
25257} ||
25258{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025259 tmp=./conf$$-$RANDOM
25260 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025261} ||
25262{
Skip Montanaro6dead952003-09-25 14:50:04 +000025263 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025264 { (exit 1); exit 1; }
25265}
25266
Martin v. Löwis11437992002-04-12 09:54:03 +000025267#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025269#
25270
25271# No need to generate the scripts if there are no CONFIG_FILES.
25272# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025274
25275_ACEOF
25276
Martin v. Löwiseba40652007-08-30 20:10:57 +000025277
25278
25279ac_delim='%!_!# '
25280for ac_last_try in false false false false false :; do
25281 cat >conf$$subs.sed <<_ACEOF
25282SHELL!$SHELL$ac_delim
25283PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25284PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25285PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25286PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25287PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25288PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25289exec_prefix!$exec_prefix$ac_delim
25290prefix!$prefix$ac_delim
25291program_transform_name!$program_transform_name$ac_delim
25292bindir!$bindir$ac_delim
25293sbindir!$sbindir$ac_delim
25294libexecdir!$libexecdir$ac_delim
25295datarootdir!$datarootdir$ac_delim
25296datadir!$datadir$ac_delim
25297sysconfdir!$sysconfdir$ac_delim
25298sharedstatedir!$sharedstatedir$ac_delim
25299localstatedir!$localstatedir$ac_delim
25300includedir!$includedir$ac_delim
25301oldincludedir!$oldincludedir$ac_delim
25302docdir!$docdir$ac_delim
25303infodir!$infodir$ac_delim
25304htmldir!$htmldir$ac_delim
25305dvidir!$dvidir$ac_delim
25306pdfdir!$pdfdir$ac_delim
25307psdir!$psdir$ac_delim
25308libdir!$libdir$ac_delim
25309localedir!$localedir$ac_delim
25310mandir!$mandir$ac_delim
25311DEFS!$DEFS$ac_delim
25312ECHO_C!$ECHO_C$ac_delim
25313ECHO_N!$ECHO_N$ac_delim
25314ECHO_T!$ECHO_T$ac_delim
25315LIBS!$LIBS$ac_delim
25316build_alias!$build_alias$ac_delim
25317host_alias!$host_alias$ac_delim
25318target_alias!$target_alias$ac_delim
25319VERSION!$VERSION$ac_delim
25320SOVERSION!$SOVERSION$ac_delim
25321CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25322UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025323ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025324PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025325PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025326PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25327PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25328PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25329FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25330FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25331FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25332FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25333FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25334MACHDEP!$MACHDEP$ac_delim
25335SGI_ABI!$SGI_ABI$ac_delim
25336EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25337EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25338CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25339EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25340CC!$CC$ac_delim
25341CFLAGS!$CFLAGS$ac_delim
25342LDFLAGS!$LDFLAGS$ac_delim
25343CPPFLAGS!$CPPFLAGS$ac_delim
25344ac_ct_CC!$ac_ct_CC$ac_delim
25345EXEEXT!$EXEEXT$ac_delim
25346OBJEXT!$OBJEXT$ac_delim
25347CXX!$CXX$ac_delim
25348MAINCC!$MAINCC$ac_delim
25349CPP!$CPP$ac_delim
25350GREP!$GREP$ac_delim
25351EGREP!$EGREP$ac_delim
25352BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25353LIBRARY!$LIBRARY$ac_delim
25354LDLIBRARY!$LDLIBRARY$ac_delim
25355DLLLIBRARY!$DLLLIBRARY$ac_delim
25356BLDLIBRARY!$BLDLIBRARY$ac_delim
25357LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25358INSTSONAME!$INSTSONAME$ac_delim
25359RUNSHARED!$RUNSHARED$ac_delim
25360LINKCC!$LINKCC$ac_delim
25361RANLIB!$RANLIB$ac_delim
25362AR!$AR$ac_delim
25363SVNVERSION!$SVNVERSION$ac_delim
25364INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25365INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25366INSTALL_DATA!$INSTALL_DATA$ac_delim
25367LN!$LN$ac_delim
25368OPT!$OPT$ac_delim
25369BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025370UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025371OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25372LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25373SO!$SO$ac_delim
25374LDSHARED!$LDSHARED$ac_delim
25375BLDSHARED!$BLDSHARED$ac_delim
25376CCSHARED!$CCSHARED$ac_delim
25377LINKFORSHARED!$LINKFORSHARED$ac_delim
25378CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379_ACEOF
25380
25381 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25382 break
25383 elif $ac_last_try; then
25384 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25385echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25386 { (exit 1); exit 1; }; }
25387 else
25388 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025389 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025390done
25391
25392ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25393if test -n "$ac_eof"; then
25394 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25395 ac_eof=`expr $ac_eof + 1`
25396fi
25397
25398cat >>$CONFIG_STATUS <<_ACEOF
25399cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25400/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25401_ACEOF
25402sed '
25403s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25404s/^/s,@/; s/!/@,|#_!!_#|/
25405:n
25406t n
25407s/'"$ac_delim"'$/,g/; t
25408s/$/\\/; p
25409N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25410' >>$CONFIG_STATUS <conf$$subs.sed
25411rm -f conf$$subs.sed
25412cat >>$CONFIG_STATUS <<_ACEOF
25413CEOF$ac_eof
25414_ACEOF
25415
25416
25417ac_delim='%!_!# '
25418for ac_last_try in false false false false false :; do
25419 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025420SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025421USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025422SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025423USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25424LDLAST!$LDLAST$ac_delim
25425THREADOBJ!$THREADOBJ$ac_delim
25426DLINCLDIR!$DLINCLDIR$ac_delim
25427DYNLOADFILE!$DYNLOADFILE$ac_delim
25428MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25429TRUE!$TRUE$ac_delim
25430LIBOBJS!$LIBOBJS$ac_delim
25431HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25432HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25433HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25434HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25435HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25436LIBM!$LIBM$ac_delim
25437LIBC!$LIBC$ac_delim
25438UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25439THREADHEADERS!$THREADHEADERS$ac_delim
25440SRCDIRS!$SRCDIRS$ac_delim
25441LTLIBOBJS!$LTLIBOBJS$ac_delim
25442_ACEOF
25443
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025444 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025445 break
25446 elif $ac_last_try; then
25447 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25448echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25449 { (exit 1); exit 1; }; }
25450 else
25451 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25452 fi
25453done
25454
25455ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25456if test -n "$ac_eof"; then
25457 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25458 ac_eof=`expr $ac_eof + 1`
25459fi
25460
25461cat >>$CONFIG_STATUS <<_ACEOF
25462cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25463/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25464_ACEOF
25465sed '
25466s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25467s/^/s,@/; s/!/@,|#_!!_#|/
25468:n
25469t n
25470s/'"$ac_delim"'$/,g/; t
25471s/$/\\/; p
25472N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25473' >>$CONFIG_STATUS <conf$$subs.sed
25474rm -f conf$$subs.sed
25475cat >>$CONFIG_STATUS <<_ACEOF
25476:end
25477s/|#_!!_#|//g
25478CEOF$ac_eof
25479_ACEOF
25480
25481
25482# VPATH may cause trouble with some makes, so we remove $(srcdir),
25483# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25484# trailing colons and then remove the whole line if VPATH becomes empty
25485# (actually we leave an empty line to preserve line numbers).
25486if test "x$srcdir" = x.; then
25487 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25488s/:*\$(srcdir):*/:/
25489s/:*\${srcdir}:*/:/
25490s/:*@srcdir@:*/:/
25491s/^\([^=]*=[ ]*\):*/\1/
25492s/:*$//
25493s/^[^=]*=[ ]*$//
25494}'
25495fi
25496
25497cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025498fi # test -n "$CONFIG_FILES"
25499
Martin v. Löwiseba40652007-08-30 20:10:57 +000025500
25501for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25502do
25503 case $ac_tag in
25504 :[FHLC]) ac_mode=$ac_tag; continue;;
25505 esac
25506 case $ac_mode$ac_tag in
25507 :[FHL]*:*);;
25508 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25509echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25510 { (exit 1); exit 1; }; };;
25511 :[FH]-) ac_tag=-:-;;
25512 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25513 esac
25514 ac_save_IFS=$IFS
25515 IFS=:
25516 set x $ac_tag
25517 IFS=$ac_save_IFS
25518 shift
25519 ac_file=$1
25520 shift
25521
25522 case $ac_mode in
25523 :L) ac_source=$1;;
25524 :[FH])
25525 ac_file_inputs=
25526 for ac_f
25527 do
25528 case $ac_f in
25529 -) ac_f="$tmp/stdin";;
25530 *) # Look for the file first in the build tree, then in the source tree
25531 # (if the path is not absolute). The absolute path cannot be DOS-style,
25532 # because $ac_f cannot contain `:'.
25533 test -f "$ac_f" ||
25534 case $ac_f in
25535 [\\/$]*) false;;
25536 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25537 esac ||
25538 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25539echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25540 { (exit 1); exit 1; }; };;
25541 esac
25542 ac_file_inputs="$ac_file_inputs $ac_f"
25543 done
25544
25545 # Let's still pretend it is `configure' which instantiates (i.e., don't
25546 # use $as_me), people would be surprised to read:
25547 # /* config.h. Generated by config.status. */
25548 configure_input="Generated from "`IFS=:
25549 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25550 if test x"$ac_file" != x-; then
25551 configure_input="$ac_file. $configure_input"
25552 { echo "$as_me:$LINENO: creating $ac_file" >&5
25553echo "$as_me: creating $ac_file" >&6;}
25554 fi
25555
25556 case $ac_tag in
25557 *:-:* | *:-) cat >"$tmp/stdin";;
25558 esac
25559 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025560 esac
25561
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025563$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025564 X"$ac_file" : 'X\(//\)[^/]' \| \
25565 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025566 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025567echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025568 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25569 s//\1/
25570 q
25571 }
25572 /^X\(\/\/\)[^/].*/{
25573 s//\1/
25574 q
25575 }
25576 /^X\(\/\/\)$/{
25577 s//\1/
25578 q
25579 }
25580 /^X\(\/\).*/{
25581 s//\1/
25582 q
25583 }
25584 s/.*/./; q'`
25585 { as_dir="$ac_dir"
25586 case $as_dir in #(
25587 -*) as_dir=./$as_dir;;
25588 esac
25589 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025590 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025591 while :; do
25592 case $as_dir in #(
25593 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25594 *) as_qdir=$as_dir;;
25595 esac
25596 as_dirs="'$as_qdir' $as_dirs"
25597 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025598$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025599 X"$as_dir" : 'X\(//\)[^/]' \| \
25600 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025601 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025602echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025603 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25604 s//\1/
25605 q
25606 }
25607 /^X\(\/\/\)[^/].*/{
25608 s//\1/
25609 q
25610 }
25611 /^X\(\/\/\)$/{
25612 s//\1/
25613 q
25614 }
25615 /^X\(\/\).*/{
25616 s//\1/
25617 q
25618 }
25619 s/.*/./; q'`
25620 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025621 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025622 test -z "$as_dirs" || eval "mkdir $as_dirs"
25623 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25624echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025625 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025626 ac_builddir=.
25627
Martin v. Löwiseba40652007-08-30 20:10:57 +000025628case "$ac_dir" in
25629.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25630*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025631 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632 # A ".." for each directory in $ac_dir_suffix.
25633 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25634 case $ac_top_builddir_sub in
25635 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25636 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25637 esac ;;
25638esac
25639ac_abs_top_builddir=$ac_pwd
25640ac_abs_builddir=$ac_pwd$ac_dir_suffix
25641# for backward compatibility:
25642ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025643
25644case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025645 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025646 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025647 ac_top_srcdir=$ac_top_builddir_sub
25648 ac_abs_top_srcdir=$ac_pwd ;;
25649 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025650 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025651 ac_top_srcdir=$srcdir
25652 ac_abs_top_srcdir=$srcdir ;;
25653 *) # Relative name.
25654 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25655 ac_top_srcdir=$ac_top_build_prefix$srcdir
25656 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025657esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025658ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025659
Martin v. Löwis11437992002-04-12 09:54:03 +000025660
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661 case $ac_mode in
25662 :F)
25663 #
25664 # CONFIG_FILE
25665 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025666
25667 case $INSTALL in
25668 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025669 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025670 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025671_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025672
25673cat >>$CONFIG_STATUS <<\_ACEOF
25674# If the template does not know about datarootdir, expand it.
25675# FIXME: This hack should be removed a few years after 2.60.
25676ac_datarootdir_hack=; ac_datarootdir_seen=
25677
25678case `sed -n '/datarootdir/ {
25679 p
25680 q
25681}
25682/@datadir@/p
25683/@docdir@/p
25684/@infodir@/p
25685/@localedir@/p
25686/@mandir@/p
25687' $ac_file_inputs` in
25688*datarootdir*) ac_datarootdir_seen=yes;;
25689*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25690 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25691echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25692_ACEOF
25693cat >>$CONFIG_STATUS <<_ACEOF
25694 ac_datarootdir_hack='
25695 s&@datadir@&$datadir&g
25696 s&@docdir@&$docdir&g
25697 s&@infodir@&$infodir&g
25698 s&@localedir@&$localedir&g
25699 s&@mandir@&$mandir&g
25700 s&\\\${datarootdir}&$datarootdir&g' ;;
25701esac
25702_ACEOF
25703
25704# Neutralize VPATH when `$srcdir' = `.'.
25705# Shell code in configure.ac might set extrasub.
25706# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025707cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025708 sed "$ac_vpsub
25709$extrasub
25710_ACEOF
25711cat >>$CONFIG_STATUS <<\_ACEOF
25712:t
25713/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025714s&@configure_input@&$configure_input&;t t
25715s&@top_builddir@&$ac_top_builddir_sub&;t t
25716s&@srcdir@&$ac_srcdir&;t t
25717s&@abs_srcdir@&$ac_abs_srcdir&;t t
25718s&@top_srcdir@&$ac_top_srcdir&;t t
25719s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25720s&@builddir@&$ac_builddir&;t t
25721s&@abs_builddir@&$ac_abs_builddir&;t t
25722s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25723s&@INSTALL@&$ac_INSTALL&;t t
25724$ac_datarootdir_hack
25725" $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 +000025726
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25728 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25729 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25730 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25731which seems to be undefined. Please make sure it is defined." >&5
25732echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25733which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025734
Martin v. Löwiseba40652007-08-30 20:10:57 +000025735 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025736 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025737 -) cat "$tmp/out"; rm -f "$tmp/out";;
25738 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025739 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025740 ;;
25741 :H)
25742 #
25743 # CONFIG_HEADER
25744 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025745_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025746
Martin v. Löwiseba40652007-08-30 20:10:57 +000025747# Transform confdefs.h into a sed script `conftest.defines', that
25748# substitutes the proper values into config.h.in to produce config.h.
25749rm -f conftest.defines conftest.tail
25750# First, append a space to every undef/define line, to ease matching.
25751echo 's/$/ /' >conftest.defines
25752# Then, protect against being on the right side of a sed subst, or in
25753# an unquoted here document, in config.status. If some macros were
25754# called several times there might be several #defines for the same
25755# symbol, which is useless. But do not sort them, since the last
25756# AC_DEFINE must be honored.
25757ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25758# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25759# NAME is the cpp macro being defined, VALUE is the value it is being given.
25760# PARAMS is the parameter list in the macro definition--in most cases, it's
25761# just an empty string.
25762ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25763ac_dB='\\)[ (].*,\\1define\\2'
25764ac_dC=' '
25765ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025766
Martin v. Löwiseba40652007-08-30 20:10:57 +000025767uniq confdefs.h |
25768 sed -n '
25769 t rset
25770 :rset
25771 s/^[ ]*#[ ]*define[ ][ ]*//
25772 t ok
25773 d
25774 :ok
25775 s/[\\&,]/\\&/g
25776 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25777 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25778 ' >>conftest.defines
25779
25780# Remove the space that was appended to ease matching.
25781# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025782# example, in the case of _POSIX_SOURCE, which is predefined and required
25783# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025784# (The regexp can be short, since the line contains either #define or #undef.)
25785echo 's/ $//
25786s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025787
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788# Break up conftest.defines:
25789ac_max_sed_lines=50
25790
25791# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25792# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25793# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25794# et cetera.
25795ac_in='$ac_file_inputs'
25796ac_out='"$tmp/out1"'
25797ac_nxt='"$tmp/out2"'
25798
25799while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025800do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025801 # Write a here document:
25802 cat >>$CONFIG_STATUS <<_ACEOF
25803 # First, check the format of the line:
25804 cat >"\$tmp/defines.sed" <<\\CEOF
25805/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25806/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25807b
25808:def
25809_ACEOF
25810 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025811 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025812 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25813 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25814 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25815 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025816 rm -f conftest.defines
25817 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025818done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025820
Martin v. Löwiseba40652007-08-30 20:10:57 +000025821echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025822cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824 echo "/* $configure_input */" >"$tmp/config.h"
25825 cat "$ac_result" >>"$tmp/config.h"
25826 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025827 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25828echo "$as_me: $ac_file is unchanged" >&6;}
25829 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025830 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025832 fi
25833 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025834 echo "/* $configure_input */"
25835 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025836 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025837 rm -f "$tmp/out12"
25838 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025839
Martin v. Löwiseba40652007-08-30 20:10:57 +000025840
25841 esac
25842
25843done # for ac_tag
25844
Guido van Rossum627b2d71993-12-24 10:39:16 +000025845
Martin v. Löwis11437992002-04-12 09:54:03 +000025846{ (exit 0); exit 0; }
25847_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025848chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025849ac_clean_files=$ac_clean_files_save
25850
25851
25852# configure is writing to config.log, and then calls config.status.
25853# config.status does its own redirection, appending to config.log.
25854# Unfortunately, on DOS this fails, as config.log is still kept open
25855# by configure, so config.status won't be able to write to it; its
25856# output is simply discarded. So we exec the FD to /dev/null,
25857# effectively closing config.log, so it can be properly (re)opened and
25858# appended to by config.status. When coming back to configure, we
25859# need to make the FD available again.
25860if test "$no_create" != yes; then
25861 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025862 ac_config_status_args=
25863 test "$silent" = yes &&
25864 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025865 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025866 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025867 exec 5>>config.log
25868 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25869 # would make configure fail if this is the last instruction.
25870 $ac_cs_success || { (exit 1); exit 1; }
25871fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025872
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025873
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025874echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025875if test ! -f Modules/Setup
25876then
25877 cp $srcdir/Modules/Setup.dist Modules/Setup
25878fi
25879
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025880echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025881if test ! -f Modules/Setup.local
25882then
25883 echo "# Edit this file for local setup changes" >Modules/Setup.local
25884fi
25885
25886echo "creating Makefile"
25887$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25888 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025889 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025890
25891case $ac_sys_system in
25892BeOS)
25893 { echo "$as_me:$LINENO: WARNING:
25894
25895 Support for BeOS is deprecated as of Python 2.6.
25896 See PEP 11 for the gory details.
25897 " >&5
25898echo "$as_me: WARNING:
25899
25900 Support for BeOS is deprecated as of Python 2.6.
25901 See PEP 11 for the gory details.
25902 " >&2;}
25903 ;;
25904*) ;;
25905esac
25906
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025907mv config.c Modules